BRepExtrema_ExtCC crash issue in OCC 7.7.1 and OCC 7.7.2 upgrades

In OCC 7.7.1 and 7.7.2 upgrades, I encountered a crash in BRepExtrema_ExtCC. In OCC 7.6.0 BRepExtrema_ExtCC worked with no issue for the same two edges. In OCC 7.7.1 and 7.7.2 upgrades, is there any alternative api for BRepExtrema_ExtCC or is there a way to avoid this issue ?

Here I have attached the IGES files of the two edges and a screenshot of the crash.

I do appreciate any feedback you can share on this.

Dmitrii Pasukhin's picture
Irina CHESNOKOVA's picture

The problem wasn't reproduced in 7.7.1 and 7.7.2 versions. The edge1.IGES file contains wire, but I checked all edges from it. And I swapped e1 and e2 for BRepExtrema_ExtCC.

Used code:

  Standard_CString aStr1 = theArgVec[1];
  Standard_CString aStr2 = theArgVec[2];
  TopoDS_Shape     aSh1 = DBRep::Get(aStr1);
  TopoDS_Shape     aSh2 = DBRep::Get(aStr2);
  TopoDS_Wire w = TopoDS::Wire(aSh1);
  TopExp_Explorer expe(w.Oriented(TopAbs_FORWARD), TopAbs_EDGE);
  TopoDS_Edge e1;
  for (; expe.More(); expe.Next()) {
    e1 = TopoDS::Edge(expe.Current());
    break;  //also without break for second edge
  }
  TopoDS_Edge e2 = TopoDS::Edge(aSh2);
  BRepExtrema_ExtCC ext(e2, e1);
  ext.Initialize(e1);
  ext.Perform(e2);
  if (ext.IsDone())
  {
    bool parall = ext.IsParallel();
    auto distm = DBL_MAX;
    for (int i = 1; i <= ext.NbExt(); ++i)
    {
      auto dist = sqrt(ext.SquareDistance(i));
      if (dist < distm)
      {
        auto param1 = ext.ParameterOnE2(i);
        auto param2 = ext.ParameterOnE1(i);
      }
    }
  }

Dmitrii Pasukhin's picture

We can't reproduce and no responce from the reporter. Issue is closed. If we recieve more information, we will reopen the issiue.

Best regards, Dmitrii.