Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Problem using Geom2dAPI_InterCurveCurve

Problem using Geom2dAPI_InterCurveCurve
haowei 2012/08/03 11:04
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!
You have to be logged in to download the attached file
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map