Method: RADMesh::STL#fix_normal_directions!
- Defined in:
- lib/radmesh/stl.rb
#fix_normal_directions! ⇒ STL
There is also the same method without ! working as expected. It is not in this reference guide, because it is automatically generated.
Check and fix if necessary the directions of the facets.
This only deals with whether the vertices of all the facets are oriented clockwise or counterclockwise, it doesn’t check or modify the value of the normal vector. Every facet should have its vertices defined in a counterclockwise order when looked at from the outside of the part. This option will orient all of the vertices so that they are all facing in the same direction. However, it it possible that this option will make all of the facets facet inwards instead of outwards. The algorithm tries to get a clue of which direction is inside and outside by checking the value of the normal vector so the chance is very good that the resulting mesh will be correct. However, it doesn’t explicitly check to find which direction is inside and which is outside.
277 278 279 280 |
# File 'lib/radmesh/stl.rb', line 277 def fix_normal_directions! CADMesh.stl_fix_normal_directions(@stl_ptr) self end |