Method: RADMesh::STL#open_merge!
- Defined in:
- lib/radmesh/stl.rb
#open_merge!(path) ⇒ STL
There is also the same method without ! working as expected. It is not in this reference guide, because it is automatically generated.
Due to some limitations in the C ADMesh library, when the exception occurs it is no longer safe to touch the object. If you are not sure the file is readable and parsable, check before, or use the method without ! and throw the object away when necessary.
Merge the specified file with self.
No translation is done, so if, for example, a file was merged with itself, the resulting file would end up with two meshes exactly the same, occupying exactly the same space. So generally, translations need to be done to the files to be merged so that when the two meshes are merged into one, the two resulting parts are properly spaced. If you know the nature of the parts to be merged, it is possible to “nest” one part inside the other. Note, however, that no warnings will be given if one part intersects with the other.
It is possible to place one part against another, with no space in between, but you will still end up with two separately defined parts. If such a mesh was made on a rapid-prototyping machine, the result would depend on the nature of the machine. Machines that use a photopolymer would produce a single solid part because the two parts would be “bonded” during the build process. Machines that use a cutting process would yield two or more parts.
559 560 561 562 563 |
# File 'lib/radmesh/stl.rb', line 559 def open_merge!(path) CADMesh.stl_open_merge(@stl_ptr, path) error_control_proc(IOError, "Could not open #{path}").call self end |