OCC.BRepGProp module

Provides global functions to compute a shape’s globalproperties for lines, surfaces or volumes, and bringthem together with the global properties alreadycomputed for a geometric system.The global properties computed for a system are :- its mass,- its center of mass,- its matrix of inertia,- its moment about an axis,- its radius of gyration about an axis,- and its principal properties of inertia such asprincipal axis, principal moments, principal radius of gyration.

class BRepGProp_Cinert(*args)

Bases: OCC.GProp.GProp_GProps

Return type:

None

Parameters:
  • C (BRepAdaptor_Curve &) –
  • CLocation (gp_Pnt) –
Return type:

None

Perform()
Parameters:C (BRepAdaptor_Curve &) –
Return type:None
SetLocation()
Parameters:CLocation (gp_Pnt) –
Return type:None
thisown

The membership flag

class BRepGProp_Domain(*args)

Bases: object

  • Empty constructor.
Return type:None
  • Constructor. Initializes the domain with the face.
Parameters:F (TopoDS_Face &) –
Return type:None
Init()
  • Initializes the domain with the face.
Parameters:F (TopoDS_Face &) –
Return type:None
  • Initializes the exploration with the face already set.
Return type:None
More()
  • Returns True if there is another arc of curve in the list.
Return type:bool
Next()
  • Sets the index of the arc iterator to the next arc of curve.
Return type:None
Value()
  • Returns the current edge.
Return type:TopoDS_Edge
thisown

The membership flag

class BRepGProp_EdgeTool

Bases: object

static D1()
  • Returns the point of parameter U and the first derivative at this point.
Parameters:
Return type:

void

static FirstParameter()
  • Returns the parametric value of the start point of the curve. The curve is oriented from the start point to the end point.
Parameters:C (BRepAdaptor_Curve &) –
Return type:float
static IntegrationOrder()
  • Returns the number of Gauss points required to do the integration with a good accuracy using the Gauss method. For a polynomial curve of degree n the maxima of accuracy is obtained with an order of integration equal to 2*n-1.
Parameters:C (BRepAdaptor_Curve &) –
Return type:int
static Intervals()
  • Stores in <T> the parameters bounding the intervals of continuity <S>. //! The array must provide enough room to accomodate for the parameters. i.e. T.Length() > NbIntervals()
Parameters:
  • C (BRepAdaptor_Curve &) –
  • T (TColStd_Array1OfReal &) –
  • S (GeomAbs_Shape) –
Return type:

void

static LastParameter()
  • Returns the parametric value of the end point of the curve. The curve is oriented from the start point to the end point.
Parameters:C (BRepAdaptor_Curve &) –
Return type:float
static NbIntervals()
  • Returns the number of intervals for continuity <S>. May be one if Continuity(me) >= <S>
Parameters:
  • C (BRepAdaptor_Curve &) –
  • S (GeomAbs_Shape) –
Return type:

int

static Value()
  • Returns the point of parameter U on the loaded curve.
Parameters:
  • C (BRepAdaptor_Curve &) –
  • U (float) –
Return type:

gp_Pnt

thisown

The membership flag

BRepGProp_EdgeTool_D1()
  • Returns the point of parameter U and the first derivative at this point.
Parameters:
Return type:

void

BRepGProp_EdgeTool_FirstParameter()
  • Returns the parametric value of the start point of the curve. The curve is oriented from the start point to the end point.
Parameters:C (BRepAdaptor_Curve &) –
Return type:float
BRepGProp_EdgeTool_IntegrationOrder()
  • Returns the number of Gauss points required to do the integration with a good accuracy using the Gauss method. For a polynomial curve of degree n the maxima of accuracy is obtained with an order of integration equal to 2*n-1.
Parameters:C (BRepAdaptor_Curve &) –
Return type:int
BRepGProp_EdgeTool_Intervals()
  • Stores in <T> the parameters bounding the intervals of continuity <S>. //! The array must provide enough room to accomodate for the parameters. i.e. T.Length() > NbIntervals()
Parameters:
  • C (BRepAdaptor_Curve &) –
  • T (TColStd_Array1OfReal &) –
  • S (GeomAbs_Shape) –
Return type:

void

BRepGProp_EdgeTool_LastParameter()
  • Returns the parametric value of the end point of the curve. The curve is oriented from the start point to the end point.
Parameters:C (BRepAdaptor_Curve &) –
Return type:float
BRepGProp_EdgeTool_NbIntervals()
  • Returns the number of intervals for continuity <S>. May be one if Continuity(me) >= <S>
Parameters:
  • C (BRepAdaptor_Curve &) –
  • S (GeomAbs_Shape) –
Return type:

int

BRepGProp_EdgeTool_Value()
  • Returns the point of parameter U on the loaded curve.
Parameters:
  • C (BRepAdaptor_Curve &) –
  • U (float) –
Return type:

gp_Pnt

class BRepGProp_Face(*args)

Bases: object

  • Constructor. Initializes the object with a flag IsUseSpan that says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Spans are returned by the methods GetUKnots and GetTKnots.
Parameters:IsUseSpan (bool) – default value is Standard_False
Return type:None
  • Constructor. Initializes the object with the face and the flag IsUseSpan that says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Spans are returned by the methods GetUKnots and GetTKnots.
Parameters:
  • F (TopoDS_Face &) –
  • IsUseSpan (bool) – default value is Standard_False
Return type:

None

Bounds()
  • Returns the parametric bounds of the Face.
Parameters:
  • U1 (float &) –
  • U2 (float &) –
  • V1 (float &) –
  • V2 (float &) –
Return type:

None

D12d()
  • Returns the point of parameter U and the first derivative at this point of a boundary curve.
Parameters:
Return type:

None

FirstParameter()
  • Returns the parametric value of the start point of the current arc of curve.
Return type:float
GetTKnots()
  • Returns an array of combination of T knots of the arc and V knots of the face. The first and last elements of the array will be theTMin and theTMax. The middle elements will be the Knots of the arc and the values of parameters of arc on which the value points have V coordinates close to V knots of face. All the parameter will be greater then theTMin and lower then theTMax in increasing order. If the face is not a BSpline, the array initialized with theTMin and theTMax only.
Parameters:
  • theTMin (float) –
  • theTMax (float) –
  • theTKnots (Handle_TColStd_HArray1OfReal &) –
Return type:

None

GetUKnots()
  • Returns an array of U knots of the face. The first and last elements of the array will be theUMin and theUMax. The middle elements will be the U Knots of the face greater then theUMin and lower then theUMax in increasing order. If the face is not a BSpline, the array initialized with theUMin and theUMax only.
Parameters:
  • theUMin (float) –
  • theUMax (float) –
  • theUKnots (Handle_TColStd_HArray1OfReal &) –
Return type:

None

IntegrationOrder()
  • Returns the number of points required to do the integration along the parameter of curve.
Return type:int
LIntOrder()
Parameters:Eps (float) –
Return type:int
LIntSubs()
Return type:int
LKnots()
Parameters:Knots (TColStd_Array1OfReal &) –
Return type:None
LastParameter()
  • Returns the parametric value of the end point of the current arc of curve.
Return type:float
Load()
Parameters:F (TopoDS_Face &) –
Return type:None
  • Loading the boundary arc.
Parameters:E (TopoDS_Edge &) –
Return type:None
  • Loading the boundary arc. This arc is either a top, bottom, left or right bound of a UV rectangle in which the parameters of surface are defined. If IsFirstParam is equal to Standard_True, the face is initialized by either left of bottom bound. Otherwise it is initialized by the top or right one. If theIsoType is equal to GeomAbs_IsoU, the face is initialized with either left or right bound. Otherwise - with either top or bottom one.
Parameters:
  • IsFirstParam (bool) –
  • theIsoType (GeomAbs_IsoType) –
Return type:

None

NaturalRestriction()
  • Returns Standard_True if the face is not trimmed.
Return type:bool
Normal()
  • Computes the point of parameter U, V on the Face <S> and the normal to the face at this point.
Parameters:
Return type:

None

SIntOrder()
Parameters:Eps (float) –
Return type:int
SUIntSubs()
Return type:int
SVIntSubs()
Return type:int
UIntegrationOrder()
  • Returns the number of points required to do the integration in the U parametric direction with a good accuracy.
Return type:int
UKnots()
Parameters:Knots (TColStd_Array1OfReal &) –
Return type:None
VIntegrationOrder()
Return type:int
VKnots()
Parameters:Knots (TColStd_Array1OfReal &) –
Return type:None
Value2d()
  • Returns the value of the boundary curve of the face.
Parameters:U (float) –
Return type:gp_Pnt2d
thisown

The membership flag

class BRepGProp_Gauss(*args)

Bases: object

  • Constructor
Parameters:theType (BRepGProp_GaussType) –
Return type:None
Sinert = 1
Vinert = 0
thisown

The membership flag

class BRepGProp_Sinert(*args)

Bases: OCC.GProp.GProp_GProps

Return type:

None

Parameters:
  • S (BRepGProp_Face &) –
  • SLocation (gp_Pnt) –
Return type:

None

  • Builds a Sinert to evaluate the global properties of the face <S>. If isNaturalRestriction is true the domain of S is defined with the natural bounds, else it defined with an iterator of Edge from TopoDS (see DomainTool from GProp)
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • SLocation (gp_Pnt) –
  • S
  • SLocation
  • Eps (float) –
  • S
  • D
  • SLocation
  • Eps
Return type:

None

Return type:

None

Return type:

None

GetEpsilon()
  • If previously used method contained Eps parameter get actual relative error of the computation, else return 1.0.
Return type:float
Perform()
Parameters:
  • S (BRepGProp_Face &) –
  • S
  • D (BRepGProp_Domain &) –
  • S
  • Eps (float) –
  • S
  • D
  • Eps
Return type:

None

Return type:

None

Return type:

float

Return type:

float

SetLocation()
Parameters:SLocation (gp_Pnt) –
Return type:None
thisown

The membership flag

class BRepGProp_TFunction(*args)

Bases: OCC.math.math_Function

  • Constructor. Initializes the function with the face, the location point, the flag IsByPoint, the coefficients theCoeff that have different meaning depending on the value of IsByPoint. The last two parameters are theUMin - the lower bound of the inner integral. This value is fixed for any integral. And the value of tolerance of inner integral computation. If IsByPoint is equal to Standard_True, the number of the coefficients is equal to 3 and they represent X, Y and Z coordinates (theCoeff[0], theCoeff[1] and theCoeff[2] correspondingly) of the shift if the inertia is computed with respect to the point different then the location. If IsByPoint is equal to Standard_False, the number of the coefficients is 4 and they represent the compbination of plane parameters and shift values.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theVertex (gp_Pnt) –
  • IsByPoint (bool) –
  • theCoeffs (Standard_Address) –
  • theUMin (float) –
  • theTolerance (float) –
Return type:

None

AbsolutError()
  • Returns the absolut reached error of all values computation since the last call of GetStateNumber method.
Return type:float
ErrorReached()
  • Returns the relative reached error of all values computation since the last call of GetStateNumber method.
Return type:float
Init()
Return type:None
SetNbKronrodPoints()
  • Setting the expected number of Kronrod points for the outer integral computation. This number is required for computation of a value of tolerance for inner integral computation. After GetStateNumber method call, this number is recomputed by the same law as in math_KronrodSingleIntegration, i.e. next number of points is equal to the current number plus a square root of the current number. If the law in math_KronrodSingleIntegration is changed, the modification algo should be modified accordingly.
Parameters:theNbPoints (int) –
Return type:None
SetTolerance()
  • Setting the tolerance for inner integration
Parameters:aTol (float) –
Return type:None
SetValueType()
  • Setting the type of the value to be returned. This parameter is directly passed to the UFunction.
Parameters:aType (GProp_ValueType) –
Return type:None
thisown

The membership flag

class BRepGProp_UFunction(*args)

Bases: OCC.math.math_Function

  • Constructor. Initializes the function with the face, the location point, the flag IsByPoint and the coefficients theCoeff that have different meaning depending on the value of IsByPoint. If IsByPoint is equal to Standard_True, the number of the coefficients is equal to 3 and they represent X, Y and Z coordinates (theCoeff[0], theCoeff[1] and theCoeff[2] correspondingly) of the shift, if the inertia is computed with respect to the point different then the location. If IsByPoint is equal to Standard_False, the number of the coefficients is 4 and they represent the combination of plane parameters and shift values.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theVertex (gp_Pnt) –
  • IsByPoint (bool) –
  • theCoeffs (Standard_Address) –
Return type:

None

SetVParam()
  • Setting the V parameter that is constant during the integral computation.
Parameters:theVParam (float) –
Return type:None
SetValueType()
  • Setting the type of the value to be returned.
Parameters:theType (GProp_ValueType) –
Return type:None
thisown

The membership flag

class BRepGProp_Vinert(*args)

Bases: OCC.GProp.GProp_GProps

Return type:None
  • Computes the global properties of a region of 3D space delimited with the surface <S> and the point VLocation. S can be closed The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Errror of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of a region of 3D space delimited with the surface <S> and the point VLocation. S can be closed Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration.
Parameters:
  • S (BRepGProp_Face &) –
  • VLocation (gp_Pnt) –
  • Eps (float) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the point VLocation. The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Error of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • O (gp_Pnt) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the point VLocation. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the plane Pln. The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Error of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • Pl (gp_Pln) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the plane Pln. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
Return type:

None

  • Computes the global properties of a region of 3D space delimited with the surface <S> and the point VLocation. S can be closed The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Errror of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of a region of 3D space delimited with the surface <S> and the point VLocation. S can be closed Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • VLocation (gp_Pnt) –
  • Eps (float) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the point VLocation. The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Error of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • O (gp_Pnt) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the point VLocation. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • O (gp_Pnt) –
  • VLocation (gp_Pnt) –
  • Eps (float) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the plane Pln. The method is quick and its precision is enough for many cases of analytical surfaces. Non-adaptive 2D Gauss integration with predefined numbers of Gauss points is used. Numbers of points depend on types of surfaces and curves. Error of the computation is not calculated.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • Pl (gp_Pln) –
  • VLocation (gp_Pnt) –
Return type:

None

  • Computes the global properties of the region of 3D space delimited with the surface <S> and the plane Pln. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
  • S (BRepGProp_Face &) –
  • D (BRepGProp_Domain &) –
  • Pl (gp_Pln) –
  • VLocation (gp_Pnt) –
  • Eps (float) –
Return type:

None

GetEpsilon()
  • If previously used methods containe Eps parameter gets actual relative error of the computation, else returns 1.0.
Return type:float
Perform()
Parameters:
  • S (BRepGProp_Face &) –
  • S
  • Eps (float) –
  • S
  • O (gp_Pnt) –
  • S
  • O
  • Eps
  • S
  • Pl (gp_Pln) –
  • S
  • Pl
  • Eps
  • S
  • D (BRepGProp_Domain &) –
  • S
  • D
  • Eps
  • S
  • D
  • O
  • S
  • D
  • O
  • Eps
  • S
  • D
  • Pl
  • S
  • D
  • Pl
  • Eps
Return type:

None

Return type:

float

Return type:

None

Return type:

float

Return type:

None

Return type:

float

Return type:

None

Return type:

float

Return type:

None

Return type:

float

Return type:

None

Return type:

float

SetLocation()
Parameters:VLocation (gp_Pnt) –
Return type:None
thisown

The membership flag

class BRepGProp_VinertGK(*args)

Bases: OCC.GProp.GProp_GProps

  • Empty constructor.
Return type:None
  • Constructor. Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the point VLocation.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

  • Constructor. Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the point VLocation. The inertia is computed with respect to thePoint.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • thePoint (gp_Pnt) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

  • Constructor. Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the point VLocation.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

  • Constructor. Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the point VLocation. The inertia is computed with respect to thePoint.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • thePoint (gp_Pnt) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

  • Constructor. Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the plane.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • thePlane (gp_Pln) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

  • Constructor. Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the plane.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • thePlane (gp_Pln) –
  • theLocation (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

None

GetErrorReached()
  • Returns the relative reached computation error.
Return type:float
Perform()
  • Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the point VLocation.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

  • Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the point VLocation. The inertia is computed with respect to thePoint.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • thePoint (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

  • Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the point VLocation.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

  • Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the point VLocation. The inertia is computed with respect to thePoint.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • thePoint (gp_Pnt) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

  • Computes the global properties of a region of 3D space delimited with the naturally restricted surface and the plane.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • thePlane (gp_Pln) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

  • Computes the global properties of a region of 3D space delimited with the surface bounded by the domain and the plane.
Parameters:
  • theSurface (BRepGProp_Face &) –
  • theDomain (BRepGProp_Domain &) –
  • thePlane (gp_Pln) –
  • theTolerance (float) – default value is 0.001
  • theCGFlag (bool) – default value is Standard_False
  • theIFlag (bool) – default value is Standard_False
Return type:

float

SetLocation()
  • Sets the vertex that delimit 3D closed region of space.
Parameters:theLocation (gp_Pnt) –
Return type:None
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
thisown

The membership flag

value()
class brepgprop

Bases: object

static LinearProperties()
  • Computes the linear global properties of the shape S, i.e. the global properties induced by each edge of the shape S, and brings them together with the global properties still retained by the framework LProps. If the current system of LProps was empty, its global properties become equal to the linear global properties of S. For this computation no linear density is attached to the edges. So, for example, the added mass corresponds to the sum of the lengths of the edges of S. The density of the composed systems, i.e. that of each component of the current system of LProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework LProps. Note: if your programming ensures that the framework LProps retains only linear global properties (brought together for example, by the function LinearProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total length of edges of the system analysed by LProps. Warning No check is performed to verify that the shape S retains truly linear properties. If S is simply a vertex, it is not considered to present any additional global properties.
Parameters:
  • S (TopoDS_Shape &) –
  • LProps (GProp_GProps &) –
Return type:

void

static SurfaceProperties()
  • Computes the surface global properties of the shape S, i.e. the global properties induced by each face of the shape S, and brings them together with the global properties still retained by the framework SProps. If the current system of SProps was empty, its global properties become equal to the surface global properties of S. For this computation, no surface density is attached to the faces. Consequently, the added mass corresponds to the sum of the areas of the faces of S. The density of the component systems, i.e. that of each component of the current system of SProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. You are advised to use a framework for each different value of density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework SProps. Note : if your programming ensures that the framework SProps retains only surface global properties, brought together, for example, by the function SurfaceProperties, for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total area of faces of the system analysed by SProps. Warning No check is performed to verify that the shape S retains truly surface properties. If S is simply a vertex, an edge or a wire, it is not considered to present any additional global properties.
Parameters:
  • S (TopoDS_Shape &) –
  • SProps (GProp_GProps &) –
Return type:

void

  • Updates <SProps> with the shape <S>, that contains its pricipal properties. The surface properties of all the faces in <S> are computed. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (area) for each face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. //! Computes the global volume properties of the solid S, and brings them together with the global properties still retained by the framework VProps. If the current system of VProps was empty, its global properties become equal to the global properties of S for volume. For this computation, no volume density is attached to the solid. Consequently, the added mass corresponds to the volume of S. The density of the component systems, i.e. that of each component of the current system of VProps, and that of S which is considered to be equal to 1, must be coherent to each other. Note that this coherence cannot be checked. You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework VProps. Note: if your programming ensures that the framework VProps retains only global properties of volume (brought together for example, by the function VolumeProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total volume of the solids of the system analysed by VProps. Warning The shape S must represent an object whose global volume properties can be computed. It may be a finite solid, or a series of finite solids all oriented in a coherent way. Nonetheless, S must be exempt of any free boundary. Note that these conditions of coherence are not checked by this algorithm, and results will be false if they are not respected.
Parameters:
  • S (TopoDS_Shape &) –
  • SProps (GProp_GProps &) –
  • Eps (float) –
Return type:

float

static VolumeProperties()
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • OnlyClosed (bool) – default value is Standard_False
Return type:

void

  • Updates <VProps> with the shape <S>, that contains its pricipal properties. The volume properties of all the FORWARD and REVERSED faces in <S> are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for each face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • Eps (float) –
  • OnlyClosed (bool) – default value is Standard_False
Return type:

float

static VolumePropertiesGK()
  • Updates <VProps> with the shape <S>, that contains its pricipal properties. The volume properties of all the FORWARD and REVERSED faces in <S> are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter IsUseSpan says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Parameter Eps sets maximal relative error of computed property for each face. Error is delivered by the adaptive Gauss-Kronrod method of integral computation that is used for properties computation. Method returns estimation of relative error reached for whole shape. Returns negative value if the computation is failed.
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • Eps (float) – default value is 0.001
  • OnlyClosed (bool) – default value is Standard_False
  • IsUseSpan (bool) – default value is Standard_False
  • CGFlag (bool) – default value is Standard_False
  • IFlag (bool) – default value is Standard_False
  • S
  • VProps
  • thePln (gp_Pln) –
  • Eps – default value is 0.001
  • OnlyClosed – default value is Standard_False
  • IsUseSpan – default value is Standard_False
  • CGFlag – default value is Standard_False
  • IFlag – default value is Standard_False
Return type:

float

Return type:

float

thisown

The membership flag

brepgprop_LinearProperties()
  • Computes the linear global properties of the shape S, i.e. the global properties induced by each edge of the shape S, and brings them together with the global properties still retained by the framework LProps. If the current system of LProps was empty, its global properties become equal to the linear global properties of S. For this computation no linear density is attached to the edges. So, for example, the added mass corresponds to the sum of the lengths of the edges of S. The density of the composed systems, i.e. that of each component of the current system of LProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework LProps. Note: if your programming ensures that the framework LProps retains only linear global properties (brought together for example, by the function LinearProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total length of edges of the system analysed by LProps. Warning No check is performed to verify that the shape S retains truly linear properties. If S is simply a vertex, it is not considered to present any additional global properties.
Parameters:
  • S (TopoDS_Shape &) –
  • LProps (GProp_GProps &) –
Return type:

void

brepgprop_SurfaceProperties()
  • Computes the surface global properties of the shape S, i.e. the global properties induced by each face of the shape S, and brings them together with the global properties still retained by the framework SProps. If the current system of SProps was empty, its global properties become equal to the surface global properties of S. For this computation, no surface density is attached to the faces. Consequently, the added mass corresponds to the sum of the areas of the faces of S. The density of the component systems, i.e. that of each component of the current system of SProps, and that of S which is considered to be equal to 1, must be coherent. Note that this coherence cannot be checked. You are advised to use a framework for each different value of density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework SProps. Note : if your programming ensures that the framework SProps retains only surface global properties, brought together, for example, by the function SurfaceProperties, for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total area of faces of the system analysed by SProps. Warning No check is performed to verify that the shape S retains truly surface properties. If S is simply a vertex, an edge or a wire, it is not considered to present any additional global properties.
Parameters:
  • S (TopoDS_Shape &) –
  • SProps (GProp_GProps &) –
Return type:

void

  • Updates <SProps> with the shape <S>, that contains its pricipal properties. The surface properties of all the faces in <S> are computed. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (area) for each face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration. //! Computes the global volume properties of the solid S, and brings them together with the global properties still retained by the framework VProps. If the current system of VProps was empty, its global properties become equal to the global properties of S for volume. For this computation, no volume density is attached to the solid. Consequently, the added mass corresponds to the volume of S. The density of the component systems, i.e. that of each component of the current system of VProps, and that of S which is considered to be equal to 1, must be coherent to each other. Note that this coherence cannot be checked. You are advised to use a separate framework for each density, and then to bring these frameworks together into a global one. The point relative to which the inertia of the system is computed is the reference point of the framework VProps. Note: if your programming ensures that the framework VProps retains only global properties of volume (brought together for example, by the function VolumeProperties) for objects the density of which is equal to 1 (or is not defined), the function Mass will return the total volume of the solids of the system analysed by VProps. Warning The shape S must represent an object whose global volume properties can be computed. It may be a finite solid, or a series of finite solids all oriented in a coherent way. Nonetheless, S must be exempt of any free boundary. Note that these conditions of coherence are not checked by this algorithm, and results will be false if they are not respected.
Parameters:
  • S (TopoDS_Shape &) –
  • SProps (GProp_GProps &) –
  • Eps (float) –
Return type:

float

brepgprop_VolumeProperties()
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • OnlyClosed (bool) – default value is Standard_False
Return type:

void

  • Updates <VProps> with the shape <S>, that contains its pricipal properties. The volume properties of all the FORWARD and REVERSED faces in <S> are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter Eps sets maximal relative error of computed mass (volume) for each face. Error is calculated as Abs((M(i+1)-M(i))/M(i+1)), M(i+1) and M(i) are values for two successive steps of adaptive integration. Method returns estimation of relative error reached for whole shape. WARNING: if Eps > 0.001 algorithm performs non-adaptive integration.
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • Eps (float) –
  • OnlyClosed (bool) – default value is Standard_False
Return type:

float

brepgprop_VolumePropertiesGK()
  • Updates <VProps> with the shape <S>, that contains its pricipal properties. The volume properties of all the FORWARD and REVERSED faces in <S> are computed. If OnlyClosed is True then computed faces must belong to closed Shells. Adaptive 2D Gauss integration is used. Parameter IsUseSpan says if it is necessary to define spans on a face. This option has an effect only for BSpline faces. Parameter Eps sets maximal relative error of computed property for each face. Error is delivered by the adaptive Gauss-Kronrod method of integral computation that is used for properties computation. Method returns estimation of relative error reached for whole shape. Returns negative value if the computation is failed.
Parameters:
  • S (TopoDS_Shape &) –
  • VProps (GProp_GProps &) –
  • Eps (float) – default value is 0.001
  • OnlyClosed (bool) – default value is Standard_False
  • IsUseSpan (bool) – default value is Standard_False
  • CGFlag (bool) – default value is Standard_False
  • IFlag (bool) – default value is Standard_False
  • S
  • VProps
  • thePln (gp_Pln) –
  • Eps – default value is 0.001
  • OnlyClosed – default value is Standard_False
  • IsUseSpan – default value is Standard_False
  • CGFlag – default value is Standard_False
  • IFlag – default value is Standard_False
Return type:

float

Return type:

float

new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases