Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:12

0001 // Created on: 1991-04-12
0002 // Created by: Michel CHAUVAT
0003 // Copyright (c) 1991-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepGProp_Vinert_HeaderFile
0018 #define _BRepGProp_Vinert_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <GProp_GProps.hxx>
0024 class BRepGProp_Face;
0025 class gp_Pnt;
0026 class gp_Pln;
0027 class BRepGProp_Domain;
0028 
0029 
0030 
0031 //! Computes the global properties of a geometric solid
0032 //! (3D closed region of space) delimited with :
0033 //! . a surface
0034 //! . a point and a surface
0035 //! . a plane and a surface
0036 //!
0037 //! The surface can be :
0038 //! . a surface limited with its parametric values U-V,
0039 //! . a surface limited in U-V space with its curves of restriction,
0040 //!
0041 //! The surface 's requirements to evaluate the global properties
0042 //! are defined in the template SurfaceTool from package GProp.
0043 class BRepGProp_Vinert  : public GProp_GProps
0044 {
0045 public:
0046 
0047   DEFINE_STANDARD_ALLOC
0048 
0049   
0050   Standard_EXPORT BRepGProp_Vinert();
0051   
0052 
0053   //! Computes the global properties of a region of 3D space
0054   //! delimited with the surface <S> and the point VLocation. S can be closed
0055   //! The method is quick and its precision is enough for many cases of analytical
0056   //! surfaces.
0057   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0058   //! is used. Numbers of points depend on types of surfaces and  curves.
0059   //! Error of the computation is not calculated.
0060   Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& VLocation);
0061   
0062 
0063   //! Computes the global properties of a region of 3D space
0064   //! delimited with the surface <S> and the point VLocation. S can be closed
0065   //! Adaptive 2D Gauss integration is used.
0066   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0067   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0068   //! for two successive steps of adaptive integration.
0069   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& VLocation, const Standard_Real Eps);
0070   
0071 
0072   //! Computes the global properties of the region of 3D space
0073   //! delimited with the surface <S> and the point VLocation.
0074   //! The method is quick and its precision is enough for many cases of analytical
0075   //! surfaces.
0076   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0077   //! is used. Numbers of points depend on types of surfaces and  curves.
0078   //! Error of the computation is not calculated.
0079   Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation);
0080   
0081 
0082   //! Computes the global properties of the region of 3D space
0083   //! delimited with the surface <S> and the point VLocation.
0084   //! Adaptive 2D Gauss integration is used.
0085   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0086   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0087   //! for two successive steps of adaptive integration.
0088   //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
0089   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps);
0090   
0091 
0092   //! Computes the global properties of the region of 3D space
0093   //! delimited with the surface <S> and the plane Pln.
0094   //! The method is quick and its precision is enough for many cases of analytical
0095   //! surfaces.
0096   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0097   //! is used. Numbers of points depend on types of surfaces and  curves.
0098   //! Error of the computation is not calculated.
0099   Standard_EXPORT BRepGProp_Vinert(const BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation);
0100   
0101 
0102   //! Computes the global properties of the region of 3D space
0103   //! delimited with the surface <S> and the plane Pln.
0104   //! Adaptive 2D Gauss integration is used.
0105   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0106   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0107   //! for two successive steps of adaptive integration.
0108   //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
0109   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps);
0110   
0111 
0112   //! Computes the global properties of a region of 3D space
0113   //! delimited with the surface <S> and the point VLocation. S can be closed
0114   //! The method is quick and its precision is enough for many cases of analytical
0115   //! surfaces.
0116   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0117   //! is used. Numbers of points depend on types of surfaces and  curves.
0118   //! Error of the computation is not calculated.
0119   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation);
0120   
0121 
0122   //! Computes the global properties of a region of 3D space
0123   //! delimited with the surface <S> and the point VLocation. S can be closed
0124   //! Adaptive 2D Gauss integration is used.
0125   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0126   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0127   //! for two successive steps of adaptive integration.
0128   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& VLocation, const Standard_Real Eps);
0129   
0130 
0131   //! Computes the global properties of the region of 3D space
0132   //! delimited with the surface <S> and the point VLocation.
0133   //! The method is quick and its precision is enough for many cases of analytical
0134   //! surfaces.
0135   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0136   //! is used. Numbers of points depend on types of surfaces and  curves.
0137   //! Error of the computation is not calculated.
0138   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation);
0139   
0140 
0141   //! Computes the global properties of the region of 3D space
0142   //! delimited with the surface <S> and the point VLocation.
0143   //! Adaptive 2D Gauss integration is used.
0144   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0145   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0146   //! for two successive steps of adaptive integration.
0147   //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
0148   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const gp_Pnt& VLocation, const Standard_Real Eps);
0149   
0150 
0151   //! Computes the global properties of the region of 3D space
0152   //! delimited with the surface <S> and the plane Pln.
0153   //! The method is quick and its precision is enough for many cases of analytical
0154   //! surfaces.
0155   //! Non-adaptive 2D Gauss integration with predefined numbers of Gauss points
0156   //! is used. Numbers of points depend on types of surfaces and  curves.
0157   //! Error of the computation is not calculated.
0158   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation);
0159   
0160 
0161   //! Computes the global properties of the region of 3D space
0162   //! delimited with the surface <S> and the plane Pln.
0163   //! Adaptive 2D Gauss integration is used.
0164   //! Parameter Eps sets maximal relative error of computed mass (volume) for face.
0165   //! Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values
0166   //! for two successive steps of adaptive integration.
0167   //! WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
0168   Standard_EXPORT BRepGProp_Vinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const gp_Pnt& VLocation, const Standard_Real Eps);
0169   
0170   Standard_EXPORT void SetLocation (const gp_Pnt& VLocation);
0171   
0172   Standard_EXPORT void Perform (const BRepGProp_Face& S);
0173   
0174   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const Standard_Real Eps);
0175   
0176   Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pnt& O);
0177   
0178   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pnt& O, const Standard_Real Eps);
0179   
0180   Standard_EXPORT void Perform (const BRepGProp_Face& S, const gp_Pln& Pl);
0181   
0182   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, const gp_Pln& Pl, const Standard_Real Eps);
0183   
0184   Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D);
0185   
0186   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const Standard_Real Eps);
0187   
0188   Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O);
0189   
0190   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& O, const Standard_Real Eps);
0191   
0192   Standard_EXPORT void Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl);
0193   
0194   Standard_EXPORT Standard_Real Perform (BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pln& Pl, const Standard_Real Eps);
0195   
0196 
0197   //! If previously used methods containe Eps parameter
0198   //! gets actual relative error of the computation, else returns  1.0.
0199   Standard_EXPORT Standard_Real GetEpsilon();
0200 
0201 
0202 
0203 
0204 protected:
0205 
0206 
0207 
0208 
0209 
0210 private:
0211 
0212 
0213 
0214   Standard_Real myEpsilon;
0215 
0216 
0217 };
0218 
0219 
0220 
0221 
0222 
0223 
0224 
0225 #endif // _BRepGProp_Vinert_HeaderFile