OCC.ProjLib module¶
The projLib package first provides projection ofcurves on a plane along a given Direction. Theresult will be a 3D curve.The ProjLib package provides projection of curveson surfaces to compute the curve in the parametricspace.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 Curve from Adaptor3don a Surface from Adaptor3d.
-
class
Handle_ProjLib_HCompProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Handle_Adaptor2d_HCurve2d
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_ProjLib_HProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Handle_Adaptor2d_HCurve2d
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_ProjLib_HSequenceOfHSequenceOfPnt
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_ProjLib_SequenceNodeOfSequenceOfHSequenceOfPnt
(*args)¶ Bases:
OCC.TCollection.Handle_TCollection_SeqNode
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
ProjLib_CompProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Adaptor2d_Curve2d
Return type: None - try to find all solutions
Parameters: Return type: - this constructor tries to optimize the search using the assamption that maximum distance between surface and curve less or equal then MaxDist. if MaxDist < 0 then algorithm works as above.
Parameters: Return type: -
Bounds
()¶ - returns the bounds of the continuous part corresponding to Index
Parameters: - Index (int) –
- Udeb (float &) –
- Ufin (float &) –
Return type:
-
GetCurve
()¶ Return type: Handle_Adaptor3d_HCurve
-
GetSequence
()¶ Return type: Handle_ProjLib_HSequenceOfHSequenceOfPnt
-
GetSurface
()¶ Return type: Handle_Adaptor3d_HSurface
-
Init
()¶ - 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.
Return type: None
-
IsSinglePnt
()¶ - returns True if part of projection with number Index is a single point and writes its coordinats in P
Parameters: Return type:
-
IsUIso
()¶ - returns True if part of projection with number Index is an u-isoparametric curve of input surface
Parameters: - Index (int) –
- U (float &) –
Return type:
-
IsVIso
()¶ - returns True if part of projection with number Index is an v-isoparametric curve of input surface
Parameters: - Index (int) –
- V (float &) –
Return type:
-
Load
()¶ - Changes the surface.
Parameters: S (Handle_Adaptor3d_HSurface &) – Return type: None - Changes the curve.
Parameters: C (Handle_Adaptor3d_HCurve &) – Return type: None
-
MaxDistance
()¶ - returns the maximum distance between curve to project and surface
Parameters: Index (int) – Return type: float
-
thisown
¶ The membership flag
-
class
ProjLib_ComputeApprox
(*args)¶ Bases:
object
- <Tol> is the tolerance with which the approximation is performed.
Parameters: - C (Handle_Adaptor3d_HCurve &) –
- S (Handle_Adaptor3d_HSurface &) –
- Tol (float) –
Return type: -
BSpline
()¶ Return type: Handle_Geom2d_BSplineCurve
-
Bezier
()¶ Return type: Handle_Geom2d_BezierCurve
-
thisown
¶ The membership flag
-
class
ProjLib_ComputeApproxOnPolarSurface
(*args)¶ Bases:
object
Return type: Parameters: - C (Handle_Adaptor3d_HCurve &) –
- S (Handle_Adaptor3d_HSurface &) –
- Tol (float) – default value is 1.0e-4
- InitCurve2d (Handle_Adaptor2d_HCurve2d &) –
- C –
- S –
- Tol –
- InitCurve2d –
- InitCurve2dBis (Handle_Adaptor2d_HCurve2d &) –
- C –
- S –
- Tol –
Return type: Return type: Return type: -
BSpline
()¶ Return type: Handle_Geom2d_BSplineCurve
-
BuildInitialCurve2d
()¶ Parameters: - Curve (Handle_Adaptor3d_HCurve &) –
- S (Handle_Adaptor3d_HSurface &) –
Return type:
-
Curve2d
()¶ Return type: Handle_Geom2d_Curve
-
Perform
()¶ Parameters: - InitCurve2d (Handle_Adaptor2d_HCurve2d &) –
- C (Handle_Adaptor3d_HCurve &) –
- S (Handle_Adaptor3d_HSurface &) –
Return type:
-
ProjectUsingInitialCurve2d
()¶ Parameters: - Curve (Handle_Adaptor3d_HCurve &) –
- S (Handle_Adaptor3d_HSurface &) –
- InitCurve2d (Handle_Adaptor2d_HCurve2d &) –
Return type:
-
thisown
¶ The membership flag
-
class
ProjLib_Cone
(*args)¶ Bases:
OCC.ProjLib.ProjLib_Projector
- Undefined projection.
Return type: None - Projection on the cone <Co>.
Parameters: Co (gp_Cone) – Return type: None - Projection of the line <L> on the cone <Co>.
Parameters: Return type: - Projection of the circle <C> on the cone <Co>.
Parameters: Return type: -
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
thisown
¶ The membership flag
-
class
ProjLib_Cylinder
(*args)¶ Bases:
OCC.ProjLib.ProjLib_Projector
- Undefined projection.
Return type: None - Projection on the cylinder <Cyl>.
Parameters: Cyl (gp_Cylinder) – Return type: None - Projection of the line <L> on the cylinder <Cyl>.
Parameters: - Cyl (gp_Cylinder) –
- L (gp_Lin) –
Return type: - Projection of the circle <C> on the cylinder <Cyl>.
Parameters: - Cyl (gp_Cylinder) –
- C (gp_Circ) –
Return type: - Projection of the ellipse <E> on the cylinder <Cyl>.
Parameters: - Cyl (gp_Cylinder) –
- E (gp_Elips) –
Return type: -
Init
()¶ Parameters: Cyl (gp_Cylinder) – Return type: None
-
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
thisown
¶ The membership flag
-
class
ProjLib_HCompProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Adaptor2d_HCurve2d
Return type: None Parameters: C (ProjLib_CompProjectedCurve &) – Return type: None -
ChangeCurve2d
()¶ Return type: ProjLib_CompProjectedCurve
-
GetHandle
()¶
-
thisown
¶ The membership flag
-
-
class
ProjLib_HProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Adaptor2d_HCurve2d
Return type: None Parameters: C (ProjLib_ProjectedCurve &) – Return type: None -
ChangeCurve2d
()¶ Return type: ProjLib_ProjectedCurve
-
GetHandle
()¶
-
thisown
¶ The membership flag
-
-
class
ProjLib_HSequenceOfHSequenceOfPnt
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Return type: None -
Append
()¶ Parameters: - anItem (Handle_TColgp_HSequenceOfPnt) –
- aSequence (Handle_ProjLib_HSequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
ChangeSequence
()¶ Return type: ProjLib_SequenceOfHSequenceOfPnt
-
ChangeValue
()¶ Parameters: anIndex (int) – Return type: Handle_TColgp_HSequenceOfPnt
-
GetHandle
()¶
-
InsertAfter
()¶ Parameters: - anIndex (int) –
- anItem (Handle_TColgp_HSequenceOfPnt) –
- anIndex –
- aSequence (Handle_ProjLib_HSequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - anIndex (int) –
- anItem (Handle_TColgp_HSequenceOfPnt) –
- anIndex –
- aSequence (Handle_ProjLib_HSequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
Prepend
()¶ Parameters: - anItem (Handle_TColgp_HSequenceOfPnt) –
- aSequence (Handle_ProjLib_HSequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Sequence
()¶ Return type: ProjLib_SequenceOfHSequenceOfPnt
-
SetValue
()¶ Parameters: - anIndex (int) –
- anItem (Handle_TColgp_HSequenceOfPnt) –
Return type:
-
Split
()¶ Parameters: anIndex (int) – Return type: Handle_ProjLib_HSequenceOfHSequenceOfPnt
-
Value
()¶ Parameters: anIndex (int) – Return type: Handle_TColgp_HSequenceOfPnt
-
thisown
¶ The membership flag
-
-
class
ProjLib_Plane
(*args)¶ Bases:
OCC.ProjLib.ProjLib_Projector
- Undefined projection.
Return type: None - Projection on the plane <Pl>.
Parameters: Pl (gp_Pln) – Return type: None - Projection of the line <L> on the plane <Pl>.
Parameters: Return type: - Projection of the circle <C> on the plane <Pl>.
Parameters: Return type: - Projection of the ellipse <E> on the plane <Pl>.
Parameters: Return type: - Projection of the parabola <P> on the plane <Pl>.
Parameters: Return type: - Projection of the hyperbola <H> on the plane <Pl>.
Parameters: Return type: -
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
thisown
¶ The membership flag
-
class
ProjLib_PrjFunc
(*args)¶ Bases:
OCC.math.math_FunctionSetWithDerivatives
Parameters: Return type: -
thisown
¶ The membership flag
-
-
class
ProjLib_PrjResolve
(*args)¶ Bases:
object
Parameters: - C (Adaptor3d_Curve &) –
- S (Adaptor3d_Surface &) –
- Fix (int) –
Return type: -
Perform
()¶ - 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 searchs a zero near the close point.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
ProjLib_ProjectOnPlane
(*args)¶ Bases:
OCC.Adaptor3d.Adaptor3d_Curve
- Empty constructor.
Return type: None - The projection will be normal to the Plane defined by the Ax3 <Pl>.
Parameters: Pl (gp_Ax3) – Return type: None - 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: Return type: -
GetCurve
()¶ Return type: Handle_Adaptor3d_HCurve
-
Load
()¶ - 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 <C>. It meens: proj(C(u)) = PC(u) for each u. Otherwize, the parametrization may change.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
ProjLib_ProjectOnSurface
(*args)¶ Bases:
object
- Create an empty projector.
Return type: None - Create a projector normaly to the surface <S>.
Parameters: S (Handle_Adaptor3d_HSurface &) – Return type: None -
BSpline
()¶ Return type: Handle_Geom_BSplineCurve
-
Delete
()¶ Return type: void
-
thisown
¶ The membership flag
-
class
ProjLib_ProjectedCurve
(*args)¶ Bases:
OCC.Adaptor2d.Adaptor2d_Curve2d
Return type: Parameters: - S (Handle_Adaptor3d_HSurface &) –
- S –
- C (Handle_Adaptor3d_HCurve &) –
- S –
- C –
- Tol (float) –
Return type: Return type: Return type: -
GetCurve
()¶ Return type: Handle_Adaptor3d_HCurve
-
GetSurface
()¶ Return type: Handle_Adaptor3d_HSurface
-
thisown
¶ The membership flag
-
class
ProjLib_Projector
(*args)¶ Bases:
object
- Sets the type to OtherCurve
Return type: None -
BSpline
()¶ Return type: Handle_Geom2d_BSplineCurve
-
Bezier
()¶ Return type: Handle_Geom2d_BezierCurve
-
Ellipse
()¶ Return type: gp_Elips2d
-
GetType
()¶ Return type: GeomAbs_CurveType
-
Parabola
()¶ Return type: gp_Parab2d
-
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
UFrame
()¶ - Translates the 2d curve to set the part of the curve [CFirst, CLast] in the range [ UFirst, UFirst + Period [
Parameters: Return type:
-
VFrame
()¶ - Translates the 2d curve to set the part of the curve [CFirst, CLast] in the range [ VFirst, VFirst + Period [
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
ProjLib_SequenceNodeOfSequenceOfHSequenceOfPnt
(*args)¶ Bases:
OCC.TCollection.TCollection_SeqNode
Parameters: - I (Handle_TColgp_HSequenceOfPnt) –
- n (TCollection_SeqNodePtr &) –
- p (TCollection_SeqNodePtr &) –
Return type: -
GetHandle
()¶
-
Value
()¶ Return type: Handle_TColgp_HSequenceOfPnt
-
thisown
¶ The membership flag
-
class
ProjLib_SequenceOfHSequenceOfPnt
(*args)¶ Bases:
OCC.TCollection.TCollection_BaseSequence
Return type: None Parameters: Other (ProjLib_SequenceOfHSequenceOfPnt &) – Return type: None -
Append
()¶ Parameters: - T (Handle_TColgp_HSequenceOfPnt) –
- S (ProjLib_SequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
Assign
()¶ Parameters: Other (ProjLib_SequenceOfHSequenceOfPnt &) – Return type: ProjLib_SequenceOfHSequenceOfPnt
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Handle_TColgp_HSequenceOfPnt
-
First
()¶ Return type: Handle_TColgp_HSequenceOfPnt
-
InsertAfter
()¶ Parameters: - Index (int) –
- T (Handle_TColgp_HSequenceOfPnt) –
- Index –
- S (ProjLib_SequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
InsertBefore
()¶ Parameters: - Index (int) –
- T (Handle_TColgp_HSequenceOfPnt) –
- Index –
- S (ProjLib_SequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
Last
()¶ Return type: Handle_TColgp_HSequenceOfPnt
-
Prepend
()¶ Parameters: - T (Handle_TColgp_HSequenceOfPnt) –
- S (ProjLib_SequenceOfHSequenceOfPnt &) –
Return type: Return type:
-
Remove
()¶ Parameters: Return type: Return type:
-
Set
()¶ Parameters: Other (ProjLib_SequenceOfHSequenceOfPnt &) – Return type: ProjLib_SequenceOfHSequenceOfPnt
-
SetValue
()¶ Parameters: - Index (int) –
- I (Handle_TColgp_HSequenceOfPnt) –
Return type:
-
Value
()¶ Parameters: Index (int) – Return type: Handle_TColgp_HSequenceOfPnt
-
thisown
¶ The membership flag
-
-
class
ProjLib_Sphere
(*args)¶ Bases:
OCC.ProjLib.ProjLib_Projector
- Undefined projection.
Return type: None - Projection on the sphere <Sp>.
Parameters: Sp (gp_Sphere) – Return type: None - Projection of the circle <C> on the sphere <Sp>.
Parameters: Return type: -
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
SetInBounds
()¶ - Set the point of parameter U on C in the natural restrictions of the sphere.
Parameters: U (float) – Return type: None
-
thisown
¶ The membership flag
-
class
ProjLib_Torus
(*args)¶ Bases:
OCC.ProjLib.ProjLib_Projector
- Undefined projection.
Return type: None - Projection on the torus <To>.
Parameters: To (gp_Torus) – Return type: None - Projection of the circle <C> on the torus <To>.
Parameters: Return type: -
Project
()¶ Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
class
projlib
¶ Bases:
object
-
static
Project
()¶ Parameters: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type:
-
thisown
¶ The membership flag
-
static
-
projlib_Project
()¶ Parameters: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type: Return type:
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases