2 // File: Geom2dInt_CurveTool.gxx
3 // Created: Thu Oct 22 12:09:58 1992
4 // Author: Laurent BUCHARD
6 //-Copyright: Matra Datavision 1992
9 #include <GeomAbs_CurveType.hxx>
10 #include <Handle_Geom2d_BezierCurve.hxx>
11 #include <Handle_Geom2d_BSplineCurve.hxx>
12 #include <Geom2d_BezierCurve.hxx>
13 #include <Geom2d_BSplineCurve.hxx>
15 //============================================================
16 Standard_Integer Geom2dInt_CurveTool::NbSamples (const IntCurveCurve& C,
17 const Standard_Real U0,
18 const Standard_Real U1) {
19 GeomAbs_CurveType typC = C.GetType();
20 static Standard_Real nbsOther = 10.0;
21 Standard_Real nbs = nbsOther;
23 if(typC == GeomAbs_Line)
25 else if(typC == GeomAbs_BezierCurve)
26 nbs = 3 + C.NbPoles();
27 else if(typC == GeomAbs_BSplineCurve) {
28 Standard_Real t=C.LastParameter()-C.FirstParameter();
29 Standard_Real t1=U1-U0;
36 //// modified by jgv, 20.02.02 for bug OCC165 ////
37 else if (typC == GeomAbs_OtherCurve)
39 //////////////////////////////////////////////////
43 return((Standard_Integer)nbs);
45 //============================================================
46 Standard_Integer Geom2dInt_CurveTool::NbSamples (const IntCurveCurve& C) {
47 GeomAbs_CurveType typC = C.GetType();
48 static Standard_Real nbsOther = 10.0;
49 Standard_Real nbs = nbsOther;
51 if(typC == GeomAbs_Line)
53 else if(typC == GeomAbs_BezierCurve)
54 nbs = 3 + C.NbPoles();
55 else if(typC == GeomAbs_BSplineCurve) {
60 //// modified by jgv, 20.02.02 for bug OCC165 ////
61 else if (typC == GeomAbs_OtherCurve)
63 //////////////////////////////////////////////////
67 return((Standard_Integer)nbs);