0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / HLRBRep / HLRBRep_BSurfaceTool.hxx
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 _HLRBRep_BSurfaceTool_HeaderFile
18 #define _HLRBRep_BSurfaceTool_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 BRepAdaptor_Surface;
42 class Adaptor3d_HSurface;
43 class gp_Pnt;
44 class gp_Vec;
45 class Geom_BezierSurface;
46 class Geom_BSplineSurface;
47 class Adaptor3d_HCurve;
48
49
50
51 class HLRBRep_BSurfaceTool 
52 {
53 public:
54
55   DEFINE_STANDARD_ALLOC
56
57   
58     static Standard_Real FirstUParameter (const BRepAdaptor_Surface& S);
59   
60     static Standard_Real FirstVParameter (const BRepAdaptor_Surface& S);
61   
62     static Standard_Real LastUParameter (const BRepAdaptor_Surface& S);
63   
64     static Standard_Real LastVParameter (const BRepAdaptor_Surface& S);
65   
66     static Standard_Integer NbUIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
67   
68     static Standard_Integer NbVIntervals (const BRepAdaptor_Surface& S, const GeomAbs_Shape Sh);
69   
70     static void UIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
71   
72     static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
73   
74   //! If <First> >= <Last>
75     static Handle(Adaptor3d_HSurface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
76   
77   //! If <First> >= <Last>
78     static Handle(Adaptor3d_HSurface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
79   
80     static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S);
81   
82     static Standard_Boolean IsVClosed (const BRepAdaptor_Surface& S);
83   
84     static Standard_Boolean IsUPeriodic (const BRepAdaptor_Surface& S);
85   
86     static Standard_Real UPeriod (const BRepAdaptor_Surface& S);
87   
88     static Standard_Boolean IsVPeriodic (const BRepAdaptor_Surface& S);
89   
90     static Standard_Real VPeriod (const BRepAdaptor_Surface& S);
91   
92     static gp_Pnt Value (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v);
93   
94     static void D0 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P);
95   
96     static void D1 (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v);
97   
98     static void D2 (const BRepAdaptor_Surface& 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);
99   
100     static void D3 (const BRepAdaptor_Surface& 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);
101   
102     static gp_Vec DN (const BRepAdaptor_Surface& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv);
103   
104     static GeomAbs_Shape UContinuity (const BRepAdaptor_Surface& S);
105   
106     static GeomAbs_Shape VContinuity (const BRepAdaptor_Surface& S);
107   
108     static Standard_Integer UDegree (const BRepAdaptor_Surface& S);
109   
110     static Standard_Integer NbUPoles (const BRepAdaptor_Surface& S);
111   
112     static Standard_Integer NbUKnots (const BRepAdaptor_Surface& S);
113   
114     static Standard_Boolean IsURational (const BRepAdaptor_Surface& S);
115   
116     static Standard_Integer VDegree (const BRepAdaptor_Surface& S);
117   
118     static Standard_Integer NbVPoles (const BRepAdaptor_Surface& S);
119   
120     static Standard_Integer NbVKnots (const BRepAdaptor_Surface& S);
121   
122     static Standard_Boolean IsVRational (const BRepAdaptor_Surface& S);
123   
124     static Standard_Real UResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d);
125   
126     static Standard_Real VResolution (const BRepAdaptor_Surface& S, const Standard_Real R3d);
127   
128     static GeomAbs_SurfaceType GetType (const BRepAdaptor_Surface& S);
129   
130     static gp_Pln Plane (const BRepAdaptor_Surface& S);
131   
132     static gp_Cylinder Cylinder (const BRepAdaptor_Surface& S);
133   
134     static gp_Cone Cone (const BRepAdaptor_Surface& S);
135   
136     static gp_Torus Torus (const BRepAdaptor_Surface& S);
137   
138     static gp_Sphere Sphere (const BRepAdaptor_Surface& S);
139   
140     static Handle(Geom_BezierSurface) Bezier (const BRepAdaptor_Surface& S);
141   
142     static Handle(Geom_BSplineSurface) BSpline (const BRepAdaptor_Surface& S);
143   
144     static gp_Ax1 AxeOfRevolution (const BRepAdaptor_Surface& S);
145   
146     static gp_Dir Direction (const BRepAdaptor_Surface& S);
147   
148     static Handle(Adaptor3d_HCurve) BasisCurve (const BRepAdaptor_Surface& S);
149   
150     static gp_Ax1 Axis (const BRepAdaptor_Surface& S);
151   
152   Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S);
153   
154   Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S);
155   
156   Standard_EXPORT static Standard_Integer NbSamplesU (const BRepAdaptor_Surface& S, const Standard_Real u1, const Standard_Real u2);
157   
158   Standard_EXPORT static Standard_Integer NbSamplesV (const BRepAdaptor_Surface& S, const Standard_Real v1, const Standard_Real v2);
159
160
161
162
163 protected:
164
165
166
167
168
169 private:
170
171
172
173
174
175 };
176
177
178 #include <HLRBRep_BSurfaceTool.lxx>
179
180
181
182
183
184 #endif // _HLRBRep_BSurfaceTool_HeaderFile