Failed to calculate self interference

Geom2dAPI_InterCurveCurve
Failed to calculate self interference

-------------------------------------------
Standard_Real df, dl;
Handle(Geom_Curve) C = BRep_Tool::Curve(aE, df, dl);
gp_Pln pln(gp::Origin(), gp_Dir(0, 0, 1));
Handle(Geom2d_Curve) C2D = GeomAPI::To2d(C, pln);
Geom2dAPI_InterCurveCurve ICC(C2D);
int nb = ICC.NbPoints();

Attachments: 
Artem Zhidkov's picture

In your case there is no intersection points, however, the intersection segment exists. Please, try

int nb = ICC.NbSegments();

Mikhail Sazonov's picture

The algorithm detects only tangential (segment) intersection in this case. Check NbSegments() method.

lee leon's picture

Thank you for your reply。
I test another curve like the Attachments ,The algorithm lost an intersection point.

Artem Zhidkov's picture

I confirm the problem exists. One intersection point is not found. Could you report it to OCCT bugtracker: https://tracker.dev.opencascade.org/