Demonstrates how to create a projection of a 3D model and returns information about it.
In this example demonstrates how to create a projection of a 3D model using projector tool (Projector_PolyProjector). For this purpose, used a console application that imports a model, traverses through unique ModelData::Part , creates and runs Projector_PolyProjector and returns information about the projection into Projector_PolyData. Creating a projection will be performed for each ModelData::Part , but only for the scope of accepted geometries.
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 SceneGraphPolyProjector
class was created.
After, the projection of the model Projector_PolyData is created in the specified direction using Projector_PolyProjector and the information about this projection is printed to the console:
To traverse parts of the imported model, the ModelData::ModelElementVoidVisitor class is used:
Below is the example output for model from ./examples/models/Fresamento_CAM1_v3.stp
: