OpenCascade.js
API ReferenceModelingAlgorithmsTKOffset

Draft

OCCT package Draft: Draft, Draft_EdgeInfo, Draft_ErrorStatus, Draft_FaceInfo, and 2 more bound classes.

Draft

Constructors(1)

Static methods(1)

  • Angle(F: TopoDS_Face, Direction: gp_Dir): number

    Returns the draft angle of the face <F> using the direction <Direction>. The method is valid for :

    • Plane faces,
    • Cylindrical or conical faces, when the direction of the axis of the surface is colinear with the direction. Otherwise, the exception DomainError is raised.
    Parameters (2)
    • F
    • Direction

Draft_EdgeInfo

Constructors(2)

Instance methods(17)

Draft_Modification

Constructors(1)

Static methods(2)

Instance methods(17)

  • Clear(): void

    Resets on the same shape.

  • Init(S: TopoDS_Shape): void

    Changes the basis shape and resets.

    Parameters (1)
    • S
  • Add(F: TopoDS_Face, Direction: gp_Dir, Angle: number, NeutralPlane: gp_Pln, Flag?: boolean): boolean

    Adds the face F and propagates the draft modification to its neighbour faces if they are tangent. If an error occurs, will return False and ProblematicShape will return the "bad" face.

    Parameters (5)
    • F
    • Direction
    • Angle
    • NeutralPlane
    • Flag
  • Removes the face F and the neighbour faces if they are tangent. It will be necessary to call this method if the method Add returns false, to unset ProblematicFace.

    Parameters (1)
    • F
  • Perform(): void

    Performs the draft angle modification and sets the value returned by the method IsDone. If an error occurs, IsDone will return false, and an error status will be given by the method Error, and the shape on which the problem appeared will be given by ProblematicShape.

  • IsDone(): boolean

    Returns True if Perform has been successfully called. Otherwise more information can be obtained using the methods Error() and ProblematicShape().

  • Returns the shape (Face, Edge or Vertex) on which an error occurred.

  • Returns all the faces which have been added together with the face <F>.

    Parameters (1)
    • F
  • Returns all the faces on which a modification has been given.

  • 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 it will be set to false.
    Otherwise, returns false, and , <L>, <Tol> , <RevWires> ,<RevFace> are not significant.

    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.
    <NewE> is the new edge created from <E>. <NewF> is the new face created from <F>. They may be useful.

    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