Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-01 08:32:21

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_Sinert_HeaderFile
0018 #define _BRepGProp_Sinert_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 BRepGProp_Domain;
0027 
0028 //! Computes the global properties of a face in 3D space.
0029 //! The face 's requirements to evaluate the global properties
0030 //! are defined in the template FaceTool from package GProp.
0031 class BRepGProp_Sinert : public GProp_GProps
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   Standard_EXPORT BRepGProp_Sinert();
0037 
0038   Standard_EXPORT BRepGProp_Sinert(const BRepGProp_Face& S, const gp_Pnt& SLocation);
0039 
0040   //! Builds a Sinert to evaluate the global properties of
0041   //! the face <S>. If isNaturalRestriction is true the domain of S is defined
0042   //! with the natural bounds, else it defined with an iterator
0043   //! of Edge from TopoDS (see DomainTool from GProp)
0044   Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face& S, BRepGProp_Domain& D, const gp_Pnt& SLocation);
0045 
0046   Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face&     S,
0047                                    const gp_Pnt&       SLocation,
0048                                    const Standard_Real Eps);
0049 
0050   Standard_EXPORT BRepGProp_Sinert(BRepGProp_Face&     S,
0051                                    BRepGProp_Domain&   D,
0052                                    const gp_Pnt&       SLocation,
0053                                    const Standard_Real Eps);
0054 
0055   Standard_EXPORT void SetLocation(const gp_Pnt& SLocation);
0056 
0057   Standard_EXPORT void Perform(const BRepGProp_Face& S);
0058 
0059   Standard_EXPORT void Perform(BRepGProp_Face& S, BRepGProp_Domain& D);
0060 
0061   Standard_EXPORT Standard_Real Perform(BRepGProp_Face& S, const Standard_Real Eps);
0062 
0063   Standard_EXPORT Standard_Real Perform(BRepGProp_Face&     S,
0064                                         BRepGProp_Domain&   D,
0065                                         const Standard_Real Eps);
0066 
0067   //! If previously used method contained Eps parameter
0068   //! get actual relative error of the computation, else return  1.0.
0069   Standard_EXPORT Standard_Real GetEpsilon();
0070 
0071 protected:
0072 private:
0073   Standard_Real myEpsilon;
0074 };
0075 
0076 #endif // _BRepGProp_Sinert_HeaderFile