OCC.IntCurve module

This package provides algorithmes to intersect 2D curves,with domains.class IntConicConic : Algorithm used to intersect 2 conicsfrom gp with domains.class IntConicCurveGen : Generic algorithm used to intersecta conic from gp, and a parametrisedcurve.The parametrised Curve cannot be a Composite curve andcan not be a conic.class IntCurveCurveGen : Generic algorithm used to intersect 2curves. The resources on a curve arediscribed in the class CurveTool.class UserIntConicCurveGen: Generic algorithm used tointersect a Conic from gpand a parametrised curve.This curve can be either acomposite curve or a conic.-Level: AdvancedThe Classes <PConicTool,IConicTool,PConic,ProjectOnPConicTool,IntConicCurveGen,ProjPCurGen,UserIntConicCurveGen,IntPolyPolyGen,Polygon2dGen,DistBetweenPCurvesGen> are InternalThe Classe <IntCurveCurveGen> is Advanced

class IntCurve_IConicTool(*args)

Bases: object

Return type:

None

Parameters:
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

D1()
Parameters:
Return type:

None

D2()
Parameters:
Return type:

None

Distance()
  • Computes the value of the signed distance between the point P and the implicit curve.
Parameters:P (gp_Pnt2d) –
Return type:float
FindParameter()
  • Returns the parameter U of the point on the implicit curve corresponding to the point P. The correspondance between P and the point P(U) on the implicit curve must be coherent with the way of determination of the signed distance.
Parameters:P (gp_Pnt2d) –
Return type:float
GradDistance()
  • Computes the Gradient of the Signed Distance between a point and the implicit curve, at the point P.
Parameters:P (gp_Pnt2d) –
Return type:gp_Vec2d
Value()
Parameters:X (float) –
Return type:gp_Pnt2d
thisown

The membership flag

class IntCurve_IntConicConic(*args)

Bases: OCC.IntRes2d.IntRes2d_Intersection

  • Empty Constructor
Return type:None
  • Intersection between 2 lines from gp.
Parameters:
Return type:

None

  • Intersection between a line and a circle. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between a line and an ellipse. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between a line and a parabola from gp.
Parameters:
Return type:

None

  • Intersection between a line and an hyperbola.
Parameters:
Return type:

None

  • Intersection between 2 circles from gp. The exception ConstructionError is raised if the method IsClosed of one of the domain returns False.
Parameters:
Return type:

None

  • Intersection between a circle and an ellipse. The exception ConstructionError is raised if the method IsClosed of one the domain returns False.
Parameters:
Return type:

None

  • Intersection between a circle and a parabola. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between a circle and an hyperbola. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between 2 ellipses. The exception ConstructionError is raised if the method IsClosed of one of the domain returns False.
Parameters:
Return type:

None

  • Intersection between an ellipse and a parabola. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between an ellipse and an hyperbola. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between 2 parabolas.
Parameters:
Return type:

None

  • Intersection between a parabola and an hyperbola.
Parameters:
Return type:

None

  • Intersection between 2 hyperbolas.
Parameters:
Return type:

None

Perform()
  • Intersection between 2 lines from gp.
Parameters:
Return type:

None

  • Intersection between a line and a circle. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between a line and an ellipse. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between a line and a parabola from gp.
Parameters:
Return type:

None

  • Intersection between a line and an hyperbola.
Parameters:
Return type:

None

  • Intersection between 2 circles from gp. The exception ConstructionError is raised if the method IsClosed of the domain of one of the circle returns False.
Parameters:
Return type:

None

  • Intersection between a circle and an ellipse. The exception ConstructionError is raised if the method IsClosed of one the domain returns False.
Parameters:
Return type:

None

  • Intersection between a circle and a parabola. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between a circle and an hyperbola. The exception ConstructionError is raised if the method IsClosed of the domain of the circle returns False.
Parameters:
Return type:

None

  • Intersection between 2 ellipses. The exception ConstructionError is raised if the method IsClosed of one of the domain returns False.
Parameters:
Return type:

None

  • Intersection between an ellipse and a parabola. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between an ellipse and an hyperbola. The exception ConstructionError is raised if the method IsClosed of the domain of the ellipse returns False.
Parameters:
Return type:

None

  • Intersection between 2 parabolas.
Parameters:
Return type:

None

  • Intersection between a parabola and an hyperbola.
Parameters:
Return type:

None

  • Intersection between 2 hyperbolas.
Parameters:
Return type:

None

thisown

The membership flag

class IntCurve_IntImpConicParConic(*args)

Bases: OCC.IntRes2d.IntRes2d_Intersection

Return type:

None

Parameters:
  • ITool (IntCurve_IConicTool &) –
  • Dom1 (IntRes2d_Domain &) –
  • PCurve (IntCurve_PConic &) –
  • Dom2 (IntRes2d_Domain &) –
  • TolConf (float) –
  • Tol (float) –
Return type:

None

And_Domaine_Objet1_Intersections()
Parameters:
  • TheImpTool (IntCurve_IConicTool &) –
  • TheParCurve (IntCurve_PConic &) –
  • TheImpCurveDomain (IntRes2d_Domain &) –
  • TheParCurveDomain (IntRes2d_Domain &) –
  • NbResultats (int &) –
  • Inter2_And_Domain2 (TColStd_Array1OfReal &) –
  • Inter1 (TColStd_Array1OfReal &) –
  • Resultat1 (TColStd_Array1OfReal &) –
  • Resultat2 (TColStd_Array1OfReal &) –
  • EpsNul (float) –
Return type:

None

FindU()
Parameters:
  • parameter (float) –
  • point (gp_Pnt2d) –
  • TheParCurev (IntCurve_PConic &) –
  • TheImpTool (IntCurve_IConicTool &) –
Return type:

float

FindV()
Parameters:
  • parameter (float) –
  • point (gp_Pnt2d) –
  • TheImpTool (IntCurve_IConicTool &) –
  • ParCurve (IntCurve_PConic &) –
  • TheParCurveDomain (IntRes2d_Domain &) –
  • V0 (float) –
  • V1 (float) –
  • Tolerance (float) –
Return type:

float

Perform()
Parameters:
  • ITool (IntCurve_IConicTool &) –
  • Dom1 (IntRes2d_Domain &) –
  • PCurve (IntCurve_PConic &) –
  • Dom2 (IntRes2d_Domain &) –
  • TolConf (float) –
  • Tol (float) –
Return type:

None

thisown

The membership flag

class IntCurve_MyImpParToolOfIntImpConicParConic(*args)

Bases: OCC.math.math_FunctionWithDerivative

Parameters:
  • IT (IntCurve_IConicTool &) –
  • PC (IntCurve_PConic &) –
Return type:

None

thisown

The membership flag

class IntCurve_PConic(*args)

Bases: object

Parameters:
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Accuracy()
Return type:int
Axis2()
Return type:gp_Ax22d
EpsX()
Return type:float
Param1()
Return type:float
Param2()
Return type:float
SetAccuracy()
  • Accuracy is the number of samples used to approximate the parametric curve on its domain.
Parameters:Nb (int) –
Return type:None
SetEpsX()
  • EpsX is a internal tolerance used in math algorithms, usually about 1e-10 (See FunctionAllRoots for more details)
Parameters:EpsDist (float) –
Return type:None
TypeCurve()
  • The Conics are manipulated as objects which only depend on three parameters : Axis and two Real from Standards. Type Curve is used to select the correct Conic.
Return type:GeomAbs_CurveType
thisown

The membership flag

class IntCurve_PConicTool

Bases: object

static D1()
Parameters:
Return type:

void

static D2()
Parameters:
Return type:

void

static EpsX()
Parameters:C (IntCurve_PConic &) –
Return type:float
static NbSamples()
Parameters:
  • C (IntCurve_PConic &) –
  • C
  • U0 (float) –
  • U1 (float) –
Return type:

int

Return type:

int

static Value()
Parameters:
  • C (IntCurve_PConic &) –
  • X (float) –
Return type:

gp_Pnt2d

thisown

The membership flag

IntCurve_PConicTool_D1()
Parameters:
Return type:

void

IntCurve_PConicTool_D2()
Parameters:
Return type:

void

IntCurve_PConicTool_EpsX()
Parameters:C (IntCurve_PConic &) –
Return type:float
IntCurve_PConicTool_NbSamples()
Parameters:
  • C (IntCurve_PConic &) –
  • C
  • U0 (float) –
  • U1 (float) –
Return type:

int

Return type:

int

IntCurve_PConicTool_Value()
Parameters:
  • C (IntCurve_PConic &) –
  • X (float) –
Return type:

gp_Pnt2d

class IntCurve_ProjectOnPConicTool

Bases: object

static FindParameter()
  • Returns the parameter V of the point on the parametric curve corresponding to the Point Pnt. The Correspondance between Pnt and the point P(V) on the parametric curve must be coherent with the way of determination of the signed distance between a point and the implicit curve. Tol is the tolerance on the distance between a point and the parametrised curve. In that case, no bounds are given. The research of the rigth parameter has to be made on the natural parametric domain of the curve.
Parameters:
Return type:

float

  • Returns the parameter V of the point on the parametric curve corresponding to the Point Pnt. The Correspondance between Pnt and the point P(V) on the parametric curve must be coherent with the way of determination of the signed distance between a point and the implicit curve. Tol is the tolerance on the distance between a point and the parametrised curve. LowParameter and HighParameter give the boundaries of the interval in wich the parameter certainly lies. These parameters are given to implement a more efficient algoritm. So, it is not necessary to check that the returned value verifies LowParameter <= Value <= HighParameter.
Parameters:
Return type:

float

thisown

The membership flag

IntCurve_ProjectOnPConicTool_FindParameter()
  • Returns the parameter V of the point on the parametric curve corresponding to the Point Pnt. The Correspondance between Pnt and the point P(V) on the parametric curve must be coherent with the way of determination of the signed distance between a point and the implicit curve. Tol is the tolerance on the distance between a point and the parametrised curve. In that case, no bounds are given. The research of the rigth parameter has to be made on the natural parametric domain of the curve.
Parameters:
Return type:

float

  • Returns the parameter V of the point on the parametric curve corresponding to the Point Pnt. The Correspondance between Pnt and the point P(V) on the parametric curve must be coherent with the way of determination of the signed distance between a point and the implicit curve. Tol is the tolerance on the distance between a point and the parametrised curve. LowParameter and HighParameter give the boundaries of the interval in wich the parameter certainly lies. These parameters are given to implement a more efficient algoritm. So, it is not necessary to check that the returned value verifies LowParameter <= Value <= HighParameter.
Parameters:
Return type:

float

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

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

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