MantisBT - Community
View Issue Details
0023999Community[OCCT] OCCT:Modeling Algorithmspublic2013-05-28 15:362014-02-12 13:31
[OCCT] 6.6.0 
Not needed
0023999: Error in BRepAlgoAPI_Section to compute the intersect line between two faces
Recently, we worked on a program that used BRepAlgoAPI_Section to compute the intersect line between two faces.

And then, transfer the intersect line to bspline curve.

We used like this:

BRepAlgoAPI_Section sec(m_Face1,m_Face2,PerformNow);

  TopoShape = sec.Shape();
  if (!TopoShape.IsNull())

   TopExp_Explorer ex_Edge;
   for (ex_Edge.Init(TopoShape,TopAbs_EDGE);ex_Edge.More();ex_Edge.Next())

    Standard_Real Frist,Last;
    TopoDS_Edge m_Edge = TopoDS::Edge(ex_Edge.Current());
    Handle(Geom_Curve) bCurve = BRep_Tool::Curve(m_Edge,Frist,Last);
    Handle(Geom_TrimmedCurve) TrimmedCurve = new Geom_TrimmedCurve(bCurve,Frist,Last);
    Handle(Geom_BSplineCurve) m_BSplineCurve = GeomConvert::CurveToBSplineCurve(TrimmedCurve);




The faces we used are attached in attachment(surface2 and surface3).

But we find an error:

if we use opencascade to display the intersect line ,that is OK,like intersectline.igs(attachment)
but if we display in heekscad or UG or other cad software.
it is wrong,the intersect line have a part of a straight line more than before,
you can just try using heekscad.
1. read the file in attachment:surface2 and surface3.
2. using the code i have posted and make intersect
3. export the intersect line (ex:iges file)
4. read in any 3d software(UG,heekscad,ICEM and so on)
5. you can find the error in the intersect line
I think it may be the problem of BRepAlgoAPI_Section
and also this alogrithm is realy slow ,Is any alogrithm faster than BRepAlgoAPI_Section ?
No tags attached.
rar sufaces-intersectline.rar (506,776) 2013-05-28 15:36
Issue History
2013-05-28 15:36shlkl99New Issue
2013-05-28 15:36shlkl99Assigned To => ifv
2013-05-28 15:36shlkl99File Added: sufaces-intersectline.rar
2014-01-29 17:16bugmasterNote Added: 0027694
2014-01-29 17:16bugmasterAssigned Toifv => apn
2014-01-29 17:16bugmasterStatusnew => assigned
2014-02-12 13:30apnNote Added: 0027856
2014-02-12 13:31apnTest case number => Not needed
2014-02-12 13:31apnAssigned Toapn => ifv

2014-01-29 17:16   
Test case required to check issue.
2014-02-12 13:30   
It's impossible to create test case is our testing system (only display intersect line in other 3d software and see is it OK or BAD).