My problem is to cut irregular object made of surfaces (imported as IGES file) at different sections and to calculate the section area at different position (say x1, x2, x3, and so on)! ofcourse using OCC!
Does anybody worked same, i need your help,
Sometime in past I had used following code to do the same thing. Hope this will help. You could achieve same result using BRepAlgoAPI_Section.
BRepAlgoAPI_Common l_brepCom(l_tdShape,l_tdCutPln);//l_tdShape is object from IGES file, l_tdCutPln is topological object of cut plane
Thank you very much for helpfull infomations. It helps a lot! But in my case, i have a surface and plane! I used BRepAlgoAPI_Section based on your suggestions. obviously the intersection is something like a curve or edge/wire. I need to mirrow this mirror this wire and finally should make a face. The face from mirroredwire and wire. Then to calculate the area, and other properties.
I succeeded sectioning, and mirror! and couldn't make the two wires together! So that to construct face and shape to calculate properties.
In addition: BRepGProp::SurfaceProperties(myFaceProfile,l_gprop); // myFaceProfile should be TOPO_DOS-SHape how to make shape from face!
I tried as follow!
The code part
BRepAlgo_Section l_brepinter(shape, aSurface, PerformNow=Standard_True); // shape is imported and the aSurface (geomtric surface)
TopoDS_Shape l_tdCommon = l_brepinter.Shape(); // l_tdCommon the intersection between shape and aSurface
// Now to create the face to calculate the waterline area
TopoDS_Edge WaterLineEdge = TopoDS::Edge(aExpEdge.Current());
TopoDS_Wire WaterLineWire = BRepBuilderAPI_MakeWire(WaterLineEdge);
TopoDS_Face WaterLineFace = BRepBuilderAPI_MakeFace(WaterLineWire, false);
Handle(Geom_Surface) WaterLineSurface = BRep_Tool::Surface(WaterLineFace);