MantisBT - Open CASCADE
View Issue Details
0030422Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2018-12-22 23:372019-08-12 17:45
agv 
msv 
normalmajor 
newopen 
WindowsVC++ 201532 bit
[OCCT] 7.3.0 
[OCCT] 7.5.0* 
0030422: Random behaviour of BRepAdaptor_CompCurve
With a particular wire, the class BRepAdaptor_CompCurve produces random results. My output is:

FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 3.0000, middle:( -28.048 49.225 79.887)
FP = 0.0000; LP = 1.0000, middle:( -27.613 147.673 8.412)

Reproduced in 7.3.0 / vc14 / 32bit
Similar result in OCCT 7.1 and 7.2 and also with VisualStudio 2010.
int main()
{
  TopoDS_Shape aShape;
  BRep_Builder aBld;
  for (int i = 0; i < 20; i++) {
    BRepTools::Read(aShape, "sect.brep", aBld);
    const BRepAdaptor_CompCurve aCurve(TopoDS::Wire(aShape));
    const Standard_Real aParam[2] = {
      aCurve.FirstParameter(), aCurve.LastParameter() };
    gp_Pnt aPnt;
    aCurve.D0(0.5 *(aParam[0]+aParam[1]), aPnt);
    printf("FP = %7.4f; LP = %7.4f, middle:(%8.3f %8.3f %8.3f)\n",
           aParam[0], aParam[1], aPnt.X(), aPnt.Y(), aPnt.Z());
  }
  return 0;
}
No tags attached.
? sect.brep (2,622) 2018-12-22 23:37
https://tracker.dev.opencascade.org/
Issue History
2018-12-22 23:37agvNew Issue
2018-12-22 23:37agvAssigned To => msv
2018-12-22 23:37agvFile Added: sect.brep
2018-12-24 11:06msvTarget VersionUnscheduled => 7.4.0
2019-08-12 17:45msvTarget Version7.4.0 => 7.5.0*

There are no notes attached to this issue.