Method: RADMesh::STL#write_binary

Defined in:
lib/radmesh/stl.rb

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

Save the contents of the instance to a binary 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

[View source]

121
122
123
124
125
# File 'lib/radmesh/stl.rb', line 121

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