terminate called after throwing an instance of 'StdFail_NotDone'
terminate called after throwing an instance of 'StdFail_NotDone'
Game Milky
2012/06/06 17:36
Dear Supervisors!
I face a problem while performing the following task. The program compile without error, and finally give me an output:
terminate called after throwing an instance of 'StdFail_NotDone'
i want to have the intersection of surface and plane! I used BRepAlgoAPI_Section. obviously the intersection is something like a curve or edge/wire. I need to mirrow 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
Standard_Boolean PerformNow=Standard_False;
BRepAlgo_Section l_brepinter(shape, aSurface, PerformNow=Standard_True); // shape is imported and the aSurface (geomtric surface)
l_brepinter.ComputePCurveOn1(Standard_True);
l_brepinter.Approximation(Standard_True);
l_brepinter.Build();
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
TopExp_Explorer aExpEdge;
for(aExpEdge.Init(l_tdCommon,TopAbs_EDGE);aExpEdge.More();aExpEdge.Next())
{
TopoDS_Edge WaterLineEdge = TopoDS::Edge(aExpEdge.Current());
TopLoc_Location aLocation;
TopoDS_Wire WaterLineWire = BRepBuilderAPI_MakeWire(WaterLineEdge);
TopoDS_Face WaterLineFace = BRepBuilderAPI_MakeFace(WaterLineWire, false);
Handle(Geom_Surface) WaterLineSurface = BRep_Tool::Surface(WaterLineFace);