Method: RADMesh::STL#write_ascii

Defined in:
lib/radmesh/stl.rb

#write_ascii(path, label = 'admesh') ⇒ STL

Save the contents of the instance to an ASCII STL file

Parameters:

  • path (String)

    path for the output file

  • label (String) (defaults to: 'admesh')

    label used internally in the output file

Returns:

  • (STL)

    returns itself

Raises:

  • (IOError)

    when ADMesh cannot save the file



109
110
111
112
113
# File 'lib/radmesh/stl.rb', line 109

def write_ascii(path, label = 'admesh')
  CADMesh.stl_write_ascii(@stl_ptr, path, label)
  error_control_proc(IOError, "Could not write to #{path}").call
  self
end