ShapeConstruct
OCCT package ShapeConstruct: ShapeConstruct, ShapeConstruct_Curve, ShapeConstruct_MakeTriangulation, ShapeConstruct_ProjectCurveOnSurface.
ShapeConstruct
This package provides new algorithms for constructing new geometrical objects and topological shapes. It complements and extends algorithms available in Open CASCADE topological and geometrical toolkist. The functionality provided by this package are the following: projecting curves on surface, adjusting curve to have given start and end points. P.
Constructors(1)
Static methods(6)
- ConvertCurveToBSpline(C3D: Geom_Curve, First: number, Last: number, Tol3d: number, Continuity: GeomAbs_Shape, MaxSegments: number, MaxDegree: number): Geom_BSplineCurve
Tool for wire triangulation.
Parameters (7)C3DFirstLastTol3dContinuityMaxSegmentsMaxDegree
- ConvertCurveToBSpline(C2D: Geom2d_Curve, First: number, Last: number, Tol2d: number, Continuity: GeomAbs_Shape, MaxSegments: number, MaxDegree: number): Geom2d_BSplineCurveParameters (7)
C2DFirstLastTol2dContinuityMaxSegmentsMaxDegree
- ConvertSurfaceToBSpline(surf: Geom_Surface, UF: number, UL: number, VF: number, VL: number, Tol3d: number, Continuity: GeomAbs_Shape, MaxSegments: number, MaxDegree: number): Geom_BSplineSurfaceParameters (9)
surfUFULVFVLTol3dContinuityMaxSegmentsMaxDegree
- JoinPCurves(theEdges: NCollection_HSequence_TopoDS_Shape, theFace: TopoDS_Face, theEdge: TopoDS_Edge): boolean
join pcurves of the <theEdge> on the <theFace> try to use pcurves from originas edges <theEdges> Returns false if cannot join pcurves
Parameters (3)theEdgestheFacetheEdge—Mutated in place; read the updated value from this argument after the call.
- JoinCurves(c3d1: Geom_Curve, ac3d2: Geom_Curve, Orient1: TopAbs_Orientation, Orient2: TopAbs_Orientation, first1: number, last1: number, first2: number, last2: number, isRev1: boolean, isRev2: boolean): { returnValue: boolean; first1: number; last1: number; first2: number; last2: number; c3dOut: Geom_Curve; isRev1: boolean; isRev2: boolean; [Symbol.dispose](): void }
Method for joininig curves 3D. Parameters : c3d1,ac3d2 - initial curves Orient1, Orient2 - initial edges orientations. first1,last1,first2,last2 - parameters for trimming curves (re-calculate with account of orientation edges) c3dOut - result curve isRev1,isRev2 - out parameters indicative on possible errors. Return value : True - if curves were joined successfully, else - False.
Parameters (10)c3d1ac3d2Orient1Orient2first1last1first2last2isRev1isRev2
ReturnsA result object with fields:
returnValue: the C++ return valuefirst1: updated value from the call.last1: updated value from the call.first2: updated value from the call.last2: updated value from the call.c3dOut: owned by the returned envelope.isRev1: updated value from the call.isRev2: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
- JoinCurves(c2d1: Geom2d_Curve, ac2d2: Geom2d_Curve, Orient1: TopAbs_Orientation, Orient2: TopAbs_Orientation, first1: number, last1: number, first2: number, last2: number, isRev1: boolean, isRev2: boolean, isError: boolean): { returnValue: boolean; first1: number; last1: number; first2: number; last2: number; c2dOut: Geom2d_Curve; isRev1: boolean; isRev2: boolean; [Symbol.dispose](): void }
Method for joininig curves 3D. Parameters : c3d1,ac3d2 - initial curves Orient1, Orient2 - initial edges orientations. first1,last1,first2,last2 - parameters for trimming curves (re-calculate with account of orientation edges) c3dOut - result curve isRev1,isRev2 - out parameters indicative on possible errors. isError - input parameter indicative possible errors due to that one from edges have one vertex Return value : True - if curves were joined successfully, else - False.
Parameters (11)c2d1ac2d2Orient1Orient2first1last1first2last2isRev1isRev2isError
ReturnsA result object with fields:
returnValue: the C++ return valuefirst1: updated value from the call.last1: updated value from the call.first2: updated value from the call.last2: updated value from the call.c2dOut: owned by the returned envelope.isRev1: updated value from the call.isRev2: updated value from the call.
Dispose the returned envelope to release owned Handle fields.
ShapeConstruct_Curve
Adjusts curve to have start and end points at the given points (currently works on lines and B-Splines only).
Constructors(1)
Static methods(2)
- FixKnots(): { returnValue: boolean; knots: NCollection_HArray1_double; [Symbol.dispose](): void }
- FixKnots(knots: NCollection_Array1_double): booleanParameters (1)
knots
Instance methods(5)
- AdjustCurve(C3D: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, take1?: boolean, take2?: boolean): boolean
Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines, returns True in this case, else returns False. For line considers both bounding points, for B-Splines only specified.
Warning : Does not check if curve should be reversedParameters (5)C3DP1P2take1take2
- AdjustCurveSegment(C3D: Geom_Curve, P1: gp_Pnt, P2: gp_Pnt, U1: number, U2: number): boolean
Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines.
For lines works as previous method, B-Splines are segmented at the given values and then are adjusted to the points.Parameters (5)C3DP1P2U1U2
- AdjustCurve2d(C2D: Geom2d_Curve, P1: gp_Pnt2d, P2: gp_Pnt2d, take1?: boolean, take2?: boolean): boolean
Modifies a curve in order to make its bounds confused with given points. Works only on lines and B-Splines, returns True in this case, else returns False.
For line considers both bounding points, for B-Splines only specified.
Warning : Does not check if curve should be reversedParameters (5)C2DP1P2take1take2
- ConvertToBSpline(C: Geom_Curve, first: number, last: number, prec: number): Geom_BSplineCurve
Converts a curve of any type (only part from first to last) to bspline. The method of conversion depends on the type of original curve: BSpline -> C.Segment(first,last) Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) Conic and Other ->
Approx_Curve3d(C[first,last],prec,C1,9,1000).Parameters (4)Cfirstlastprec
- ConvertToBSpline(C: Geom2d_Curve, first: number, last: number, prec: number): Geom2d_BSplineCurve
Converts a curve of any type (only part from first to last) to bspline. The method of conversion depends on the type of original curve: BSpline -> C.Segment(first,last) Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) Conic and Other ->
Approx_Curve2d(C[first,last],prec,C1,9,1000).Parameters (4)Cfirstlastprec
ShapeConstruct_MakeTriangulation
Constructors(2)
- constructor(pnts: NCollection_Array1_gp_Pnt, prec?: number): ShapeConstruct_MakeTriangulationParameters (2)
pntsprec
- constructor(wire: TopoDS_Wire, prec?: number): ShapeConstruct_MakeTriangulationParameters (2)
wireprec
Instance methods(2)
- Build(theRange?: Message_ProgressRange): void
This is called by
Shape(). It does nothing but may be redefined.Parameters (1)theRange
- IsDone(): boolean
ShapeConstruct_ProjectCurveOnSurface
This tool provides a method for computing pcurve by projecting 3d curve onto a surface. Projection is done by 23 or more points (this number is changed for B-Splines according to the following rule: the total number of the points is not less than number of spans * (degree + 1); it is increased recursively starting with 23 and is added with 22 until the condition is fulfilled). Isoparametric cases (if curve corresponds to U=const or V=const on the surface) are recognized with the given precision.
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(9)
- Init(theSurf: Geom_Surface, thePreci: number): void
Initializes the object with all necessary parameters, i.e. surface and precision.
Parameters (2)theSurf—the surface to project onthePreci—the precision for projection
- Init(theSurf: ShapeAnalysis_Surface, thePreci: number): void
Initializes the object with all necessary parameters, i.e. surface and precision.
Parameters (2)theSurf—the surface to project on (ShapeAnalysis_Surface)thePreci—the precision for projection
- SetSurface(theSurf: Geom_Surface): void
Loads a surface (in the form of
Geom_Surface) to project on.Parameters (1)theSurf—the surface to project on
- SetSurface(theSurf: ShapeAnalysis_Surface): void
Loads a surface (in the form of
ShapeAnalysis_Surface) to project on.Parameters (1)theSurf—the surface to project on
- SetPrecision(thePreci: number): void
Sets value for current precision.
Parameters (1)thePreci—the precision value
- AdjustOverDegenMode(): number
Returns (modifiable) the flag specifying to which side of parametrical space adjust part of pcurve which lies on seam. This is required in very rare case when 3d curve which is to be projected goes partly along the seam on the closed surface with singularity (e.g. sphere), goes through the degenerated point and partly lies on internal area of surface.
If this flag is True, the seam part of such curve will be adjusted to the left side of parametric space (on sphere U=0), else to the right side (on sphere U=2*PI) Default value is TrueReturnsmodifiable reference to the adjustment flag
- Status(theStatus: ShapeExtend_Status): boolean
Returns the status of last Perform.
Parameters (1)theStatus—the status to query
Returnstrue if the specified status is set
- Perform(theC3D: Geom_Curve, theFirst: number, theLast: number, theTolFirst: number, theTolLast: number): { returnValue: boolean; theC2D: Geom2d_Curve; [Symbol.dispose](): void }
Computes the projection of 3d curve onto a surface using the specialized algorithm. Returns False if projector fails, otherwise, if pcurve computed successfully, returns True. The output curve 2D is guaranteed to be same-parameter with input curve 3D on the interval [theFirst, theLast]. If the output curve lies on a direct line the infinite line is returned, in the case same-parameter condition is satisfied.
Parameters (5)theC3D—the 3D curve to projecttheFirst—the first parameter of the curvetheLast—the last parameter of the curvetheTolFirst—the tolerance at the first point (default:Precision::Confusion())theTolLast—the tolerance at the last point (default:Precision::Confusion())
ReturnsA result object with fields:
returnValue: true if projection succeededtheC2D: the resulting 2D curve, owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.