Warnings on vc14 were eliminated
[occt.git] / src / BRepGProp / BRepGProp_Vinert.hxx
CommitLineData
42cf5bc1 1// Created on: 1991-04-12
2// Created by: Michel CHAUVAT
3// Copyright (c) 1991-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 _BRepGProp_Vinert_HeaderFile
18#define _BRepGProp_Vinert_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <GProp_GProps.hxx>
26class BRepGProp_Face;
27class gp_Pnt;
28class gp_Pln;
29class BRepGProp_Domain;
30
31
32
33//! Computes the global properties of a geometric solid
34//! (3D closed region of space) delimited with :
35//! . a surface
36//! . a point and a surface
37//! . a plane and a surface
38//!
39//! The surface can be :
40//! . a surface limited with its parametric values U-V,
41//! . a surface limited in U-V space with its curves of restriction,
42//!
43//! The surface 's requirements to evaluate the global properties
44//! are defined in the template SurfaceTool from package GProp.
45class BRepGProp_Vinert : public GProp_GProps
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 Standard_EXPORT BRepGProp_Vinert();
53
54
55 //! Computes the global properties of a region of 3D space
56 //! delimited with the surface <S> and the point VLocation. S can be closed
57 //! The method is quick and its precision is enough for many cases of analytical
58 //! surfaces.
59 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
60 //! is used. Numbers of points depend on types of surfaces and curves.
61 //! Errror of the computation is not calculated.
62 Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& VLocation);
63
64
65 //! Computes the global properties of a region of 3D space
66 //! delimited with the surface <S> and the point VLocation. S can be closed
67 //! Adaptive 2D Gauss integration is used.
68 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
69 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
70 //! for two successive steps of adaptive integration.
71 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& VLocation, const Standard_Real Eps);
72
73
74 //! Computes the global properties of the region of 3D space
75 //! delimited with the surface <S> and the point VLocation.
76 //! The method is quick and its precision is enough for many cases of analytical
77 //! surfaces.
78 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
79 //! is used. Numbers of points depend on types of surfaces and curves.
80 //! Error of the computation is not calculated.
81 Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation);
82
83
84 //! Computes the global properties of the region of 3D space
85 //! delimited with the surface <S> and the point VLocation.
86 //! Adaptive 2D Gauss integration is used.
87 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
88 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
89 //! for two successive steps of adaptive integration.
90 //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
91 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps);
92
93
94 //! Computes the global properties of the region of 3D space
95 //! delimited with the surface <S> and the plane Pln.
96 //! The method is quick and its precision is enough for many cases of analytical
97 //! surfaces.
98 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
99 //! is used. Numbers of points depend on types of surfaces and curves.
100 //! Error of the computation is not calculated.
101 Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation);
102
103
104 //! Computes the global properties of the region of 3D space
105 //! delimited with the surface <S> and the plane Pln.
106 //! Adaptive 2D Gauss integration is used.
107 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
108 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
109 //! for two successive steps of adaptive integration.
110 //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
111 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps);
112
113
114 //! Computes the global properties of a region of 3D space
115 //! delimited with the surface <S> and the point VLocation. S can be closed
116 //! The method is quick and its precision is enough for many cases of analytical
117 //! surfaces.
118 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
119 //! is used. Numbers of points depend on types of surfaces and curves.
120 //! Errror of the computation is not calculated.
121 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation);
122
123
124 //! Computes the global properties of a region of 3D space
125 //! delimited with the surface <S> and the point VLocation. S can be closed
126 //! Adaptive 2D Gauss integration is used.
127 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
128 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
129 //! for two successive steps of adaptive integration.
130 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation, const Standard_Real Eps);
131
132
133 //! Computes the global properties of the region of 3D space
134 //! delimited with the surface <S> and the point VLocation.
135 //! The method is quick and its precision is enough for many cases of analytical
136 //! surfaces.
137 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
138 //! is used. Numbers of points depend on types of surfaces and curves.
139 //! Error of the computation is not calculated.
140 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation);
141
142
143 //! Computes the global properties of the region of 3D space
144 //! delimited with the surface <S> and the point VLocation.
145 //! Adaptive 2D Gauss integration is used.
146 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
147 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
148 //! for two successive steps of adaptive integration.
149 //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
150 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps);
151
152
153 //! Computes the global properties of the region of 3D space
154 //! delimited with the surface <S> and the plane Pln.
155 //! The method is quick and its precision is enough for many cases of analytical
156 //! surfaces.
157 //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
158 //! is used. Numbers of points depend on types of surfaces and curves.
159 //! Error of the computation is not calculated.
160 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation);
161
162
163 //! Computes the global properties of the region of 3D space
164 //! delimited with the surface <S> and the plane Pln.
165 //! Adaptive 2D Gauss integration is used.
166 //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
167 //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
168 //! for two successive steps of adaptive integration.
169 //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
170 Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps);
171
172 Standard_EXPORT void SetLocation (const gp_Pnt& VLocation);
173
174 Standard_EXPORT void Perform (const BRepGProp_Face& S);
175
176 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const Standard_Real Eps);
177
178 Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pnt& O);
179
180 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pnt& O, const Standard_Real Eps);
181
182 Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pln& Pl);
183
184 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pln& Pl, const Standard_Real Eps);
185
186 Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D);
187
188 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const Standard_Real Eps);
189
190 Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O);
191
192 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const Standard_Real Eps);
193
194 Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl);
195
196 Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const Standard_Real Eps);
197
198
199 //! If previously used methods containe Eps parameter
200 //! gets actual relative error of the computation, else returns 1.0.
201 Standard_EXPORT Standard_Real GetEpsilon();
202
203
204
205
206protected:
207
208
209
210
211
212private:
213
214
215
216 Standard_Real myEpsilon;
217
218
219};
220
221
222
223
224
225
226
227#endif // _BRepGProp_Vinert_HeaderFile