Adaptor2d
OCCT package Adaptor2d: Adaptor2d_Curve2d, Adaptor2d_Line2d, Adaptor2d_OffsetCurve.
Adaptor2d_Curve2d
Root class for 2D curves on which geometric algorithms work. An adapted curve is an interface between the services provided by a curve, and those required of the curve by algorithms, which use it. A derived concrete class is provided: Geom2dAdaptor_Curve for a curve from the Geom2d package.
Polynomial coefficients of BSpline curves used for their evaluation are cached for better performance. Therefore these evaluations are not thread-safe and parallel evaluations need to be prevented.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(36)
Shallow copy of adaptor.
- FirstParameter(): number
- LastParameter(): number
- NbIntervals(S: GeomAbs_Shape): number
If necessary, breaks the curve in intervals of continuity . And returns the number of intervals.
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Stores in <T> the parameters bounding the intervals of continuity .
The array must provide enough room to accommodate for the parameters. i.e. T.Length() >NbIntervals()Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- Trim(First: number, Last: number, Tol: number): Adaptor2d_Curve2d
Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>.
Parameters (3)FirstLastTol
- IsClosed(): boolean
- IsPeriodic(): boolean
- Period(): number
Computes the point of parameter U on the curve.
Parameters (1)U
Computes the point of parameter U on the curve.
Parameters (2)UP—Mutated in place; read the updated value from this argument after the call.
Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.
Parameters (3)UP—Mutated in place; read the updated value from this argument after the call.V—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.
Parameters (4)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.
Parameters (5)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.V3—Mutated in place; read the updated value from this argument after the call.
The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.
Parameters (2)UN
- Resolution(R3d: number): number
Returns the parametric resolution corresponding to the real space resolution <R3d>.
Parameters (1)R3d
Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.
- Degree(): number
- IsRational(): boolean
- NbPoles(): number
- NbKnots(): number
- NbSamples(): number
Computes the point of parameter U on the curve. Raises an exception on failure.
Parameters (1)theU
- EvalD1(theU: number): Geom2d_Curve_ResD1
Computes the point and first derivative at parameter U. Raises an exception on failure.
Parameters (1)theU
- EvalD2(theU: number): Geom2d_Curve_ResD2
Computes the point and first two derivatives at parameter U. Raises an exception on failure.
Parameters (1)theU
- EvalD3(theU: number): Geom2d_Curve_ResD3
Computes the point and first three derivatives at parameter U. Raises an exception on failure.
Parameters (1)theU
Computes the Nth derivative at parameter U. Raises an exception on failure.
Parameters (2)theUtheN
Adaptor2d_Line2d
Use by the TopolTool to trim a surface.
Constructors(2)
- constructor(P: gp_Pnt2d, D: gp_Dir2d, UFirst: number, ULast: number): Adaptor2d_Line2dParameters (4)
PDUFirstULast
Static methods(2)
- get_type_name(): string
Instance methods(32)
Shallow copy of adaptor.
- Parameters (1)
L
- Parameters (3)
LUFirstULast
- FirstParameter(): number
- LastParameter(): number
- NbIntervals(S: GeomAbs_Shape): number
If necessary, breaks the curve in intervals of continuity . And returns the number of intervals.
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Stores in <T> the parameters bounding the intervals of continuity .
The array must provide enough room to accommodate for the parameters. i.e. T.Length() >NbIntervals()Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- Trim(First: number, Last: number, Tol: number): Adaptor2d_Curve2d
Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>.
Parameters (3)FirstLastTol
- IsClosed(): boolean
- IsPeriodic(): boolean
- Period(): number
Computes the point of parameter U on the curve.
Parameters (1)U
Computes the point of parameter U on the curve.
Parameters (2)UP—Mutated in place; read the updated value from this argument after the call.
Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.
Parameters (3)UP—Mutated in place; read the updated value from this argument after the call.V—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.
Parameters (4)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.
Parameters (5)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.V3—Mutated in place; read the updated value from this argument after the call.
The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.
Parameters (2)UN
- Resolution(R3d: number): number
Returns the parametric resolution corresponding to the real space resolution <R3d>.
Parameters (1)R3d
Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.
- Degree(): number
- IsRational(): boolean
- NbPoles(): number
- NbKnots(): number
Adaptor2d_OffsetCurve
Defines an Offset curve (algorithmic 2d curve).
Constructors(4)
The Offset is set to 0.
The curve is loaded. The Offset is set to 0.
Parameters (1)C
- constructor(C: Adaptor2d_Curve2d, Offset: number): Adaptor2d_OffsetCurve
Creates an OffsetCurve curve. The Offset is set to Offset.
Parameters (2)COffset
- constructor(C: Adaptor2d_Curve2d, Offset: number, WFirst: number, WLast: number): Adaptor2d_OffsetCurve
Create an Offset curve. WFirst,WLast define the bounds of the Offset curve.
Parameters (4)COffsetWFirstWLast
Static methods(2)
- get_type_name(): string
Instance methods(36)
Shallow copy of adaptor.
- Load(S: Adaptor2d_Curve2d): void
Changes the curve. The Offset is reset to 0.
Parameters (1)S
- Load(Offset: number): void
Changes the Offset on the current Curve.
Parameters (1)Offset
- Load(Offset: number, WFirst: number, WLast: number): void
Changes the Offset Curve on the current Curve.
Parameters (3)OffsetWFirstWLast
- Offset(): number
- FirstParameter(): number
- LastParameter(): number
- NbIntervals(S: GeomAbs_Shape): number
If necessary, breaks the curve in intervals of continuity . And returns the number of intervals.
Parameters (1)S
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Stores in <T> the parameters bounding the intervals of continuity .
The array must provide enough room to accommodate for the parameters. i.e. T.Length() >NbIntervals()Parameters (2)T—Mutated in place; read the updated value from this argument after the call.S
- Trim(First: number, Last: number, Tol: number): Adaptor2d_Curve2d
Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>.
Parameters (3)FirstLastTol
- IsClosed(): boolean
- IsPeriodic(): boolean
- Period(): number
Computes the point of parameter U on the curve.
Parameters (1)U
Computes the point of parameter U on the curve.
Parameters (2)UP—Mutated in place; read the updated value from this argument after the call.
Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.
Parameters (3)UP—Mutated in place; read the updated value from this argument after the call.V—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.
Parameters (4)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.
Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.
Parameters (5)UP—Mutated in place; read the updated value from this argument after the call.V1—Mutated in place; read the updated value from this argument after the call.V2—Mutated in place; read the updated value from this argument after the call.V3—Mutated in place; read the updated value from this argument after the call.
The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.
Parameters (2)UN
- Resolution(R3d: number): number
Returns the parametric resolution corresponding to the real space resolution <R3d>.
Parameters (1)R3d
Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.
- Degree(): number
- IsRational(): boolean
- NbPoles(): number
- NbKnots(): number
- NbSamples(): number