IntAna2d
OCCT package IntAna2d: IntAna2d_AnaIntersection, IntAna2d_Conic, IntAna2d_IntPoint, MyDirectPolynomialRoots.
IntAna2d_AnaIntersection
Implementation of the analytical intersection between:
- two Lin2d,
- two Circ2d,
- a Lin2d and a Circ2d,
- an element of gp (Lin2d, Circ2d, Elips2d, Parab2d, Hypr2d) and another conic. No tolerance is given for all the intersections: the tolerance will be the "precision machine".
Constructors(9)
Empty constructor. IsDone returns False.
- constructor(L1: gp_Lin2d, L2: gp_Lin2d): IntAna2d_AnaIntersection
Intersection between two lines.
Parameters (2)L1L2
- constructor(C1: gp_Circ2d, C2: gp_Circ2d): IntAna2d_AnaIntersection
Intersection between two circles.
Parameters (2)C1C2
Intersection between a line and a circle.
Parameters (2)LC
Intersection between a line and a conic.
Parameters (2)LC
Intersection between a circle and another conic.
Parameters (2)CCo
Intersection between an ellipse and another conic.
Parameters (2)EC
Intersection between a parabola and another conic.
Parameters (2)PC
Intersection between an hyperbola and another conic.
Parameters (2)HC
Instance methods(14)
Intersection between two lines.
Parameters (2)L1L2
Intersection between two circles.
Parameters (2)C1C2
Intersection between a line and a circle.
Parameters (2)LC
- Perform(L: gp_Lin2d, C: IntAna2d_Conic): void
Intersection between a line and a conic.
Parameters (2)LC
- Perform(C: gp_Circ2d, Co: IntAna2d_Conic): void
Intersection between a circle and another conic.
Parameters (2)CCo
- Perform(E: gp_Elips2d, C: IntAna2d_Conic): void
Intersection between an ellipse and another conic.
Parameters (2)EC
- Perform(P: gp_Parab2d, C: IntAna2d_Conic): void
Intersection between a parabola and another conic.
Parameters (2)PC
- Perform(H: gp_Hypr2d, C: IntAna2d_Conic): void
Intersection between an hyperbola and another conic.
Parameters (2)HC
- IsDone(): boolean
Returns TRUE if the computation was successful.
- IsEmpty(): boolean
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.
- IdenticalElements(): boolean
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.
- ParallelElements(): boolean
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.
- NbPoints(): number
returns the number of IntPoint between the 2 curves.
- Point(N: number): IntAna2d_IntPoint
returns the intersection point of range N; If (N<=0) or (N>NbPoints), an exception is raised.
Parameters (1)N
IntAna2d_Conic
Definition of a conic by its implicit quadaratic equation: A.X2 + B.Y2 + 2.C.X*Y + 2.D.X + 2.E.Y + F = 0.
Constructors(5)
- Parameters (1)
C
- Parameters (1)
C
- Parameters (1)
C
- Parameters (1)
C
- Parameters (1)
C
Instance methods(5)
- Value(X: number, Y: number): number
value of the function F at the point X,Y.
Parameters (2)XY
returns the value of the gradient of F at the point X,Y.
Parameters (2)XY
- ValAndGrad(X: number, Y: number, Val: number, Grd: gp_XY): { Val: number }
Returns the value of the function and its gradient at the point X,Y.
Parameters (4)XYValGrd—Mutated in place; read the updated value from this argument after the call.
ReturnsA result object with fields:
Val: updated value from the call.
- Coefficients(A: number, B: number, C: number, D: number, E: number, F: number): { A: number; B: number; C: number; D: number; E: number; F: number }
returns the coefficients of the polynomial equation which defines the conic: A.X2 + B.Y2 + 2.C.X*Y + 2.D.X + 2.E.Y + F = 0.
Parameters (6)ABCDEF
ReturnsA result object with fields:
A: updated value from the call.B: updated value from the call.C: updated value from the call.D: updated value from the call.E: updated value from the call.F: updated value from the call.
- NewCoefficients(A: number, B: number, C: number, D: number, E: number, F: number, Axis: gp_Ax2d): { A: number; B: number; C: number; D: number; E: number; F: number }
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 (7)ABCDEFAxis
ReturnsA result object with fields:
A: updated value from the call.B: updated value from the call.C: updated value from the call.D: updated value from the call.E: updated value from the call.F: updated value from the call.
IntAna2d_IntPoint
Geometrical intersection between two 2d elements.
Constructors(3)
- constructor(X: number, Y: number, U1: number): IntAna2d_IntPoint
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 (3)XYU1
- constructor(X: number, Y: number, U1: number, U2: number): IntAna2d_IntPoint
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 (4)XYU1U2
Instance methods(6)
- SetValue(X: number, Y: number, U1: number, U2: number): void
Set the values for a "non-implicit" point.
Parameters (4)XYU1U2
- SetValue(X: number, Y: number, U1: number): void
Set the values for an "implicit" point.
Parameters (3)XYU1
Returns the geometric point.
- SecondIsImplicit(): boolean
Returns True if the second curve is implicit.
- ParamOnFirst(): number
Returns the parameter on the first element.
- ParamOnSecond(): number
Returns the parameter on the second element. If the second element is an implicit curve, an exception is raised.
MyDirectPolynomialRoots
Constructors(2)
- constructor(A2: number, A1: number, A0: number): MyDirectPolynomialRootsParameters (3)
A2A1A0
- constructor(A4: number, A3: number, A2: number, A1: number, A0: number): MyDirectPolynomialRootsParameters (5)
A4A3A2A1A0
Instance methods(4)
- NbSolutions(): number
- Value(i: number): numberParameters (1)
i
- IsDone(): number
- InfiniteRoots(): boolean