1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
#include <Standard_Failure.hxx>
#include <gp.hxx>
#include <Geom2d_Line.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Extrema_POnCurv2d.hxx>
#include <gp_Vec.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
GeomAbs_CurveType GccGeo_CurvePGTool::
TheType(const TheParGenCurve& ) {
return GeomAbs_OtherCurve;
}
gp_Lin2d GccGeo_CurvePGTool::
Line (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return gp_Lin2d();
}
gp_Circ2d GccGeo_CurvePGTool::
Circle (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return gp_Circ2d();
}
gp_Elips2d GccGeo_CurvePGTool::
Ellipse (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return gp_Elips2d();
}
gp_Parab2d GccGeo_CurvePGTool::
Parabola (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return gp_Parab2d();
}
gp_Hypr2d GccGeo_CurvePGTool::
Hyperbola (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return gp_Hypr2d();
}
Standard_Real
GccGeo_CurvePGTool::EpsX (const TheParGenCurve& /*C*/,
const Standard_Real Tol) {
return Tol;
}
Standard_Integer
GccGeo_CurvePGTool::NbSamples (const TheParGenCurve& C) {
GeomAbs_CurveType typC = C.GetType();
Standard_Integer nbs = 20;
if(typC == GeomAbs_Line)
nbs = 2;
else if(typC == GeomAbs_BezierCurve)
nbs = 3 + C.Bezier()->NbPoles();
else if(typC == GeomAbs_BSplineCurve) {
Handle(Geom2d_BSplineCurve) BSC = C.BSpline();
nbs = BSC->NbKnots();
nbs*= BSC->Degree();
if(nbs < 2) nbs=2;
}
return(nbs);
}
Standard_Real
GccGeo_CurvePGTool::FirstParameter (const TheParGenCurve& C) {
return C.FirstParameter();
}
Standard_Real
GccGeo_CurvePGTool::LastParameter (const TheParGenCurve& C) {
return C.LastParameter();
}
gp_Pnt2d
GccGeo_CurvePGTool::Value (const TheParGenCurve& C,
const Standard_Real U) {
return C.Value(U);
}
void GccGeo_CurvePGTool::D1(const TheParGenCurve& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T) {
C.D1(U,P,T);
}
void GccGeo_CurvePGTool::D2(const TheParGenCurve& C,
const Standard_Real U,
gp_Pnt2d& P,
gp_Vec2d& T,
gp_Vec2d& N) {
C.D2(U,P,T,N);
}
Standard_Boolean GccGeo_CurvePGTool::
IsComposite (const TheParGenCurve& ) {
return Standard_False;
}
Standard_Integer GccGeo_CurvePGTool::
GetIntervals (const TheParGenCurve& ) {
cout << "Not implemented" << endl;
return 0;
}
void GccGeo_CurvePGTool::
GetInterval (const TheParGenCurve& ,
const Standard_Integer ,
Standard_Real& ,
Standard_Real& ) {
cout << "Not implemented" << endl;
}
void GccGeo_CurvePGTool::
SetCurrentInterval ( TheParGenCurve& ,
const Standard_Integer ) {
cout << "Not implemented" << endl;
}
|