OpenCascade.js
API ReferenceModelingAlgorithmsTKGeomAlgo

IntPolyh

OCCT package IntPolyh: IntPolyh_Couple, IntPolyh_Edge, IntPolyh_Intersection, IntPolyh_Point, and 5 more bound classes.

IntPolyh_Couple

The class represents the couple of indices with additional characteristics such as analyzed flag and an angle. In IntPolyh_MaillageAffinage algorithm the class is used as a couple of interfering triangles with the intersection angle.

Constructors(2)

Instance methods(9)

  • FirstValue(): number

    Returns the first index.

  • SecondValue(): number

    Returns the second index.

  • IsAnalyzed(): boolean

    Returns TRUE if the couple has been analyzed.

  • Angle(): number

    Returns the angle.

  • SetCoupleValue(theInd1: number, theInd2: number): void

    Sets the triangles.

    Parameters (2)
    • theInd1
    • theInd2
  • SetAnalyzed(theAnalyzed: boolean): void

    Sets the analyzed flag.

    Parameters (1)
    • theAnalyzed
  • SetAngle(theAngle: number): void

    Sets the angle.

    Parameters (1)
    • theAngle
  • IsEqual(theOther: IntPolyh_Couple): boolean

    Returns true if the Couple is equal to <theOther>.

    Parameters (1)
    • theOther
  • Dump(v: number): void
    Parameters (1)
    • v

IntPolyh_Edge

The class represents the edge built between the two IntPolyh points. It is linked to two IntPolyh triangles.

Constructors(2)

Instance methods(9)

  • FirstPoint(): number

    Returns the first point.

  • SecondPoint(): number

    Returns the second point.

  • FirstTriangle(): number

    Returns the first triangle.

  • SecondTriangle(): number

    Returns the second triangle.

  • SetFirstPoint(thePoint: number): void

    Sets the first point.

    Parameters (1)
    • thePoint
  • SetSecondPoint(thePoint: number): void

    Sets the second point.

    Parameters (1)
    • thePoint
  • SetFirstTriangle(theTriangle: number): void

    Sets the first triangle.

    Parameters (1)
    • theTriangle
  • SetSecondTriangle(theTriangle: number): void

    Sets the second triangle.

    Parameters (1)
    • theTriangle
  • Dump(v: number): void
    Parameters (1)
    • v

IntPolyh_Intersection

API algorithm for intersection of two surfaces by intersection of their triangulations.
Algorithm provides possibility to intersect surfaces as without the precomputed sampling as with it.
If the numbers of sampling points are not given, it will build the net of 10x10 sampling points for each surface.
The intersection is done inside constructors. Before obtaining the results of intersection it is necessary to check if intersection has been performed correctly. It can be done by calling the IsDone() method.
The results of intersection are the intersection lines and points.

Constructors(3)

Instance methods(7)

  • IsParallel(): boolean
  • NbSectionLines(): number
  • NbPointsInLine(IndexLine: number): number
    Parameters (1)
    • IndexLine
  • NbTangentZones(): number
  • NbPointsInTangentZone(argNo0: number): number
    Parameters (1)
    • argNo0
  • GetLinePoint(IndexLine: number, IndexPoint: number, x: number, y: number, z: number, u1: number, v1: number, u2: number, v2: number, incidence: number): { x: number; y: number; z: number; u1: number; v1: number; u2: number; v2: number; incidence: number }
    Parameters (10)
    • IndexLine
    • IndexPoint
    • x
    • y
    • z
    • u1
    • v1
    • u2
    • v2
    • incidence
  • GetTangentZonePoint(IndexLine: number, IndexPoint: number, x: number, y: number, z: number, u1: number, v1: number, u2: number, v2: number): { x: number; y: number; z: number; u1: number; v1: number; u2: number; v2: number }
    Parameters (9)
    • IndexLine
    • IndexPoint
    • x
    • y
    • z
    • u1
    • v1
    • u2
    • v2

IntPolyh_Point

The class represents the point on the surface with both 3D and 2D points.

Constructors(2)

Instance methods(26)

  • X(): number

    Returns X coordinate of the 3D point.

  • Y(): number

    Returns Y coordinate of the 3D point.

  • Z(): number

    Returns the Z coordinate of the 3D point.

  • U(): number

    Returns the U coordinate of the 2D point.

  • V(): number

    Returns the V coordinate of the 2D point.

  • PartOfCommon(): number

    Returns 0 if the point is not common with the other surface.

  • Set(x: number, y: number, z: number, u: number, v: number, II?: number): void

    Sets the point.

    Parameters (6)
    • x
    • y
    • z
    • u
    • v
    • II
  • SetX(x: number): void

    Sets the X coordinate for the 3D point.

    Parameters (1)
    • x
  • SetY(y: number): void

    Sets the Y coordinate for the 3D point.

    Parameters (1)
    • y
  • SetZ(z: number): void

    Sets the Z coordinate for the 3D point.

    Parameters (1)
    • z
  • SetU(u: number): void

    Sets the U coordinate for the 2D point.

    Parameters (1)
    • u
  • SetV(v: number): void

    Sets the V coordinate for the 2D point.

    Parameters (1)
    • v
  • SetPartOfCommon(ii: number): void

    Sets the part of common.

    Parameters (1)
    • ii
  • Creates middle point from P1 and P2 and stores it to this.

    Parameters (3)
    • MySurface
    • P1
    • P2
  • Addition.

    Parameters (1)
    • P1
  • Subtraction.

    Parameters (1)
    • P1
  • Divide(rr: number): IntPolyh_Point

    Division.

    Parameters (1)
    • rr
  • Multiplication.

    Parameters (1)
    • rr
  • SquareModulus(): number

    Square modulus.

  • Square distance to the other point.

    Parameters (1)
    • P2
  • Dot(P2: IntPolyh_Point): number

    Dot.

    Parameters (1)
    • P2
  • Cross.

    Parameters (2)
    • P1
    • P2
  • Dump(): void

    Dump.

  • Dump(i: number): void

    Dump.

    Parameters (1)
    • i
  • SetDegenerated(theFlag: boolean): void

    Sets the degenerated flag.

    Parameters (1)
    • theFlag
  • Degenerated(): boolean

    Returns the degenerated flag.

IntPolyh_SectionLine

Constructors(3)

Instance methods(10)

IntPolyh_StartPoint

Constructors(2)

Instance methods(29)

  • X(): number
  • Y(): number
  • Z(): number
  • U1(): number
  • V1(): number
  • U2(): number
  • V2(): number
  • T1(): number
  • E1(): number
  • Lambda1(): number
  • T2(): number
  • E2(): number
  • Lambda2(): number
  • GetAngle(): number
  • ChainList(): number
  • GetEdgePoints(Triangle: IntPolyh_Triangle, FirstEdgePoint: number, SecondEdgePoint: number, LastPoint: number): { returnValue: number; FirstEdgePoint: number; SecondEdgePoint: number; LastPoint: number }
    Parameters (4)
    • Triangle
    • FirstEdgePoint
    • SecondEdgePoint
    • LastPoint
  • SetXYZ(XX: number, YY: number, ZZ: number): void
    Parameters (3)
    • XX
    • YY
    • ZZ
  • SetUV1(UU1: number, VV1: number): void
    Parameters (2)
    • UU1
    • VV1
  • SetUV2(UU2: number, VV2: number): void
    Parameters (2)
    • UU2
    • VV2
  • SetEdge1(IE1: number): void
    Parameters (1)
    • IE1
  • SetLambda1(LAM1: number): void
    Parameters (1)
    • LAM1
  • SetEdge2(IE2: number): void
    Parameters (1)
    • IE2
  • SetLambda2(LAM2: number): void
    Parameters (1)
    • LAM2
  • SetCoupleValue(IT1: number, IT2: number): void
    Parameters (2)
    • IT1
    • IT2
  • SetAngle(ang: number): void
    Parameters (1)
    • ang
  • SetChainList(ChList: number): void
    Parameters (1)
    • ChList
  • Parameters (1)
    • SP
  • Dump(): void
  • Dump(i: number): void
    Parameters (1)
    • i

IntPolyh_Tools

The class provides tools for surface sampling.

Constructors(1)

Static methods(4)

  • IsEnlargePossible(theSurf: Adaptor3d_Surface, theUEnlarge: boolean, theVEnlarge: boolean): { theUEnlarge: boolean; theVEnlarge: boolean }

    Checks if the surface can be enlarged in U or V direction.

    Parameters (3)
    • theSurf
    • theUEnlarge
    • theVEnlarge
    Returns

    A result object with fields:

    • theUEnlarge: updated value from the call.
    • theVEnlarge: updated value from the call.
  • MakeSampling(theSurf: Adaptor3d_Surface, theNbSU: number, theNbSV: number, theEnlargeZone: boolean, theUPars: NCollection_Array1_double, theVPars: NCollection_Array1_double): void

    Makes the sampling of the given surface <theSurf> making the net of <theNbSU> x <theNbSV> sampling points. The flag <theEnlargeZone> controls the enlargement of the sampling zone on the surface. The parameters of the sampling points are stored into <theUPars> and <theVPars> arrays.

    Parameters (6)
    • theSurf
    • theNbSU
    • theNbSV
    • theEnlargeZone
    • theUPars
      Mutated in place; read the updated value from this argument after the call.
    • theVPars
      Mutated in place; read the updated value from this argument after the call.
  • Computes the deflection tolerance on the surface for the given sampling.

    Parameters (3)
    • theSurf
    • theUPars
    • theVPars
  • FillArrayOfPointNormal(theSurf: Adaptor3d_Surface, theUPars: NCollection_Array1_double, theVPars: NCollection_Array1_double, thePoints: IntPolyh_ArrayOfPointNormal): void

    Fills the array <thePoints> with the points (triangulation nodes) on the surface and normal directions of the surface in these points.

    Parameters (4)
    • theSurf
    • theUPars
    • theVPars
    • thePoints

IntPolyh_Triangle

The class represents the triangle built from three IntPolyh points and three IntPolyh edges.

Constructors(2)

Instance methods(35)

  • FirstPoint(): number

    Returns the first point.

  • SecondPoint(): number

    Returns the second point.

  • ThirdPoint(): number

    Returns the third point.

  • FirstEdge(): number

    Returns the first edge.

  • Returns the orientation of the first edge.

  • SecondEdge(): number

    Returns the second edge.

  • Returns the orientation of the second edge.

  • ThirdEdge(): number

    Returns the third edge.

  • Returns the orientation of the third edge.

  • Deflection(): number

    Returns the deflection of the triangle.

  • Returns possibility of the intersection.

  • HasIntersection(): boolean

    Returns true if the triangle has interfered the other triangle.

  • IsDegenerated(): boolean

    Returns the Degenerated flag.

  • SetFirstPoint(thePoint: number): void

    Sets the first point.

    Parameters (1)
    • thePoint
  • SetSecondPoint(thePoint: number): void

    Sets the second point.

    Parameters (1)
    • thePoint
  • SetThirdPoint(thePoint: number): void

    Sets the third point.

    Parameters (1)
    • thePoint
  • SetFirstEdge(theEdge: number, theEdgeOrientation: number): void

    Sets the first edge.

    Parameters (2)
    • theEdge
    • theEdgeOrientation
  • SetSecondEdge(theEdge: number, theEdgeOrientation: number): void

    Sets the second edge.

    Parameters (2)
    • theEdge
    • theEdgeOrientation
  • SetThirdEdge(theEdge: number, theEdgeOrientation: number): void

    Sets the third edge.

    Parameters (2)
    • theEdge
    • theEdgeOrientation
  • SetDeflection(theDeflection: number): void

    Sets the deflection.

    Parameters (1)
    • theDeflection
  • SetIntersectionPossible(theIP: boolean): void

    Sets the flag of possibility of intersection.

    Parameters (1)
    • theIP
  • SetIntersection(theInt: boolean): void

    Sets the flag of intersection.

    Parameters (1)
    • theInt
  • SetDegenerated(theDegFlag: boolean): void

    Sets the degenerated flag.

    Parameters (1)
    • theDegFlag
  • GetEdgeNumber(theEdgeIndex: number): number

    Gets the edge number by the index.

    Parameters (1)
    • theEdgeIndex
  • SetEdge(theEdgeIndex: number, theEdgeNumber: number): void

    Sets the edge by the index.

    Parameters (2)
    • theEdgeIndex
    • theEdgeNumber
  • GetEdgeOrientation(theEdgeIndex: number): number

    Gets the edges orientation by the index.

    Parameters (1)
    • theEdgeIndex
  • SetEdgeOrientation(theEdgeIndex: number, theEdgeOrientation: number): void

    Sets the edges orientation by the index.

    Parameters (2)
    • theEdgeIndex
    • theEdgeOrientation
  • ComputeDeflection(theSurface: Adaptor3d_Surface, thePoints: IntPolyh_ArrayOfPoints): number

    Computes the deflection for the triangle.

    Parameters (2)
    • theSurface
    • thePoints
  • GetNextTriangle(theTriangle: number, theEdgeNum: number, TEdges: IntPolyh_ArrayOfEdges): number

    Gets the adjacent triangle.

    Parameters (3)
    • theTriangle
    • theEdgeNum
    • TEdges
  • MiddleRefinement(theTriangleNumber: number, theSurface: Adaptor3d_Surface, TPoints: IntPolyh_ArrayOfPoints, TTriangles: IntPolyh_ArrayOfTriangles, TEdges: IntPolyh_ArrayOfEdges): void

    Splits the triangle on two to decrease its deflection.

    Parameters (5)
    • theTriangleNumber
    • theSurface
    • TPoints
    • TTriangles
    • TEdges
  • MultipleMiddleRefinement(theRefineCriterion: number, theBox: Bnd_Box, theTriangleNumber: number, theSurface: Adaptor3d_Surface, TPoints: IntPolyh_ArrayOfPoints, TTriangles: IntPolyh_ArrayOfTriangles, TEdges: IntPolyh_ArrayOfEdges): void

    Splits the current triangle and new triangles until the refinement criterion is not achieved.

    Parameters (7)
    • theRefineCriterion
    • theBox
    • theTriangleNumber
    • theSurface
    • TPoints
    • TTriangles
    • TEdges
  • LinkEdges2Triangle(TEdges: IntPolyh_ArrayOfEdges, theEdge1: number, theEdge2: number, theEdge3: number): void

    Links edges to triangle.

    Parameters (4)
    • TEdges
    • theEdge1
    • theEdge2
    • theEdge3
  • SetEdgeAndOrientation(theEdge: IntPolyh_Edge, theEdgeIndex: number): void

    Sets the appropriate edge and orientation for the triangle.

    Parameters (2)
    • theEdge
    • theEdgeIndex
  • BoundingBox(thePoints: IntPolyh_ArrayOfPoints): Bnd_Box

    Returns the bounding box of the triangle.

    Parameters (1)
    • thePoints
  • Dump(v: number): void

    Dumps the contents of the triangle.

    Parameters (1)
    • v