Method: RADMesh::STL#write_obj

Defined in:
lib/radmesh/stl.rb

#write_obj(path) ⇒ STL

Save the contents of the instance to an OBJ file

Parameters:

  • path (String)

    path for the output file

Returns:

  • (STL)

    returns itself

Raises:

  • (IOError)

    when ADMesh cannot save the file

[View source]

132
133
134
135
136
137
# File 'lib/radmesh/stl.rb', line 132

def write_obj(path)
  generate_shared_vertices! unless @shared
  CADMesh.stl_write_obj(@stl_ptr, path)
  error_control_proc(IOError, "Could not write to #{path}").call
  self
end