X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FGeometryTest%2FGeometryTest_API2dCommands.cxx;h=45fd7d72adf3ca8c3447e9f8681d146486367039;hb=92a206a3dd48b99945d80f63d80b545f9173e4f3;hpb=6273fa4b6c3ee16c5fa960168368f2960246aa97 diff --git a/src/GeometryTest/GeometryTest_API2dCommands.cxx b/src/GeometryTest/GeometryTest_API2dCommands.cxx index 5210f6fd4b..45fd7d72ad 100644 --- a/src/GeometryTest/GeometryTest_API2dCommands.cxx +++ b/src/GeometryTest/GeometryTest_API2dCommands.cxx @@ -205,50 +205,6 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch } -//======================================================================= -//function : extrema -//purpose : -//======================================================================= - -static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const char** a) -{ - if ( n<3) return 1; - - Handle(Geom2d_Curve) GC1, GC2; - - Standard_Real U1f,U1l,U2f,U2l; - - GC1 = DrawTrSurf::GetCurve2d(a[1]); - if ( GC1.IsNull()) - return 1; - U1f = GC1->FirstParameter(); - U1l = GC1->LastParameter(); - - GC2 = DrawTrSurf::GetCurve2d(a[2]); - if ( GC2.IsNull()) - return 1; - U2f = GC2->FirstParameter(); - U2l = GC2->LastParameter(); - - char name[100]; - - Geom2dAPI_ExtremaCurveCurve Ex(GC1,GC2,U1f,U1l,U2f,U2l); - for ( Standard_Integer i = 1; i <= Ex.NbExtrema(); i++) { - gp_Pnt2d P1,P2; - Ex.Points(i,P1,P2); - Handle(Geom2d_Line) L = new Geom2d_Line(P1,gp_Vec2d(P1,P2)); - Handle(Geom2d_TrimmedCurve) CT = - new Geom2d_TrimmedCurve(L, 0., P1.Distance(P2)); - Sprintf(name,"%s%d","ext_",i); - char* temp = name; // portage WNT - DrawTrSurf::Set(temp, CT); - di << name << " "; - } - - return 0; -} - - //======================================================================= //function : intersect //purpose : @@ -324,9 +280,6 @@ void GeometryTest::API2dCommands(Draw_Interpretor& theCommands) g = "GEOMETRY curves and surfaces analysis"; - theCommands.Add("2dextrema", "extrema curve curve",__FILE__, - extrema,g); - g = "GEOMETRY intersections"; theCommands.Add("2dintersect", "intersect curve curve",__FILE__,