ProjLib
OCCT package ProjLib: ProjLib, ProjLib_CompProjectedCurve, ProjLib_ComputeApprox, ProjLib_ComputeApproxOnPolarSurface, and 11 more bound classes.
ProjLib
The ProjLib package first provides projection of curves on a plane along a given Direction. The result will be a 3D curve.
The ProjLib package provides projection of curves on surfaces to compute the curve in the parametric space. It is assumed that the curve is on the surface.
It provides:
- Package methods to handle the easiest cases:Line, Circle, Ellipse, Parabola, Hyperbola on plane.Line, Circle on cylinder.Line, Circle on cone.
- Classes to handle the general cases:Plane.Cylinder.Cone.Sphere.Torus.
- A generic class to handle a
Adaptor3d_Curveon aAdaptor3d_Surface.
Constructors(1)
Static methods(18)
- Parameters (2)
PlP
- Parameters (2)
PlL
- Parameters (2)
PlC
- Project(Pl: gp_Pln, E: gp_Elips): gp_Elips2dParameters (2)
PlE
- Project(Pl: gp_Pln, P: gp_Parab): gp_Parab2dParameters (2)
PlP
- Parameters (2)
PlH
- Project(Cy: gp_Cylinder, P: gp_Pnt): gp_Pnt2dParameters (2)
CyP
- Project(Cy: gp_Cylinder, L: gp_Lin): gp_Lin2dParameters (2)
CyL
- Project(Cy: gp_Cylinder, Ci: gp_Circ): gp_Lin2dParameters (2)
CyCi
- Parameters (2)
CoP
- Parameters (2)
CoL
- Parameters (2)
CoCi
- Parameters (2)
SpP
- Parameters (2)
SpCi
- Parameters (2)
ToP
- Parameters (2)
ToCi
- MakePCurveOfType(PC: ProjLib_ProjectedCurve): { aC: Geom2d_Curve; [Symbol.dispose](): void }
Make empty P-Curve <aC> of relevant to <PC> type.
Parameters (1)PC
ReturnsA result object with fields:
aC: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
- IsAnaSurf(theAS: Adaptor3d_Surface): boolean
Returns "true" if surface is analytical, that is it can be Plane, Cylinder, Cone, Sphere, Torus. For all other types of surface method returns "false".
Parameters (1)theAS
ProjLib_CompProjectedCurve
Constructors(4)
- constructor(S: Adaptor3d_Surface, C: Adaptor3d_Curve, TolU: number, TolV: number): ProjLib_CompProjectedCurve
try to find all solutions
Parameters (4)SCTolUTolV
- constructor(Tol3d: number, S: Adaptor3d_Surface, C: Adaptor3d_Curve, MaxDist?: number): ProjLib_CompProjectedCurve
this constructor tries to optimize the search using the assumption that maximum distance between surface and curve less or equal then MaxDist. if MaxDist < 0 then algorithm try to find all solutions Tolerances of parameters are calculated automatically.
Parameters (4)Tol3dSCMaxDist
- constructor(S: Adaptor3d_Surface, C: Adaptor3d_Curve, TolU: number, TolV: number, MaxDist: number): ProjLib_CompProjectedCurve
this constructor tries to optimize the search using the assumption that maximum distance between surface and curve less or equal then MaxDist. if MaxDist < 0 then algorithm works as above.
Parameters (5)SCTolUTolVMaxDist
Static methods(2)
- get_type_name(): string
Instance methods(44)
Shallow copy of adaptor.
- Init(): void
computes a set of projected point and determine the continuous parts of the projected curves. The points corresponding to a projection on the bounds of the surface are included in this set of points.
- Perform(): void
Performs projecting for given curve. If projecting uses approximation, approximation parameters can be set before by corresponding methods SetTol3d(...), SeContinuity(...), SetMaxDegree(...), SetMaxSeg(...)
- SetTol3d(theTol3d: number): void
Set the parameter, which defines 3d tolerance of approximation.
Parameters (1)theTol3d
- SetContinuity(theContinuity: GeomAbs_Shape): void
Set the parameter, which defines curve continuity. Default value is GeomAbs_C2;.
Parameters (1)theContinuity
- SetMaxDegree(theMaxDegree: number): void
Set max possible degree of result BSpline curve2d, which is got by approximation. If MaxDegree < 0, algorithm uses values that are chosen depending of types curve 3d and surface.
Parameters (1)theMaxDegree
- SetMaxSeg(theMaxSeg: number): void
Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If MaxSeg < 0, algorithm uses default value = 16.
Parameters (1)theMaxSeg
- SetProj2d(theProj2d: boolean): void
Set the parameter, which defines necessity of 2d results.
Parameters (1)theProj2d
- SetProj3d(theProj3d: boolean): void
Set the parameter, which defines necessity of 3d results.
Parameters (1)theProj3d
- Load(S: Adaptor3d_Surface): void
Changes the surface.
Parameters (1)S
- Load(C: Adaptor3d_Curve): void
Changes the curve.
Parameters (1)C
- GetTolerance(TolU?: number, TolV?: number): { TolU: number; TolV: number }Parameters (2)
TolUTolV
- NbCurves(): number
returns the number of continuous part of the projected curve
- Bounds(Index: number, Udeb?: number, Ufin?: number): { Udeb: number; Ufin: number }
returns the bounds of the continuous part corresponding to Index
Parameters (3)IndexUdebUfin
ReturnsA result object with fields:
Udeb: updated value from the call.Ufin: updated value from the call.
- IsSinglePnt(Index: number, P: gp_Pnt2d): boolean
returns True if part of projection with number Index is a single point and writes its coordinates in P
Parameters (2)IndexP—Mutated in place; read the updated value from this argument after the call.
- IsUIso(Index: number, U?: number): { returnValue: boolean; U: number }
returns True if part of projection with number Index is an u-isoparametric curve of input surface
Parameters (2)IndexU
ReturnsA result object with fields:
returnValue: the C++ return valueU: updated value from the call.
- IsVIso(Index: number, V?: number): { returnValue: boolean; V: number }
returns True if part of projection with number Index is an v-isoparametric curve of input surface
Parameters (2)IndexV
ReturnsA result object with fields:
returnValue: the C++ return valueV: updated value from the call.
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.
The returned vector gives the value of the derivative for the order of derivation N. Raised if N < 1. Raised if N > 2.
Parameters (2)UN
- FirstParameter(): number
Returns the first parameter of the curve C which has a projection on S.
- LastParameter(): number
Returns the last parameter of the curve C which has a projection on S.
Returns the Continuity used in the approximation.
- NbIntervals(S: GeomAbs_Shape): number
Returns the number of intervals which define an S continuous part of the projected curve.
Parameters (1)S
- Trim(FirstParam: number, LastParam: number, Tol: number): Adaptor2d_Curve2d
Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 2d points confusion. If <First> >= <Last>
Parameters (3)FirstParamLastParamTol
- Intervals(T: NCollection_Array1_double, S: GeomAbs_Shape): void
Returns the parameters corresponding to S discontinuities.
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
- MaxDistance(Index: number): number
returns the maximum distance between curve to project and surface
Parameters (1)Index
Returns the type of the curve in the current interval: Line, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.
- ResultIsPoint(theIndex: number): boolean
Returns true if result of projecting of the curve interval with number Index is point.
Parameters (1)theIndex
- GetResult2dUApproxError(theIndex: number): number
Returns the error of approximation of U parameter 2d-curve as a result projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult2dVApproxError(theIndex: number): number
Returns the error of approximation of V parameter 2d-curve as a result projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult3dApproxError(theIndex: number): number
Returns the error of approximation of 3d-curve as a result projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult2dC(theIndex: number): Geom2d_Curve
Returns the resulting 2d-curve of projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult3dC(theIndex: number): Geom_Curve
Returns the resulting 3d-curve of projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult2dP(theIndex: number): gp_Pnt2d
Returns the resulting 2d-point of projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetResult3dP(theIndex: number): gp_Pnt
Returns the resulting 3d-point of projecting of the curve interval with number Index.
Parameters (1)theIndex
- GetProj2d(): boolean
Returns the parameter, which defines necessity of only 2d results.
- GetProj3d(): boolean
Returns the parameter, which defines necessity of only 3d results.
ProjLib_ComputeApprox
Approximate the projection of a 3d curve on an analytic surface and stores the result in Approx. The result is a 2d curve. For approximation some parameters are used, including required tolerance of approximation. Tolerance is maximal possible value of 3d deviation of 3d projection of projected curve from "exact" 3d projection.
Since algorithm searches 2d curve on surface, required 2d tolerance is computed from 3d tolerance with help of U,V resolutions of surface. 3d and 2d tolerances have sense only for curves on surface, it defines precision of projecting and approximation and have nothing to do with distance between the projected curve and the surface.
Constructors(2)
Empty constructor, it only sets some initial values for class fields.
- constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, Tol: number): ProjLib_ComputeApprox
<Tol> is the tolerance with which the approximation is performed. Other parameters for approximation have default values.
Parameters (3)CSTol
Instance methods(8)
- Perform(C: Adaptor3d_Curve, S: Adaptor3d_Surface): void
Performs projecting. In case of approximation current values of parameters are used: default values or set by corresponding methods Set...
Parameters (2)CS
- SetTolerance(theTolerance: number): void
Set tolerance of approximation. Default value is
Precision::Confusion().Parameters (1)theTolerance
- SetDegree(theDegMin: number, theDegMax: number): void
Set min and max possible degree of result BSpline curve2d, which is got by approximation. If theDegMin/Max < 0, algorithm uses values that are chosen depending of types curve 3d and surface.
Parameters (2)theDegMintheDegMax
- SetMaxSegments(theMaxSegments: number): void
Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If theMaxSegments < 0, algorithm uses default value = 1000.
Parameters (1)theMaxSegments
- SetBndPnt(theBndPnt: AppParCurves_Constraint): void
Set the parameter, which defines type of boundary condition between segments during approximation. It can be AppParCurves_PassPoint or AppParCurves_TangencyPoint. Default value is AppParCurves_TangencyPoint;.
Parameters (1)theBndPnt
- Tolerance(): number
returns the reached Tolerance.
ProjLib_ComputeApproxOnPolarSurface
Approximate the projection of a 3d curve on an polar surface and stores the result in Approx. The result is a 2d curve. The evaluation of the current point of the 2d curve is done with the evaluation of the extrema P3d - Surface. For approximation some parameters are used, including required tolerance of approximation. Tolerance is maximal possible value of 3d deviation of 3d projection of projected curve from "exact" 3d projection.
Since algorithm searches 2d curve on surface, required 2d tolerance is computed from 3d tolerance with help of U,V resolutions of surface. 3d and 2d tolerances have sense only for curves on surface, it defines precision of projecting and approximation and have nothing to do with distance between the projected curve and the surface.
Constructors(4)
Empty constructor, it only sets some initial values for class fields.
- constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, Tol?: number): ProjLib_ComputeApproxOnPolarSurface
Constructor, which performs projecting.
Parameters (3)CSTol
- constructor(InitCurve2d: Adaptor2d_Curve2d, C: Adaptor3d_Curve, S: Adaptor3d_Surface, Tol: number): ProjLib_ComputeApproxOnPolarSurface
Constructor, which performs projecting, using initial curve 2d InitCurve2d, which is any rough approximation of result curve. Parameter Tol is 3d tolerance of approximation.
Parameters (4)InitCurve2dCSTol
- constructor(InitCurve2d: Adaptor2d_Curve2d, InitCurve2dBis: Adaptor2d_Curve2d, C: Adaptor3d_Curve, S: Adaptor3d_Surface, Tol: number): ProjLib_ComputeApproxOnPolarSurface
Constructor, which performs projecting, using two initial curves 2d: InitCurve2d and InitCurve2dBis that are any rough approximations of result curves. This constructor is used to get two pcurves for seem edge. Parameter Tol is 3d tolerance of approximation.
Parameters (5)InitCurve2dInitCurve2dBisCSTol
Instance methods(13)
- SetDegree(theDegMin: number, theDegMax: number): void
Set min and max possible degree of result BSpline curve2d, which is got by approximation. If theDegMin/Max < 0, algorithm uses values min = 2, max = 8.
Parameters (2)theDegMintheDegMax
- SetMaxSegments(theMaxSegments: number): void
Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If theMaxSegments < 0, algorithm uses default value = 1000.
Parameters (1)theMaxSegments
- SetBndPnt(theBndPnt: AppParCurves_Constraint): void
Set the parameter, which defines type of boundary condition between segments during approximation. It can be AppParCurves_PassPoint or AppParCurves_TangencyPoint. Default value is AppParCurves_TangencyPoint.
Parameters (1)theBndPnt
- SetMaxDist(theMaxDist: number): void
Set the parameter, which defines maximal possible distance between projected curve and surface. It is used only for projecting on not analytical surfaces. If theMaxDist < 0, algorithm uses default value 100.*Tolerance. If real distance between curve and surface more then theMaxDist, algorithm stops working.
Parameters (1)theMaxDist
- SetTolerance(theTolerance: number): void
Set the tolerance used to project the curve on the surface. Default value is
Precision::Approximation().Parameters (1)theTolerance
- Perform(C: Adaptor3d_Curve, S: Adaptor3d_Surface): void
Method, which performs projecting, using default values of parameters or they must be set by corresponding methods before using.
Parameters (2)CS
- Perform(InitCurve2d: Adaptor2d_Curve2d, C: Adaptor3d_Curve, S: Adaptor3d_Surface): Geom2d_BSplineCurve
Method, which performs projecting, using default values of parameters or they must be set by corresponding methods before using. Parameter InitCurve2d is any rough estimation of 2d result curve.
Parameters (3)InitCurve2dCS
Builds initial 2d curve as BSpline with degree = 1 using Extrema algorithm. Method is used in method Perform(...).
Parameters (2)CurveS
- ProjectUsingInitialCurve2d(Curve: Adaptor3d_Curve, S: Adaptor3d_Surface, InitCurve2d: Adaptor2d_Curve2d): Geom2d_BSplineCurve
Method, which performs projecting. Method is used in method Perform(...).
Parameters (3)CurveSInitCurve2d
Returns result curve 2d.
Returns second 2d curve.
- IsDone(): boolean
- Tolerance(): number
returns the reached Tolerance.
ProjLib_Cone
Projects elementary curves on a cone.
Constructors(4)
Undefined projection.
- constructor(Co: gp_Cone): ProjLib_Cone
Projection on the cone <Co>.
Parameters (1)Co
- constructor(Co: gp_Cone, L: gp_Lin): ProjLib_Cone
Projection of the line <L> on the cone <Co>.
Parameters (2)CoL
- constructor(Co: gp_Cone, C: gp_Circ): ProjLib_Cone
Projection of the circle
on the cone <Co>.Parameters (2)CoC
Instance methods(6)
- Parameters (1)
Co
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H
ProjLib_Cylinder
Projects elementary curves on a cylinder.
Constructors(5)
Undefined projection.
Projection on the cylinder <Cyl>.
Parameters (1)Cyl
- constructor(Cyl: gp_Cylinder, L: gp_Lin): ProjLib_Cylinder
Projection of the line <L> on the cylinder <Cyl>.
Parameters (2)CylL
- constructor(Cyl: gp_Cylinder, C: gp_Circ): ProjLib_Cylinder
Projection of the circle
on the cylinder <Cyl>.Parameters (2)CylC
- constructor(Cyl: gp_Cylinder, E: gp_Elips): ProjLib_Cylinder
Projection of the ellipse <E> on the cylinder <Cyl>.
Parameters (2)CylE
Instance methods(6)
- Init(Cyl: gp_Cylinder): voidParameters (1)
Cyl
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H
ProjLib_Plane
Projects elementary curves on a plane.
Constructors(7)
Undefined projection.
- constructor(Pl: gp_Pln): ProjLib_Plane
Projection on the plane <Pl>.
Parameters (1)Pl
- constructor(Pl: gp_Pln, L: gp_Lin): ProjLib_Plane
Projection of the line <L> on the plane <Pl>.
Parameters (2)PlL
- constructor(Pl: gp_Pln, C: gp_Circ): ProjLib_Plane
Projection of the circle
on the plane <Pl>.Parameters (2)PlC
- constructor(Pl: gp_Pln, E: gp_Elips): ProjLib_Plane
Projection of the ellipse <E> on the plane <Pl>.
Parameters (2)PlE
- constructor(Pl: gp_Pln, P: gp_Parab): ProjLib_Plane
Projection of the parabola.
on the plane <Pl>.Parameters (2)PlP
- constructor(Pl: gp_Pln, H: gp_Hypr): ProjLib_Plane
Projection of the hyperbola <H> on the plane <Pl>.
Parameters (2)PlH
Instance methods(6)
- Parameters (1)
Pl
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H
ProjLib_PrjFunc
Constructors(1)
- constructor(C: Adaptor3d_Curve, FixVal: number, S: Adaptor3d_Surface, Fix: number): ProjLib_PrjFuncParameters (4)
CFixValSFix
Instance methods(6)
- NbVariables(): number
returns the number of variables of the function.
- NbEquations(): number
returns the number of equations of the function.
- Value(X: math_VectorBase_double, F: math_VectorBase_double): boolean
computes the values <F> of the Functions for the variable <X>. Returns True if the computation was done successfully, False otherwise.
Parameters (2)XF
- Derivatives(X: math_VectorBase_double, D: math_Matrix): boolean
returns the values <D> of the derivatives for the variable <X>. Returns True if the computation was done successfully, False otherwise.
Parameters (2)XD
- Values(X: math_VectorBase_double, F: math_VectorBase_double, D: math_Matrix): boolean
returns the values <F> of the functions and the derivatives <D> for the variable <X>. Returns True if the computation was done successfully, False otherwise.
Parameters (3)XFD
returns point on surface
ProjLib_PrjResolve
Constructors(1)
- constructor(C: Adaptor3d_Curve, S: Adaptor3d_Surface, Fix: number): ProjLib_PrjResolveParameters (3)
CSFix
Instance methods(3)
- Perform(t: number, U: number, V: number, Tol: gp_Pnt2d, Inf: gp_Pnt2d, Sup: gp_Pnt2d, FTol?: number, StrictInside?: boolean): void
Calculates the ort from C(t) to S with a close point. The close point is defined by the parameter values U0 and V0. The function F(u,v)=distance(S(u,v),C(t)) has an extremum when gradient(F)=0. The algorithm searches a zero near the close point.
Parameters (8)tUVTolInfSupFTolStrictInside
- IsDone(): boolean
Returns True if the distance is found.
Returns the point of the extremum distance.
ProjLib_ProjectOnPlane
Class used to project a 3d curve on a plane. The result will be a 3d curve.
You can ask the projected curve to have the same parametrization as the original curve.
The projection can be done along every direction not parallel to the plane.
Constructors(3)
Empty constructor.
The projection will be normal to the Plane defined by the Ax3 <Pl>.
Parameters (1)Pl
- constructor(Pl: gp_Ax3, D: gp_Dir): ProjLib_ProjectOnPlane
The projection will be along the direction <D> on the plane defined by the Ax3 <Pl>. raises if the direction <D> is parallel to the plane <Pl>.
Parameters (2)PlD
Instance methods(33)
Shallow copy of adaptor.
- Load(C: Adaptor3d_Curve, Tolerance: number, KeepParametrization?: boolean): void
Sets the Curve and perform the projection. if <KeepParametrization> is true, the parametrization of the Projected Curve <PC> will be the same as the parametrization of the initial curve
. It means: proj(C(u)) = PC(u) for each u. Otherwise, the parametrization may change.Parameters (3)CToleranceKeepParametrization
- 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): Adaptor3d_Curve
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 theU on the curve.
Parameters (1)theU
- EvalD1(theU: number): Geom_Curve_ResD1
Computes the point of parameter theU on the curve with its first derivative. Raised if the continuity of the current interval is not C1.
Parameters (1)theU
- EvalD2(theU: number): Geom_Curve_ResD2
Returns the point and the first and second derivatives at parameter theU. Raised if the continuity of the current interval is not C2.
Parameters (1)theU
- EvalD3(theU: number): Geom_Curve_ResD3
Returns the point and the first, second and third derivatives at parameter theU. Raised if the continuity of the current interval is not C3.
Parameters (1)theU
Returns the derivative of order theN at parameter theU. Raised if the continuity of the current interval is not CN. Raised if theN < 1.
Parameters (2)theUtheN
- 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
Warning ! this will NOT make a copy of the Bezier Curve : If you want to modify the Curve please make a copy yourself Also it will NOT trim the surface to myFirst/Last.
Warning ! this will NOT make a copy of the BSpline Curve : If you want to modify the Curve please make a copy yourself Also it will NOT trim the surface to myFirst/Last.
ProjLib_ProjectOnSurface
Project a curve on a surface. The result (a 3D Curve) will be an approximation.
Constructors(2)
Create an empty projector.
Create a projector normally to the surface .
Parameters (1)S
Instance methods(4)
- Load(S: Adaptor3d_Surface): void
Set the Surface to . To compute the projection, you have to Load the Curve.
Parameters (1)S
- Load(C: Adaptor3d_Curve, Tolerance: number): void
Compute the projection of the curve
on the Surface.Parameters (2)CTolerance
- IsDone(): boolean
ProjLib_ProjectedCurve
Compute the 2d-curve. Try to solve the particular case if possible. Otherwise, an approximation is done. For approximation some parameters are used, including required tolerance of approximation. Tolerance is maximal possible value of 3d deviation of 3d projection of projected curve from "exact" 3d projection.
Since algorithm searches 2d curve on surface, required 2d tolerance is computed from 3d tolerance with help of U,V resolutions of surface. 3d and 2d tolerances have sense only for curves on surface, it defines precision of projecting and approximation and have nothing to do with distance between the projected curve and the surface.
Constructors(4)
Empty constructor, it only sets some initial values for class fields.
Constructor with initialisation field mySurface.
Parameters (1)S
Constructor, which performs projecting. If projecting uses approximation, default parameters are used, in particular, 3d tolerance of approximation is
Precision::Confusion()Parameters (2)SC
- constructor(S: Adaptor3d_Surface, C: Adaptor3d_Curve, Tol: number): ProjLib_ProjectedCurve
Constructor, which performs projecting. If projecting uses approximation, 3d tolerance is Tol, default parameters are used,.
Parameters (3)SCTol
Static methods(2)
- get_type_name(): string
Instance methods(40)
Shallow copy of adaptor.
- Load(Tolerance: number): void
Changes the tolerance used to project the curve on the surface.
Parameters (1)Tolerance
- Load(S: Adaptor3d_Surface): void
Changes the Surface.
Parameters (1)S
- Perform(C: Adaptor3d_Curve): void
Performs projecting for given curve. If projecting uses approximation, approximation parameters can be set before by corresponding methods SetDegree(...), SetMaxSegmets(...), SetBndPnt(...), SetMaxDist(...)
Parameters (1)C
- SetDegree(theDegMin: number, theDegMax: number): void
Set min and max possible degree of result BSpline curve2d, which is got by approximation. If theDegMin/Max < 0, algorithm uses values that are chosen depending of types curve 3d and surface.
Parameters (2)theDegMintheDegMax
- SetMaxSegments(theMaxSegments: number): void
Set the parameter, which defines maximal value of parametric intervals the projected curve can be cut for approximation. If theMaxSegments < 0, algorithm uses default value = 1000.
Parameters (1)theMaxSegments
- SetBndPnt(theBndPnt: AppParCurves_Constraint): void
Set the parameter, which defines type of boundary condition between segments during approximation. It can be AppParCurves_PassPoint or AppParCurves_TangencyPoint. Default value is AppParCurves_TangencyPoint;.
Parameters (1)theBndPnt
- SetMaxDist(theMaxDist: number): void
Set the parameter, which degines maximal possible distance between projected curve and surface. It uses only for projecting on not analytical surfaces. If theMaxDist < 0, algorithm uses default value 100.*Tolerance. If real distance between curve and surface more then theMaxDist, algorithm stops working.
Parameters (1)theMaxDist
- GetTolerance(): number
returns the tolerance reached if an approximation is Done.
- 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
Warning! This will NOT make a copy of the Bezier Curve If you want to modify the Curve please make a copy yourself. Also it will NOT trim the surface to myFirst/Last.
Warning! This will NOT make a copy of the BSpline Curve If you want to modify the Curve please make a copy yourself. Also it will NOT trim the surface to myFirst/Last.
ProjLib_Projector
Root class for projection algorithms, stores the result.
Constructors(1)
Sets the type to OtherCurve.
Instance methods(22)
- IsDone(): boolean
- Done(): void
Set isDone = true;.
- SetBSpline(C: Geom2d_BSplineCurve): voidParameters (1)
C
- SetBezier(C: Geom2d_BezierCurve): voidParameters (1)
C
- SetType(Type: GeomAbs_CurveType): voidParameters (1)
Type
- IsPeriodic(): boolean
- SetPeriodic(): void
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H
- UFrame(CFirst: number, CLast: number, UFirst: number, Period: number): void
Translates the 2d curve to set the part of the curve [CFirst, CLast] in the range [ UFirst, UFirst + Period [.
Parameters (4)CFirstCLastUFirstPeriod
- VFrame(CFirst: number, CLast: number, VFirst: number, Period: number): void
Translates the 2d curve to set the part of the curve [CFirst, CLast] in the range [ VFirst, VFirst + Period [.
Parameters (4)CFirstCLastVFirstPeriod
ProjLib_Sphere
Projects elementary curves on a sphere.
Constructors(3)
Undefined projection.
Projection on the sphere <Sp>.
Parameters (1)Sp
- constructor(Sp: gp_Sphere, C: gp_Circ): ProjLib_Sphere
Projection of the circle
on the sphere <Sp>.Parameters (2)SpC
Instance methods(7)
- Parameters (1)
Sp
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H
- SetInBounds(U: number): void
Set the point of parameter U on C in the natural restrictions of the sphere.
Parameters (1)U
ProjLib_Torus
Projects elementary curves on a torus.
Constructors(3)
Undefined projection.
- constructor(To: gp_Torus): ProjLib_Torus
Projection on the torus <To>.
Parameters (1)To
- constructor(To: gp_Torus, C: gp_Circ): ProjLib_Torus
Projection of the circle
on the torus <To>.Parameters (2)ToC
Instance methods(6)
- Parameters (1)
To
- Parameters (1)
L
- Parameters (1)
C
- Parameters (1)
E
- Parameters (1)
P
- Parameters (1)
H