Demonstrates how to create a projection of a 3D model, print projection info, and export the generated projection mesh.
This example demonstrates how to create a projection of a 3D model using the projector tool Projector_PolyProjector.
The console application:
Application needs 2 input arguments to run:
For more information about projector visit Projection Creation page.
To explore the model and process ModelData.Part , it's need to create an inheritor from the ModelData.ModelElementVoidVisitor and override the part processing method void operator() (const ModelData::Part& thePart). For this purpose, the ProjectionComputer class was created.
For each ModelData.Part , the projection is created in the specified direction using Projector_PolyProjector . The returned Projector_Projection provides:
Area() - total projection area OuterPerimeter() - outer boundary perimeter Mesh() - triangulated projection mesh, suitable for export to STLBelow is the example output for model from ./examples/models/Fresamento_CAM1_v3.stp:
Model |
Y Projection |
X Projection |
Z Projection |