0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / HLRBRep / HLRBRep_SurfaceTool.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_SurfaceTool_HeaderFile
18 #define _HLRBRep_SurfaceTool_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_Address.hxx>
26 #include <Standard_Integer.hxx>
27 #include <GeomAbs_Shape.hxx>
28 #include <TColStd_Array1OfReal.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <gp_Pnt.hxx>
31 #include <gp_Vec.hxx>
32 #include <GeomAbs_SurfaceType.hxx>
33 #include <gp_Pln.hxx>
34 #include <gp_Cylinder.hxx>
35 #include <gp_Cone.hxx>
36 #include <gp_Torus.hxx>
37 #include <gp_Sphere.hxx>
38 #include <gp_Ax1.hxx>
39 #include <gp_Dir.hxx>
40 class Standard_NoSuchObject;
41 class Standard_OutOfRange;
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_SurfaceTool 
52 {
53 public:
54
55   DEFINE_STANDARD_ALLOC
56
57   
58     static Standard_Real FirstUParameter (const Standard_Address S);
59   
60     static Standard_Real FirstVParameter (const Standard_Address S);
61   
62     static Standard_Real LastUParameter (const Standard_Address S);
63   
64     static Standard_Real LastVParameter (const Standard_Address S);
65   
66     static Standard_Integer NbUIntervals (const Standard_Address S, const GeomAbs_Shape Sh);
67   
68     static Standard_Integer NbVIntervals (const Standard_Address S, const GeomAbs_Shape Sh);
69   
70     static void UIntervals (const Standard_Address S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
71   
72     static void VIntervals (const Standard_Address S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
73   
74   //! If <First> >= <Last>
75     static Handle(Adaptor3d_HSurface) UTrim (const Standard_Address 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 Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
79   
80     static Standard_Boolean IsUClosed (const Standard_Address S);
81   
82     static Standard_Boolean IsVClosed (const Standard_Address S);
83   
84     static Standard_Boolean IsUPeriodic (const Standard_Address S);
85   
86     static Standard_Real UPeriod (const Standard_Address S);
87   
88     static Standard_Boolean IsVPeriodic (const Standard_Address S);
89   
90     static Standard_Real VPeriod (const Standard_Address S);
91   
92     static gp_Pnt Value (const Standard_Address S, const Standard_Real u, const Standard_Real v);
93   
94     static void D0 (const Standard_Address S, const Standard_Real u, const Standard_Real v, gp_Pnt& P);
95   
96     static void D1 (const Standard_Address S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v);
97   
98     static void D2 (const Standard_Address 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 Standard_Address 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 Standard_Address S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv);
103   
104     static Standard_Real UResolution (const Standard_Address S, const Standard_Real R3d);
105   
106     static Standard_Real VResolution (const Standard_Address S, const Standard_Real R3d);
107   
108     static GeomAbs_SurfaceType GetType (const Standard_Address S);
109   
110     static gp_Pln Plane (const Standard_Address S);
111   
112     static gp_Cylinder Cylinder (const Standard_Address S);
113   
114     static gp_Cone Cone (const Standard_Address S);
115   
116     static gp_Torus Torus (const Standard_Address S);
117   
118     static gp_Sphere Sphere (const Standard_Address S);
119   
120     static Handle(Geom_BezierSurface) Bezier (const Standard_Address S);
121   
122     static Handle(Geom_BSplineSurface) BSpline (const Standard_Address S);
123   
124     static gp_Ax1 AxeOfRevolution (const Standard_Address S);
125   
126     static gp_Dir Direction (const Standard_Address S);
127   
128     static Handle(Adaptor3d_HCurve) BasisCurve (const Standard_Address S);
129   
130     static Handle(Adaptor3d_HSurface) BasisSurface (const Standard_Address S);
131   
132     static Standard_Real OffsetValue (const Standard_Address S);
133   
134   Standard_EXPORT static Standard_Integer NbSamplesU (const Standard_Address S);
135   
136   Standard_EXPORT static Standard_Integer NbSamplesV (const Standard_Address S);
137   
138   Standard_EXPORT static Standard_Integer NbSamplesU (const Standard_Address S, const Standard_Real u1, const Standard_Real u2);
139   
140   Standard_EXPORT static Standard_Integer NbSamplesV (const Standard_Address S, const Standard_Real v1, const Standard_Real v2);
141
142
143
144
145 protected:
146
147
148
149
150
151 private:
152
153
154
155
156
157 };
158
159
160 #include <HLRBRep_SurfaceTool.lxx>
161
162
163
164
165
166 #endif // _HLRBRep_SurfaceTool_HeaderFile