OpenCascade.js
API ReferenceModelingAlgorithmsTKOffset

BRepOffset

OCCT package BRepOffset: BRepOffset_Analyse, BRepOffset_Error, BRepOffset_Inter2d, BRepOffset_Inter3d, and 8 more bound classes.

BRepOffset_Analyse

Analyses the shape to find the parts of edges connecting the convex, concave or tangent faces.

Constructors(2)

Instance methods(20)

BRepOffset_Error

Properties(11)

BRepOffset_Inter2d

Computes the intersections between edges on a face stores result is SD as AsDes from BRepOffset.

Constructors(1)

Static methods(5)

BRepOffset_Inter3d

Computes the connection of the offset and not offset faces according to the connection type required. Store the result in AsDes tool.

Constructors(1)

Instance methods(11)

BRepOffset_MakeLoops

Constructors(1)

Instance methods(3)

BRepOffset_MakeSimpleOffset

This class represents simple offset algorithm itself. It builds simple offset without intersection. Solid can be created using SetBuildSolidFlag method (set flag to true). By default shell will be constructed.
Algorithm:

  1. Build source-image maps for vertices, edges and faces.BRepTools_Modification class will be used to store this information. An image of a shared edge can be constructed from the corresponding edge of the first iterated face.
  2. Run BRepTools_Modifier to obtain offset shape. Limitations: According to the algorithm nature result depends on the smoothness of input data. Smooth (G1-continuity) input shape will lead to the good result.
    The possible drawback of the simple algorithm is that it leads, in general case, to tolerance increasing. The tolerances have to grow in order to cover the gaps between the neighbor faces in the output. It should be noted that the actual tolerance growth depends on the offset distance and the quality of joints between the input faces. Anyway the good input shell (smooth connections between adjacent faces) will lead to good result.

Constructors(2)

Instance methods(15)

BRepOffset_Offset

This class compute elemenary offset surface. Evaluate the offset generated : 1 - from a face. 2 - from an edge. 3 - from a vertex.

Constructors(6)

Instance methods(10)

BRepOffset_SimpleOffset

This class represents mechanism of simple offset algorithm i.e. topology-preserve offset construction without intersection.
The list below shows mapping scheme:

  • Each surface is mapped to its geometric offset surface.
  • For each edge, pcurves are mapped to the same pcurves on offset surfaces.
  • For each edge, 3d curve is constructed by re-approximation of pcurve on the first offset face.
  • Position of each vertex in a result shell is computed as average point of all ends of edges shared by that vertex.
  • Tolerances are updated according to the resulting geometry.

Constructors(1)

  • constructor(theInputShape: TopoDS_Shape, theOffsetValue: number, theTolerance: number): BRepOffset_SimpleOffset

    Constructor.

    Parameters (3)
    • theInputShape
      shape to be offset
    • theOffsetValue
      offset distance (signed)
    • theTolerance
      tolerance for handling singular points

Static methods(2)

Instance methods(7)

  • NewSurface(F: TopoDS_Face, L: TopLoc_Location, Tol: number, RevWires: boolean, RevFace: boolean): { returnValue: boolean; S: Geom_Surface; Tol: number; RevWires: boolean; RevFace: boolean; [Symbol.dispose](): void }

    Returns true if the face <F> has been modified. In this case, is the new geometric support of the face, <L> the new location, <Tol> the new tolerance. <RevWires> has to be set to true when the modification reverses the normal of the surface. (the wires have to be reversed). <RevFace> has to be set to true if the orientation of the modified face changes in the shells which contain it. Here, <RevFace> will return true if the gp_Trsf is negative.

    Parameters (5)
    • F
    • L
      Mutated in place; read the updated value from this argument after the call.
    • Tol
    • RevWires
    • RevFace
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • S: owned by the returned envelope.
    • Tol: updated value from the call.
    • RevWires: updated value from the call.
    • RevFace: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • NewCurve(E: TopoDS_Edge, L: TopLoc_Location, Tol: number): { returnValue: boolean; C: Geom_Curve; Tol: number; [Symbol.dispose](): void }

    Returns true if the edge <E> has been modified. In this case, is the new geometric support of the edge, <L> the new location, <Tol> the new tolerance. Otherwise, returns false, and , <L>, <Tol> are not significant.

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

    A result object with fields:

    • returnValue: the C++ return value
    • C: owned by the returned envelope.
    • Tol: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • NewPoint(V: TopoDS_Vertex, P: gp_Pnt, Tol: number): { returnValue: boolean; Tol: number }

    Returns true if the vertex <V> has been modified. In this case,.
    is the new geometric support of the vertex, <Tol> the new tolerance. Otherwise, returns false, and
    , <Tol> are not significant.

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

    A result object with fields:

    • returnValue: the C++ return value
    • Tol: updated value from the call.
  • NewCurve2d(E: TopoDS_Edge, F: TopoDS_Face, NewE: TopoDS_Edge, NewF: TopoDS_Face, Tol: number): { returnValue: boolean; C: Geom2d_Curve; Tol: number; [Symbol.dispose](): void }

    Returns true if the edge <E> has a new curve on surface on the face <F>. In this case, is the new geometric support of the edge, <L> the new location, <Tol> the new tolerance. Otherwise, returns false, and , <L>, <Tol> are not significant.

    Parameters (5)
    • E
    • F
    • NewE
    • NewF
    • Tol
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • C: owned by the returned envelope.
    • Tol: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • NewParameter(V: TopoDS_Vertex, E: TopoDS_Edge, P: number, Tol: number): { returnValue: boolean; P: number; Tol: number }

    Returns true if the Vertex <V> has a new parameter on the edge <E>. In this case,.
    is the parameter, <Tol> the new tolerance. Otherwise, returns false, and
    , <Tol> are not significant.

    Parameters (4)
    • V
    • E
    • P
    • Tol
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • P: updated value from the call.
    • Tol: updated value from the call.
  • Returns the continuity of <NewE> between <NewF1> and <NewF2>.
    <NewE> is the new edge created from <E>. <NewF1> (resp. <NewF2>) is the new face created from <F1> (resp. <F2>).

    Parameters (6)
    • E
    • F1
    • F2
    • NewE
    • NewF1
    • NewF2

BRepOffsetSimple_Status

Properties(6)