OCC.GeomLib module¶
Geom Library. This package provides animplementation of functions for basic computationon geometric entity from packages Geom and Geom2d.
-
class
GeomLib_Array1OfMat
(*args)¶ Bases:
object
Parameters: Return type: Return type: -
Assign
()¶ Parameters: Other (GeomLib_Array1OfMat &) – Return type: GeomLib_Array1OfMat
-
Set
()¶ Parameters: Other (GeomLib_Array1OfMat &) – Return type: GeomLib_Array1OfMat
-
thisown
¶ The membership flag
-
-
class
GeomLib_Check2dBSplineCurve
(*args)¶ Bases:
object
Parameters: Return type: -
FixedTangent
()¶ - modifies the curve by fixing the first or the last tangencies //! if Index3D not in the Range [1,Nb3dSpaces] if the Approx is not Done
Parameters: Return type:
-
thisown
¶ The membership flag
-
-
class
GeomLib_CheckBSplineCurve
(*args)¶ Bases:
object
Parameters: Return type: -
FixedTangent
()¶ - modifies the curve by fixing the first or the last tangencies //! if Index3D not in the Range [1,Nb3dSpaces] if the Approx is not Done
Parameters: Return type:
-
thisown
¶ The membership flag
-
-
class
GeomLib_DenominatorMultiplier
(*args)¶ Bases:
object
- if the surface is rational this will define the evaluator of a real function of 2 variables a(u,v) such that if we define a new surface by : a(u,v) * N(u,v) NewF(u,v) = —————- a(u,v) * D(u,v)
Parameters: - Surface (Handle_Geom_BSplineSurface &) –
- KnotVector (TColStd_Array1OfReal &) –
Return type: -
Value
()¶ - Returns the value of a(UParameter,VParameter)= //! H0(UParameter)/Denominator(Umin,Vparameter) //! D Denominator(Umin,Vparameter) - ——————————[H1(u)]/(Denominator(Umin,Vparameter)^2) D U //! + H3(UParameter)/Denominator(Umax,Vparameter) //! D Denominator(Umax,Vparameter) - ——————————[H2(u)]/(Denominator(Umax,Vparameter)^2) D U
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
GeomLib_Interpolate
(*args)¶ Bases:
object
Parameters: - Degree (int) –
- NumPoints (int) –
- Points (TColgp_Array1OfPnt) –
- Parameters (TColStd_Array1OfReal &) –
Return type: -
Curve
()¶ - returns the interpolated curve of the requested degree
Return type: Handle_Geom_BSplineCurve
-
Error
()¶ - returns the error type if any
Return type: GeomLib_InterpolationErrors
-
thisown
¶ The membership flag
-
class
GeomLib_IsPlanarSurface
(*args)¶ Bases:
object
Parameters: - S (Handle_Geom_Surface &) –
- Tol (float) – default value is 1.0e-7
Return type: -
thisown
¶ The membership flag
-
class
GeomLib_LogSample
(*args)¶ Bases:
OCC.math.math_FunctionSample
Parameters: Return type: -
thisown
¶ The membership flag
-
-
class
GeomLib_MakeCurvefromApprox
(*args)¶ Bases:
object
Parameters: Approx (AdvApprox_ApproxAFunction &) – Return type: None -
Curve
()¶ - returns a polynomial curve whose poles correspond to the Index3D 3D space if Index3D not in the Range [1,Nb3dSpaces] if the Approx is not Done
Parameters: Index3d (int) – Return type: Handle_Geom_BSplineCurve - returns a rational curve whose poles correspond to the index3D of the 3D space and whose weights correspond to the index1d 1D space. if Index1D not in the Range [1,Nb1dSpaces] if Index3D not in the Range [1,Nb3dSpaces] if the Approx is not Done
Parameters: Return type:
-
Curve2d
()¶ - returns a polynomial curve whose poles correspond to the Index2d 2D space if Index2d not in the Range [1,Nb2dSpaces] if the Approx is not Done
Parameters: Index2d (int) – Return type: Handle_Geom2d_BSplineCurve - returns a rational curve whose poles correspond to the index2d of the 2D space and whose weights correspond to one dimensional space of index 1d if Index1d not in the Range [1,Nb1dSpaces] if Index2d not in the Range [1,Nb2dSpaces] if the Approx is not Done
Parameters: Return type:
-
Curve2dFromTwo1d
()¶ - returns a 2D curve building it from the 1D curve in x at Index1d and y at Index2d amongst the 1D curves if Index1d not in the Range [1,Nb1dSpaces] if Index2d not in the Range [1,Nb1dSpaces] if the Approx is not Done
Parameters: Return type:
-
thisown
¶ The membership flag
-
-
class
GeomLib_PolyFunc
(*args)¶ Bases:
OCC.math.math_FunctionWithDerivative
Parameters: Coeffs (math_Vector &) – Return type: None -
thisown
¶ The membership flag
-
-
class
GeomLib_Tool
¶ Bases:
object
-
static
Parameter
()¶ - Extracts the parameter of a 3D point lying on a 3D curve or at a distance less than the tolerance value.
Parameters: Return type: - Extracts the parameter of a 2D point lying on a 2D curve or at a distance less than the tolerance value.
Parameters: Return type:
-
static
Parameters
()¶ - Extracts the parameter of a 3D point lying on a surface or at a distance less than the tolerance value.
Parameters: Return type:
-
thisown
¶ The membership flag
-
static
-
GeomLib_Tool_Parameter
()¶ - Extracts the parameter of a 3D point lying on a 3D curve or at a distance less than the tolerance value.
Parameters: Return type: - Extracts the parameter of a 2D point lying on a 2D curve or at a distance less than the tolerance value.
Parameters: Return type:
-
GeomLib_Tool_Parameters
()¶ - Extracts the parameter of a 3D point lying on a surface or at a distance less than the tolerance value.
Parameters: Return type:
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
geomlib
¶ Bases:
object
-
static
AdjustExtremity
()¶ Parameters: Return type: void
-
static
AxeOfInertia
()¶ - Compute axes of inertia, of some points – – – <Axe>.Location() is the BaryCentre – – – – – <Axe>.XDirection is the axe of upper inertia – – – – <Axe>.Direction is the Normal to the average plane – – – IsSingular is True if points are on line – Tol is used to determine singular cases.
Parameters: - Points (TColgp_Array1OfPnt) –
- Axe (gp_Ax2) –
- IsSingular (bool) –
- Tol (float) – default value is 1.0e-7
Return type: void
-
static
BuildCurve3d
()¶ Parameters: - Tolerance (float) –
- CurvePtr (Adaptor3d_CurveOnSurface &) –
- FirstParameter (float) –
- LastParameter (float) –
- NewCurvePtr (Handle_Geom_Curve &) –
- MaxDeviation (float &) –
- AverageDeviation (float &) –
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
- MaxDegree (int) – default value is 14
- MaxSegment (int) – default value is 30
Return type: void
-
static
CancelDenominatorDerivative
()¶ - Cancel,on the boudaries,the denominator first derivative in the directions wished by the user and set its value to 1.
Parameters: Return type: void
-
static
DensifyArray1OfReal
()¶ - this makes sure that there is at least MinNumPoints in OutParameters taking into account the parameters in the InParameters array provided those are in order, that is the sequence of real in the InParameter is strictly non decreasing
Parameters: - MinNumPoints (int) –
- InParameters (TColStd_Array1OfReal &) –
- OutParameters (Handle_TColStd_HArray1OfReal &) –
Return type: void
-
static
EvalMaxDistanceAlongParameter
()¶ - this will compute the maximum distancef at the parameters given in the Parameters array by projecting from the Curve to the reference curve and taking the minimum distance Than the maximum will be taken on those minimas.
Parameters: - Curve (Adaptor3d_Curve &) –
- AReferenceCurve (Adaptor3d_Curve &) –
- Tolerance (float) –
- Parameters (TColStd_Array1OfReal &) –
- MaxDistance (float &) –
Return type: void
-
static
EvalMaxParametricDistance
()¶ - this will compute the maximum distance at the parameters given in the Parameters array by evaluating each parameter the two curves and taking the maximum of the evaluated distance
Parameters: - Curve (Adaptor3d_Curve &) –
- AReferenceCurve (Adaptor3d_Curve &) –
- Tolerance (float) –
- Parameters (TColStd_Array1OfReal &) –
- MaxDistance (float &) –
Return type: void
-
static
ExtendCurveToPoint
()¶ - Extends the bounded curve Curve to the point Point. The extension is built: - at the end of the curve if After equals true, or - at the beginning of the curve if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded curve Curve into a BSpline curve. Warning - Nothing is done, and Curve is not modified if Cont is not equal to 1, 2 or 3. - It is recommended that the extension should not be too large with respect to the size of the bounded curve Curve: Point must not be located too far from one of the extremities of Curve.
Parameters: Return type: void
-
static
ExtendSurfByLength
()¶ - Extends the bounded surface Surf along one of its boundaries. The chord length of the extension is equal to Length. The direction of the extension is given as: - the u parametric direction of Surf, if InU equals true, or - the v parametric direction of Surf, if InU equals false. In this parametric direction, the extension is built on the side of: - the last parameter of Surf, if After equals true, or - the first parameter of Surf, if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded surface Surf into a BSpline surface. Warning - Nothing is done, and Surf is not modified if Cont is not equal to 1, 2 or 3. - It is recommended that Length, the size of the extension should not be too large with respect to the size of the bounded surface Surf. - Surf must not be a periodic BSpline surface in the parametric direction corresponding to the direction of extension.
Parameters: Return type: void
-
static
FuseIntervals
()¶ Parameters: - Interval1 (TColStd_Array1OfReal &) –
- Interval2 (TColStd_Array1OfReal &) –
- Fusion (TColStd_SequenceOfReal &) –
- Confusion (float) – default value is 1.0e-9
Return type: void
-
static
GTransform
()¶ - Computes the curve 3d from package Geom corresponding to the curve 3d from package Geom, transformed with the transformation <GTrsf> WARNING : this method may return a null Handle if it’s impossible to compute the transformation of a curve. It’s not implemented when : 1) the curve is an infinite parabola or hyperbola 2) the curve is an offsetcurve
Parameters: - Curve (Handle_Geom2d_Curve &) –
- GTrsf (gp_GTrsf2d) –
Return type:
-
static
Inertia
()¶ - Compute principale axes of inertia, and dispertion value of some points.
Parameters: - Points (TColgp_Array1OfPnt) –
- Bary (gp_Pnt) –
- XDir (gp_Dir) –
- YDir (gp_Dir) –
- Xgap (float &) –
- YGap (float &) –
- ZGap (float &) –
Return type: void
-
static
NormEstim
()¶ Parameters: Return type:
-
static
RemovePointsFromArray
()¶ - Warning! This assume that the InParameter is an increasing sequence of real number and it will not check for that : Unpredictable result can happen if this is not satisfied. It is the caller responsability to check for that property. //! This method makes uniform NumPoints segments S1,…SNumPoints out of the segment defined by the first parameter and the last parameter ofthe InParameter ; keeps only one point of the InParameters set of parameter in each of the uniform segments taking care of the first and the last parameters. For the ith segment the element of the InParameter is the one that is the first to exceed the midpoint of the segment and to fall before the midpoint of the next segment There will be at the end at most NumPoints + 1 if NumPoints > 2 in the OutParameters Array
Parameters: - NumPoints (int) –
- InParameters (TColStd_Array1OfReal &) –
- OutParameters (Handle_TColStd_HArray1OfReal &) –
Return type: void
-
static
SameRange
()¶ - Make the curve Curve2dPtr have the imposed range First to List the most economic way, that is if it can change the range without changing the nature of the curve it will try to do that. Otherwise it will produce a Bspline curve that has the required range
Parameters: Return type: void
-
static
To3d
()¶ - Computes the curve 3d from package Geom corresponding to curve 2d from package Geom2d, on the plan defined with the local coordinate system Position.
Parameters: - Position (gp_Ax2) –
- Curve2d (Handle_Geom2d_Curve &) –
Return type:
-
thisown
¶ The membership flag
-
static
-
geomlib_AdjustExtremity
()¶ Parameters: Return type: void
-
geomlib_AxeOfInertia
()¶ - Compute axes of inertia, of some points – – – <Axe>.Location() is the BaryCentre – – – – – <Axe>.XDirection is the axe of upper inertia – – – – <Axe>.Direction is the Normal to the average plane – – – IsSingular is True if points are on line – Tol is used to determine singular cases.
Parameters: - Points (TColgp_Array1OfPnt) –
- Axe (gp_Ax2) –
- IsSingular (bool) –
- Tol (float) – default value is 1.0e-7
Return type: void
-
geomlib_BuildCurve3d
()¶ Parameters: - Tolerance (float) –
- CurvePtr (Adaptor3d_CurveOnSurface &) –
- FirstParameter (float) –
- LastParameter (float) –
- NewCurvePtr (Handle_Geom_Curve &) –
- MaxDeviation (float &) –
- AverageDeviation (float &) –
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C1
- MaxDegree (int) – default value is 14
- MaxSegment (int) – default value is 30
Return type: void
-
geomlib_CancelDenominatorDerivative
()¶ - Cancel,on the boudaries,the denominator first derivative in the directions wished by the user and set its value to 1.
Parameters: Return type: void
-
geomlib_DensifyArray1OfReal
()¶ - this makes sure that there is at least MinNumPoints in OutParameters taking into account the parameters in the InParameters array provided those are in order, that is the sequence of real in the InParameter is strictly non decreasing
Parameters: - MinNumPoints (int) –
- InParameters (TColStd_Array1OfReal &) –
- OutParameters (Handle_TColStd_HArray1OfReal &) –
Return type: void
-
geomlib_EvalMaxDistanceAlongParameter
()¶ - this will compute the maximum distancef at the parameters given in the Parameters array by projecting from the Curve to the reference curve and taking the minimum distance Than the maximum will be taken on those minimas.
Parameters: - Curve (Adaptor3d_Curve &) –
- AReferenceCurve (Adaptor3d_Curve &) –
- Tolerance (float) –
- Parameters (TColStd_Array1OfReal &) –
- MaxDistance (float &) –
Return type: void
-
geomlib_EvalMaxParametricDistance
()¶ - this will compute the maximum distance at the parameters given in the Parameters array by evaluating each parameter the two curves and taking the maximum of the evaluated distance
Parameters: - Curve (Adaptor3d_Curve &) –
- AReferenceCurve (Adaptor3d_Curve &) –
- Tolerance (float) –
- Parameters (TColStd_Array1OfReal &) –
- MaxDistance (float &) –
Return type: void
-
geomlib_ExtendCurveToPoint
()¶ - Extends the bounded curve Curve to the point Point. The extension is built: - at the end of the curve if After equals true, or - at the beginning of the curve if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded curve Curve into a BSpline curve. Warning - Nothing is done, and Curve is not modified if Cont is not equal to 1, 2 or 3. - It is recommended that the extension should not be too large with respect to the size of the bounded curve Curve: Point must not be located too far from one of the extremities of Curve.
Parameters: Return type: void
-
geomlib_ExtendSurfByLength
()¶ - Extends the bounded surface Surf along one of its boundaries. The chord length of the extension is equal to Length. The direction of the extension is given as: - the u parametric direction of Surf, if InU equals true, or - the v parametric direction of Surf, if InU equals false. In this parametric direction, the extension is built on the side of: - the last parameter of Surf, if After equals true, or - the first parameter of Surf, if After equals false. The extension is performed according to a degree of continuity equal to Cont, which in its turn must be equal to 1, 2 or 3. This function converts the bounded surface Surf into a BSpline surface. Warning - Nothing is done, and Surf is not modified if Cont is not equal to 1, 2 or 3. - It is recommended that Length, the size of the extension should not be too large with respect to the size of the bounded surface Surf. - Surf must not be a periodic BSpline surface in the parametric direction corresponding to the direction of extension.
Parameters: Return type: void
-
geomlib_FuseIntervals
()¶ Parameters: - Interval1 (TColStd_Array1OfReal &) –
- Interval2 (TColStd_Array1OfReal &) –
- Fusion (TColStd_SequenceOfReal &) –
- Confusion (float) – default value is 1.0e-9
Return type: void
-
geomlib_GTransform
()¶ - Computes the curve 3d from package Geom corresponding to the curve 3d from package Geom, transformed with the transformation <GTrsf> WARNING : this method may return a null Handle if it’s impossible to compute the transformation of a curve. It’s not implemented when : 1) the curve is an infinite parabola or hyperbola 2) the curve is an offsetcurve
Parameters: - Curve (Handle_Geom2d_Curve &) –
- GTrsf (gp_GTrsf2d) –
Return type:
-
geomlib_Inertia
()¶ - Compute principale axes of inertia, and dispertion value of some points.
Parameters: - Points (TColgp_Array1OfPnt) –
- Bary (gp_Pnt) –
- XDir (gp_Dir) –
- YDir (gp_Dir) –
- Xgap (float &) –
- YGap (float &) –
- ZGap (float &) –
Return type: void
-
geomlib_NormEstim
()¶ Parameters: Return type:
-
geomlib_RemovePointsFromArray
()¶ - Warning! This assume that the InParameter is an increasing sequence of real number and it will not check for that : Unpredictable result can happen if this is not satisfied. It is the caller responsability to check for that property. //! This method makes uniform NumPoints segments S1,…SNumPoints out of the segment defined by the first parameter and the last parameter ofthe InParameter ; keeps only one point of the InParameters set of parameter in each of the uniform segments taking care of the first and the last parameters. For the ith segment the element of the InParameter is the one that is the first to exceed the midpoint of the segment and to fall before the midpoint of the next segment There will be at the end at most NumPoints + 1 if NumPoints > 2 in the OutParameters Array
Parameters: - NumPoints (int) –
- InParameters (TColStd_Array1OfReal &) –
- OutParameters (Handle_TColStd_HArray1OfReal &) –
Return type: void
-
geomlib_SameRange
()¶ - Make the curve Curve2dPtr have the imposed range First to List the most economic way, that is if it can change the range without changing the nature of the curve it will try to do that. Otherwise it will produce a Bspline curve that has the required range
Parameters: Return type: void
-
geomlib_To3d
()¶ - Computes the curve 3d from package Geom corresponding to curve 2d from package Geom2d, on the plan defined with the local coordinate system Position.
Parameters: - Position (gp_Ax2) –
- Curve2d (Handle_Geom2d_Curve &) –
Return type:
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases