Method: RADMesh::STL#initialize
- Defined in:
- lib/radmesh/stl.rb
permalink #initialize(path = nil) ⇒ STL
Returns a new instance of STL.
32 33 34 35 36 37 38 39 40 |
# File 'lib/radmesh/stl.rb', line 32 def initialize(path = nil) @stl_ptr = FFI::MemoryPointer.new CADMesh::STLFile, 1 @stl_value = CADMesh::STLFile.new @stl_ptr init if path.nil? open path unless path.nil? ObjectSpace.define_finalizer self, self.class.finalize(@stl_ptr) @exact = false @shared = false end |