OpenCascade.js
API ReferenceModelingDataTKGeomBase

IntAna

OCCT package IntAna: IntAna_Curve, IntAna_Int3Pln, IntAna_IntConicQuad, IntAna_IntLinTorus, and 4 more bound classes.

IntAna_Curve

Definition of a parametric Curve which is the result of the intersection between two quadrics.

Constructors(1)

Instance methods(13)

  • SetCylinderQuadValues(Cylinder: gp_Cylinder, Qxx: number, Qyy: number, Qzz: number, Qxy: number, Qxz: number, Qyz: number, Qx: number, Qy: number, Qz: number, Q1: number, Tol: number, DomInf: number, DomSup: number, TwoZForATheta: boolean, ZIsPositive: boolean): void

    Sets the parameters used to compute Points and Derivative on the curve.

    Parameters (16)
    • Cylinder
    • Qxx
    • Qyy
    • Qzz
    • Qxy
    • Qxz
    • Qyz
    • Qx
    • Qy
    • Qz
    • Q1
    • Tol
    • DomInf
    • DomSup
    • TwoZForATheta
    • ZIsPositive
  • SetConeQuadValues(Cone: gp_Cone, Qxx: number, Qyy: number, Qzz: number, Qxy: number, Qxz: number, Qyz: number, Qx: number, Qy: number, Qz: number, Q1: number, Tol: number, DomInf: number, DomSup: number, TwoZForATheta: boolean, ZIsPositive: boolean): void

    Sets the parameters used to compute Points and Derivative on the curve.

    Parameters (16)
    • Cone
    • Qxx
    • Qyy
    • Qzz
    • Qxy
    • Qxz
    • Qyz
    • Qx
    • Qy
    • Qz
    • Q1
    • Tol
    • DomInf
    • DomSup
    • TwoZForATheta
    • ZIsPositive
  • IsOpen(): boolean

    Returns TRUE if the curve is not infinite at the last parameter or at the first parameter of the domain.

  • Domain(theFirst: number, theLast: number): { theFirst: number; theLast: number }

    Returns the parametric domain of the curve.

    Parameters (2)
    • theFirst
    • theLast
    Returns

    A result object with fields:

    • theFirst: updated value from the call.
    • theLast: updated value from the call.
  • IsConstant(): boolean

    Returns TRUE if the function is constant.

  • IsFirstOpen(): boolean

    Returns TRUE if the domain is open at the beginning.

  • IsLastOpen(): boolean

    Returns TRUE if the domain is open at the end.

  • Value(Theta: number): gp_Pnt

    Returns the point at parameter Theta on the curve.

    Parameters (1)
    • Theta
  • D1u(Theta: number, P: gp_Pnt, V: gp_Vec): boolean

    Returns the point and the first derivative at parameter Theta on the curve.

    Parameters (3)
    • Theta
    • P
      Mutated in place; read the updated value from this argument after the call.
    • V
      Mutated in place; read the updated value from this argument after the call.
  • Tries to find the parameter of the point P on the curve. If the method returns False, the "projection" is impossible. If the method returns True at least one parameter has been found. theParams is always sorted in ascending order.

    Parameters (2)
    • P
    • theParams
      Mutated in place; read the updated value from this argument after the call.
  • SetIsFirstOpen(Flag: boolean): void

    If flag is True, the Curve is not defined at the first parameter of its domain.

    Parameters (1)
    • Flag
  • SetIsLastOpen(Flag: boolean): void

    If flag is True, the Curve is not defined at the first parameter of its domain.

    Parameters (1)
    • Flag
  • SetDomain(theFirst: number, theLast: number): void

    Trims this curve.

    Parameters (2)
    • theFirst
    • theLast

IntAna_Int3Pln

Intersection between 3 planes. The algorithm searches for an intersection point. If two of the planes are parallel or identical, IsEmpty returns TRUE.

Constructors(2)

Instance methods(4)

  • Perform(P1: gp_Pln, P2: gp_Pln, P3: gp_Pln): void

    Determination of the intersection point between 3 planes.

    Parameters (3)
    • P1
    • P2
    • P3
  • IsDone(): boolean

    Returns True if the computation was successful.

  • IsEmpty(): boolean

    Returns TRUE if there is no intersection POINT. If 2 planes are identical or parallel, IsEmpty will return TRUE.

  • Returns the intersection point.

IntAna_IntConicQuad

This class provides the analytic intersection between a conic defined as an element of gp (Lin,Circ,Elips, Parab,Hypr) and a quadric as defined in the class Quadric from IntAna. The intersection between a conic and a plane is treated as a special case.
The result of the intersection are points (Pnt from gp), associated with the parameter on the conic.
A call to an Intersection L:Lin from gp and SPH: Sphere from gp can be written either: IntAna_IntConicQuad Inter(L,IntAna_Quadric(SPH)) or: IntAna_IntConicQuad Inter(L,SPH) (it is necessary to include IntAna_Quadric.hxx in this case)

Constructors(11)

Instance methods(16)

  • Intersects a line and a quadric.

    Parameters (2)
    • L
    • Q
  • Intersects a circle and a quadric.

    Parameters (2)
    • C
    • Q
  • Intersects an ellipse and a quadric.

    Parameters (2)
    • E
    • Q
  • Intersects a parabola and a quadric.

    Parameters (2)
    • P
    • Q
  • Intersects an hyperbola and a quadric.

    Parameters (2)
    • H
    • Q
  • Perform(Pb: gp_Parab, P: gp_Pln, Tolang: number): void

    Intersects a parabola and a plane. Tolang is used to determine if the angle between two vectors is null.

    Parameters (3)
    • Pb
    • P
    • Tolang
  • Perform(H: gp_Hypr, P: gp_Pln, Tolang: number): void

    Intersects an hyperbola and a plane. Tolang is used to determine if the angle between two vectors is null.

    Parameters (3)
    • H
    • P
    • Tolang
  • Perform(C: gp_Circ, P: gp_Pln, Tolang: number, Tol: number): void

    Intersects a circle and a plane. Tolang is used to determine if the angle between two vectors is null. Tol is used to determine if a distance is null.

    Parameters (4)
    • C
    • P
    • Tolang
    • Tol
  • Perform(E: gp_Elips, P: gp_Pln, Tolang: number, Tol: number): void

    Intersects an ellipse and a plane. Tolang is used to determine if the angle between two vectors is null. Tol is used to determine if a distance is null.

    Parameters (4)
    • E
    • P
    • Tolang
    • Tol
  • Perform(L: gp_Lin, P: gp_Pln, Tolang: number, Tol: number, Len: number): void

    Intersects a line and a plane. Tolang is used to determine if the angle between two vectors is null. Tol is used to check the distance between line and plane on the distance <Len> from the origin of the line.

    Parameters (5)
    • L
    • P
    • Tolang
    • Tol
    • Len
  • IsDone(): boolean

    Returns TRUE if the creation completed.

  • IsInQuadric(): boolean

    Returns TRUE if the conic is in the quadric.

  • IsParallel(): boolean

    Returns TRUE if the line is in a quadric which is parallel to the quadric.

  • NbPoints(): number

    Returns the number of intersection point.

  • Point(N: number): gp_Pnt

    Returns the point of range N.

    Parameters (1)
    • N
  • ParamOnConic(N: number): number

    Returns the parameter on the line of the intersection point of range N.

    Parameters (1)
    • N

IntAna_IntLinTorus

Intersection between a line and a torus.

Constructors(2)

Instance methods(6)

  • Perform(L: gp_Lin, T: gp_Torus): void

    Intersects a line and a torus.

    Parameters (2)
    • L
    • T
  • IsDone(): boolean

    Returns True if the computation was successful.

  • NbPoints(): number

    Returns the number of intersection points.

  • Value(Index: number): gp_Pnt

    Returns the intersection point of range Index.

    Parameters (1)
    • Index
  • ParamOnLine(Index: number): number

    Returns the parameter on the line of the intersection point of range Index.

    Parameters (1)
    • Index
  • ParamOnTorus(Index: number, FI: number, THETA: number): { FI: number; THETA: number }

    Returns the parameters on the torus of the intersection point of range Index.

    Parameters (3)
    • Index
    • FI
    • THETA
    Returns

    A result object with fields:

    • FI: updated value from the call.
    • THETA: updated value from the call.

IntAna_IntQuadQuad

This class provides the analytic intersection between a cylinder or a cone from gp and another quadric, as defined in the class Quadric from IntAna. This algorithm is used when the geometric intersection (class QuadQuadGeo from IntAna) returns no geometric solution. The result of the intersection may be.

  • Curves as defined in the class Curve from IntAna
  • Points (Pnt from gp)

Constructors(3)

Instance methods(13)

  • Perform(C: gp_Cylinder, Q: IntAna_Quadric, Tol: number): void

    Intersects a cylinder and a quadric . Tol est a definir plus precisemment.

    Parameters (3)
    • C
    • Q
    • Tol
  • Perform(C: gp_Cone, Q: IntAna_Quadric, Tol: number): void

    Intersects a cone and a quadric. Tol est a definir plus precisemment.

    Parameters (3)
    • C
    • Q
    • Tol
  • IsDone(): boolean

    Returns True if the computation was successful.

  • Returns TRUE if the cylinder, the cone or the sphere is identical to the quadric.

  • NbCurve(): number

    Returns the number of curves solution.

  • Curve(N: number): IntAna_Curve

    Returns the curve of range N.

    Parameters (1)
    • N
  • NbPnt(): number

    Returns the number of contact point.

  • Point(N: number): gp_Pnt

    Returns the point of range N.

    Parameters (1)
    • N
  • Parameters(N: number, U1: number, U2: number): { U1: number; U2: number }

    Returns the parameters on the "explicit quadric" (i.e. the cylinder or the cone, the first argument given to the constructor) of the point of range N.

    Parameters (3)
    • N
    • U1
    • U2
    Returns

    A result object with fields:

    • U1: updated value from the call.
    • U2: updated value from the call.
  • HasNextCurve(I: number): boolean

    Returns True if the Curve I shares its last bound with another curve.

    Parameters (1)
    • I
  • NextCurve(I: number, theOpposite: boolean): { returnValue: number; theOpposite: boolean }

    If HasNextCurve(I) returns True, this function returns the Index J of the curve which has a common bound with the curve I. If theOpposite == True, then the last parameter of the curve I, and the last parameter of the curve J give the same point. Else the last parameter of the curve I and the first parameter of the curve J are the same point.

    Parameters (2)
    • I
    • theOpposite
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theOpposite: updated value from the call.
  • HasPreviousCurve(I: number): boolean

    Returns True if the Curve I shares its first bound with another curve.

    Parameters (1)
    • I
  • PreviousCurve(I: number, theOpposite: boolean): { returnValue: number; theOpposite: boolean }

    if HasPreviousCurve(I) returns True, this function returns the Index J of the curve which has a common bound with the curve I. If theOpposite == True then the first parameter of the curve I, and the first parameter of the curve J give the same point. Else the first parameter of the curve I and the last parameter of the curve J are the same point.

    Parameters (2)
    • I
    • theOpposite
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theOpposite: updated value from the call.

IntAna_QuadQuadGeo

Geometric intersections between two natural quadrics (Sphere , Cylinder , Cone , Pln from gp). The possible intersections are :

  • 1 point
  • 1 or 2 line(s)
  • 1 Point and 1 Line
  • 1 circle
  • 1 ellipse
  • 1 parabola
  • 1 or 2 hyperbola(s).
  • Empty : there is no intersection between the two quadrics.
  • Same : the quadrics are identical
  • NoGeometricSolution : there may be an intersection, but it is necessary to use an analytic algorithm to determine it. See class IntQuadQuad from IntAna.

Constructors(16)

Instance methods(26)

  • Perform(P: gp_Pln, S: gp_Sphere): void

    Intersects a plane and a sphere.

    Parameters (2)
    • P
    • S
  • Perform(Cyl1: gp_Cylinder, Cyl2: gp_Cylinder, Tol: number): void

    Intersects two cylinders.

    Parameters (3)
    • Cyl1
    • Cyl2
    • Tol
  • Perform(Cyl: gp_Cylinder, Sph: gp_Sphere, Tol: number): void

    Intersects a cylinder and a sphere.

    Parameters (3)
    • Cyl
    • Sph
    • Tol
  • Perform(Cyl: gp_Cylinder, Con: gp_Cone, Tol: number): void

    Intersects a cylinder and a cone.

    Parameters (3)
    • Cyl
    • Con
    • Tol
  • Perform(Sph1: gp_Sphere, Sph2: gp_Sphere, Tol: number): void

    Intersects a two spheres.

    Parameters (3)
    • Sph1
    • Sph2
    • Tol
  • Perform(Sph: gp_Sphere, Con: gp_Cone, Tol: number): void

    Intersects a sphere and a cone.

    Parameters (3)
    • Sph
    • Con
    • Tol
  • Perform(Con1: gp_Cone, Con2: gp_Cone, Tol: number): void

    Intersects two cones.

    Parameters (3)
    • Con1
    • Con2
    • Tol
  • Perform(Pln: gp_Pln, Tor: gp_Torus, Tol: number): void

    Intersects plane and torus.

    Parameters (3)
    • Pln
    • Tor
    • Tol
  • Perform(Cyl: gp_Cylinder, Tor: gp_Torus, Tol: number): void

    Intersects cylinder and torus.

    Parameters (3)
    • Cyl
    • Tor
    • Tol
  • Perform(Con: gp_Cone, Tor: gp_Torus, Tol: number): void

    Intersects cone and torus.

    Parameters (3)
    • Con
    • Tor
    • Tol
  • Perform(Sph: gp_Sphere, Tor: gp_Torus, Tol: number): void

    Intersects sphere and torus.

    Parameters (3)
    • Sph
    • Tor
    • Tol
  • Perform(Tor1: gp_Torus, Tor2: gp_Torus, Tol: number): void

    Intersects two toruses.

    Parameters (3)
    • Tor1
    • Tor2
    • Tol
  • Perform(P1: gp_Pln, P2: gp_Pln, TolAng: number, Tol: number): void

    Intersects two planes. TolAng is the angular tolerance used to determine if the planes are parallel. Tol is the tolerance used to determine if the planes are identical (only when they are parallel).

    Parameters (4)
    • P1
    • P2
    • TolAng
    • Tol
  • Perform(P: gp_Pln, C: gp_Cone, Tolang: number, Tol: number): void

    Intersects a plane and a cone. TolAng is the angular tolerance used to determine if the axis of the cone is parallel or perpendicular to the plane, and if the generating line of the cone is parallel to the plane. Tol is the tolerance used to determine if the apex of the cone is in the plane.

    Parameters (4)
    • P
    • C
    • Tolang
    • Tol
  • Perform(P: gp_Pln, C: gp_Cylinder, Tolang: number, Tol: number, H: number): void

    Intersects a plane and a cylinder. TolAng is the angular tolerance used to determine if the axis of the cylinder is parallel to the plane. Tol is the tolerance used to determine if the result is a circle or an ellipse. If the maximum distance between the ellipse solution and the circle centered at the ellipse center is less than Tol, the result will be the circle. H is the height of the cylinder <Cyl>. It is used to check whether the plane and cylinder are parallel.

    Parameters (5)
    • P
    • C
    • Tolang
    • Tol
    • H
  • IsDone(): boolean

    Returns true if the computation was successful.

  • Returns the type of intersection.

  • NbSolutions(): number

    Returns the number of intersections. The possible intersections are :

    • 1 point
    • 1 or 2 line(s)
    • 1 Point and 1 Line
    • 1 circle
    • 1 ellipse
    • 1 parabola
    • 1 or 2 hyperbola(s).
  • Point(Num: number): gp_Pnt

    Returns the point solution of range Num.

    Parameters (1)
    • Num
  • Line(Num: number): gp_Lin

    Returns the line solution of range Num.

    Parameters (1)
    • Num
  • Circle(Num: number): gp_Circ

    Returns the circle solution of range Num.

    Parameters (1)
    • Num
  • Ellipse(Num: number): gp_Elips

    Returns the ellipse solution of range Num.

    Parameters (1)
    • Num
  • Parabola(Num: number): gp_Parab

    Returns the parabola solution of range Num.

    Parameters (1)
    • Num
  • Hyperbola(Num: number): gp_Hypr

    Returns the hyperbola solution of range Num.

    Parameters (1)
    • Num
  • HasCommonGen(): boolean

IntAna_Quadric

This class provides a description of Quadrics by their Coefficients in natural coordinate system.

Constructors(5)

Instance methods(7)

  • SetQuadric(P: gp_Pln): void

    Initializes the quadric with a Pln.

    Parameters (1)
    • P
  • SetQuadric(Sph: gp_Sphere): void

    Initialize the quadric with a Sphere.

    Parameters (1)
    • Sph
  • SetQuadric(Con: gp_Cone): void

    Initializes the quadric with a Cone.

    Parameters (1)
    • Con
  • Initializes the quadric with a Cylinder.

    Parameters (1)
    • Cyl
  • Coefficients(xCXX: number, xCYY: number, xCZZ: number, xCXY: number, xCXZ: number, xCYZ: number, xCX: number, xCY: number, xCZ: number, xCCte: number): { xCXX: number; xCYY: number; xCZZ: number; xCXY: number; xCXZ: number; xCYZ: number; xCX: number; xCY: number; xCZ: number; xCCte: number }

    Returns the coefficients of the polynomial equation which define the quadric: xCXX x2 + xCYY y2 + xCZZ z**2.

    • 2 ( xCXY x y + xCXZ x z + xCYZ y z )
    • 2 ( xCX x + xCY y + xCZ z )
    • xCCte
    Parameters (10)
    • xCXX
    • xCYY
    • xCZZ
    • xCXY
    • xCXZ
    • xCYZ
    • xCX
    • xCY
    • xCZ
    • xCCte
    Returns

    A result object with fields:

    • xCXX: updated value from the call.
    • xCYY: updated value from the call.
    • xCZZ: updated value from the call.
    • xCXY: updated value from the call.
    • xCXZ: updated value from the call.
    • xCYZ: updated value from the call.
    • xCX: updated value from the call.
    • xCY: updated value from the call.
    • xCZ: updated value from the call.
    • xCCte: updated value from the call.
  • NewCoefficients(xCXX: number, xCYY: number, xCZZ: number, xCXY: number, xCXZ: number, xCYZ: number, xCX: number, xCY: number, xCZ: number, xCCte: number, Axis: gp_Ax3): { xCXX: number; xCYY: number; xCZZ: number; xCXY: number; xCXZ: number; xCYZ: number; xCX: number; xCY: number; xCZ: number; xCCte: number }

    Returns the coefficients of the polynomial equation ( written in the natural coordinates system ) in the local coordinates system defined by Axis.

    Parameters (11)
    • xCXX
    • xCYY
    • xCZZ
    • xCXY
    • xCXZ
    • xCYZ
    • xCX
    • xCY
    • xCZ
    • xCCte
    • Axis
    Returns

    A result object with fields:

    • xCXX: updated value from the call.
    • xCYY: updated value from the call.
    • xCZZ: updated value from the call.
    • xCXY: updated value from the call.
    • xCXZ: updated value from the call.
    • xCYZ: updated value from the call.
    • xCX: updated value from the call.
    • xCY: updated value from the call.
    • xCZ: updated value from the call.
    • xCCte: updated value from the call.
  • Returns the list of special points (with singularities).