42cf5bc1 |
1 | // Created on: 1993-07-02 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Adaptor3d_HSurfaceTool_HeaderFile |
18 | #define _Adaptor3d_HSurfaceTool_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <Standard_Integer.hxx> |
26 | #include <GeomAbs_Shape.hxx> |
27 | #include <TColStd_Array1OfReal.hxx> |
28 | #include <Standard_Boolean.hxx> |
29 | #include <gp_Pnt.hxx> |
30 | #include <gp_Vec.hxx> |
31 | #include <GeomAbs_SurfaceType.hxx> |
32 | #include <gp_Pln.hxx> |
33 | #include <gp_Cylinder.hxx> |
34 | #include <gp_Cone.hxx> |
35 | #include <gp_Torus.hxx> |
36 | #include <gp_Sphere.hxx> |
37 | #include <gp_Ax1.hxx> |
38 | #include <gp_Dir.hxx> |
39 | class Standard_NoSuchObject; |
40 | class Standard_OutOfRange; |
41 | class Adaptor3d_HSurface; |
42 | class gp_Pnt; |
43 | class gp_Vec; |
44 | class Geom_BezierSurface; |
45 | class Geom_BSplineSurface; |
46 | class Adaptor3d_HCurve; |
47 | |
48 | |
49 | |
50 | class Adaptor3d_HSurfaceTool |
51 | { |
52 | public: |
53 | |
54 | DEFINE_STANDARD_ALLOC |
55 | |
56 | |
57 | static Standard_Real FirstUParameter (const Handle(Adaptor3d_HSurface)& S); |
58 | |
59 | static Standard_Real FirstVParameter (const Handle(Adaptor3d_HSurface)& S); |
60 | |
61 | static Standard_Real LastUParameter (const Handle(Adaptor3d_HSurface)& S); |
62 | |
63 | static Standard_Real LastVParameter (const Handle(Adaptor3d_HSurface)& S); |
64 | |
65 | static Standard_Integer NbUIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh); |
66 | |
67 | static Standard_Integer NbVIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh); |
68 | |
69 | static void UIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); |
70 | |
71 | static void VIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh); |
72 | |
73 | //! If <First> >= <Last> |
74 | static Handle(Adaptor3d_HSurface) UTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); |
75 | |
76 | //! If <First> >= <Last> |
77 | static Handle(Adaptor3d_HSurface) VTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); |
78 | |
79 | static Standard_Boolean IsUClosed (const Handle(Adaptor3d_HSurface)& S); |
80 | |
81 | static Standard_Boolean IsVClosed (const Handle(Adaptor3d_HSurface)& S); |
82 | |
83 | static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_HSurface)& S); |
84 | |
85 | static Standard_Real UPeriod (const Handle(Adaptor3d_HSurface)& S); |
86 | |
87 | static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_HSurface)& S); |
88 | |
89 | static Standard_Real VPeriod (const Handle(Adaptor3d_HSurface)& S); |
90 | |
91 | static gp_Pnt Value (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v); |
92 | |
93 | static void D0 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P); |
94 | |
95 | static void D1 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v); |
96 | |
97 | static void D2 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV); |
98 | |
99 | static void D3 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV); |
100 | |
101 | static gp_Vec DN (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv); |
102 | |
103 | static Standard_Real UResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d); |
104 | |
105 | static Standard_Real VResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d); |
106 | |
107 | static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_HSurface)& S); |
108 | |
109 | static gp_Pln Plane (const Handle(Adaptor3d_HSurface)& S); |
110 | |
111 | static gp_Cylinder Cylinder (const Handle(Adaptor3d_HSurface)& S); |
112 | |
113 | static gp_Cone Cone (const Handle(Adaptor3d_HSurface)& S); |
114 | |
115 | static gp_Torus Torus (const Handle(Adaptor3d_HSurface)& S); |
116 | |
117 | static gp_Sphere Sphere (const Handle(Adaptor3d_HSurface)& S); |
118 | |
119 | static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_HSurface)& S); |
120 | |
121 | static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_HSurface)& S); |
122 | |
123 | static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_HSurface)& S); |
124 | |
125 | static gp_Dir Direction (const Handle(Adaptor3d_HSurface)& S); |
126 | |
127 | static Handle(Adaptor3d_HCurve) BasisCurve (const Handle(Adaptor3d_HSurface)& S); |
128 | |
129 | static Handle(Adaptor3d_HSurface) BasisSurface (const Handle(Adaptor3d_HSurface)& S); |
130 | |
131 | static Standard_Real OffsetValue (const Handle(Adaptor3d_HSurface)& S); |
132 | |
133 | Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S); |
134 | |
135 | Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S); |
136 | |
137 | Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2); |
138 | |
139 | Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2); |
140 | |
141 | |
142 | |
143 | |
144 | protected: |
145 | |
146 | |
147 | |
148 | |
149 | |
150 | private: |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | }; |
157 | |
158 | |
159 | #include <Adaptor3d_HSurfaceTool.lxx> |
160 | |
161 | |
162 | |
163 | |
164 | |
165 | #endif // _Adaptor3d_HSurfaceTool_HeaderFile |