OpenCascade.js
API ReferenceModelingAlgorithmsTKBool

BRepAlgo

OCCT package BRepAlgo: BRepAlgo, BRepAlgo_AsDes, BRepAlgo_FaceRestrictor, BRepAlgo_Image, and 2 more bound classes.

BRepAlgo

The BRepAlgo class provides the following tools for:

  • Checking validity of the shape;
  • Concatenation of the edges of the wire.

Constructors(1)

Static methods(7)

  • ConcatenateWire(Wire: TopoDS_Wire, Option: GeomAbs_Shape, AngularTolerance?: number): TopoDS_Wire

    this method makes a wire whose edges are C1 from a Wire whose edges could be G1. It removes a vertex between G1 edges. Option can be G1 or C1.

    Parameters (3)
    • Wire
    • Option
    • AngularTolerance
  • this method makes an edge from a wire. Junction points between edges of wire may be sharp, resulting curve of the resulting edge may be C0.

    Parameters (1)
    • Wire
  • ConvertWire(theWire: TopoDS_Wire, theAngleTolerance: number, theFace: TopoDS_Face): TopoDS_Wire

    Method of wire conversion, calls BRepAlgo_Approx internally.

    Parameters (3)
    • theWire
      Input Wire object.
    • theAngleTolerance
      Angle (in radians) defining the continuity of the wire: if two vectors differ by less than this angle, the result will be smooth (zero angle of tangent lines between curve elements).
    • theFace
    Returns

    The new TopoDS_Wire object consisting of edges each representing an arc of circle or a linear segment. The accuracy of conversion is defined as the maximal tolerance of edges in theWire.

  • ConvertFace(theFace: TopoDS_Face, theAngleTolerance: number): TopoDS_Face

    Method of face conversion. The API corresponds to the method ConvertWire. This is a shortcut for calling ConvertWire() for each wire in theFace.

    Parameters (2)
    • theFace
    • theAngleTolerance
  • IsValid(S: TopoDS_Shape): boolean

    Checks if the shape is "correct". If not, returns <false>, else returns <true>.

    Parameters (1)
    • S
  • IsValid(theArgs: NCollection_List_TopoDS_Shape, theResult: TopoDS_Shape, closedSolid: boolean, GeomCtrl: boolean): boolean

    Checks if the Generated and Modified Faces from the shapes <arguments> in the shape <result> are "correct". The args may be empty, then all faces will be checked. If <Closed> is True, only closed shape are valid. If <GeomCtrl> is False the geometry of new vertices and edges are not verified and the auto-intersection of new wires are not searched.

    Parameters (4)
    • theArgs
    • theResult
    • closedSolid
    • GeomCtrl
  • Checks if the shape is "correct". If not, returns FALSE, else returns TRUE. This method differs from the previous one in the fact that no geometric controls (intersection of wires, pcurve validity) are performed.

    Parameters (1)
    • S

BRepAlgo_AsDes

SD to store descendants and ascendants of Shapes.

Constructors(1)

Static methods(2)

Instance methods(12)

BRepAlgo_FaceRestrictor

Builds all the faces limited with a set of non jointing and planars wires. if <ControlOrientation> is false The Wires must have correct orientations. Sinon orientation des wires de telle sorte que les faces ne soient pas infinies et qu'elles soient disjointes.

Constructors(1)

Instance methods(8)

  • Init(F: TopoDS_Face, Proj?: boolean, ControlOrientation?: boolean): void

    the surface of <F> will be the surface of each new faces built. <Proj> is used to update pcurves on edges if necessary. See Add().

    Parameters (3)
    • F
    • Proj
    • ControlOrientation
  • Add(W: TopoDS_Wire): void

    Add the wire <W> to the set of wires.
    Warning: The Wires must be closed.
    The edges of <W> can be modified if they don't have pcurves on the surface of <F>. In this case if <Proj> is false the first pcurve of the edge is positioned on . if <Proj> is True, the Pcurve On is the projection of the curve 3d on <F>.

    Parameters (1)
    • W
      Mutated in place; read the updated value from this argument after the call.
  • Clear(): void

    Removes all the Wires.

  • Perform(): void

    Evaluate all the faces limited by the set of Wires.

  • IsDone(): boolean
  • More(): boolean
  • Next(): void

BRepAlgo_Image

Stores link between a shape and a shape <NewS> obtained from . <NewS> is an image of .

Constructors(1)

Instance methods(18)

BRepAlgo_Loop

Builds the loops from a set of edges on a face.

Constructors(1)

Instance methods(16)

BRepAlgo_NormalProjection

This class makes the projection of a wire on a shape.

Constructors(2)

Instance methods(15)

  • Init(S: TopoDS_Shape): void
    Parameters (1)
    • S
  • Add(ToProj: TopoDS_Shape): void

    Add an edge or a wire to the list of shape to project.

    Parameters (1)
    • ToProj
  • SetParams(Tol3D: number, Tol2D: number, InternalContinuity: GeomAbs_Shape, MaxDegree: number, MaxSeg: number): void

    Set the parameters used for computation Tol3d is the required tolerance between the 3d projected curve and its 2d representation InternalContinuity is the order of constraints used for approximation. MaxDeg and MaxSeg are the maximum degree and the maximum number of segment for BSpline resulting of an approximation.

    Parameters (5)
    • Tol3D
    • Tol2D
    • InternalContinuity
    • MaxDegree
    • MaxSeg
  • Set the parameters used for computation in their default values.

  • SetMaxDistance(MaxDist: number): void

    Sets the maximum distance between target shape and shape to project. If this condition is not satisfied then corresponding part of solution is discarded. if MaxDist < 0 then this method does not affect the algorithm.

    Parameters (1)
    • MaxDist
  • Compute3d(With3d?: boolean): void

    if With3d = false the 3dcurve is not computed the initial 3dcurve is kept to build the resulting edges.

    Parameters (1)
    • With3d
  • SetLimit(FaceBoundaries?: boolean): void

    Manage limitation of projected edges.

    Parameters (1)
    • FaceBoundaries
  • Build(): void

    Builds the result as a compound.

  • IsDone(): boolean
  • returns the result

  • For a resulting edge, returns the corresponding initial edge.

    Parameters (1)
    • E
  • For a projected edge, returns the corresponding initial face.

    Parameters (1)
    • E
  • Returns the list of shapes generated from the shape .

    Parameters (1)
    • S
  • Parameters (1)
    • C
  • build the result as a list of wire if possible in - a first returns a wire only if there is only a wire.

    Parameters (1)
    • Liste
      Mutated in place; read the updated value from this argument after the call.