OCC.GeomAPI module¶
The GeomAPI package provides an ApplicationProgramming Interface for the Geometry.The API is a set of classes and methods aiming toprovide :* High level and simple calls for the most commonoperations.* Keeping an access on the low-levelimplementation of high-level calls.The API provides classes to call the algorithmesof the Geometry* The constructors of the classes provides thedifferent constructions methods.* The class keeps as fields the different toolsused by the algorithmes* The class provides a casting method to getautomatically the result with a function-likecall.For example to evaluate the distance <D> between apoint <P> and a curve <C>, one can writes :D = GeomAPI_ProjectPointOnCurve(P,C);orGeomAPI_ProjectPointOnCurve PonC(P,C);D = PonC.LowerDistance();
-
class
GeomAPI_ExtremaCurveCurve
(*args)¶ Bases:
object
- Constructs an empty algorithm for computing extrema between two curves. Use an Init function to define the curves on which it is going to work.
Return type: None - Computes the extrema between the curves C1 and C2.
Parameters: - C1 (Handle_Geom_Curve &) –
- C2 (Handle_Geom_Curve &) –
Return type: - Computes the portion of the curve C1 limited by the two points of parameter (U1min,U1max), and - the portion of the curve C2 limited by the two points of parameter (U2min,U2max). Warning Use the function NbExtrema to obtain the number of solutions. If this algorithm fails, NbExtrema returns 0.
Parameters: - C1 (Handle_Geom_Curve &) –
- C2 (Handle_Geom_Curve &) –
- U1min (Quantity_Parameter) –
- U1max (Quantity_Parameter) –
- U2min (Quantity_Parameter) –
- U2max (Quantity_Parameter) –
Return type: -
Distance
()¶ - Computes the distance between the end points of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Index (int) – Return type: Quantity_Length
-
Extrema
()¶ - return the algorithmic object from Extrema
Return type: Extrema_ExtCC
-
Init
()¶ - Initializes this algorithm with the given arguments and computes the extrema between the curves C1 and C2
Parameters: - C1 (Handle_Geom_Curve &) –
- C2 (Handle_Geom_Curve &) –
Return type: - Initializes this algorithm with the given arguments and computes the extrema between : - the portion of the curve C1 limited by the two points of parameter (U1min,U1max), and - the portion of the curve C2 limited by the two points of parameter (U2min,U2max). Warning Use the function NbExtrema to obtain the number of solutions. If this algorithm fails, NbExtrema returns 0.
Parameters: - C1 (Handle_Geom_Curve &) –
- C2 (Handle_Geom_Curve &) –
- U1min (Quantity_Parameter) –
- U1max (Quantity_Parameter) –
- U2min (Quantity_Parameter) –
- U2max (Quantity_Parameter) –
Return type:
-
LowerDistance
()¶ - Computes the distance between the end points of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails.
Return type: Quantity_Length
-
LowerDistanceParameters
()¶ - Returns the parameters U1 of the point on the first curve and U2 of the point on the second curve, which are the ends of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails.
Parameters: - U1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
Return type:
-
NbExtrema
()¶ - Returns the number of extrema computed by this algorithm. Note: if this algorithm fails, NbExtrema returns 0.
Return type: int
-
NearestPoints
()¶ - Returns the points P1 on the first curve and P2 on the second curve, which are the ends of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails.
Parameters: Return type:
-
Parameters
()¶ - Returns the parameters U1 of the point on the first curve and U2 of the point on the second curve, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: - Index (int) –
- U1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
Return type:
-
Points
()¶ - Returns the points P1 on the first curve and P2 on the second curve, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Return type:
-
TotalLowerDistance
()¶ - return the distance of the total nearest couple solution point. if <myExtCC> is not done
Return type: Quantity_Length
-
TotalLowerDistanceParameters
()¶ - set in <U1> and <U2> the parameters of the couple solution points which represents the total nearest solution.
Parameters: - U1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
Return type:
-
TotalNearestPoints
()¶ - set in <P1> and <P2> the couple solution points such a the distance [P1,P2] is the minimum. taking in account extremity points of curves.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
GeomAPI_ExtremaCurveSurface
(*args)¶ Bases:
object
- Constructs an empty algorithm for computing extrema between a curve and a surface. Use an Init function to define the curve and the surface on which it is going to work.
Return type: None - Computes the extrema distances between the curve <C> and the surface <S>.
Parameters: - Curve (Handle_Geom_Curve &) –
- Surface (Handle_Geom_Surface &) –
Return type: - Computes the extrema distances between the curve <C> and the surface <S>. The solution point are computed in the domain [Wmin,Wmax] of the curve and in the domain [Umin,Umax] [Vmin,Vmax] of the surface. Warning Use the function NbExtrema to obtain the number of solutions. If this algorithm fails, NbExtrema returns 0.
Parameters: - Curve (Handle_Geom_Curve &) –
- Surface (Handle_Geom_Surface &) –
- Wmin (Quantity_Parameter) –
- Wmax (Quantity_Parameter) –
- Umin (Quantity_Parameter) –
- Umax (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vmax (Quantity_Parameter) –
Return type: -
Distance
()¶ - Computes the distance between the end points of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Index (int) – Return type: Quantity_Length
-
Extrema
()¶ - Missing detailed docstringic object from Extrema
Return type: Extrema_ExtCS
-
Init
()¶ - Computes the extrema distances between the curve <C> and the surface <S>.
Parameters: - Curve (Handle_Geom_Curve &) –
- Surface (Handle_Geom_Surface &) –
Return type: - Computes the extrema distances between the curve <C> and the surface <S>. The solution point are computed in the domain [Wmin,Wmax] of the curve and in the domain [Umin,Umax] [Vmin,Vmax] of the surface. Warning Use the function NbExtrema to obtain the number of solutions. If this algorithm fails, NbExtrema returns 0.
Parameters: - Curve (Handle_Geom_Curve &) –
- Surface (Handle_Geom_Surface &) –
- Wmin (Quantity_Parameter) –
- Wmax (Quantity_Parameter) –
- Umin (Quantity_Parameter) –
- Umax (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vmax (Quantity_Parameter) –
Return type:
-
LowerDistance
()¶ - Computes the distance between the end points of the shortest extremum computed by this algorithm. Exceptions - StdFail_NotDone if this algorithm fails.
Return type: Quantity_Length
-
LowerDistanceParameters
()¶ - Returns the parameters W of the point on the curve and (U,V) of the point on the surface, which are the ends of the shortest extremum computed by this algorithm. Exceptions - StdFail_NotDone if this algorithm fails.
Parameters: - W (Quantity_Parameter &) –
- U (Quantity_Parameter &) –
- V (Quantity_Parameter &) –
Return type:
-
NbExtrema
()¶ - Returns the number of extrema computed by this algorithm. Note: if this algorithm fails, NbExtrema returns 0.
Return type: int
-
NearestPoints
()¶ - Returns the points PC on the curve and PS on the surface, which are the ends of the shortest extremum computed by this algorithm. Exceptions - StdFail_NotDone if this algorithm fails.
Parameters: Return type:
-
Parameters
()¶ - Returns the parameters W of the point on the curve, and (U,V) of the point on the surface, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: - Index (int) –
- W (Quantity_Parameter &) –
- U (Quantity_Parameter &) –
- V (Quantity_Parameter &) –
Return type:
-
Points
()¶ - Returns the points P1 on the curve and P2 on the surface, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
GeomAPI_ExtremaSurfaceSurface
(*args)¶ Bases:
object
- Constructs an empty algorithm for computing extrema between two surfaces. Use an Init function to define the surfaces on which it is going to work.
Return type: None - Computes the extrema distances between the surfaces <S1> and <S2>
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
Return type: - Computes the extrema distances between the portion of the surface S1 limited by the two values of parameter (U1min,U1max) in the u parametric direction, and by the two values of parameter (V1min,V1max) in the v parametric direction, and - the portion of the surface S2 limited by the two values of parameter (U2min,U2max) in the u parametric direction, and by the two values of parameter (V2min,V2max) in the v parametric direction.
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
- U1min (Quantity_Parameter) –
- U1max (Quantity_Parameter) –
- V1min (Quantity_Parameter) –
- V1max (Quantity_Parameter) –
- U2min (Quantity_Parameter) –
- U2max (Quantity_Parameter) –
- V2min (Quantity_Parameter) –
- V2max (Quantity_Parameter) –
Return type: -
Distance
()¶ - Computes the distance between the end points of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Index (int) – Return type: Quantity_Length
-
Extrema
()¶ - return the algorithmic object from Extrema
Return type: Extrema_ExtSS
-
Init
()¶ - Initializes this algorithm with the given arguments and computes the extrema distances between the surfaces <S1> and <S2>
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
Return type: - Initializes this algorithm with the given arguments and computes the extrema distances between - the portion of the surface S1 limited by the two values of parameter (U1min,U1max) in the u parametric direction, and by the two values of parameter (V1min,V1max) in the v parametric direction, and - the portion of the surface S2 limited by the two values of parameter (U2min,U2max) in the u parametric direction, and by the two values of parameter (V2min,V2max) in the v parametric direction.
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
- U1min (Quantity_Parameter) –
- U1max (Quantity_Parameter) –
- V1min (Quantity_Parameter) –
- V1max (Quantity_Parameter) –
- U2min (Quantity_Parameter) –
- U2max (Quantity_Parameter) –
- V2min (Quantity_Parameter) –
- V2max (Quantity_Parameter) –
Return type:
-
LowerDistance
()¶ - Computes the distance between the end points of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails.
Return type: Quantity_Length
-
LowerDistanceParameters
()¶ - Returns the parameters (U1,V1) of the point on the first surface and (U2,V2) of the point on the second surface, which are the ends of the shortest extremum computed by this algorithm. Exceptions - StdFail_NotDone if this algorithm fails.
Parameters: - U1 (Quantity_Parameter &) –
- V1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
Return type:
-
NbExtrema
()¶ - Returns the number of extrema computed by this algorithm. Note: if this algorithm fails, NbExtrema returns 0.
Return type: int
-
NearestPoints
()¶ - Returns the points P1 on the first surface and P2 on the second surface, which are the ends of the shortest extremum computed by this algorithm. Exceptions StdFail_NotDone if this algorithm fails.
Parameters: Return type:
-
Parameters
()¶ - Returns the parameters (U1,V1) of the point on the first surface, and (U2,V2) of the point on the second surface, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: - Index (int) –
- U1 (Quantity_Parameter &) –
- V1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
Return type:
-
Points
()¶ - Returns the points P1 on the first surface and P2 on the second surface, which are the ends of the extremum of index Index computed by this algorithm. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbExtrema ], where NbExtrema is the number of extrema computed by this algorithm.
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
GeomAPI_IntCS
(*args)¶ Bases:
object
- Creates an empty object. Use the function Perform for further initialization of the algorithm by the curve and the surface.
Return type: None - Computes the intersections between the curve C and the surface S. Warning Use function IsDone to verify that the intersections are computed successfully.
Parameters: - C (Handle_Geom_Curve &) –
- S (Handle_Geom_Surface &) –
Return type: -
NbPoints
()¶ - Returns the number of Intersection Points if IsDone returns True. else NotDone is raised.
Return type: int
-
NbSegments
()¶ - Returns the number of computed intersection segments in case of tangential intersection. Exceptions StdFail_NotDone if the intersection algorithm fails or is not initialized.
Return type: int
-
Parameters
()¶ - Returns parameter W on the curve and (parameters U,V) on the surface of the computed intersection point of index Index in case of cross intersection. Exceptions StdFail_NotDone if intersection algorithm fails or is not initialized. Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of computed intersection points.
Parameters: - Index (int) –
- U (Quantity_Parameter &) –
- V (Quantity_Parameter &) –
- W (Quantity_Parameter &) –
Return type: - Returns the parameters of the first (U1,V1) and the last (U2,V2) points of curve’s segment on the surface in case of tangential intersection. Index is the number of computed intersection segments. Exceptions StdFail_NotDone if intersection algorithm fails or is not initialized. Standard_OutOfRange if Index is not in the range [ 1,NbSegments ], where NbSegments is the number of computed intersection segments.
Parameters: - Index (int) –
- U1 (Quantity_Parameter &) –
- V1 (Quantity_Parameter &) –
- U2 (Quantity_Parameter &) –
- V2 (Quantity_Parameter &) –
Return type:
-
Perform
()¶ - This function Initializes an algorithm with the curve C and the surface S and computes the intersections between C and S. Warning Use function IsDone to verify that the intersections are computed successfully.
Parameters: - C (Handle_Geom_Curve &) –
- S (Handle_Geom_Surface &) –
Return type:
-
Point
()¶ - Returns the Intersection Point of range <Index>in case of cross intersection. Raises NotDone if the computation has failed or if the computation has not been done raises OutOfRange if Index is not in the range <1..NbPoints>
Parameters: Index (int) – Return type: gp_Pnt
-
Segment
()¶ - Returns the computed intersection segment of index Index in case of tangential intersection. Intersection segment is a portion of the initial curve tangent to surface. Exceptions StdFail_NotDone if intersection algorithm fails or is not initialized. Standard_OutOfRange if Index is not in the range [ 1,NbSegments ], where NbSegments is the number of computed intersection segments.
Parameters: Index (int) – Return type: Handle_Geom_Curve
-
thisown
¶ The membership flag
-
class
GeomAPI_IntSS
(*args)¶ Bases:
object
- Constructs an empty object. Use the function Perform for further initialization algorithm by two surfaces.
Return type: None - Computes the intersection curves between the two surfaces S1 and S2. Parameter Tol defines the precision of curves computation. For most cases the value 1.0e-7 is recommended to use. Warning Use the function IsDone to verify that the intersections are successfully computed.I
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
- Tol (float) –
Return type: -
Line
()¶ - Returns the computed intersection curve of index Index. Exceptions StdFail_NotDone if the computation fails. Standard_OutOfRange if Index is out of range [1, NbLines] where NbLines is the number of computed intersection curves.
Parameters: Index (int) – Return type: Handle_Geom_Curve
-
NbLines
()¶ - Returns the number of computed intersection curves. Exceptions StdFail_NotDone if the computation fails.
Return type: int
-
Perform
()¶ - Initializes an algorithm with the given arguments and computes the intersection curves between the two surfaces S1 and S2. Parameter Tol defines the precision of curves computation. For most cases the value 1.0e-7 is recommended to use. Warning Use function IsDone to verify that the intersections are successfully computed.
Parameters: - S1 (Handle_Geom_Surface &) –
- S2 (Handle_Geom_Surface &) –
- Tol (float) –
Return type:
-
thisown
¶ The membership flag
-
class
GeomAPI_Interpolate
(*args)¶ Bases:
object
- Initializes an algorithm for constructing a constrained BSpline curve passing through the points of the table Points. Tangential vectors can then be assigned, using the function Load. If PeriodicFlag is true, the constrained BSpline curve will be periodic and closed. In this case, the junction point is the first point of the table Points. The tolerance value Tolerance is used to check that: - points are not too close to each other, or - tangential vectors (defined using the function Load) are not too small. The resulting BSpline curve will be ‘C2’ continuous, except where a tangency constraint is defined on a point through which the curve passes (by using the Load function). In this case, it will be only ‘C1’ continuous. Once all the constraints are defined, use the function Perform to compute the curve. Warning - There must be at least 2 points in the table Points. - If PeriodicFlag is false, there must be as many parameters in the array Parameters as there are points in the array Points. - If PeriodicFlag is true, there must be one more parameter in the table Parameters: this is used to give the parameter on the resulting BSpline curve of the junction point of the curve (which is also the first point of the table Points). Exceptions - Standard_ConstructionError if the distance between two consecutive points in the table Points is less than or equal to Tolerance. - Standard_OutOfRange if: - there are less than two points in the table Points, or - conditions relating to the respective number of elements in the parallel tables Points and Parameters are not respected.
Parameters: - Points (Handle_TColgp_HArray1OfPnt) –
- PeriodicFlag (bool) –
- Tolerance (float) –
Return type: - Initializes an algorithm for constructing a constrained BSpline curve passing through the points of the table Points, where the parameters of each of its points are given by the parallel table Parameters. Tangential vectors can then be assigned, using the function Load. If PeriodicFlag is true, the constrained BSpline curve will be periodic and closed. In this case, the junction point is the first point of the table Points. The tolerance value Tolerance is used to check that: - points are not too close to each other, or - tangential vectors (defined using the function Load) are not too small. The resulting BSpline curve will be ‘C2’ continuous, except where a tangency constraint is defined on a point through which the curve passes (by using the Load function). In this case, it will be only ‘C1’ continuous. Once all the constraints are defined, use the function Perform to compute the curve. Warning - There must be at least 2 points in the table Points. - If PeriodicFlag is false, there must be as many parameters in the array Parameters as there are points in the array Points. - If PeriodicFlag is true, there must be one more parameter in the table Parameters: this is used to give the parameter on the resulting BSpline curve of the junction point of the curve (which is also the first point of the table Points). Exceptions - Standard_ConstructionError if the distance between two consecutive points in the table Points is less than or equal to Tolerance. - Standard_OutOfRange if: - there are less than two points in the table Points, or - conditions relating to the respective number of elements in the parallel tables Points and Parameters are not respected.
Parameters: - Points (Handle_TColgp_HArray1OfPnt) –
- Parameters (Handle_TColStd_HArray1OfReal &) –
- PeriodicFlag (bool) –
- Tolerance (float) –
Return type: -
Curve
()¶ - Returns the computed BSpline curve. Raises StdFail_NotDone if the interpolation fails.
Return type: Handle_Geom_BSplineCurve
-
IsDone
()¶ - Returns true if the constrained BSpline curve is successfully constructed. Note: in this case, the result is given by the function Curve.
Return type: bool
-
Load
()¶ - Assigns this constrained BSpline curve to be tangential to vectors InitialTangent and FinalTangent at its first and last points respectively (i.e. the first and last points of the table of points through which the curve passes, as defined at the time of initialization).
Parameters: Return type: - Assigns this constrained BSpline curve to be tangential to vectors defined in the table Tangents, which is parallel to the table of points through which the curve passes, as defined at the time of initialization. Vectors in the table Tangents are defined only if the flag given in the parallel table TangentFlags is true: only these vectors are set as tangency constraints.
Parameters: - Tangents (TColgp_Array1OfVec) –
- TangentFlags (Handle_TColStd_HArray1OfBoolean &) –
- Scale (bool) – default value is Standard_True
Return type:
-
Perform
()¶ - Computes the constrained BSpline curve. Use the function IsDone to verify that the computation is successful, and then the function Curve to obtain the result.
Return type: None
-
thisown
¶ The membership flag
-
class
GeomAPI_PointsToBSpline
(*args)¶ Bases:
object
- Constructs an empty approximation algorithm. Use an Init function to define and build the BSpline curve.
Return type: None - Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- ParType (Approx_ParametrizationType) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array <Parameters>. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- Parameters (TColStd_Array1OfReal &) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion
Parameters: Return type: -
Curve
()¶ - Returns the computed BSpline curve. Raises StdFail_NotDone if the curve is not built.
Return type: Handle_Geom_BSplineCurve
-
Init
()¶ - Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- ParType (Approx_ParametrizationType) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point, which parameters are given by the array <Parameters>. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array1OfPnt) –
- Parameters (TColStd_Array1OfReal &) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximate a BSpline Curve passing through an array of Point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion
Parameters: Return type:
-
thisown
¶ The membership flag
-
class
GeomAPI_PointsToBSplineSurface
(*args)¶ Bases:
object
- Constructs an empty algorithm for approximation or interpolation of a surface. Use: - an Init function to define and build the BSpline surface by approximation, or - an Interpolate function to define and build the BSpline surface by interpolation.
Return type: None - Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array2OfPnt) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximates a BSpline Surface passing through an array of Points. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array2OfPnt) –
- ParType (Approx_ParametrizationType) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximates a BSpline Surface passing through an array of points using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion
Parameters: Return type: - Approximates a BSpline Surface passing through an array of Points. //! The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX , Y0 + (j-1)*dY , ZPoints(i,j) ) //! The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
Parameters: Return type: -
Init
()¶ - Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array2OfPnt) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximates a BSpline Surface passing through an array of Points. //! The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX , Y0 + (j-1)*dY , ZPoints(i,j) ) //! The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
Parameters: Return type: - Approximates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be in the range [Degmin,Degmax] 2- his continuity will be at least <Continuity> 3- the distance from the point <Points> to the BSpline will be lower to Tol3D
Parameters: - Points (TColgp_Array2OfPnt) –
- ParType (Approx_ParametrizationType) –
- DegMin (int) – default value is 3
- DegMax (int) – default value is 8
- Continuity (GeomAbs_Shape) – default value is GeomAbs_C2
- Tol3D (float) – default value is 1.0e-3
Return type: - Approximates a BSpline Surface passing through an array of point using variational smoothing algorithm, which tries to minimize additional criterium: Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion
Parameters: Return type:
-
Interpolate
()¶ - Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.
Parameters: Points (TColgp_Array2OfPnt) – Return type: None - Interpolates a BSpline Surface passing through an array of Point. The resulting BSpline will have the following properties: 1- his degree will be 3. 2- his continuity will be C2.
Parameters: - Points (TColgp_Array2OfPnt) –
- ParType (Approx_ParametrizationType) –
Return type: - Interpolates a BSpline Surface passing through an array of Points. //! The points will be constructed as follow: P(i,j) = gp_Pnt( X0 + (i-1)*dX , Y0 + (j-1)*dY , ZPoints(i,j) ) //! The resulting BSpline will have the following properties: 1- his degree will be 3 2- his continuity will be C2. 4- the parametrization of the surface will verify: S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
Parameters: Return type:
-
Surface
()¶ - Returns the approximate BSpline Surface
Return type: Handle_Geom_BSplineSurface
-
thisown
¶ The membership flag
-
class
GeomAPI_ProjectPointOnCurve
(*args)¶ Bases:
object
- Creates an empty object. Use an Init function for further initialization.
Return type: None - Create the projection of a point <P> on a curve <Curve>
Parameters: - P (gp_Pnt) –
- Curve (Handle_Geom_Curve &) –
Return type: - Create the projection of a point <P> on a curve <Curve> limited by the two points of parameter Umin and Usup.
Parameters: - P (gp_Pnt) –
- Curve (Handle_Geom_Curve &) –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
Return type: -
Distance
()¶ - Computes the distance between the point and its orthogonal projection on the curve. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: Index (int) – Return type: Quantity_Length
-
Extrema
()¶ - return the algorithmic object from Extrema
Return type: Extrema_ExtPC
-
Init
()¶ - Init the projection of a point <P> on a curve <Curve>
Parameters: - P (gp_Pnt) –
- Curve (Handle_Geom_Curve &) –
Return type: - Init the projection of a point <P> on a curve <Curve> limited by the two points of parameter Umin and Usup.
Parameters: - P (gp_Pnt) –
- Curve (Handle_Geom_Curve &) –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
Return type: - Init the projection of a point <P> on a curve <Curve> limited by the two points of parameter Umin and Usup.
Parameters: - Curve (Handle_Geom_Curve &) –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
Return type:
-
LowerDistance
()¶ - Computes the distance between the point and its nearest orthogonal projection on the curve. Exceptions: StdFail_NotDone if this algorithm fails.
Return type: Quantity_Length
-
LowerDistanceParameter
()¶ - Returns the parameter on the curve of the nearest orthogonal projection of the point. Exceptions: StdFail_NotDone if this algorithm fails.
Return type: Quantity_Parameter
-
NbPoints
()¶ - Returns the number of computed orthogonal projection points. Note: if this algorithm fails, NbPoints returns 0.
Return type: int
-
NearestPoint
()¶ - Returns the nearest orthogonal projection of the point on the curve. Exceptions: StdFail_NotDone if this algorithm fails.
Return type: gp_Pnt
-
Parameter
()¶ - Returns the parameter on the curve of the point, which is the orthogonal projection. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: Index (int) – Return type: Quantity_Parameter - Returns the parameter on the curve of the point, which is the orthogonal projection. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.-
Parameters: - Index (int) –
- U (Quantity_Parameter &) –
Return type:
-
Perform
()¶ - Performs the projection of a point on the current curve.
Parameters: P (gp_Pnt) – Return type: None
-
Point
()¶ - Returns the orthogonal projection on the curve. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: Index (int) – Return type: gp_Pnt
-
thisown
¶ The membership flag
-
class
GeomAPI_ProjectPointOnSurf
(*args)¶ Bases:
object
- Creates an empty object. Use the Init function for further initialization.
Return type: None - Create the projection of a point <P> on a surface <Surface>
Parameters: - P (gp_Pnt) –
- Surface (Handle_Geom_Surface &) –
- Algo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: - Create the projection of a point <P> on a surface <Surface> Create the projection of a point <P> on a surface <Surface>. The solution are computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface.
Parameters: - P (gp_Pnt) –
- Surface (Handle_Geom_Surface &) –
- Tolerance (float) –
- Algo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
- P –
- Surface –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vsup (Quantity_Parameter) –
- Tolerance –
- Algo – default value is Extrema_ExtAlgo_Grad
Return type: Return type: - Init the projection of a point <P> on a surface <Surface>
Parameters: - P (gp_Pnt) –
- Surface (Handle_Geom_Surface &) –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vsup (Quantity_Parameter) –
- Algo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
Return type: -
Distance
()¶ - Computes the distance between the point and its orthogonal projection on the surface. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: Index (int) – Return type: Quantity_Length
-
Extrema
()¶ - return the algorithmic object from Extrema
Return type: Extrema_ExtPS
-
Init
()¶ Parameters: Return type: - Init the projection of a point <P> on a surface <Surface>. The solution are computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface.
Parameters: - P (gp_Pnt) –
- Surface (Handle_Geom_Surface &) –
- Algo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
- P –
- Surface –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vsup (Quantity_Parameter) –
- Tolerance (float) –
- Algo – default value is Extrema_ExtAlgo_Grad
Return type: Return type: - Init the projection for many points on a surface <Surface>. The solutions will be computed in the domain [Umin,Usup] [Vmin,Vsup] of the surface.
Parameters: - P (gp_Pnt) –
- Surface (Handle_Geom_Surface &) –
- Umin (Quantity_Parameter) –
- Usup (Quantity_Parameter) –
- Vmin (Quantity_Parameter) –
- Vsup (Quantity_Parameter) –
- Algo (Extrema_ExtAlgo) – default value is Extrema_ExtAlgo_Grad
- Surface –
- Umin –
- Usup –
- Vmin –
- Vsup –
- Tolerance (float) –
- Algo – default value is Extrema_ExtAlgo_Grad
- Surface –
- Umin –
- Usup –
- Vmin –
- Vsup –
- Algo – default value is Extrema_ExtAlgo_Grad
Return type: Return type: Return type:
-
LowerDistance
()¶ - Computes the distance between the point and its nearest orthogonal projection on the surface. Exceptions StdFail_NotDone if projection fails.
Return type: Quantity_Length
-
LowerDistanceParameters
()¶ - Returns the parameters (U,V) on the surface of the nearest computed orthogonal projection of the point. Exceptions StdFail_NotDone if projection fails.
Parameters: - U (Quantity_Parameter &) –
- V (Quantity_Parameter &) –
Return type:
-
NbPoints
()¶ - Returns the number of computed orthogonal projection points. Note: if projection fails, NbPoints returns 0.
Return type: int
-
NearestPoint
()¶ - Returns the nearest orthogonal projection of the point on the surface. Exceptions StdFail_NotDone if projection fails.
Return type: gp_Pnt
-
Parameters
()¶ - Returns the parameters (U,V) on the surface of the orthogonal projection. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: - Index (int) –
- U (Quantity_Parameter &) –
- V (Quantity_Parameter &) –
Return type:
-
Perform
()¶ - Performs the projection of a point on the current surface.
Parameters: P (gp_Pnt) – Return type: None
-
Point
()¶ - Returns the orthogonal projection on the surface. Index is a number of a computed point. Exceptions Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where NbPoints is the number of solution points.
Parameters: Index (int) – Return type: gp_Pnt
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
geomapi
¶ Bases:
object
-
static
To2d
()¶ - This function builds (in the parametric space of the plane P) a 2D curve equivalent to the 3D curve C. The 3D curve C is considered to be located in the plane P. Warning The 3D curve C must be of one of the following types: - a line - a circle - an ellipse - a hyperbola - a parabola - a Bezier curve - a BSpline curve Exceptions Standard_NoSuchObject if C is not a defined type curve.
Parameters: - C (Handle_Geom_Curve &) –
- P (gp_Pln) –
Return type:
-
static
To3d
()¶ - Builds a 3D curve equivalent to the 2D curve C described in the parametric space defined by the local coordinate system of plane P. The resulting 3D curve is of the same nature as that of the curve C.
Parameters: - C (Handle_Geom2d_Curve &) –
- P (gp_Pln) –
Return type:
-
thisown
¶ The membership flag
-
static
-
geomapi_To2d
()¶ - This function builds (in the parametric space of the plane P) a 2D curve equivalent to the 3D curve C. The 3D curve C is considered to be located in the plane P. Warning The 3D curve C must be of one of the following types: - a line - a circle - an ellipse - a hyperbola - a parabola - a Bezier curve - a BSpline curve Exceptions Standard_NoSuchObject if C is not a defined type curve.
Parameters: - C (Handle_Geom_Curve &) –
- P (gp_Pln) –
Return type:
-
geomapi_To3d
()¶ - Builds a 3D curve equivalent to the 2D curve C described in the parametric space defined by the local coordinate system of plane P. The resulting 3D curve is of the same nature as that of the curve C.
Parameters: - C (Handle_Geom2d_Curve &) –
- P (gp_Pln) –
Return type:
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases