OpenCascade.js
API ReferenceModelingAlgorithmsTKShHealing

ShapeCustom

OCCT package ShapeCustom: ShapeCustom, ShapeCustom_BSplineRestriction, ShapeCustom_ConvertToBSpline, ShapeCustom_ConvertToRevolution, and 8 more bound…

ShapeCustom

This package is intended to convert geometrical objects and topological. The modifications of one geometrical object to another (one) geometrical object are provided.
The supported modifications are the following: conversion of BSpline and Bezier surfaces to analytical form, conversion of indirect elementary surfaces (with left-handed coordinate systems) into direct ones, conversion of elementary surfaces to surfaces of revolution, conversion of surface of linear extrusion, revolution, offset surface to bspline, modification of parameterization, degree, number of segments of bspline surfaces, scale the shape.

Constructors(1)

Static methods(7)

ShapeCustom_BSplineRestriction

this tool intended for approximation surfaces, curves and pcurves with specified degree , max number of segments, tolerance 2d, tolerance 3d. Specified continuity can be reduced if approximation with specified continuity was not done.

Constructors(3)

  • Empty constructor.

  • constructor(anApproxSurfaceFlag: boolean, anApproxCurve3dFlag: boolean, anApproxCurve2dFlag: boolean, aTol3d: number, aTol2d: number, aContinuity3d: GeomAbs_Shape, aContinuity2d: GeomAbs_Shape, aMaxDegree: number, aNbMaxSeg: number, Degree: boolean, Rational: boolean): ShapeCustom_BSplineRestriction

    Initializes with specified parameters of approximation.

    Parameters (11)
    • anApproxSurfaceFlag
    • anApproxCurve3dFlag
    • anApproxCurve2dFlag
    • aTol3d
    • aTol2d
    • aContinuity3d
    • aContinuity2d
    • aMaxDegree
    • aNbMaxSeg
    • Degree
    • Rational
  • constructor(anApproxSurfaceFlag: boolean, anApproxCurve3dFlag: boolean, anApproxCurve2dFlag: boolean, aTol3d: number, aTol2d: number, aContinuity3d: GeomAbs_Shape, aContinuity2d: GeomAbs_Shape, aMaxDegree: number, aNbMaxSeg: number, Degree: boolean, Rational: boolean, aModes: ShapeCustom_RestrictionParameters): ShapeCustom_BSplineRestriction

    Initializes with specified parameters of approximation.

    Parameters (12)
    • anApproxSurfaceFlag
    • anApproxCurve3dFlag
    • anApproxCurve2dFlag
    • aTol3d
    • aTol2d
    • aContinuity3d
    • aContinuity2d
    • aMaxDegree
    • aNbMaxSeg
    • Degree
    • Rational
    • aModes

Static methods(2)

Instance methods(28)

  • 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.
    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 curve from 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 true if Surface is modified or one of pcurves of edge is modified. In this case C is copy of geometric support of the edge. In other cases 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.
  • 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 been modified. In this case,if curve on the surface is modified, is the new geometric support of the edge, <L> the new location, <Tol> the new tolerance. If curve on the surface is not modified C is copy curve on surface from the edge <E>.
    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.
  • ConvertSurface(aSurface: Geom_Surface, UF: number, UL: number, VF: number, VL: number, IsOf: boolean): { returnValue: boolean; S: Geom_Surface; [Symbol.dispose](): void }

    Returns true if the surface has been modified. if flag IsOf equals true Offset surfaces are approximated to Offset if false to BSpline.

    Parameters (6)
    • aSurface
    • UF
    • UL
    • VF
    • VL
    • IsOf
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • S: owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.
  • ConvertCurve(aCurve: Geom_Curve, IsConvert: boolean, First: number, Last: number, TolCur: number, IsOf: boolean): { returnValue: boolean; C: Geom_Curve; TolCur: number; [Symbol.dispose](): void }

    Returns true if the curve has been modified. if flag IsOf equals true Offset curves are approximated to Offset if false to BSpline.

    Parameters (6)
    • aCurve
    • IsConvert
    • First
    • Last
    • TolCur
    • IsOf
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • C: owned by the returned envelope.
    • TolCur: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • ConvertCurve2d(aCurve: Geom2d_Curve, IsConvert: boolean, First: number, Last: number, TolCur: number, IsOf: boolean): { returnValue: boolean; C: Geom2d_Curve; TolCur: number; [Symbol.dispose](): void }

    Returns true if the pcurve has been modified. if flag IsOf equals true Offset pcurves are approximated to Offset if false to BSpline.

    Parameters (6)
    • aCurve
    • IsConvert
    • First
    • Last
    • TolCur
    • IsOf
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • C: owned by the returned envelope.
    • TolCur: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • SetTol3d(Tol3d: number): void

    Sets tolerance of approximation for curve3d and surface.

    Parameters (1)
    • Tol3d
  • SetTol2d(Tol2d: number): void

    Sets tolerance of approximation for curve2d.

    Parameters (1)
    • Tol2d
  • Returns (modifiable) the flag which defines whether the surface is approximated.

  • Returns (modifiable) the flag which defines whether the curve3d is approximated.

  • Returns (modifiable) the flag which defines whether the curve2d is approximated.

  • SetContinuity3d(Continuity3d: GeomAbs_Shape): void

    Sets continuity3d for approximation curve3d and surface.

    Parameters (1)
    • Continuity3d
  • SetContinuity2d(Continuity2d: GeomAbs_Shape): void

    Sets continuity3d for approximation curve2d.

    Parameters (1)
    • Continuity2d
  • SetMaxDegree(MaxDegree: number): void

    Sets max degree for approximation.

    Parameters (1)
    • MaxDegree
  • SetMaxNbSegments(MaxNbSegments: number): void

    Sets max number of segments for approximation.

    Parameters (1)
    • MaxNbSegments
  • SetPriority(Degree: boolean): void

    Sets priority for approximation curves and surface. If Degree is True approximation is made with degree less then specified MaxDegree at the expense of number of spanes. If Degree is False approximation is made with number of spans less then specified MaxNbSegment at the expense of specified MaxDegree.

    Parameters (1)
    • Degree
  • SetConvRational(Rational: boolean): void

    Sets flag for define if rational BSpline or Bezier is converted to polynomial. If Rational is True approximation for rational BSpline and Bezier is made to polynomial even if degree is less then MaxDegree and number of spans is less then specified MaxNbSegment.

    Parameters (1)
    • Rational
  • Returns the container of modes which defines what geometry should be converted to BSplines.

  • Sets the container of modes which defines what geometry should be converted to BSplines.

    Parameters (1)
    • aModes
  • Curve3dError(): number

    Returns error for approximation curve3d.

  • Curve2dError(): number

    Returns error for approximation curve2d.

  • SurfaceError(): number

    Returns error for approximation surface.

  • NewPoint(V: TopoDS_Vertex, P: gp_Pnt, Tol: number): { returnValue: boolean; Tol: number }

    Returns true if the vertex V has been modified. If V has been modified:

    • P is the new geometry of the vertex, and
    • Tol is the new tolerance. If the vertex has not been modified this function returns false, and the values of P 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.
  • 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. If a new parameter exists:

    • P is the parameter, and
    • Tol is the new tolerance. If there is no new parameter this function returns false, and the values of P 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
  • MaxErrors(aCurve3dErr: number, aCurve2dErr: number): { returnValue: number; aCurve3dErr: number; aCurve2dErr: number }

    Returns error for approximation surface, curve3d and curve2d.

    Parameters (2)
    • aCurve3dErr
    • aCurve2dErr
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • aCurve3dErr: updated value from the call.
    • aCurve2dErr: updated value from the call.
  • NbOfSpan(): number

    Returns number for approximation surface, curve3d and curve2d.

ShapeCustom_ConvertToBSpline

implement a modification for BRepTools Modifier algorithm. Converts Surface of Linear Exctrusion, Revolution and Offset surfaces into BSpline Surface according to flags.

Constructors(1)

Static methods(2)

Instance methods(11)

  • SetExtrusionMode(extrMode: boolean): void

    Sets mode for conversion of Surfaces of Linear extrusion.

    Parameters (1)
    • extrMode
  • SetRevolutionMode(revolMode: boolean): void

    Sets mode for conversion of Surfaces of Revolution.

    Parameters (1)
    • revolMode
  • SetOffsetMode(offsetMode: boolean): void

    Sets mode for conversion of Offset surfaces.

    Parameters (1)
    • offsetMode
  • SetPlaneMode(planeMode: boolean): void

    Sets mode for conversion of Plane surfaces.

    Parameters (1)
    • planeMode
  • 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. Otherwise, returns false, and , <L>, <Tol> 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

ShapeCustom_ConvertToRevolution

implements a modification for the BRepTools Modifier algorithm. Converts all elementary surfaces into surfaces of revolution.

Constructors(1)

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. Otherwise, returns false, and , <L>, <Tol> 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

ShapeCustom_Curve

Converts BSpline curve to periodic.

Constructors(2)

Instance methods(2)

  • Init(C: Geom_Curve): void
    Parameters (1)
    • C
  • ConvertToPeriodic(substitute: boolean, preci?: number): Geom_Curve

    Tries to convert the Curve to the Periodic form Returns the resulting curve Works only if the Curve is BSpline and is closed with Precision::Confusion() Else, or in case of failure, returns a Null Handle.

    Parameters (2)
    • substitute
    • preci

ShapeCustom_Curve2d

Converts curve2d to analytical form with given precision or simplify curve2d.

Constructors(1)

Static methods(3)

  • IsLinear(thePoles: NCollection_Array1_gp_Pnt2d, theTolerance: number, theDeviation: number): { returnValue: boolean; theDeviation: number }

    Check if poleses is in the plane with given precision Returns false if no.

    Parameters (3)
    • thePoles
    • theTolerance
    • theDeviation
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theDeviation: updated value from the call.
  • ConvertToLine2d(theCurve: Geom2d_Curve, theFirstIn: number, theLastIn: number, theTolerance: number, theNewFirst: number, theNewLast: number, theDeviation: number): { returnValue: Geom2d_Line; theNewFirst: number; theNewLast: number; theDeviation: number; [Symbol.dispose](): void }

    Try to convert BSpline2d or Bezier2d to line 2d only if it is linear. Recalculate first and last parameters. Returns line2d or null curve2d.

    Parameters (7)
    • theCurve
    • theFirstIn
    • theLastIn
    • theTolerance
    • theNewFirst
    • theNewLast
    • theDeviation
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theNewFirst: updated value from the call.
    • theNewLast: updated value from the call.
    • theDeviation: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • SimplifyBSpline2d(theTolerance: number): { returnValue: boolean; theBSpline2d: Geom2d_BSplineCurve; [Symbol.dispose](): void }

    Try to remove knots from bspline where local derivatives are the same. Remove knots with given precision. Returns false if Bsplien was not modified.

    Parameters (1)
    • theTolerance
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • theBSpline2d: owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.

ShapeCustom_DirectModification

implements a modification for the BRepTools Modifier algorithm. Will redress indirect surfaces.

Constructors(1)

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. Otherwise, returns false, and , <L>, <Tol> 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

ShapeCustom_Modification

A base class of Modification's from ShapeCustom. Implements message sending mechanism.

Static methods(2)

Instance methods(4)

ShapeCustom_RestrictionParameters

This class is axuluary tool which contains parameters for BSplineRestriction class.

Constructors(1)

Static methods(2)

Instance methods(17)

  • GMaxDegree(): number

    Returns (modifiable) maximal degree of approximation.

  • GMaxSeg(): number

    Returns (modifiable) maximal number of spans of approximation.

  • ConvertPlane(): boolean

    Sets flag for define if Plane converted to BSpline surface.

  • Sets flag for define if Bezier surface converted to BSpline surface.

  • Sets flag for define if surface of Revolution converted to BSpline surface.

  • Sets flag for define if surface of LinearExtrusion converted to BSpline surface.

  • Sets flag for define if Offset surface converted to BSpline surface.

  • Sets flag for define if cylindrical surface converted to BSpline surface.

  • Sets flag for define if conical surface converted to BSpline surface.

  • Sets flag for define if toroidal surface converted to BSpline surface.

  • Sets flag for define if spherical surface converted to BSpline surface.

  • Sets Segment mode for surface. If Segment is True surface is approximated in the bondaries of face lying on this surface.

  • ConvertCurve3d(): boolean

    Sets flag for define if 3d curve converted to BSpline curve.

  • Sets flag for define if Offset curve3d converted to BSpline surface.

  • ConvertCurve2d(): boolean

    Returns (modifiable) flag for define if 2d curve converted to BSpline curve.

  • Returns (modifiable) flag for define if Offset curve2d converted to BSpline surface.

ShapeCustom_Surface

Converts a surface to the analytical form with given precision. Conversion is done only the surface is bspline of bezier and this can be approximated by some analytical surface with that precision.

Constructors(2)

Instance methods(4)

  • Init(S: Geom_Surface): void
    Parameters (1)
    • S
  • Gap(): number

    Returns maximal deviation of converted surface from the original one computed by last call to ConvertToAnalytical.

  • ConvertToAnalytical(tol: number, substitute: boolean): Geom_Surface

    Tries to convert the Surface to an Analytic form Returns the result Works only if the Surface is BSpline or Bezier. Else, or in case of failure, returns a Null Handle.
    If <substitute> is True, the new surface replaces the actual one in <me>
    It works by analysing the case which can apply, creating the corresponding analytic surface, then checking coincidence Warning: Parameter laws are not kept, hence PCurves should be redone

    Parameters (2)
    • tol
    • substitute
  • ConvertToPeriodic(substitute: boolean, preci?: number): Geom_Surface

    Tries to convert the Surface to the Periodic form Returns the resulting surface Works only if the Surface is BSpline and is closed with Precision::Confusion() Else, or in case of failure, returns a Null Handle.

    Parameters (2)
    • substitute
    • preci

ShapeCustom_SweptToElementary

implements a modification for the BRepTools Modifier algorithm. Converts all elementary surfaces into surfaces of revolution.

Constructors(1)

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. Otherwise, returns false, and , <L>, <Tol> 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

ShapeCustom_TrsfModification

Complements BRepTools_TrsfModification to provide reversible scaling regarding tolerances. Uses actual tolerances (attached to the shapes) not ones returned by BRep_Tool::Tolerance to work with tolerances lower than Precision::Confusion.

Constructors(1)

Static methods(2)

Instance methods(6)

  • 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 }

    Calls inherited method. Sets <Tol> as actual tolerance of <F> multiplied with scale factor.

    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 }

    Calls inherited method. Sets <Tol> as actual tolerance of <E> multiplied with scale factor.

    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 }

    Calls inherited method. Sets <Tol> as actual tolerance of <V> multiplied with scale factor.

    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 }

    Calls inherited method. Sets <Tol> as actual tolerance of <E> multiplied with scale factor.

    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 }

    Calls inherited method. Sets <Tol> as actual tolerance of <V> multiplied with scale factor.

    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.