ShapeUpgrade
OCCT package ShapeUpgrade: ShapeUpgrade, ShapeUpgrade_ClosedEdgeDivide, ShapeUpgrade_ClosedFaceDivide, ShapeUpgrade_ConvertCurve2dToBezier, and 29 more…
ShapeUpgrade
This package provides tools for splitting and converting shapes by some criteria. It provides modifications of the kind when one topological object can be converted or split in to several ones. In particular this package contains high level API classes which perform: converting geometry of shapes up to given continuity, splitting revolutions by U to segments less than given value, converting to beziers, splitting closed faces.
Constructors(1)
Static methods(2)
- C0BSplineToSequenceOfC1BSplineCurve(BS: Geom_BSplineCurve): { returnValue: boolean; seqBS: NCollection_HSequence_handle_Geom_BoundedCurve; [Symbol.dispose](): void }
Unifies same domain faces and edges of specified shape.
Parameters (1)BS
ReturnsA result object with fields:
returnValue: the C++ return valueseqBS: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- C0BSplineToSequenceOfC1BSplineCurve(BS: Geom2d_BSplineCurve): { returnValue: boolean; seqBS: NCollection_HSequence_handle_Geom2d_BoundedCurve; [Symbol.dispose](): void }
Converts C0 B-Spline curve into sequence of C1 B-Spline curves. This method splits B-Spline at the knots with multiplicities equal to degree, i.e. unlike method
GeomConvert::C0BSplineToArrayOfC1BSplineCurvethis one does not use any tolerance and therefore does not change the geometry of B-Spline. Returns True if C0 B-Spline was successfully split, else returns False (if BS is C1 B-Spline).Parameters (1)BS
ReturnsA result object with fields:
returnValue: the C++ return valueseqBS: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
ShapeUpgrade_ClosedEdgeDivide
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Compute(E: TopoDS_Edge): booleanParameters (1)
E
ShapeUpgrade_ClosedFaceDivide
Divides a Face with one or more seam edge to avoid closed faces. Splitting is performed by U and V direction. The number of resulting faces can be defined by user.
Constructors(2)
Creates empty constructor.
Initialize by a Face.
Parameters (1)F
Static methods(2)
- get_type_name(): string
Instance methods(4)
- SplitSurface(theArea?: number): boolean
Performs splitting of surface and computes the shell from source face.
Parameters (1)theArea
- SetNbSplitPoints(num: number): void
Sets the number of cutting lines by which closed face will be split. The resulting faces will be num+1.
Parameters (1)num
- GetNbSplitPoints(): number
Returns the number of splitting points.
ShapeUpgrade_ConvertCurve2dToBezier
converts/splits a 2d curve to a list of beziers
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(4)
- Compute(): void
Converts curve into a list of beziers, and stores the splitting parameters on original curve.
- Build(Segment: boolean): void
Splits a list of beziers computed by Compute method according the split values and splitting parameters.
Parameters (1)Segment
Returns the list of split parameters in original curve parametrisation.
ShapeUpgrade_ConvertCurve3dToBezier
converts/splits a 3d curve of any type to a list of beziers
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(10)
- SetLineMode(mode: boolean): void
Sets mode for conversion
Geom_Lineto bezier.Parameters (1)mode
- GetLineMode(): boolean
Returns the
Geom_Lineconversion mode. - SetCircleMode(mode: boolean): void
Sets mode for conversion
Geom_Circleto bezier.Parameters (1)mode
- GetCircleMode(): boolean
Returns the
Geom_Circleconversion mode. - SetConicMode(mode: boolean): void
Returns the
Geom_Conicconversion mode.Parameters (1)mode
- GetConicMode(): boolean
Performs converting and computes the resulting shape.
- Compute(): void
Converts curve into a list of beziers, and stores the splitting parameters on original curve.
- Build(Segment: boolean): void
Splits a list of beziers computed by Compute method according the split values and splitting parameters.
Parameters (1)Segment
Returns the list of split parameters in original curve parametrisation.
ShapeUpgrade_ConvertSurfaceToBezierBasis
Converts a plane, bspline surface, surface of revolution, surface of extrusion, offset surface to grid of bezier basis surface ( bezier surface, surface of revolution based on bezier curve, offset surface based on any previous type).
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(12)
- Build(Segment: boolean): void
Splits a list of beziers computed by Compute method according the split values and splitting parameters.
Parameters (1)Segment
- Compute(Segment: boolean): void
Converts surface into a grid of bezier based surfaces, and stores this grid.
Parameters (1)Segment
Returns the grid of bezier based surfaces correspondent to original surface.
- SetPlaneMode(mode: boolean): void
Sets mode for conversion
Geom_Planeto Bezier.Parameters (1)mode
- GetPlaneMode(): boolean
Returns the Geom_Pline conversion mode.
- SetRevolutionMode(mode: boolean): void
Sets mode for conversion
Geom_SurfaceOfRevolutionto Bezier.Parameters (1)mode
- GetRevolutionMode(): boolean
Returns the
Geom_SurfaceOfRevolutionconversion mode. - SetExtrusionMode(mode: boolean): void
Sets mode for conversion
Geom_SurfaceOfLinearExtrusionto Bezier.Parameters (1)mode
- GetExtrusionMode(): boolean
Returns the
Geom_SurfaceOfLinearExtrusionconversion mode. - SetBSplineMode(mode: boolean): void
Sets mode for conversion
Geom_BSplineSurfaceto Bezier.Parameters (1)mode
- GetBSplineMode(): boolean
Returns the
Geom_BSplineSurfaceconversion mode.
ShapeUpgrade_EdgeDivide
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(12)
- Clear(): void
- SetFace(F: TopoDS_Face): void
Sets supporting surface by face.
Parameters (1)F
- Compute(E: TopoDS_Edge): booleanParameters (1)
E
- HasCurve2d(): boolean
- HasCurve3d(): boolean
- SetSplitCurve2dTool(splitCurve2dTool: ShapeUpgrade_SplitCurve2d): void
Sets the tool for splitting pcurves.
Parameters (1)splitCurve2dTool
- SetSplitCurve3dTool(splitCurve3dTool: ShapeUpgrade_SplitCurve3d): void
Sets the tool for splitting 3D curves.
Parameters (1)splitCurve3dTool
Returns the tool for splitting pcurves.
Returns the tool for splitting 3D curves.
ShapeUpgrade_FaceDivide
Divides a Face (both edges in the wires, by splitting curves and pcurves, and the face itself, by splitting supporting surface) according to splitting criteria.
- The domain of the face to divide is defined by the PCurves of the wires on the Face.
- all the PCurves are supposed to be defined (in the parametric space of the supporting surface).
The result is available after the call to the Build method. It is a Shell containing all the resulting Faces.
All the modifications made during splitting are recorded in the external context (ShapeBuild_ReShape).
Constructors(2)
Creates empty constructor.
Initialize by a Face.
Parameters (1)F
Static methods(2)
- get_type_name(): string
Instance methods(12)
- Init(F: TopoDS_Face): void
Initialize by a Face.
Parameters (1)F
- SetSurfaceSegmentMode(Segment: boolean): void
Purpose sets mode for trimming (segment) surface by wire UV bounds.
Parameters (1)Segment
- Perform(theArea?: number): boolean
Performs splitting and computes the resulting shell The context is used to keep track of former splittings in order to keep sharings. It is updated according to modifications made. The optional argument <theArea> is used to initialize the tool for splitting surface in the case of splitting into N parts where N is user-defined.
Parameters (1)theArea
- SplitSurface(theArea?: number): boolean
Performs splitting of surface and computes the shell from source face. The optional argument <theArea> is used to initialize the tool for splitting surface in the case of splitting into N parts where N is user-defined.
Parameters (1)theArea
- SplitCurves(): boolean
Performs splitting of curves of all the edges in the shape and divides these edges.
Gives the resulting Shell, or Face, or Null shape if not done.
- Status(status: ShapeExtend_Status): boolean
Queries the status of last call to Perform OK : no splitting was done (or no call to Perform) DONE1: some edges were split DONE2: surface was split DONE3: surface was modified without splitting FAIL1: some fails encountered during splitting wires FAIL2: face cannot be split.
Parameters (1)status
- SetSplitSurfaceTool(splitSurfaceTool: ShapeUpgrade_SplitSurface): void
Sets the tool for splitting surfaces.
Parameters (1)splitSurfaceTool
- SetWireDivideTool(wireDivideTool: ShapeUpgrade_WireDivide): void
Sets the tool for dividing edges on Face.
Parameters (1)wireDivideTool
Returns the tool for splitting surfaces. This tool must be already initialized.
Returns the tool for dividing edges on Face. This tool must be already initialized.
ShapeUpgrade_FaceDivideArea
Divides face by max area criterium.
Constructors(2)
Creates empty constructor.
- Parameters (1)
F
Static methods(2)
- get_type_name(): string
Instance methods(6)
- Perform(theArea?: number): boolean
Performs splitting and computes the resulting shell The context is used to keep track of former splittings.
Parameters (1)theArea
- MaxArea(): number
Set max area allowed for faces.
- NbParts(): number
Set number of parts expected.
- SetNumbersUVSplits(theNbUsplits: number, theNbVsplits: number): void
Set fixed numbers of splits in U and V directions. Only for "Splitting By Numbers" mode.
Parameters (2)theNbUsplitstheNbVsplits
- SetSplittingByNumber(theIsSplittingByNumber: boolean): void
Set splitting mode If the mode is "splitting by number", the face is splitted approximately into <myNbParts> parts, the parts are similar to squares in 2D.
Parameters (1)theIsSplittingByNumber
ShapeUpgrade_FixSmallBezierCurves
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Approx(First: number, Last: number): { returnValue: boolean; Curve3d: Geom_Curve; Curve2d: Geom2d_Curve; Curve2dR: Geom2d_Curve; First: number; Last: number; [Symbol.dispose](): void }Parameters (2)
FirstLast
ShapeUpgrade_FixSmallCurves
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(6)
- Init(theEdge: TopoDS_Edge, theFace: TopoDS_Face): voidParameters (2)
theEdgetheFace
- Approx(First: number, Last: number): { returnValue: boolean; Curve3d: Geom_Curve; Curve2d: Geom2d_Curve; Curve2dR: Geom2d_Curve; First: number; Last: number; [Symbol.dispose](): void }Parameters (2)
FirstLast
- SetSplitCurve3dTool(splitCurve3dTool: ShapeUpgrade_SplitCurve3d): void
Sets the tool for splitting 3D curves.
Parameters (1)splitCurve3dTool
- SetSplitCurve2dTool(splitCurve2dTool: ShapeUpgrade_SplitCurve2d): void
Sets the tool for splitting pcurves.
Parameters (1)splitCurve2dTool
- Status(status: ShapeExtend_Status): boolean
Queries the status of last call to Perform OK : DONE1: DONE2: FAIL1:
Parameters (1)status
ShapeUpgrade_RemoveInternalWires
Removes all internal wires having area less than specified min area.
Constructors(2)
Creates empty constructor.
- constructor(theShape: TopoDS_Shape): ShapeUpgrade_RemoveInternalWiresParameters (1)
theShape
Static methods(2)
- get_type_name(): string
Instance methods(10)
- Init(theShape: TopoDS_Shape): void
Initialize by a Shape.
Parameters (1)theShape
- Perform(): boolean
Removes all internal wires having area less than area specified as minimal allowed area.
- Perform(theSeqShapes: NCollection_Sequence_TopoDS_Shape): boolean
If specified sequence of shape contains - 1.wires then these wires will be removed if they have area less than allowed min area. 2.faces than internal wires from these faces will be removed if they have area less than allowed min area.
Parameters (1)theSeqShapes
Get result shape.
- MinArea(): number
Set min area allowed for holes( all holes having area less than mi area will be removed).
- RemoveFaceMode(): boolean
Set mode which manage removing faces which have outer wires consisting only from edges belonginig to removed internal wires. By default it is equal to true.
Returns sequence of removed faces.
Returns sequence of removed faces.
- Status(theStatus: ShapeExtend_Status): boolean
Queries status of last call to
Perform(): OK - nothing was done :DONE1 - internal wires were removed :DONE2 - small faces were removed. :FAIL1 - initial shape is not specified :FAIL2 - specified sub-shape is not belonged to inotial shape.Parameters (1)theStatus
ShapeUpgrade_RemoveLocations
Removes all locations sub-shapes of specified shape.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(7)
- Remove(theShape: TopoDS_Shape): boolean
Removes all location correspondingly to RemoveLevel.
Parameters (1)theShape
Returns shape with removed locations.
- SetRemoveLevel(theLevel: TopAbs_ShapeEnum): void
sets level starting with that location will be removed, by default TopAbs_SHAPE. In this case locations will be kept for specified shape and if specified shape is TopAbs_COMPOUND for sub-shapes of first level.
Parameters (1)theLevel
sets level starting with that location will be removed.Value of level can be set to TopAbs_SHAPE,TopAbs_COMPOUND,TopAbs_SOLID,TopAbs_SHELL,TopAbs_FACE.By default TopAbs_SHAPE. In this case location will be removed for all shape types for exception of compound.
- ModifiedShape(theInitShape: TopoDS_Shape): TopoDS_Shape
Returns modified shape obtained from initial shape.
Parameters (1)theInitShape
Returns map of modified shapes.
ShapeUpgrade_ShapeConvertToBezier
API class for performing conversion of 3D, 2D curves to bezier curves and surfaces to bezier based surfaces ( bezier surface, surface of revolution based on bezier curve, offset surface based on any previous type).
Constructors(2)
Empty constructor.
Initialize by a Shape.
Parameters (1)S
Instance methods(21)
- Set2dConversion(mode: boolean): void
Sets mode for conversion 2D curves to bezier.
Parameters (1)mode
- Get2dConversion(): boolean
Returns the 2D conversion mode.
- Set3dConversion(mode: boolean): void
Sets mode for conversion 3d curves to bezier.
Parameters (1)mode
- Get3dConversion(): boolean
Returns the 3D conversion mode.
- SetSurfaceConversion(mode: boolean): void
Sets mode for conversion surfaces curves to bezier basis.
Parameters (1)mode
- GetSurfaceConversion(): boolean
Returns the surface conversion mode.
- Set3dLineConversion(mode: boolean): void
Sets mode for conversion
Geom_Lineto bezier.Parameters (1)mode
- Get3dLineConversion(): boolean
Returns the
Geom_Lineconversion mode. - Set3dCircleConversion(mode: boolean): void
Sets mode for conversion
Geom_Circleto bezier.Parameters (1)mode
- Get3dCircleConversion(): boolean
Returns the
Geom_Circleconversion mode. - Set3dConicConversion(mode: boolean): void
Sets mode for conversion
Geom_Conicto bezier.Parameters (1)mode
- Get3dConicConversion(): boolean
Returns the
Geom_Conicconversion mode. - SetPlaneMode(mode: boolean): void
Sets mode for conversion
Geom_Planeto Bezier.Parameters (1)mode
- GetPlaneMode(): boolean
Returns the Geom_Pline conversion mode.
- SetRevolutionMode(mode: boolean): void
Sets mode for conversion
Geom_SurfaceOfRevolutionto Bezier.Parameters (1)mode
- GetRevolutionMode(): boolean
Returns the
Geom_SurfaceOfRevolutionconversion mode. - SetExtrusionMode(mode: boolean): void
Sets mode for conversion
Geom_SurfaceOfLinearExtrusionto Bezier.Parameters (1)mode
- GetExtrusionMode(): boolean
Returns the
Geom_SurfaceOfLinearExtrusionconversion mode. - SetBSplineMode(mode: boolean): void
Sets mode for conversion
Geom_BSplineSurfaceto Bezier.Parameters (1)mode
- GetBSplineMode(): boolean
Returns the
Geom_BSplineSurfaceconversion mode. - Perform(newContext?: boolean): boolean
Performs converting and computes the resulting shape.
Parameters (1)newContext
ShapeUpgrade_ShapeDivide
Divides a all faces in shell with given criteria Shell.
Constructors(2)
Initialize by a Shape.
Parameters (1)S
Instance methods(15)
- Init(S: TopoDS_Shape): void
Initialize by a Shape.
Parameters (1)S
- SetPrecision(Prec: number): void
Defines the spatial precision used for splitting.
Parameters (1)Prec
- SetMaxTolerance(maxtol: number): void
Sets maximal allowed tolerance.
Parameters (1)maxtol
- SetMinTolerance(mintol: number): void
Sets minimal allowed tolerance.
Parameters (1)mintol
- SetSurfaceSegmentMode(Segment: boolean): void
Purpose sets mode for trimming (segment) surface by wire UV bounds.
Parameters (1)Segment
- Perform(newContext?: boolean): boolean
Performs splitting and computes the resulting shape If newContext is True (default), the internal context will be cleared at start, else previous substitutions will be acting.
Parameters (1)newContext
Gives the resulting Shape, or Null shape if not done.
Returns context with all the modifications made during last call(s) to
Perform()recorded.- SetContext(context: ShapeBuild_ReShape): void
Sets context with recorded modifications to be applied during next call(s) to Perform(shape,false).
Parameters (1)context
- SetMsgRegistrator(msgreg: ShapeExtend_BasicMsgRegistrator): void
Sets message registrator.
Parameters (1)msgreg
Returns message registrator.
- SendMsg(shape: TopoDS_Shape, message: Message_Msg, gravity?: Message_Gravity): void
Sends a message to be attached to the shape. Calls corresponding message of message registrator.
Parameters (3)shapemessagegravity
- Status(status: ShapeExtend_Status): boolean
Queries the status of last call to Perform OK : no splitting was done (or no call to Perform) DONE1: some edges were split DONE2: surface was split FAIL1: some errors occurred.
Parameters (1)status
- SetSplitFaceTool(splitFaceTool: ShapeUpgrade_FaceDivide): void
Sets the tool for splitting faces.
Parameters (1)splitFaceTool
- SetEdgeMode(aEdgeMode: number): void
Sets mode for splitting 3d curves from edges. 0 - only curve 3d from free edges. 1 - only curve 3d from shared edges. 2 - all curve 3d.
Parameters (1)aEdgeMode
ShapeUpgrade_ShapeDivideAngle
Splits all surfaces of revolution, cylindrical, toroidal, conical, spherical surfaces in the given shape so that each resulting segment covers not more than defined number of degrees (to segments less than 90).
Constructors(2)
- constructor(MaxAngle: number): ShapeUpgrade_ShapeDivideAngle
Empty constructor.
Parameters (1)MaxAngle
- constructor(MaxAngle: number, S: TopoDS_Shape): ShapeUpgrade_ShapeDivideAngle
Initialize by a Shape.
Parameters (2)MaxAngleS
Instance methods(3)
- InitTool(MaxAngle: number): void
Resets tool for splitting face with given angle.
Parameters (1)MaxAngle
- SetMaxAngle(MaxAngle: number): void
Set maximal angle (calls InitTool).
Parameters (1)MaxAngle
- MaxAngle(): number
Returns maximal angle.
ShapeUpgrade_ShapeDivideArea
Divides faces from specified shape by max area criterium.
Constructors(2)
Initialize by a Shape.
Parameters (1)S
Instance methods(4)
- MaxArea(): number
Set max area allowed for faces.
- NbParts(): number
Set number of parts expected for the case of splitting by number.
- SetNumbersUVSplits(theNbUsplits: number, theNbVsplits: number): void
Set fixed numbers of splits in U and V directions. Only for "Splitting By Numbers" mode.
Parameters (2)theNbUsplitstheNbVsplits
- SetSplittingByNumber(theIsSplittingByNumber: boolean): void
Set splitting mode If the mode is "splitting by number", the face is splitted approximately into <myNbParts> parts, the parts are similar to squares in 2D.
Parameters (1)theIsSplittingByNumber
ShapeUpgrade_ShapeDivideClosed
Divides all closed faces in the shape. Class ShapeUpgrade_ClosedFaceDivide is used as divide tool.
Constructors(1)
Initialises tool with shape and default parameter.
Parameters (1)S
Instance methods(1)
- SetNbSplitPoints(num: number): void
Sets the number of cuts applied to divide closed faces. The number of resulting faces will be num+1.
Parameters (1)num
ShapeUpgrade_ShapeDivideClosedEdges
Constructors(1)
Initialises tool with shape and default parameter.
Parameters (1)S
Instance methods(1)
- SetNbSplitPoints(num: number): void
Sets the number of cuts applied to divide closed edges. The number of resulting faces will be num+1.
Parameters (1)num
ShapeUpgrade_ShapeDivideContinuity
API Tool for converting shapes with C0 geometry into C1 ones.
Constructors(2)
Initialize by a Shape.
Parameters (1)S
Instance methods(5)
- SetTolerance(Tol: number): void
Sets tolerance.
Parameters (1)Tol
- SetTolerance2d(Tol: number): void
Sets tolerance.
Parameters (1)Tol
- SetBoundaryCriterion(Criterion?: GeomAbs_Shape): void
Defines a criterion of continuity for the boundary (all the Wires).
The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.Parameters (1)Criterion
- SetPCurveCriterion(Criterion?: GeomAbs_Shape): void
Defines a criterion of continuity for the boundary (all the pcurves of Wires).
The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.Parameters (1)Criterion
- SetSurfaceCriterion(Criterion?: GeomAbs_Shape): void
Defines a criterion of continuity for the boundary (all the Wires).
The possible values are C0, G1, C1, G2, C2, C3, CN The default is C1 to respect the Cas.Cade Shape Validity. G1 and G2 are not authorized.Parameters (1)Criterion
ShapeUpgrade_ShellSewing
This class provides a tool for applying sewing algorithm from BRepBuilderAPI: it takes a shape, calls sewing for each shell, and then replaces sewed shells with use of ShapeBuild_ReShape.
Constructors(1)
Creates a ShellSewing, empty.
Instance methods(1)
- ApplySewing(shape: TopoDS_Shape, tol?: number): TopoDS_Shape
Builds a new shape from a former one, by calling Sewing from
BRepBuilderAPI. Rebuilt solids are oriented to be "not infinite".
If <tol> is not given (i.e. value 0. by default), it is computed as the mean tolerance recorded in <shape>
If no shell has been sewed, this method returns the input shapeParameters (2)shapetol
ShapeUpgrade_SplitCurve
Splits a curve with a criterion.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(8)
- Init(First: number, Last: number): void
Initializes with curve first and last parameters.
Parameters (2)FirstLast
- SetSplitValues(SplitValues: NCollection_HSequence_double): void
Sets the parameters where splitting has to be done.
Parameters (1)SplitValues
- Build(Segment: boolean): void
If Segment is True, the result is composed with segments of the curve bounded by the SplitValues. If Segment is False, the result is composed with trimmed Curves all based on the same complete curve.
Parameters (1)Segment
returns all the splitting values including the First and Last parameters of the input curve Merges input split values and new ones into myGlobalKnots
- Compute(): void
Calculates points for correction/splitting of the curve.
- Perform(Segment?: boolean): void
Performs correction/splitting of the curve. First defines splitting values by method
Compute(), then calls methodBuild().Parameters (1)Segment
- Status(status: ShapeExtend_Status): boolean
Returns the status OK - no splitting is needed DONE1 - splitting required and gives more than one segment DONE2 - splitting is required, but gives only one segment (initial) DONE3 - geometric form of the curve or parametrisation is modified.
Parameters (1)status
ShapeUpgrade_SplitCurve2d
Splits a 2d curve with a criterion.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(6)
- Init(C: Geom2d_Curve): void
Initializes with pcurve with its first and last parameters.
Parameters (1)C
- Init(C: Geom2d_Curve, First: number, Last: number): void
Initializes with pcurve with its parameters.
Parameters (3)CFirstLast
- Init(First: number, Last: number): void
Initializes with pcurve with its first and last parameters.
Parameters (2)FirstLast
- Build(Segment: boolean): void
If Segment is True, the result is composed with segments of the curve bounded by the SplitValues. If Segment is False, the result is composed with trimmed Curves all based on the same complete curve.
Parameters (1)Segment
ShapeUpgrade_SplitCurve2dContinuity
Corrects/splits a 2d curve with a continuity criterion. Tolerance is used to correct the curve at a knot that respects geometrically the criterion, in order to reduce the multiplicity of the knot.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(4)
- SetCriterion(Criterion: GeomAbs_Shape): void
Sets criterion for splitting.
Parameters (1)Criterion
- SetTolerance(Tol: number): void
Sets tolerance.
Parameters (1)Tol
- Compute(): void
Calculates points for correction/splitting of the curve.
ShapeUpgrade_SplitCurve3d
Splits a 3d curve with a criterion.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(6)
- Init(C: Geom_Curve): void
Initializes with curve with its first and last parameters.
Parameters (1)C
- Init(C: Geom_Curve, First: number, Last: number): void
Initializes with curve with its parameters.
Parameters (3)CFirstLast
- Init(First: number, Last: number): void
Initializes with curve with its first and last parameters.
Parameters (2)FirstLast
- Build(Segment: boolean): void
If Segment is True, the result is composed with segments of the curve bounded by the SplitValues. If Segment is False, the result is composed with trimmed Curves all based on the same complete curve.
Parameters (1)Segment
ShapeUpgrade_SplitCurve3dContinuity
Corrects/splits a 2d curve with a continuity criterion. Tolerance is used to correct the curve at a knot that respects geometrically the criterion, in order to reduce the multiplicity of the knot.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(5)
- SetCriterion(Criterion: GeomAbs_Shape): void
Sets criterion for splitting.
Parameters (1)Criterion
- SetTolerance(Tol: number): void
Sets tolerance.
Parameters (1)Tol
- Compute(): void
Calculates points for correction/splitting of the curve.
ShapeUpgrade_SplitSurface
Splits a Surface with a criterion.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(12)
- Init(S: Geom_Surface): void
Initializes with single supporting surface.
Parameters (1)S
- Init(S: Geom_Surface, UFirst: number, ULast: number, VFirst: number, VLast: number, theArea: number): void
Initializes with single supporting surface with bounding parameters.
Parameters (6)SUFirstULastVFirstVLasttheArea
- SetUSplitValues(UValues: NCollection_HSequence_double): void
Sets U parameters where splitting has to be done.
Parameters (1)UValues
- SetVSplitValues(VValues: NCollection_HSequence_double): void
Sets V parameters where splitting has to be done.
Parameters (1)VValues
- Build(Segment: boolean): void
Performs splitting of the supporting surface. If resulting surface is B-Spline and Segment is True, the result is composed with segments of the surface bounded by the U and V SplitValues (method
Geom_BSplineSurface::Segmentis used). If Segment is False, the result is composed withGeom_RectangularTrimmedSurfaceall based on the same complete surface. Fields myNbResultingRow and myNbResultingCol must be set to specify the size of resulting grid of surfaces.Parameters (1)Segment
- Compute(Segment?: boolean): void
Calculates points for correction/splitting of the surface.
Parameters (1)Segment
- Perform(Segment?: boolean): void
Performs correction/splitting of the surface. First defines splitting values by method
Compute(), then calls methodBuild().Parameters (1)Segment
returns all the U splitting values including the First and Last parameters of the input surface
returns all the splitting V values including the First and Last parameters of the input surface
- Status(status: ShapeExtend_Status): boolean
Returns the status OK - no splitting is needed DONE1 - splitting required and gives more than one patch DONE2 - splitting is required, but gives only single patch (initial) DONE3 - geometric form of the surface or parametrisation is modified.
Parameters (1)status
Returns obtained surfaces after splitting as CompositeSurface.
ShapeUpgrade_SplitSurfaceAngle
Splits a surfaces of revolution, cylindrical, toroidal, conical, spherical so that each resulting segment covers not more than defined number of degrees.
Constructors(1)
- constructor(MaxAngle: number): ShapeUpgrade_SplitSurfaceAngle
Empty constructor.
Parameters (1)MaxAngle
Static methods(2)
- get_type_name(): string
Instance methods(4)
- SetMaxAngle(MaxAngle: number): void
Set maximal angle.
Parameters (1)MaxAngle
- MaxAngle(): number
Returns maximal angle.
- Compute(Segment: boolean): void
Performs splitting of the supporting surface(s). First defines splitting values, then calls inherited method.
Parameters (1)Segment
ShapeUpgrade_SplitSurfaceArea
Split surface in the parametric space in according specified number of splits on the.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(5)
- NbParts(): number
Set number of split for surfaces.
- SetSplittingIntoSquares(theIsSplittingIntoSquares: boolean): void
Set splitting mode If the mode is "splitting into squares", the face is splitted approximately into <myNbParts> parts, the parts are similar to squares in 2D.
Parameters (1)theIsSplittingIntoSquares
- SetNumbersUVSplits(theNbUsplits: number, theNbVsplits: number): void
Set fixed numbers of splits in U and V directions. Only for "Splitting Into Squares" mode.
Parameters (2)theNbUsplitstheNbVsplits
- Compute(Segment?: boolean): void
Calculates points for correction/splitting of the surface.
Parameters (1)Segment
ShapeUpgrade_SplitSurfaceContinuity
Splits a Surface with a continuity criterion. At the present moment C1 criterion is used only. This tool works with tolerance. If C0 surface can be corrected at a knot with given tolerance then the surface is corrected, otherwise it is spltted at that knot.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(4)
- SetCriterion(Criterion: GeomAbs_Shape): void
Sets criterion for splitting.
Parameters (1)Criterion
- SetTolerance(Tol: number): void
Sets tolerance.
Parameters (1)Tol
- Compute(Segment: boolean): void
Calculates points for correction/splitting of the surface.
Parameters (1)Segment
ShapeUpgrade_Tool
Tool is a root class for splitting classes Provides context for recording changes, basic precision value and limit (minimal and maximal) values for tolerances.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(11)
- Set(tool: ShapeUpgrade_Tool): void
Copy all fields from another Root object.
Parameters (1)tool
- SetContext(context: ShapeBuild_ReShape): void
Sets context.
Parameters (1)context
Returns context.
- SetPrecision(preci: number): void
Sets basic precision value.
Parameters (1)preci
- Precision(): number
Returns basic precision value.
- SetMinTolerance(mintol: number): void
Sets minimal allowed tolerance.
Parameters (1)mintol
- MinTolerance(): number
Returns minimal allowed tolerance.
- SetMaxTolerance(maxtol: number): void
Sets maximal allowed tolerance.
Parameters (1)maxtol
- MaxTolerance(): number
Returns maximal allowed tolerance.
- LimitTolerance(toler: number): number
Returns tolerance limited by [myMinTol,myMaxTol].
Parameters (1)toler
ShapeUpgrade_UnifySameDomain
This tool tries to unify faces and edges of the shape which lie on the same geometry. Faces/edges are considering as 'same-domain' if a group of neighbouring faces/edges are lying on coincident surfaces/curves.
In this case these faces/edges can be unified into one face/edge. ShapeUpgrade_UnifySameDomain is initialized by a shape and the next optional parameters: UnifyFaces - tries to unify all possible faces UnifyEdges - tries to unify all possible edges ConcatBSplines - if this flag is set to true then all neighbouring edges, which lay on BSpline or Bezier curves with C1 continuity on their common vertices, will be merged into one common edge.
The input shape can be of any type containing faces or edges - compsolid, solid, shell, wire, compound of any kind of shapes. The algorithm preserves the structure of compsolids, solids, shells and wires. E.g., if two shells have a common edge and the faces sharing this edge lie on the same surface the algorithm will not unify these faces, otherwise the structure of shells would be broken. However, if such faces belong to different compounds of faces they will be unified.
The output result of the tool is the unified shape.
All the modifications of initial shape are recorded during unifying. Methods History are intended to:
- set a place holder for the history of modifications of sub-shapes of the initial shape;
- get the collected history. The algorithm provides a place holder for the history and collects the history by default. To avoid collecting of the history the place holder should be set to null handle.
Constructors(2)
Empty constructor.
- constructor(aShape: TopoDS_Shape, UnifyEdges?: boolean, UnifyFaces?: boolean, ConcatBSplines?: boolean): ShapeUpgrade_UnifySameDomain
Constructor defining input shape and necessary flags. It does not perform unification.
Parameters (4)aShapeUnifyEdgesUnifyFacesConcatBSplines
Static methods(2)
- get_type_name(): string
Instance methods(11)
- Initialize(aShape: TopoDS_Shape, UnifyEdges?: boolean, UnifyFaces?: boolean, ConcatBSplines?: boolean): void
Initializes with a shape and necessary flags. It does not perform unification. If you intend to nullify the History place holder do it after initialization.
Parameters (4)aShapeUnifyEdgesUnifyFacesConcatBSplines
- AllowInternalEdges(theValue: boolean): void
Sets the flag defining whether it is allowed to create internal edges inside merged faces in the case of non-manifold topology. Without this flag merging through multi connected edge is forbidden. Default value is false.
Parameters (1)theValue
- KeepShape(theShape: TopoDS_Shape): void
Sets the shape for avoid merging of the faces/edges. This shape can be vertex or edge. If the shape is a vertex it forbids merging of connected edges. If the shape is a edge it forbids merging of connected faces. This method can be called several times to keep several shapes.
Parameters (1)theShape
- KeepShapes(theShapes: NCollection_Map_TopoDS_Shape_TopTools_ShapeMapHasher): void
Sets the map of shapes for avoid merging of the faces/edges. It allows passing a ready to use map instead of calling many times the method KeepShape.
Parameters (1)theShapes
- SetSafeInputMode(theValue: boolean): void
Sets the flag defining the behavior of the algorithm regarding modification of input shape. If this flag is equal to True then the input (original) shape can't be modified during modification process. Default value is true.
Parameters (1)theValue
- SetLinearTolerance(theValue: number): void
Sets the linear tolerance. It plays the role of chord error when taking decision about merging of shapes. Default value is
Precision::Confusion().Parameters (1)theValue
- SetAngularTolerance(theValue: number): void
Sets the angular tolerance. If two shapes form a connection angle greater than this value they will not be merged. Default value is
Precision::Angular().Parameters (1)theValue
- Build(): void
Performs unification and builds the resulting shape.
Gives the resulting shape.
Returns the history of the processed shapes.
ShapeUpgrade_WireDivide
Divides edges in the wire lying on the face or free wires or free edges with a criterion. Splits 3D curve and pcurve(s) of the edge on the face. Other pcurves which may be associated with the edge are simply copied. If 3D curve is split then pcurve on the face is split as well, and vice-versa. Input shape is not modified. The modifications made are recorded in external context (ShapeBuild_ReShape). This tool is applied to all edges before splitting them in order to keep sharing.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(20)
- Init(W: TopoDS_Wire, F: TopoDS_Face): void
Initializes by wire and face.
Parameters (2)WF
- Init(W: TopoDS_Wire, S: Geom_Surface): void
Initializes by wire and surface.
Parameters (2)WS
- Load(W: TopoDS_Wire): void
Loads working wire.
Parameters (1)W
- Load(E: TopoDS_Edge): void
Creates wire of one edge and calls Load for wire.
Parameters (1)E
- SetFace(F: TopoDS_Face): void
Sets supporting surface by face.
Parameters (1)F
- SetSurface(S: Geom_Surface): void
Sets supporting surface.
Parameters (1)S
- SetSurface(S: Geom_Surface, L: TopLoc_Location): void
Sets supporting surface with location.
Parameters (2)SL
- Perform(): void
Computes the resulting wire by splitting all the edges according to splitting criteria. All the modifications made are recorded in context (
ShapeBuild_ReShape). This tool is applied to all edges before splitting them in order to keep sharings. If no supporting face or surface is defined, only 3d splitting criteria are used. - Wire(): TopoDS_Wire
Gives the resulting Wire (equal to initial one if not done or Null if not loaded).
- Status(status: ShapeExtend_Status): boolean
Queries status of last call to
Perform()OK - no edges were split, wire left untouched DONE1 - some edges were split FAIL1 - some edges have no 3d curve (skipped) FAIL2 - some edges have no pcurve (skipped).Parameters (1)status
- SetSplitCurve3dTool(splitCurve3dTool: ShapeUpgrade_SplitCurve3d): void
Sets the tool for splitting 3D curves.
Parameters (1)splitCurve3dTool
- SetSplitCurve2dTool(splitCurve2dTool: ShapeUpgrade_SplitCurve2d): void
Sets the tool for splitting pcurves.
Parameters (1)splitCurve2dTool
- SetTransferParamTool(TransferParam: ShapeAnalysis_TransferParameters): void
Sets the tool for Transfer parameters between curves and pcurves.
Parameters (1)TransferParam
- SetEdgeDivideTool(edgeDivideTool: ShapeUpgrade_EdgeDivide): void
Sets tool for splitting edge.
Parameters (1)edgeDivideTool
returns tool for splitting edges
Returns the tool for Transfer of parameters.
- SetEdgeMode(EdgeMode: number): void
Sets mode for splitting 3d curves from edges. 0 - only curve 3d from free edges. 1 - only curve 3d from shared edges. 2 - all curve 3d.
Parameters (1)EdgeMode
- SetFixSmallCurveTool(FixSmallCurvesTool: ShapeUpgrade_FixSmallCurves): void
Sets tool for fixing small curves with specified min tolerance;.
Parameters (1)FixSmallCurvesTool
Returns tool for fixing small curves.