How to create a section view?

How to create a section view? See the attached picture NecessaryResult.png.

My Steps (MySteps.png):
1) Create or load the basic model (TopoDS_Shape baseModel)
2) Create a section model (TopoDS_Shape sectionModel) using BRepAlgoAPI_Common or BRepAlgoAPI_Cut
3) Project the section model onto the surface using HLRBRep_Algo and HLRAlgo_Projector

All right? Or are there other ways to create view sections?

Hugues Delorme's picture

Hello,

    Maybe clipping planes would be easier ?

    See V3d_View::AddClipPlane() and Graphic3d_ClipPlane.

    You can set the capping aspect also.

Dmitrii Baranov's picture

I can use clipping plane to get a section model (see "sectionModel" on picture MySteps.png). But what to do next? Should I do a projection of the model or not? Maybe I shouldn't have to project the model onto the plane (HLRAlgo_Projector), and must switch on mode wireframe?