7fd59977 |
1 | // File: BRepLProp_SurfaceTool.cxx |
2 | // Created: Thu Feb 24 16:44:32 1994 |
3 | // Author: Laurent BOURESCHE |
4 | // <lbo@nonox> |
5 | |
6 | |
7 | #include <BRepLProp_SurfaceTool.ixx> |
8 | |
9 | //======================================================================= |
10 | //function : Value |
11 | //purpose : |
12 | //======================================================================= |
13 | |
14 | void BRepLProp_SurfaceTool::Value(const BRepAdaptor_Surface& S, |
15 | const Standard_Real U, |
16 | const Standard_Real V, |
17 | gp_Pnt& P) |
18 | { |
19 | P = S.Value(U, V); |
20 | } |
21 | |
22 | |
23 | //======================================================================= |
24 | //function : D1 |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | void BRepLProp_SurfaceTool::D1(const BRepAdaptor_Surface& S, |
29 | const Standard_Real U, |
30 | const Standard_Real V, |
31 | gp_Pnt& P, |
32 | gp_Vec& D1U, |
33 | gp_Vec& D1V) |
34 | { |
35 | S.D1(U, V, P, D1U, D1V); |
36 | } |
37 | |
38 | |
39 | //======================================================================= |
40 | //function : D2 |
41 | //purpose : |
42 | //======================================================================= |
43 | |
44 | void BRepLProp_SurfaceTool::D2(const BRepAdaptor_Surface& S, |
45 | const Standard_Real U, |
46 | const Standard_Real V, |
47 | gp_Pnt& P, |
48 | gp_Vec& D1U, |
49 | gp_Vec& D1V, |
50 | gp_Vec& D2U, |
51 | gp_Vec& D2V, |
52 | gp_Vec& DUV) |
53 | { |
54 | S.D2(U, V, P, D1U, D1V, D2U, D2V, DUV); |
55 | } |
56 | |
57 | //======================================================================= |
58 | //function : DN |
59 | //purpose : |
60 | //======================================================================= |
61 | gp_Vec BRepLProp_SurfaceTool::DN(const BRepAdaptor_Surface& S, |
62 | const Standard_Real U, |
63 | const Standard_Real V, |
64 | const Standard_Integer IU, |
65 | const Standard_Integer IV) |
66 | { |
67 | return S.DN(U, V, IU, IV); |
68 | } |
69 | |
70 | |
71 | //======================================================================= |
72 | //function : Continuity |
73 | //purpose : |
74 | //======================================================================= |
75 | |
76 | Standard_Integer BRepLProp_SurfaceTool::Continuity |
77 | (const BRepAdaptor_Surface& S) |
78 | { |
79 | GeomAbs_Shape s = (GeomAbs_Shape) Min(S.UContinuity(),S.VContinuity()); |
80 | switch (s) { |
81 | case GeomAbs_C0: |
82 | return 0; |
83 | case GeomAbs_C1: |
84 | return 1; |
85 | case GeomAbs_C2: |
86 | return 2; |
87 | case GeomAbs_C3: |
88 | return 3; |
89 | case GeomAbs_G1: |
90 | return 0; |
91 | case GeomAbs_G2: |
92 | return 0; |
93 | case GeomAbs_CN: |
94 | return 3; |
95 | }; |
96 | return 0; |
97 | } |
98 | |
99 | |
100 | //======================================================================= |
101 | //function : Bounds |
102 | //purpose : |
103 | //======================================================================= |
104 | |
105 | void BRepLProp_SurfaceTool::Bounds(const BRepAdaptor_Surface& S, |
106 | Standard_Real& U1, |
107 | Standard_Real& V1, |
108 | Standard_Real& U2, |
109 | Standard_Real& V2) |
110 | { |
111 | U1 = S.FirstUParameter(); |
112 | V1 = S.FirstVParameter(); |
113 | U2 = S.LastUParameter(); |
114 | V2 = S.LastVParameter(); |
115 | } |
116 | |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |