For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Problem using Geom2dAPI_InterCurveCurve

haowei's picture
Forums: 

I am using Geom2dAPI_InterCurveCurve to computes self-intersections of the curve. this is my test code:

Handle(TColgp_HArray1OfPnt2d) harray = new TColgp_HArray1OfPnt2d (1,12);
harray->SetValue(1,gp_Pnt2d(0,0));
harray->SetValue(2,gp_Pnt2d(10,0));
harray->SetValue(3,gp_Pnt2d(20,10));
harray->SetValue(4,gp_Pnt2d(30,0));
harray->SetValue(5,gp_Pnt2d(40,10));
harray->SetValue(6,gp_Pnt2d(50,0));
harray->SetValue(7,gp_Pnt2d(60,10));
harray->SetValue(8,gp_Pnt2d(70,0));
harray->SetValue(9,gp_Pnt2d(90,20));
harray->SetValue(10,gp_Pnt2d(110,0));
harray->SetValue(11,gp_Pnt2d(113,0));
harray->SetValue(12,gp_Pnt2d(127,5));
Geom2dAPI_Interpolate anInterpolation(harray,TRUE,1.0e-6);
anInterpolation.Perform();
Handle(Geom2d_BSplineCurve) curve = anInterpolation.Curve();

Geom2dAPI_InterCurveCurve IIC(curve,1.0e-10);
int nbpoints = IIC.NbPoints();

Geom2dAPI_InterCurveCurve only return one intersection point,but actual three intersction points. why?

Any help is appreciated!

Attachments: