OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

BRepClass3d

OCCT package BRepClass3d: BRepClass3d, BRepClass3d_BndBoxTreeSelectorLine, BRepClass3d_BndBoxTreeSelectorPoint, BRepClass3d_Intersector3d, and 4 more…

BRepClass3d_BndBoxTreeSelectorLine

Constructors(1)

Instance methods(9)

BRepClass3d_Intersector3d

Constructors(1)

Instance methods(10)

  • Perform(L: gp_Lin, Prm: number, Tol: number, F: TopoDS_Face): void

    Perform the intersection between the segment L(0) ... L(Prm) and the Shape <Sh>.
    Only the point with the smallest parameter on the line is returned.
    The Tolerance <Tol> is used to determine if the first point of the segment is near the face. In that case, the parameter of the intersection point on the line can be a negative value (greater than -Tol).

    Parameters (4)
    • L
    • Prm
    • Tol
    • F
  • IsDone(): boolean

    True is returned when the intersection have been computed.

  • HasAPoint(): boolean

    True is returned if a point has been found.

  • UParameter(): number

    Returns the U parameter of the intersection point on the surface.

  • VParameter(): number

    Returns the V parameter of the intersection point on the surface.

  • WParameter(): number

    Returns the parameter of the intersection point on the line.

  • Returns the geometric point of the intersection between the line and the surface.

  • Returns the transition of the line on the surface.

  • Returns the state of the point on the face. The values can be either TopAbs_IN ( the point is in the face) or TopAbs_ON ( the point is on a boundary of the face).

  • Returns the significant face used to determine the intersection.

BRepClass3d_SClassifier

Provides an algorithm to classify a point in a solid.

Constructors(2)

Instance methods(6)

  • Perform(S: BRepClass3d_SolidExplorer, P: gp_Pnt, Tol: number): void

    Classify the point P with the tolerance Tol on the solid S.

    Parameters (3)
    • S
    • P
    • Tol
  • Classify an infinite point with the tolerance Tol on the solid S.

    Parameters (2)
    • S
    • Tol
  • Rejected(): boolean

    Returns True if the classification has been computed by rejection. The State is then OUT.

  • Returns the result of the classification.

  • IsOnAFace(): boolean

    Returns True when the point is a point of a face.

  • Returns the face used to determine the classification. When the state is ON, this is the face containing the point.
    When Rejected() returns True, Face() has no signification.

BRepClass3d_SolidClassifier

Provides an algorithm to classify a point in a solid.

Constructors(3)

Instance methods(6)

BRepClass3d_SolidExplorer

Provide an exploration of a BRep Shape for the classification. Provide access to the special UB tree to obtain fast search.

Constructors(2)

Static methods(6)

  • Parameters (2)
    • F
    • P
  • FindAPointInTheFace(F: TopoDS_Face, P: gp_Pnt, Param: number): { returnValue: boolean; Param: number }

    compute a point P in the face F. Param is a Real in ]0,1[ and is used to initialise the algorithm. For different values , different points are returned.

    Parameters (3)
    • F
    • P
      Mutated in place; read the updated value from this argument after the call.
    • Param
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • Param: updated value from the call.
  • FindAPointInTheFace(F: TopoDS_Face, u: number, v: number): { returnValue: boolean; u: number; v: number }
    Parameters (3)
    • F
    • u
    • v
  • FindAPointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number): { returnValue: boolean; u: number; v: number }
    Parameters (4)
    • F
    • P
    • u
    • v
  • FindAPointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number, Param: number): { returnValue: boolean; u: number; v: number; Param: number }
    Parameters (5)
    • F
    • P
    • u
    • v
    • Param
  • FindAPointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number, Param: number, theVecD1U: gp_Vec, theVecD1V: gp_Vec): { returnValue: boolean; u: number; v: number; Param: number }
    Parameters (7)
    • F
    • P
    • u
    • v
    • Param
    • theVecD1U
    • theVecD1V

Instance methods(22)

  • Parameters (1)
    • S
  • Reject(P: gp_Pnt): boolean

    Should return True if P outside of bounding vol. of the shape.

    Parameters (1)
    • P
  • PointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number, Param: number, Index: number): { returnValue: boolean; u: number; v: number; Param: number; Index: number }
    Parameters (6)
    • F
    • P
    • u
    • v
    • Param
    • Index
  • PointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number, Param: number, Index: number, surf: BRepAdaptor_Surface, u1: number, v1: number, u2: number, v2: number): { returnValue: boolean; u: number; v: number; Param: number; Index: number }
    Parameters (11)
    • F
    • P
    • u
    • v
    • Param
    • Index
    • surf
    • u1
    • v1
    • u2
    • v2
  • PointInTheFace(F: TopoDS_Face, P: gp_Pnt, u: number, v: number, Param: number, Index: number, surf: BRepAdaptor_Surface, u1: number, v1: number, u2: number, v2: number, theVecD1U: gp_Vec, theVecD1V: gp_Vec): { returnValue: boolean; u: number; v: number; Param: number; Index: number }

    <Index> gives point index to search from and returns point index of succeseful search

    Parameters (13)
    • F
    • P
      Mutated in place; read the updated value from this argument after the call.
    • u
    • v
    • Param
    • Index
    • surf
    • u1
    • v1
    • u2
    • v2
    • theVecD1U
      Mutated in place; read the updated value from this argument after the call.
    • theVecD1V
      Mutated in place; read the updated value from this argument after the call.
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • u: updated value from the call.
    • v: updated value from the call.
    • Param: updated value from the call.
    • Index: updated value from the call.
  • InitShell(): void

    Starts an exploration of the shells.

  • MoreShell(): boolean

    Returns True if there is a current shell.

  • NextShell(): void

    Sets the explorer to the next shell.

  • Returns the current shell.

  • RejectShell(L: gp_Lin): boolean

    Returns True if the Shell is rejected.

    Parameters (1)
    • L
  • InitFace(): void

    Starts an exploration of the faces of the current shell.

  • MoreFace(): boolean

    Returns True if current face in current shell.

  • NextFace(): void

    Sets the explorer to the next Face of the current shell.

  • Returns the current face.

  • RejectFace(L: gp_Lin): boolean

    returns True if the face is rejected.

    Parameters (1)
    • L
  • Segment(P: gp_Pnt, L: gp_Lin, Par: number): { returnValue: number; Par: number }

    Returns in <L>, <Par> a segment having at least one intersection with the shape boundary to compute intersections.

    Parameters (3)
    • P
    • L
      Mutated in place; read the updated value from this argument after the call.
    • Par
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • Par: updated value from the call.
  • OtherSegment(P: gp_Pnt, L: gp_Lin, Par: number): { returnValue: number; Par: number }

    Returns in <L>, <Par> a segment having at least one intersection with the shape boundary to compute intersections.
    The First Call to this method returns a line which point to a point of the first face of the shape. The Second Call provide a line to the second face and so on.

    Parameters (3)
    • P
    • L
      Mutated in place; read the updated value from this argument after the call.
    • Par
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • Par: updated value from the call.
  • Returns the index of face for which last segment is calculated.

  • DumpSegment(P: gp_Pnt, L: gp_Lin, Par: number, S: TopAbs_State): void
    Parameters (4)
    • P
    • L
    • Par
    • S
  • Return edge/vertices map for current shape.

  • Destroy(): void

BRepClass3d_SolidPassiveClassifier

Constructors(1)

Instance methods(6)

  • Reset(L: gp_Lin, P: number, Tol: number): void

    Starts a classification process. The point to classify is the origin of the line <L>.
    is the original length of the segment on <L> used to compute intersections. <Tol> is the tolerance attached to the intersections.

    Parameters (3)
    • L
    • P
    • Tol
  • Updates the classification process with the face <F> from the boundary.

    Parameters (2)
    • F
    • Or
  • Parameter(): number

    Returns the current value of the parameter.

  • HasIntersection(): boolean

    Returns True if an intersection is computed.

  • Returns the intersecting algorithm.

  • Returns the current state of the point.