Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / terminate called after throwing an instance of 'StdFail_NotDone'

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



// TopoDS_Wire WaterLineWire = TopoDS::Wire(l_brepinter.Shape());

// 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);

//Reflect or mirror the wire

gp_Pnt aOrigin(xmin , ymin , z);
gp_Dir xDir(xmax , ymin , z);
gp_Ax1 xAxis(aOrigin , xDir);

//gp_Ax1 xAxis = gp::OX();
gp_Trsf aTrsf;
aTrsf.SetMirror(xAxis);

BRepBuilderAPI_Transform aBRepTrsf(WaterLineWire , aTrsf);

TopoDS_Shape aMirroredShape = aBRepTrsf.Shape();

TopoDS_Wire aMirroredWire = TopoDS::Wire(aBRepTrsf.Shape());

BRepBuilderAPI_MakeWire mkWire;

mkWire.Add(WaterLineWire);
mkWire.Add(aMirroredWire);

TopoDS_Wire myWireProfile = mkWire.Wire();

TopoDS_Face myFaceProfile = BRepBuilderAPI_MakeFace(myWireProfile);



//Global properties of the geometric components
GProp_GProps l_gprop;
BRepGProp::SurfaceProperties(myFaceProfile,l_gprop);
Standard_Real l_rArea = l_gprop.Mass();
//BRepGProp::LinearProperties(WaterLineSurface,l_gprop);
Standard_Real l_rPeri = l_gprop.Mass();
Standard_Real l_rDia = 4*l_rArea/l_rPeri;
// qDebug ()<<l_rArea;

}
Thank so much for help, any information will be appreciated
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map