Hello, I'm trying to generate technicals planes of a shape, I need to know what class can I use to project a shape on a plane.
Best regards.
Fabian Hachenberg Tue, 09/13/2011 - 12:54
Hm, I'm not sure whether it's wise to use shape projection techniques to create visual representations of objects. I think Open CASCADE has different facilities to help with that. Have a look at the visualization user guide. There's a chapter about 2d visualization. This might be want you want.
However...if you insist on using shape projection...
You can use BRepProj_Projection. It's using boolean operations to calculate the projection of your shape (therefore it's rather slow). Make sure your plane is large enough to contain the projection. I think the algorithm crashes if you try to use it with an infinite plane.
Another option is to extract all edges in your shape and project each onto the plane using ProjLib_ProjectOnPlane. This is faster, but requires a lot of extra code.
Tue, 09/13/2011 - 12:54
Hm, I'm not sure whether it's wise to use shape projection techniques to create visual representations of objects. I think Open CASCADE has different facilities to help with that. Have a look at the visualization user guide. There's a chapter about 2d visualization. This might be want you want.
However...if you insist on using shape projection...
You can use BRepProj_Projection. It's using boolean operations to calculate the projection of your shape (therefore it's rather slow). Make sure your plane is large enough to contain the projection. I think the algorithm crashes if you try to use it with an infinite plane.
Another option is to extract all edges in your shape and project each onto the plane using ProjLib_ProjectOnPlane. This is faster, but requires a lot of extra code.
Tue, 09/13/2011 - 18:20
Thanks for your answer. I'm studying about 2D visualization. I think that is the best option.