Warning, /include/opencascade/BRepGProp_Face.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 2005-12-20
0002 // Created by: Sergey KHROMOV
0003 // Copyright (c) 2005-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015
0016 #include <BRep_Tool.hxx>
0017
0018 //=======================================================================
0019 // function : BRepGProp_Face
0020 // purpose : Constructor. Initializes the object with IsUseSpan.
0021 //=======================================================================
0022
0023 inline BRepGProp_Face::BRepGProp_Face(const bool IsUseSpan)
0024 : myIsFaceContextReady(false),
0025 mySReverse(false),
0026 myIsUseSpan(IsUseSpan)
0027 {
0028 }
0029
0030 //=======================================================================
0031 // function : BRepGProp_Face
0032 // purpose : Constructor.Initializes the object with the face and
0033 // IsUseSpan flan.
0034 //=======================================================================
0035
0036 inline BRepGProp_Face::BRepGProp_Face(const TopoDS_Face& F, const bool IsUseSpan)
0037 : myIsFaceContextReady(false),
0038 mySReverse(false),
0039 myIsUseSpan(IsUseSpan)
0040 {
0041 Load(F);
0042 }
0043
0044 //=======================================================================
0045 // function : NaturalRestriction
0046 // purpose : Returns true if the face is not trimmed.
0047 //=======================================================================
0048
0049 inline bool BRepGProp_Face::NaturalRestriction() const
0050 {
0051 return BRep_Tool::NaturalRestriction(mySurface.Face());
0052 }
0053
0054 //
0055
0056 //=================================================================================================
0057
0058 inline const TopoDS_Face& BRepGProp_Face::GetFace() const
0059 {
0060 return mySurface.Face();
0061 }
0062
0063 //=======================================================================
0064 // function : Value2d
0065 // purpose : Returns the value of the boundary curve of the face.
0066 //=======================================================================
0067
0068 inline gp_Pnt2d BRepGProp_Face::Value2d(const double U) const
0069 {
0070 return myCurve.Value(U);
0071 }
0072
0073 //=======================================================================
0074 // function : D12d
0075 // purpose : Returns the point of parameter U and the first derivative
0076 // at this point of a boundary curve.
0077 //=======================================================================
0078
0079 inline void BRepGProp_Face::D12d(const double U, gp_Pnt2d& P, gp_Vec2d& V1) const
0080 {
0081 myCurve.D1(U, P, V1);
0082 }
0083
0084 //=======================================================================
0085 // function : FirstParameter
0086 // purpose : Returns the parametric value of the start point of
0087 // the current arc of curve.
0088 //=======================================================================
0089
0090 inline double BRepGProp_Face::FirstParameter() const
0091 {
0092 return myCurve.FirstParameter();
0093 }
0094
0095 //=======================================================================
0096 // function : LastParameter
0097 // purpose : Returns the parametric value of the end point of
0098 // the current arc of curve.
0099 //=======================================================================
0100
0101 inline double BRepGProp_Face::LastParameter() const
0102 {
0103 return myCurve.LastParameter();
0104 }