OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

MAT2d

OCCT package MAT2d: MAT2d_BiInt, MAT2d_Circuit, MAT2d_Connexion, MAT2d_Mat2d, and 2 more bound classes.

MAT2d_Circuit

Constructs a circuit on a set of lines. EquiCircuit gives a Circuit passing by all the lines in a set and all the connexions of the minipath associated.

Constructors(1)

Static methods(2)

Instance methods(8)

MAT2d_Connexion

A Connexion links two lines of items in a set of lines. It contains two points and their paramatric definitions on the lines. The items can be points or curves.

Constructors(2)

Static methods(2)

Instance methods(22)

MAT2d_Mat2d

this class contains the generic algorithm of computation of the bisecting locus.

Constructors(1)

Instance methods(9)

  • CreateMat(aTool: MAT2d_Tool2d): void

    Algorithm of computation of the bisecting locus.

    Parameters (1)
    • aTool
      Mutated in place; read the updated value from this argument after the call.
  • Algorithm of computation of the bisecting locus for open wire.

    Parameters (1)
    • aTool
      Mutated in place; read the updated value from this argument after the call.
  • IsDone(): boolean

    Returns <TRUE> if CreateMat has succeeded.

  • Init(): void

    Initialize an iterator on the set of the roots of the trees of bisectors.

  • More(): boolean

    Return False if there is no more roots.

  • Next(): void

    Move to the next root.

  • Returns the current root.

  • SemiInfinite(): boolean

    Returns True if there are semi_infinite bisectors. So there is a tree for each semi_infinte bisector.

  • Returns the total number of bisectors.

MAT2d_MiniPath

MiniPath computes a path to link all the lines in a set of lines. The path is described as a set of connexions.
The set of connexions can be seen as an arbitrary Tree. The node of the tree are the lines. The arcs of the tree are the connexions. The ancestror of a line is the connexion which ends on it. The children of a line are the connexions which start on it.
The children of a line are ordered by the relation <IsAfter> defined on the connexions. (See MAT2s_Connexion.cdl).

Constructors(1)

Instance methods(7)

  • Perform(Figure: NCollection_Sequence_NCollection_Sequence_handle_Geom2d_Geometry, IndStart: number, Sense: boolean): void

    Computes the path to link the lines in <Figure>. the path starts on the line of index <IndStart> <Sense> = True if the Circuit turns in the trigonometric sense.

    Parameters (3)
    • Figure
    • IndStart
    • Sense
  • Run on the set of connexions to compute the path. the path is an exploration of the tree which contains the connexions and their reverses. if the tree of connexions is A / | B E / | | C D F.
    the path is A->B, B->C, C->B, B->D, D->B, B->A, A->E, E->F, F->E, E->A.

  • Returns the sequence of connexions corresponding to the path.

  • IsConnexionsFrom(Index: number): boolean

    Returns <True> if there is one Connexion which starts on line designed by <Index>.

    Parameters (1)
    • Index
  • Returns the connexions which start on line designed by <Index>.

    Parameters (1)
    • Index
  • IsRoot(Index: number): boolean

    Returns <True> if the line designed by <Index> is the root.

    Parameters (1)
    • Index
  • Father(Index: number): MAT2d_Connexion

    Returns the connexion which ends on line designed by <Index>.

    Parameters (1)
    • Index

MAT2d_Tool2d

Set of the methods useful for the MAT's computation. Tool2d contains the geometry of the bisecting locus.

Constructors(1)

Instance methods(22)

  • Sense(aside: MAT_Side): void

    <aSide> defines the side of the computation of the map.

    Parameters (1)
    • aside
  • SetJoinType(aJoinType: GeomAbs_JoinType): void
    Parameters (1)
    • aJoinType
  • InitItems(aCircuit: MAT2d_Circuit): void

    InitItems cuts the line in Items. this Items are the geometrics representations of the BasicElts from MAT.

    Parameters (1)
    • aCircuit
  • NumberOfItems(): number

    Returns the Number of Items .

  • Returns tolerance to test the confusion of two points.

  • FirstPoint(anitem: number, dist: number): { returnValue: number; dist: number }

    Creates the point at the origin of the bisector between anitem and the previous item. dist is the distance from the FirstPoint to <anitem>. Returns the index of this point in <theGeomPnts>.

    Parameters (2)
    • anitem
    • dist
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • dist: updated value from the call.
  • TangentBefore(anitem: number, IsOpenResult: boolean): number

    Creates the Tangent at the end of the Item defined by <anitem>. Returns the index of this vector in <theGeomVecs>.

    Parameters (2)
    • anitem
    • IsOpenResult
  • TangentAfter(anitem: number, IsOpenResult: boolean): number

    Creates the Reversed Tangent at the origin of the Item defined by <anitem>. Returns the index of this vector in <theGeomVecs>.

    Parameters (2)
    • anitem
    • IsOpenResult
  • Tangent(bisector: number): number

    Creates the Tangent at the end of the bisector defined by <bisector>. Returns the index of this vector in <theGeomVecs>.

    Parameters (1)
    • bisector
  • CreateBisector(abisector: MAT_Bisector): void

    Creates the geometric bisector defined by <abisector>.

    Parameters (1)
    • abisector
  • TrimBisector(abisector: MAT_Bisector): boolean

    Trims the geometric bisector by the <firstparameter> of <abisector>. If the parameter is out of the bisector, Return FALSE. else Return True.

    Parameters (1)
    • abisector
  • TrimBisector(abisector: MAT_Bisector, apoint: number): boolean

    Trims the geometric bisector by the point of index <apoint> in <theGeomPnts>. If the point is out of the bisector, Return FALSE. else Return True.

    Parameters (2)
    • abisector
    • apoint
  • IntersectBisector(bisectorone: MAT_Bisector, bisectortwo: MAT_Bisector, intpnt: number): { returnValue: number; intpnt: number }

    Computes the point of intersection between the bisectors defined by <bisectorone> and <bisectortwo> . If this point exists, <intpnt> is its index in <theGeomPnts> and Return the distance of the point from the bisector else Return <RealLast>.

    Parameters (3)
    • bisectorone
    • bisectortwo
    • intpnt
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • intpnt: updated value from the call.
  • Distance(abisector: MAT_Bisector, param1: number, param2: number): number

    Returns the distance between the two points designed by their parameters on <abisector>.

    Parameters (3)
    • abisector
    • param1
    • param2
  • Dump(bisector: number, erease: number): void

    displays information about the bisector defined by <bisector>.

    Parameters (2)
    • bisector
    • erease
  • GeomBis(Index: number): Bisector_Bisec

    Returns the <Bisec> of index <Index> in <theGeomBisectors>.

    Parameters (1)
    • Index
  • GeomElt(Index: number): Geom2d_Geometry

    Returns the Geometry of index <Index> in <theGeomElts>.

    Parameters (1)
    • Index
  • GeomPnt(Index: number): gp_Pnt2d

    Returns the point of index <Index> in the <theGeomPnts>.

    Parameters (1)
    • Index
  • GeomVec(Index: number): gp_Vec2d

    Returns the vector of index <Index> in the <theGeomVecs>.

    Parameters (1)
    • Index
  • BisecFusion(Index1: number, Index2: number): void
    Parameters (2)
    • Index1
    • Index2
  • Returns the <Bisec> of index <Index> in <theGeomBisectors>.

    Parameters (1)
    • Index