# OCC.GeomLib module

class `GeomLib_Array1OfMat`(*args)

  Bases: `object`

  Parameters: | Low (int) – Up (int) – Item (gp_Mat) – Low – Up –
  Return type: | None
  Return type: | None

  `Assign`()

    Parameters: | Other (GeomLib_Array1OfMat &) –
    Return type: | GeomLib_Array1OfMat

  `ChangeValue`()

    Parameters: | Index (int) –
    Return type: | gp_Mat

  `Destroy`()

    Return type: | None

  `Init`()

    Parameters: | V (gp_Mat) –
    Return type: | None

  `IsAllocated`()

    Return type: | bool

  `Length`()

    Return type: | int

  `Lower`()

    Return type: | int

  `Set`()

    Parameters: | Other (GeomLib_Array1OfMat &) –
    Return type: | GeomLib_Array1OfMat

  `SetValue`()

    Parameters: | Index (int) – Value (gp_Mat) –
    Return type: | None

  `Upper`()

    Return type: | int

  `Value`()

    Parameters: | Index (int) –
    Return type: | gp_Mat

  `thisown`

    The membership flag

class `GeomLib_Check2dBSplineCurve`(*args)

  Bases: `object`

  Parameters: | Curve (Handle_Geom2d_BSplineCurve &) – Tolerance (float) – AngularTolerance (float) –
  Return type: | None

  `FixTangent`()

    Parameters: | FirstFlag (bool) – LastFlag (bool) –
    Return type: | None

  `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: | FirstFlag (bool) – LastFlag (bool) –
    Return type: | Handle_Geom2d_BSplineCurve

  `IsDone`()

    Return type: | bool

  `NeedTangentFix`()

    Parameters: | FirstFlag (bool) – SecondFlag (bool) –
    Return type: | None

  `thisown`

    The membership flag

class `GeomLib_CheckBSplineCurve`(*args)

  Bases: `object`

  Parameters: | Curve (Handle_Geom_BSplineCurve &) – Tolerance (float) – AngularTolerance (float) –
  Return type: | None

  `FixTangent`()

    Parameters: | FirstFlag (bool) – LastFlag (bool) –
    Return type: | None

  `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: | FirstFlag (bool) – LastFlag (bool) –
    Return type: | Handle_Geom_BSplineCurve

  `IsDone`()

    Return type: | bool

  `NeedTangentFix`()

    Parameters: | FirstFlag (bool) – SecondFlag (bool) –
    Return type: | None

  `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: | None

  `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: | UParameter (float) – VParameter (float) –
    Return type: | float

  `thisown`

    The membership flag

class `GeomLib_Interpolate`(*args)

  Bases: `object`

  Parameters: | Degree (int) – NumPoints (int) – Points (TColgp_Array1OfPnt) – Parameters (TColStd_Array1OfReal &) –
  Return type: | None

  `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

  `IsDone`()
    - returns if everything went OK

    Return type: | bool

  `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: | None

  `IsPlanar`()
    - Return if the Surface is a plan

    Return type: | bool

  `Plan`()
    - Return the plan definition

    Return type: | gp_Pln

  `thisown`

    The membership flag

class `GeomLib_LogSample`(*args)

  Bases: `OCC.math.math_FunctionSample`

  Parameters: | A (float) – B (float) – N (int) –
  Return type: | None

  `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: | Index1D (int) – Index3D (int) –
    Return type: | Handle_Geom_BSplineCurve

  `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: | Index1d (int) – Index2d (int) –
    Return type: | Handle_Geom2d_BSplineCurve

  `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: | Index1d (int) – Index2d (int) –
    Return type: | Handle_Geom2d_BSplineCurve

  `IsDone`()

    Return type: | bool

  `Nb1DSpaces`()
    - returns the number of 1D spaces of the Approx

    Return type: | int

  `Nb2DSpaces`()
    - returns the number of 3D spaces of the Approx

    Return type: | int

  `Nb3DSpaces`()
    - returns the number of 3D spaces of the Approx

    Return type: | int

  `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`(*args)
    - Extracts the parameter of a 3D point lying on a 3D curve or at a distance less than the tolerance value.

    Parameters: | Curve (Handle_Geom_Curve &) – Point (gp_Pnt) – Tolerance (float) – U (float &) –
    Return type: | bool

    - Extracts the parameter of a 2D point lying on a 2D curve or at a distance less than the tolerance value.

    Parameters: | Curve (Handle_Geom2d_Curve &) – Point (gp_Pnt2d) – Tolerance (float) – U (float &) –
    Return type: | bool

  static `Parameters`(*args)
    - Extracts the parameter of a 3D point lying on a surface or at a distance less than the tolerance value.

    Parameters: | Surface (Handle_Geom_Surface &) – Point (gp_Pnt) – Tolerance (float) – U (float &) – V (float &) –
    Return type: | bool

  `thisown`

    The membership flag

`GeomLib_Tool_Parameter`(*args)
  - Extracts the parameter of a 3D point lying on a 3D curve or at a distance less than the tolerance value.

  Parameters: | Curve (Handle_Geom_Curve &) – Point (gp_Pnt) – Tolerance (float) – U (float &) –
  Return type: | bool

  - Extracts the parameter of a 2D point lying on a 2D curve or at a distance less than the tolerance value.

  Parameters: | Curve (Handle_Geom2d_Curve &) – Point (gp_Pnt2d) – Tolerance (float) – U (float &) –
  Return type: | bool

`GeomLib_Tool_Parameters`(*args)
  - Extracts the parameter of a 3D point lying on a surface or at a distance less than the tolerance value.

  Parameters: | Surface (Handle_Geom_Surface &) – Point (gp_Pnt) – Tolerance (float) – U (float &) – V (float &) –
  Return type: | bool

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`(*args)

    Parameters: | Curve (Handle_Geom_BoundedCurve &) – P1 (gp_Pnt) – P2 (gp_Pnt) – T1 (gp_Vec) – T2 (gp_Vec) –
    Return type: | void

  static `AxeOfInertia`(*args)
    - 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`(*args)

    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`(*args)
    - Cancel,on the boudaries,the denominator first derivative in the directions wished by the user and set its value to 1.

    Parameters: | BSurf (Handle_Geom_BSplineSurface &) – UDirection (bool) – VDirection (bool) –
    Return type: | void

  static `DensifyArray1OfReal`(*args)
    - 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`(*args)
    - 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`(*args)
    - 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`(*args)
    - 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: | Curve (Handle_Geom_BoundedCurve &) – Point (gp_Pnt) – Cont (int) – After (bool) –
    Return type: | void

  static `ExtendSurfByLength`(*args)
    - 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: | Surf (Handle_Geom_BoundedSurface &) – Length (float) – Cont (int) – InU (bool) – After (bool) –
    Return type: | void

  static `FuseIntervals`(*args)

    Parameters: | Interval1 (TColStd_Array1OfReal &) – Interval2 (TColStd_Array1OfReal &) – Fusion (TColStd_SequenceOfReal &) – Confusion (float) – default value is 1.0e-9
    Return type: | void

  static `GTransform`(*args)
    - 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: | Handle_Geom2d_Curve

  static `Inertia`(*args)
    - 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`(*args)

    Parameters: | S (Handle_Geom_Surface &) – UV (gp_Pnt2d) – Tol (float) – N (gp_Dir) –
    Return type: | int

  static `RemovePointsFromArray`(*args)
    - 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`(*args)
    - 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: | Tolerance (float) – Curve2dPtr (Handle_Geom2d_Curve &) – First (float) – Last (float) – RequestedFirst (float) – RequestedLast (float) – NewCurve2dPtr (Handle_Geom2d_Curve &) –
    Return type: | void

  static `To3d`(*args)
    - 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: | Handle_Geom_Curve

  `thisown`

    The membership flag

`geomlib_AdjustExtremity`(*args)

  Parameters: | Curve (Handle_Geom_BoundedCurve &) – P1 (gp_Pnt) – P2 (gp_Pnt) – T1 (gp_Vec) – T2 (gp_Vec) –
  Return type: | void

`geomlib_AxeOfInertia`(*args)
  - 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`(*args)

  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`(*args)
  - Cancel,on the boudaries,the denominator first derivative in the directions wished by the user and set its value to 1.

  Parameters: | BSurf (Handle_Geom_BSplineSurface &) – UDirection (bool) – VDirection (bool) –
  Return type: | void

`geomlib_DensifyArray1OfReal`(*args)
  - 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`(*args)
  - 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`(*args)
  - 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`(*args)
  - 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: | Curve (Handle_Geom_BoundedCurve &) – Point (gp_Pnt) – Cont (int) – After (bool) –
  Return type: | void

`geomlib_ExtendSurfByLength`(*args)
  - 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: | Surf (Handle_Geom_BoundedSurface &) – Length (float) – Cont (int) – InU (bool) – After (bool) –
  Return type: | void

`geomlib_FuseIntervals`(*args)

  Parameters: | Interval1 (TColStd_Array1OfReal &) – Interval2 (TColStd_Array1OfReal &) – Fusion (TColStd_SequenceOfReal &) – Confusion (float) – default value is 1.0e-9
  Return type: | void

`geomlib_GTransform`(*args)
  - 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: | Handle_Geom2d_Curve

`geomlib_Inertia`(*args)
  - 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`(*args)

  Parameters: | S (Handle_Geom_Surface &) – UV (gp_Pnt2d) – Tol (float) – N (gp_Dir) –
  Return type: | int

`geomlib_RemovePointsFromArray`(*args)
  - 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`(*args)
  - 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: | Tolerance (float) – Curve2dPtr (Handle_Geom2d_Curve &) – First (float) – Last (float) – RequestedFirst (float) – RequestedLast (float) – NewCurve2dPtr (Handle_Geom2d_Curve &) –
  Return type: | void

`geomlib_To3d`(*args)
  - 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: | Handle_Geom_Curve

`register_handle`(handle, base_object)

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