OCC.IntAna2d module

This package defines the intersection between two elements ofthe geometric processor : Line, Circle, Ellipse, Parabola andHyperbola; One of these elements is known with his real type,the other one is known by an implicit quadratic equation (seeclass Conic).A particular case has been made for the intersection betweentwo Lin2d, two Circ2d, a Lin2d and a Circ2d.

class IntAna2d_AnaIntersection(*args)

Bases: object

  • Empty constructor. IsDone returns False.
Return type:None
  • Intersection between two lines.
Parameters:
Return type:

None

  • Intersection between two circles.
Parameters:
Return type:

None

  • Intersection between a line and a circle.
Parameters:
Return type:

None

  • Intersection between a line and a conic.
Parameters:
  • L (gp_Lin2d) –
  • C (IntAna2d_Conic &) –
Return type:

None

  • Intersection between a circle and another conic.
Parameters:
  • C (gp_Circ2d) –
  • Co (IntAna2d_Conic &) –
Return type:

None

  • Intersection between an ellipse and another conic.
Parameters:
Return type:

None

  • Intersection between a parabola and another conic.
Parameters:
Return type:

None

  • Intersection between an hyperbola and another conic.
Parameters:
Return type:

None

IdenticalElements()
  • For the intersection between an element of gp and a conic known by an implicit equation, the result will be True if the element of gp verifies the implicit equation. For the intersection between two Lin2d or two Circ2d, the result will be True if the elements are identical. The function returns False in all the other cases.
Return type:bool
IsDone()
  • Returns True if the computation was succesfull.
Return type:bool
IsEmpty()
  • Returns True when there is no intersection, i-e - no intersection point - the elements are not identical. The element may be parallel in this case.
Return type:bool
NbPoints()
  • returns the number of IntPoint between the 2 curves.
Return type:int
ParallelElements()
  • For the intersection between two Lin2d or two Circ2d, the function returns True if the elements are parallel. The function returns False in all the other cases.
Return type:bool
Perform()
  • Intersection between two lines.
Parameters:
Return type:

None

  • Intersection between two circles.
Parameters:
Return type:

None

  • Intersection between a line and a circle.
Parameters:
Return type:

None

  • Intersection between a line and a conic.
Parameters:
  • L (gp_Lin2d) –
  • C (IntAna2d_Conic &) –
Return type:

None

  • Intersection between a circle and another conic.
Parameters:
  • C (gp_Circ2d) –
  • Co (IntAna2d_Conic &) –
Return type:

None

  • Intersection between an ellipse and another conic.
Parameters:
Return type:

None

  • Intersection between a parabola and another conic.
Parameters:
Return type:

None

  • Intersection between an hyperbola and another conic.
Parameters:
Return type:

None

Point()
  • returns the intersection point of range N; If (N<=0) or (N>NbPoints), an exception is raised.
Parameters:N (int) –
Return type:IntAna2d_IntPoint
thisown

The membership flag

class IntAna2d_Conic(*args)

Bases: object

Parameters:
Return type:

None

Return type:

None

Return type:

None

Return type:

None

Return type:

None

Coefficients()
  • returns the coefficients of the polynomial equation wich defines the conic: A.X**2 + B.Y**2 + 2.C.X*Y + 2.D.X + 2.E.Y + F = 0.
Parameters:
  • A (float &) –
  • B (float &) –
  • C (float &) –
  • D (float &) –
  • E (float &) –
  • F (float &) –
Return type:

None

Grad()
  • returns the value of the gradient of F at the point X,Y.
Parameters:
Return type:

gp_XY

NewCoefficients()
  • Returns the coefficients of the polynomial equation ( written in the natural coordinates system ) A x x + B y y + 2 C x y + 2 D x + 2 E y + F in the local coordinates system defined by Axis
Parameters:
  • A (float &) –
  • B (float &) –
  • C (float &) –
  • D (float &) –
  • E (float &) –
  • F (float &) –
  • Axis (gp_Ax2d) –
Return type:

None

ValAndGrad()
  • Returns the value of the function and its gradient at the point X,Y.
Parameters:
Return type:

None

Value()
  • value of the function F at the point X,Y.
Parameters:
Return type:

float

thisown

The membership flag

class IntAna2d_IntPoint(*args)

Bases: object

  • Create an intersection point between 2 parametric 2d lines. X,Y are the coordinate of the point. U1 is the parameter on the first element, U2 the parameter on the second one.
Parameters:
Return type:

None

  • Create an intersection point between a parametric 2d line, and a line given by an implicit equation (ImplicitCurve). X,Y are the coordinate of the point. U1 is the parameter on the parametric element. Empty constructor. It’s necessary to use one of the SetValue method after this one.
Parameters:
Return type:

None

Return type:

None

ParamOnFirst()
  • Returns the parameter on the first element.
Return type:float
ParamOnSecond()
  • Returns the parameter on the second element. If the second element is an implicit curve, an exception is raised.
Return type:float
SecondIsImplicit()
  • Returns True if the second curve is implicit.
Return type:bool
SetValue()
  • Set the values for a ‘non-implicit’ point.
Parameters:
Return type:

void

  • Set the values for an ‘implicit’ point.
Parameters:
Return type:

void

Value()
  • Returns the geometric point.
Return type:gp_Pnt2d
thisown

The membership flag

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