OCC.Core.Geom module¶
Geom module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_geom.html
-
class
Geom_Axis1Placement
(*args)¶ Bases:
OCC.Core.Geom.Geom_AxisPlacement
- Returns a transient copy of A1.
- param A1
- type A1
gp_Ax1
- rtype
None* P is the origin of the axis placement and V is the direction of the axis placement.
- param P
- type P
gp_Pnt
- param V
- type V
gp_Dir
- rtype
None
-
Ax1
()¶ - Returns a non transient copy of <self>.
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Reverse
()¶ - Reverses the direction of the axis placement.
- rtype
None
-
Reversed
()¶ - Returns a copy of <self> reversed.
- rtype
opencascade::handle<Geom_Axis1Placement>
-
property
thisown
¶ The membership flag
-
class
Geom_Axis2Placement
(*args)¶ Bases:
OCC.Core.Geom.Geom_AxisPlacement
- Returns a transient copy of A2.
- param A2
- type A2
gp_Ax2
- rtype
None* P is the origin of the axis placement, N is the main direction of the axis placement and Vx is the ‘XDirection’. If the two directions N and Vx are not orthogonal the ‘XDirection’ is computed as follow : XDirection = N ^ (Vx ^ N). Raised if N and Vx are parallel.
- param P
- type P
gp_Pnt
- param N
- type N
gp_Dir
- param Vx
- type Vx
gp_Dir
- rtype
None
-
Ax2
()¶ - Returns a non transient copy of <self>.
- rtype
gp_Ax2
-
static
DownCast
(t)¶
-
SetAx2
()¶ - Assigns the origin and the three unit vectors of A2 to this coordinate system.
- param A2
- type A2
gp_Ax2
- rtype
None
-
SetXDirection
()¶ - Changes the ‘XDirection’ of the axis placement, Vx is the new ‘XDirection’. If Vx is not normal to the main direction then ‘XDirection’ is computed as followXDirection = Direction ^ ( Vx ^ Direction). The main direction is not modified. Raised if Vx and ‘Direction’ are parallel.
- param Vx
- type Vx
gp_Dir
- rtype
None
-
SetYDirection
()¶ - Changes the ‘YDirection’ of the axis placement, Vy is the new ‘YDirection’. If Vy is not normal to the main direction then ‘YDirection’ is computed as followYDirection = Direction ^ ( Vy ^ Direction). The main direction is not modified. The ‘XDirection’ is modified. Raised if Vy and the main direction are parallel.
- param Vy
- type Vy
gp_Dir
- rtype
None
-
XDirection
()¶ - Returns the ‘XDirection’. This is a unit vector.
- rtype
gp_Dir
-
YDirection
()¶ - Returns the ‘YDirection’. This is a unit vector.
- rtype
gp_Dir
-
property
thisown
¶ The membership flag
-
class
Geom_AxisPlacement
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Geometry
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Angle
()¶ - Computes the angular value, in radians, between the ‘main Direction’ of this positioning system and that of positioning system Other. The result is a value between 0 and Pi.
- param Other
- type Other
Geom_AxisPlacement
- rtype
float
-
Axis
()¶ - Returns the main axis of the axis placement. For an ‘Axis2placement’ it is the main axis (Location, Direction ). For an ‘Axis1Placement’ this method returns a copy of <self>.
- rtype
gp_Ax1
-
Direction
()¶ - Returns the main ‘Direction’ of an axis placement.
- rtype
gp_Dir
-
static
DownCast
(t)¶
-
Location
()¶ - Returns the Location point (origin) of the axis placement.
- rtype
gp_Pnt
-
SetAxis
()¶ - Assigns A1 as the ‘main Axis’ of this positioning system. This modifies - its origin, and - its ‘main Direction’. If this positioning system is a Geom_Axis2Placement, then its ‘X Direction’ and ‘Y Direction’ are recomputed. Exceptions For a Geom_Axis2Placement: Standard_ConstructionError if A1 and the previous ‘X Direction’ of the coordinate system are parallel.
- param A1
- type A1
gp_Ax1
- rtype
None
-
SetDirection
()¶ - Changes the direction of the axis placement. If <self> is an axis placement two axis the main ‘Direction’ is modified and the ‘XDirection’ and ‘YDirection’ are recomputed. Raises ConstructionError only for an axis placement two axis if V and the previous ‘XDirection’ are parallel because it is not possible to calculate the new ‘XDirection’ and the new ‘YDirection’.
- param V
- type V
gp_Dir
- rtype
void
-
SetLocation
()¶ - Assigns the point P as the origin of this positioning system.
- param P
- type P
gp_Pnt
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_BSplineCurve
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedCurve
- Creates a non-rational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>.
- param Poles
- type Poles
TColgp_Array1OfPnt
- param Knots
- type Knots
TColStd_Array1OfReal
- param Multiplicities
- type Multiplicities
TColStd_Array1OfInteger
- param Degree
- type Degree
int
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None* Creates a rational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>. Raises ConstructionError subject to the following conditions 0 < Degree <= MaxDegree. //! Weights.Length() == Poles.Length() //! Knots.Length() == Mults.Length() >= 2 //! Knots(i) < Knots(i+1) (Knots are increasing) //! 1 <= Mults(i) <= Degree //! On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). //! On a periodic curve the first and the last multicities must be the same. //! on non-periodic curves //! Poles.Length() == Sum(Mults(i)) - Degree - 1 >= 2 //! on periodic curves //! Poles.Length() == Sum(Mults(i)) except the first or last
- param Poles
- type Poles
TColgp_Array1OfPnt
- param Weights
- type Weights
TColStd_Array1OfReal
- param Knots
- type Knots
TColStd_Array1OfReal
- param Multiplicities
- type Multiplicities
TColStd_Array1OfInteger
- param Degree
- type Degree
int
- param Periodic
default value is Standard_False
- type Periodic
bool
- param CheckRational
default value is Standard_True
- type CheckRational
bool
- rtype
None
-
Degree
()¶ - Returns the degree of this BSpline curve. The degree of a Geom_BSplineCurve curve cannot be greater than Geom_BSplineCurve::MaxDegree(). Computation of value and derivatives
- rtype
int
-
static
DownCast
(t)¶
-
FirstUKnotIndex
()¶ - Returns the index in the knot array of the knot corresponding to the first or last parameter of this BSpline curve. For a BSpline curve, the first (or last) parameter (which gives the start (or end) point of the curve) is a knot value. However, if the multiplicity of the first (or last) knot is less than Degree + 1, where Degree is the degree of the curve, it is not the first (or last) knot of the curve.
- rtype
int
-
IncreaseDegree
()¶ - Increases the degree of this BSpline curve to Degree. As a result, the poles, weights and multiplicities tables are modified; the knots table is not changed. Nothing is done if Degree is less than or equal to the current degree. Exceptions Standard_ConstructionError if Degree is greater than Geom_BSplineCurve::MaxDegree().
- param Degree
- type Degree
int
- rtype
None
-
IncreaseMultiplicity
()¶ - Increases the multiplicity of the knot <Index> to <M>. //! If <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. If <Index> is not in [FirstUKnotIndex, LastUKnotIndex]
- param Index
- type Index
int
- param M
- type M
int
- rtype
None* Increases the multiplicities of the knots in [I1,I2] to <M>. //! For each knot if <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex]
- param I1
- type I1
int
- param I2
- type I2
int
- param M
- type M
int
- rtype
None
-
IncrementMultiplicity
()¶ - Increment the multiplicities of the knots in [I1,I2] by <M>. //! If <M> is not positive nithing is done. //! For each knot the resulting multiplicity is limited to the Degree. If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex]
- param I1
- type I1
int
- param I2
- type I2
int
- param M
- type M
int
- rtype
None
-
InsertKnot
()¶ - Inserts a knot value in the sequence of knots. If <U> is an existing knot the multiplicity is increased by <M>. //! If U is not on the parameter range nothing is done. //! If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. //! The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
- param U
- type U
float
- param M
default value is 1
- type M
int
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
InsertKnots
()¶ - Inserts a set of knots values in the sequence of knots. //! For each U = Knots(i), M = Mults(i) //! If <U> is an existing knot the multiplicity is increased by <M> if <Add> is True, increased to <M> if <Add> is False. //! If U is not on the parameter range nothing is done. //! If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. //! The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_False
- type Add
bool
- rtype
None
-
IsEqual
()¶ - Comapare two Bspline curve on identity;
- param theOther
- type theOther
Geom_BSplineCurve
- param thePreci
- type thePreci
float
- rtype
bool
-
IsG1
()¶ - Check if curve has at least G1 continuity in interval [theTf, theTl] Returns true if IsCN(1) or angle betweem ‘left’ and ‘right’ first derivatives at knots with C0 continuity is less then theAngTol only knots in interval [theTf, theTl] is checked
- param theTf
- type theTf
float
- param theTl
- type theTl
float
- param theAngTol
- type theAngTol
float
- rtype
bool
-
IsRational
()¶ - Returns True if the weights are not identical. The tolerance criterion is Epsilon of the class Real.
- rtype
bool
-
Knot
()¶ - Returns the knot of range Index. When there is a knot with a multiplicity greater than 1 the knot is not repeated. The method Multiplicity can be used to get the multiplicity of the Knot. Raised if Index < 1 or Index > NbKnots
- param Index
- type Index
int
- rtype
float
-
KnotDistribution
()¶ - Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot the BSpline Curve can be- Uniform if all the knots are of multiplicity 1, - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree A piecewise Bezier with only two knots is a BezierCurve. else the curve is non uniform. The tolerance criterion is Epsilon from class Real.
- rtype
GeomAbs_BSplKnotDistribution
-
KnotSequence
()¶ - Returns K, the knots sequence of this BSpline curve. In this sequence, knots with a multiplicity greater than 1 are repeated. In the case of a non-periodic curve the length of the sequence must be equal to the sum of the NbKnots multiplicities of the knots of the curve (where NbKnots is the number of knots of this BSpline curve). This sum is also equal toNbPoles + Degree + 1 where NbPoles is the number of poles and Degree the degree of this BSpline curve. In the case of a periodic curve, if there are k periodic knots, the period is Knot(k+1) - Knot(1). The initial sequence is built by writing knots 1 to k+1, which are repeated according to their corresponding multiplicities. If Degree is the degree of the curve, the degree of continuity of the curve at the knot of index 1 (or k+1) is equal to c = Degree + 1 - Mult(1). c knots are then inserted at the beginning and end of the initial sequence: - the c values of knots preceding the first item Knot(k+1) in the initial sequence are inserted at the beginning; the period is subtracted from these c values; - the c values of knots following the last item Knot(1) in the initial sequence are inserted at the end; the period is added to these c values. The length of the sequence must therefore be equal to: NbPoles + 2*Degree - Mult(1) + 2. Example For a non-periodic BSpline curve of degree 2 where: - the array of knots is: { k1 k2 k3 k4 }, - with associated multiplicities: { 3 1 2 3 }, the knot sequence is: K = { k1 k1 k1 k2 k3 k3 k4 k4 k4 } For a periodic BSpline curve of degree 4 , which is ‘C1’ continuous at the first knot, and where- the periodic knots are: { k1 k2 k3 (k4) } (3 periodic knots: the points of parameter k1 and k4 are identical, the period is p = k4 - k1), - with associated multiplicities: { 3 1 2 (3) }, the degree of continuity at knots k1 and k4 is: Degree + 1 - Mult(i) = 2. 2 supplementary knots are added at the beginning and end of the sequence: - at the beginning: the 2 knots preceding k4 minus the period; in this example, this is k3 - p both times; - at the end: the 2 knots following k1 plus the period; in this example, this is k2 + p and k3 + p. The knot sequence is therefore: K = { k3-p k3-p k1 k1 k1 k2 k3 k3 k4 k4 k4 k2+p k3+p } Exceptions Raised if K.Lower() is less than number of first knot in knot sequence with repetitions or K.Upper() is more than number of last knot in knot sequence with repetitions.
- param K
- type K
TColStd_Array1OfReal
- rtype
None* returns the knots of the B-spline curve. Knots with multiplicit greater than 1 are repeated
- rtype
TColStd_Array1OfReal
-
Knots
()¶ - returns the knot values of the B-spline curve; Warning A knot with a multiplicity greater than 1 is not repeated in the knot table. The Multiplicity function can be used to obtain the multiplicity of each knot. //! Raised K.Lower() is less than number of first knot or K.Upper() is more than number of last knot.
- param K
- type K
TColStd_Array1OfReal
- rtype
None* returns the knot values of the B-spline curve; Warning A knot with a multiplicity greater than 1 is not repeated in the knot table. The Multiplicity function can be used to obtain the multiplicity of each knot.
- rtype
TColStd_Array1OfReal
-
LastUKnotIndex
()¶ - For a BSpline curve the last parameter (which gives the end point of the curve) is a knot value but if the multiplicity of the last knot index is lower than Degree + 1 it is not the last knot of the curve. This method computes the index of the knot corresponding to the last parameter.
- rtype
int
-
LocalD0
()¶ - Raised if FromK1 = ToK2.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
gp_Pnt
- rtype
None
-
LocalD1
()¶ - Raised if the local continuity of the curve is not C1 between the knot K1 and the knot K2. Raised if FromK1 = ToK2.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- rtype
None
-
LocalD2
()¶ - Raised if the local continuity of the curve is not C2 between the knot K1 and the knot K2. Raised if FromK1 = ToK2.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- param V2
- type V2
gp_Vec
- rtype
None
-
LocalD3
()¶ - Raised if the local continuity of the curve is not C3 between the knot K1 and the knot K2. Raised if FromK1 = ToK2.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- param V2
- type V2
gp_Vec
- param V3
- type V3
gp_Vec
- rtype
None
-
LocalDN
()¶ - Raised if the local continuity of the curve is not CN between the knot K1 and the knot K2. Raised if FromK1 = ToK2. Raised if N < 1.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param N
- type N
int
- rtype
gp_Vec
-
LocalValue
()¶ - Raised if FromK1 = ToK2.
- param U
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- rtype
gp_Pnt
-
LocateU
()¶ - Locates the parametric value U in the sequence of knots. If ‘WithKnotRepetition’ is True we consider the knot’s representation with repetition of multiple knot value, otherwise we consider the knot’s representation with no repetition of multiple knot values. Knots (I1) <= U <= Knots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < Knots (1) - Abs(ParametricTolerance) . if I2 > NbKnots => U > Knots (NbKnots) + Abs(ParametricTolerance)
- param U
- type U
float
- param ParametricTolerance
- type ParametricTolerance
float
- param I1
- type I1
int
- param I2
- type I2
int
- param WithKnotRepetition
default value is Standard_False
- type WithKnotRepetition
bool
- rtype
None
-
static
MaxDegree
()¶ - Returns the value of the maximum degree of the normalized B-spline basis functions in this package.
- rtype
int
-
MovePoint
()¶ - Moves the point of parameter U of this BSpline curve to P. Index1 and Index2 are the indexes in the table of poles of this BSpline curve of the first and last poles designated to be moved. FirstModifiedPole and LastModifiedPole are the indexes of the first and last poles which are effectively modified. In the event of incompatibility between Index1, Index2 and the value U: - no change is made to this BSpline curve, and - the FirstModifiedPole and LastModifiedPole are returned null. Exceptions Standard_OutOfRange if: - Index1 is greater than or equal to Index2, or - Index1 or Index2 is less than 1 or greater than the number of poles of this BSpline curve.
- param U
- type U
float
- param P
- type P
gp_Pnt
- param Index1
- type Index1
int
- param Index2
- type Index2
int
- param FirstModifiedPole
- type FirstModifiedPole
int
- param LastModifiedPole
- type LastModifiedPole
int
- rtype
None
-
MovePointAndTangent
()¶ - Move a point with parameter U to P. and makes it tangent at U be Tangent. StartingCondition = -1 means first can move EndingCondition = -1 means last point can move StartingCondition = 0 means the first point cannot move EndingCondition = 0 means the last point cannot move StartingCondition = 1 means the first point and tangent cannot move EndingCondition = 1 means the last point and tangent cannot move and so forth ErrorStatus != 0 means that there are not enought degree of freedom with the constrain to deform the curve accordingly
- param U
- type U
float
- param P
- type P
gp_Pnt
- param Tangent
- type Tangent
gp_Vec
- param Tolerance
- type Tolerance
float
- param StartingCondition
- type StartingCondition
int
- param EndingCondition
- type EndingCondition
int
- param ErrorStatus
- type ErrorStatus
int
- rtype
None
-
Multiplicities
()¶ - Returns the multiplicity of the knots of the curve. //! Raised if the length of M is not equal to NbKnots.
- param M
- type M
TColStd_Array1OfInteger
- rtype
None* returns the multiplicity of the knots of the curve.
- rtype
TColStd_Array1OfInteger
-
Multiplicity
()¶ - Returns the multiplicity of the knots of range Index. Raised if Index < 1 or Index > NbKnots
- param Index
- type Index
int
- rtype
int
-
NbKnots
()¶ - Returns the number of knots. This method returns the number of knot without repetition of multiple knots.
- rtype
int
-
NbPoles
()¶ - Returns the number of poles
- rtype
int
-
PeriodicNormalization
()¶ - returns the parameter normalized within the period if the curve is periodicotherwise does not do anything
- param U
- type U
float
- rtype
None
-
Pole
()¶ - Returns the pole of range Index. Raised if Index < 1 or Index > NbPoles.
- param Index
- type Index
int
- rtype
gp_Pnt
-
Poles
()¶ - Returns the poles of the B-spline curve; //! Raised if the length of P is not equal to the number of poles.
- param P
- type P
TColgp_Array1OfPnt
- rtype
None* Returns the poles of the B-spline curve;
- rtype
TColgp_Array1OfPnt
-
RemoveKnot
()¶ - Reduces the multiplicity of the knot of index Index to M. If M is equal to 0, the knot is removed. With a modification of this type, the array of poles is also modified. Two different algorithms are systematically used to compute the new poles of the curve. If, for each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is less than Tolerance, this ensures that the curve is not modified by more than Tolerance. Under these conditions, true is returned; otherwise, false is returned. A low tolerance is used to prevent modification of the curve. A high tolerance is used to ‘smooth’ the curve. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table. pole insertion and pole removing this operation is limited to the Uniform or QuasiUniform BSplineCurve. The knot values are modified . If the BSpline is NonUniform or Piecewise Bezier an exception Construction error is raised.
- param Index
- type Index
int
- param M
- type M
int
- param Tolerance
- type Tolerance
float
- rtype
bool
-
Resolution
()¶ - Computes for this BSpline curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this BSpline curve, UTolerance ensures that: | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < Tolerance3D
- param Tolerance3D
- type Tolerance3D
float
- param UTolerance
- type UTolerance
float
- rtype
None
-
Segment
()¶ - Modifies this BSpline curve by segmenting it between U1 and U2. Either of these values can be outside the bounds of the curve, but U2 must be greater than U1. All data structure tables of this BSpline curve are modified, but the knots located between U1 and U2 are retained. The degree of the curve is not modified. //! Parameter theTolerance defines the possible proximity of the segment boundaries and B-spline knots to treat them as equal. //! WarningsEven if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <self> or if the curve makes loop. After the segmentation the length of a curve can be null. raises if U2 < U1. Standard_DomainError if U2 - U1 exceeds the period for periodic curves. i.e. ((U2 - U1) - Period) > Precision::PConfusion().
- param U1
- type U1
float
- param U2
- type U2
float
- param theTolerance
default value is Precision::Confusion()
- type theTolerance
float
- rtype
None
-
SetKnot
()¶ - Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index - 1) < K < Knots(Index + 1) The second syntax allows you also to increase the multiplicity of the knot to M (but it is not possible to decrease the multiplicity of the knot with this function). Standard_ConstructionError if: - K is not such that: Knots(Index - 1) < K < Knots(Index + 1) - M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table.
- param Index
- type Index
int
- param K
- type K
float
- rtype
None* Changes the knot of range Index with its multiplicity. You can increase the multiplicity of a knot but it is not allowed to decrease the multiplicity of an existing knot. //! Raised if K >= Knots(Index+1) or K <= Knots(Index-1). Raised if M is greater than Degree or lower than the previous multiplicity of knot of range Index. Raised if Index < 1 || Index > NbKnots
- param Index
- type Index
int
- param K
- type K
float
- param M
- type M
int
- rtype
None
-
SetKnots
()¶ - Modifies this BSpline curve by assigning the array K to its knots table. The multiplicity of the knots is not modified. Exceptions Standard_ConstructionError if the values in the array K are not in ascending order. Standard_OutOfRange if the bounds of the array K are not respectively 1 and the number of knots of this BSpline curve.
- param K
- type K
TColStd_Array1OfReal
- rtype
None
-
SetNotPeriodic
()¶ - Changes this BSpline curve into a non-periodic curve. If this curve is already non-periodic, it is not modified. Note: the poles and knots tables are modified. Warning If this curve is periodic, as the multiplicity of the first and last knots is not modified, and is not equal to Degree + 1, where Degree is the degree of this BSpline curve, the start and end points of the curve are not its first and last poles.
- rtype
None
-
SetOrigin
()¶ - Assigns the knot of index Index in the knots table as the origin of this periodic BSpline curve. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this curve is not periodic. Standard_DomainError if Index is outside the bounds of the knots table.
- param Index
- type Index
int
- rtype
None* Set the origin of a periodic curve at Knot U. If U is not a knot of the BSpline a new knot is inseted. KnotVector and poles are modified. Raised if the curve is not periodic
- param U
- type U
float
- param Tol
- type Tol
float
- rtype
None
-
SetPeriodic
()¶ - Changes this BSpline curve into a periodic curve. To become periodic, the curve must first be closed. Next, the knot sequence must be periodic. For this, FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2, the indexes in the knots array of the knots corresponding to the first and last parameters of this BSpline curve. The period is therefore: Knots(I2) - Knots(I1). Consequently, the knots and poles tables are modified. Exceptions Standard_ConstructionError if this BSpline curve is not closed.
- rtype
None
-
SetPole
()¶ - Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- rtype
None* Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. This syntax also allows you to modify the weight of the modified pole, which becomes Weight. In this case, if this BSpline curve is non-rational, it can become rational and vice versa. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
SetWeight
()¶ - Changes the weight for the pole of range Index. If the curve was non rational it can become rational. If the curve was rational it can become non rational. //! Raised if Index < 1 || Index > NbPoles Raised if Weight <= 0.0
- param Index
- type Index
int
- param Weight
- type Weight
float
- rtype
None
-
Weight
()¶ - Returns the weight of the pole of range Index . Raised if Index < 1 or Index > NbPoles.
- param Index
- type Index
int
- rtype
float
-
Weights
()¶ - Returns the weights of the B-spline curve; //! Raised if the length of W is not equal to NbPoles.
- param W
- type W
TColStd_Array1OfReal
- rtype
None* Returns the weights of the B-spline curve;
- rtype
TColStd_Array1OfReal *
-
property
thisown
¶ The membership flag
-
class
Geom_BSplineSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedSurface
- Creates a non-rational b-spline surface (weights default value is 1.). The following conditions must be verified. 0 < UDegree <= MaxDegree. UKnots.Length() == UMults.Length() >= 2 UKnots(i) < UKnots(i+1) (Knots are increasing) 1 <= UMults(i) <= UDegree On a non uperiodic surface the first and last umultiplicities may be UDegree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). On a uperiodic surface the first and the last umultiplicities must be the same. on non-uperiodic surfaces Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2 on uperiodic surfaces Poles.ColLength() == Sum(UMults(i)) except the first or last The previous conditions for U holds also for V, with the RowLength of the poles.
- param Poles
- type Poles
TColgp_Array2OfPnt
- param UKnots
- type UKnots
TColStd_Array1OfReal
- param VKnots
- type VKnots
TColStd_Array1OfReal
- param UMults
- type UMults
TColStd_Array1OfInteger
- param VMults
- type VMults
TColStd_Array1OfInteger
- param UDegree
- type UDegree
int
- param VDegree
- type VDegree
int
- param UPeriodic
default value is Standard_False
- type UPeriodic
bool
- param VPeriodic
default value is Standard_False
- type VPeriodic
bool
- rtype
None* Creates a non-rational b-spline surface (weights default value is 1.). //! The following conditions must be verified. 0 < UDegree <= MaxDegree. //! UKnots.Length() == UMults.Length() >= 2 //! UKnots(i) < UKnots(i+1) (Knots are increasing) 1 <= UMults(i) <= UDegree //! On a non uperiodic surface the first and last umultiplicities may be UDegree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). //! On a uperiodic surface the first and the last umultiplicities must be the same. //! on non-uperiodic surfaces //! Poles.ColLength() == Sum(UMults(i)) - UDegree - 1 >= 2 //! on uperiodic surfaces //! Poles.ColLength() == Sum(UMults(i)) except the first or last //! The previous conditions for U holds also for V, with the RowLength of the poles.
- param Poles
- type Poles
TColgp_Array2OfPnt
- param Weights
- type Weights
TColStd_Array2OfReal
- param UKnots
- type UKnots
TColStd_Array1OfReal
- param VKnots
- type VKnots
TColStd_Array1OfReal
- param UMults
- type UMults
TColStd_Array1OfInteger
- param VMults
- type VMults
TColStd_Array1OfInteger
- param UDegree
- type UDegree
int
- param VDegree
- type VDegree
int
- param UPeriodic
default value is Standard_False
- type UPeriodic
bool
- param VPeriodic
default value is Standard_False
- type VPeriodic
bool
- rtype
None
-
CheckAndSegment
()¶ - Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. //! same as Segment but do nothing if U1 and U2 (resp. V1 and V2) are equal to the bounds in U (resp. in V) of <self>. For example, if <self> is periodic in V, it will be always periodic in V after the segmentation if the bounds in V are unchanged //! Parameters theUTolerance, theVTolerance define the possible proximity along the correponding direction of the segment boundaries and B-spline knots to treat them as equal. //! WarningsEven if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface <self> or if the surface makes loop. raises if U2 < U1 or V2 < V1. Standard_DomainError if U2 - U1 exceeds the uperiod for uperiodic surfaces. i.e. ((U2 - U1) - UPeriod) > Precision::PConfusion(). Standard_DomainError if V2 - V1 exceeds the vperiod for vperiodic surfaces. i.e. ((V2 - V1) - VPeriod) > Precision::PConfusion()).
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- param theUTolerance
default value is Precision::Confusion()
- type theUTolerance
float
- param theVTolerance
default value is Precision::Confusion()
- type theVTolerance
float
- rtype
None
-
static
DownCast
(t)¶
-
ExchangeUV
()¶ - Exchanges the u and v parametric directions on this BSpline surface. As a consequence: - the poles and weights tables are transposed, - the knots and multiplicities tables are exchanged, - degrees of continuity, and rational, periodic and uniform characteristics are exchanged, and - the orientation of the surface is inverted.
- rtype
None
-
FirstUKnotIndex
()¶ - Computes the Index of the UKnots which gives the first parametric value of the surface in the U direction. The UIso curve corresponding to this value is a boundary curve of the surface.
- rtype
int
-
FirstVKnotIndex
()¶ - Computes the Index of the VKnots which gives the first parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface.
- rtype
int
-
IncreaseDegree
()¶ - Increases the degrees of this BSpline surface to UDegree and VDegree in the u and v parametric directions respectively. As a result, the tables of poles, weights and multiplicities are modified. The tables of knots is not changed. Note: Nothing is done if the given degree is less than or equal to the current degree in the corresponding parametric direction. Exceptions Standard_ConstructionError if UDegree or VDegree is greater than Geom_BSplineSurface::MaxDegree().
- param UDegree
- type UDegree
int
- param VDegree
- type VDegree
int
- rtype
None
-
IncreaseUMultiplicity
()¶ - Increases the multiplicity of the knot of range UIndex in the UKnots sequence. M is the new multiplicity. M must be greater than the previous multiplicity and lower or equal to the degree of the surface in the U parametric direction. Raised if M is not in the range [1, UDegree] //! Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name.
- param UIndex
- type UIndex
int
- param M
- type M
int
- rtype
None* Increases until order M the multiplicity of the set of knots FromI1,…., ToI2 in the U direction. This method can be used to make a B_spline surface into a PiecewiseBezier B_spline surface. If <self> was uniform, it can become non uniform. //! Raised if FromI1 or ToI2 is out of the range [FirstUKnotIndex, LastUKnotIndex]. //! M should be greater than the previous multiplicity of the all the knots FromI1,…, ToI2 and lower or equal to the Degree of the surface in the U parametric direction.
- param FromI1
- type FromI1
int
- param ToI2
- type ToI2
int
- param M
- type M
int
- rtype
None
-
IncreaseVMultiplicity
()¶ - Increases the multiplicity of a knot in the V direction. M is the new multiplicity. //! M should be greater than the previous multiplicity and lower than the degree of the surface in the V parametric direction. //! Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name.
- param VIndex
- type VIndex
int
- param M
- type M
int
- rtype
None* Increases until order M the multiplicity of the set of knots FromI1,…., ToI2 in the V direction. This method can be used to make a BSplineSurface into a PiecewiseBezier B_spline surface. If <self> was uniform, it can become non-uniform. //! Raised if FromI1 or ToI2 is out of the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. //! M should be greater than the previous multiplicity of the all the knots FromI1,…, ToI2 and lower or equal to the Degree of the surface in the V parametric direction.
- param FromI1
- type FromI1
int
- param ToI2
- type ToI2
int
- param M
- type M
int
- rtype
None
-
IncrementUMultiplicity
()¶ - Increments the multiplicity of the consecutives uknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,…..,ToI2 must be lower or equal to the UDegree of the B_spline. //! Raised if FromI1 or ToI2 is not in the range [FirstUKnotIndex, LastUKnotIndex] //! Raised if one knot has a multiplicity greater than UDegree.
- param FromI1
- type FromI1
int
- param ToI2
- type ToI2
int
- param Step
- type Step
int
- rtype
None
-
IncrementVMultiplicity
()¶ - Increments the multiplicity of the consecutives vknots FromI1..ToI2 by step. The multiplicity of each knot FromI1,…..,ToI2 must be lower or equal to the VDegree of the B_spline. //! Raised if FromI1 or ToI2 is not in the range [FirstVKnotIndex, LastVKnotIndex] //! Raised if one knot has a multiplicity greater than VDegree.
- param FromI1
- type FromI1
int
- param ToI2
- type ToI2
int
- param Step
- type Step
int
- rtype
None
-
InsertUKnot
()¶ - Inserts a knot value in the sequence of UKnots. If U is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M else it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. //! Raised if U is out of the bounds [U1, U2] given by the methods Bounds, the criterion ParametricTolerance is used. Raised if M is not in the range [1, UDegree].
- param U
- type U
float
- param M
- type M
int
- param ParametricTolerance
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
InsertUKnots
()¶ - Inserts into the knots table for the U parametric direction of this BSpline surface: - the values of the array Knots, with their respective multiplicities, Mults. If the knot value to insert already exists in the table, its multiplicity is: - increased by M, if Add is true (the default), or - increased to M, if Add is false. The tolerance criterion used to check the equality of the knots is the larger of the values ParametricTolerance and Standard_Real::Epsilon(val), where val is the knot value to be inserted. Warning - If a given multiplicity coefficient is null, or negative, nothing is done. - The new multiplicity of a knot is limited to the degree of this BSpline surface in the corresponding parametric direction. Exceptions Standard_ConstructionError if a knot value to insert is outside the bounds of this BSpline surface in the specified parametric direction. The comparison uses the precision criterion ParametricTolerance.
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
InsertVKnot
()¶ - Inserts a knot value in the sequence of VKnots. If V is a knot value this method increases the multiplicity of the knot if the previous multiplicity was lower than M otherwise it does nothing. The tolerance criterion is ParametricTolerance. ParametricTolerance should be greater or equal than Resolution from package gp. //! raises if V is out of the Bounds [V1, V2] given by the methods Bounds, the criterion ParametricTolerance is used. raises if M is not in the range [1, VDegree].
- param V
- type V
float
- param M
- type M
int
- param ParametricTolerance
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
InsertVKnots
()¶ - Inserts into the knots table for the V parametric direction of this BSpline surface: - the values of the array Knots, with their respective multiplicities, Mults. If the knot value to insert already exists in the table, its multiplicity is: - increased by M, if Add is true (the default), or - increased to M, if Add is false. The tolerance criterion used to check the equality of the knots is the larger of the values ParametricTolerance and Standard_Real::Epsilon(val), where val is the knot value to be inserted. Warning - If a given multiplicity coefficient is null, or negative, nothing is done. - The new multiplicity of a knot is limited to the degree of this BSpline surface in the corresponding parametric direction. Exceptions Standard_ConstructionError if a knot value to insert is outside the bounds of this BSpline surface in the specified parametric direction. The comparison uses the precision criterion ParametricTolerance.
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
IsURational
()¶ - Returns False if for each row of weights all the weights are identical. The tolerance criterion is resolution from package gp. Example|1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|
- rtype
bool
-
IsVRational
()¶ - Returns False if for each column of weights all the weights are identical. The tolerance criterion is resolution from package gp. Examples|1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|
- rtype
bool
-
LastUKnotIndex
()¶ - Computes the Index of the UKnots which gives the last parametric value of the surface in the U direction. The UIso curve corresponding to this knot is a boundary curve of the surface.
- rtype
int
-
LastVKnotIndex
()¶ - Computes the Index of the VKnots which gives the last parametric value of the surface in the V direction. The VIso curve corresponding to this knot is a boundary curve of the surface.
- rtype
int
-
LocalD0
()¶ - Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- param P
- type P
gp_Pnt
- rtype
None
-
LocalD1
()¶ - Raised if the local continuity of the surface is not C1 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- rtype
None
-
LocalD2
()¶ - Raised if the local continuity of the surface is not C2 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- param D2U
- type D2U
gp_Vec
- param D2V
- type D2V
gp_Vec
- param D2UV
- type D2UV
gp_Vec
- rtype
None
-
LocalD3
()¶ - Raised if the local continuity of the surface is not C3 between the knots FromUK1, ToUK2 and FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- param D2U
- type D2U
gp_Vec
- param D2V
- type D2V
gp_Vec
- param D2UV
- type D2UV
gp_Vec
- param D3U
- type D3U
gp_Vec
- param D3V
- type D3V
gp_Vec
- param D3UUV
- type D3UUV
gp_Vec
- param D3UVV
- type D3UVV
gp_Vec
- rtype
None
-
LocalDN
()¶ - Raised if the local continuity of the surface is not CNu between the knots FromUK1, ToUK2 and CNv between the knots FromVK1, ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- param Nu
- type Nu
int
- param Nv
- type Nv
int
- rtype
gp_Vec
-
LocalValue
()¶ - Computes the point of parameter U, V on the BSpline surface patch defines between the knots UK1 UK2, VK1, VK2. U can be out of the bounds [Knot UK1, Knot UK2] and V can be outof the bounds [Knot VK1, Knot VK2] but for the computation we only use the definition of the surface between these knot values. Raises if FromUK1 = ToUK2 or FromVK1 = ToVK2.
- param U
- type U
float
- param V
- type V
float
- param FromUK1
- type FromUK1
int
- param ToUK2
- type ToUK2
int
- param FromVK1
- type FromVK1
int
- param ToVK2
- type ToVK2
int
- rtype
gp_Pnt
-
LocateU
()¶ - Locates the parametric value U in the sequence of UKnots. If ‘WithKnotRepetition’ is True we consider the knot’s representation with repetition of multiple knot value, otherwise we consider the knot’s representation with no repetition of multiple knot values. UKnots (I1) <= U <= UKnots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < UKnots(1) - Abs(ParametricTolerance) . if I2 > NbUKnots => U > UKnots(NbUKnots)+Abs(ParametricTolerance)
- param U
- type U
float
- param ParametricTolerance
- type ParametricTolerance
float
- param I1
- type I1
int
- param I2
- type I2
int
- param WithKnotRepetition
default value is Standard_False
- type WithKnotRepetition
bool
- rtype
None
-
LocateV
()¶ - Locates the parametric value V in the sequence of knots. If ‘WithKnotRepetition’ is True we consider the knot’s representation with repetition of multiple knot value, otherwise we consider the knot’s representation with no repetition of multiple knot values. VKnots (I1) <= V <= VKnots (I2) . if I1 = I2 V is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => V < VKnots(1) - Abs(ParametricTolerance) . if I2 > NbVKnots => V > VKnots(NbVKnots)+Abs(ParametricTolerance) poles insertion and removing The following methods are available only if the surface is Uniform or QuasiUniform in the considered direction The knot repartition is modified.
- param V
- type V
float
- param ParametricTolerance
- type ParametricTolerance
float
- param I1
- type I1
int
- param I2
- type I2
int
- param WithKnotRepetition
default value is Standard_False
- type WithKnotRepetition
bool
- rtype
None
-
static
MaxDegree
()¶ - Returns the value of the maximum degree of the normalized B-spline basis functions in the u and v directions.
- rtype
int
-
MovePoint
()¶ - Move a point with parameter U and V to P. given u,v as parameters) to reach a new position UIndex1, UIndex2, VIndex1, VIndex2: indicates the poles which can be moved if Problem in BSplineBasis calculation, no change for the curve and UFirstIndex, VLastIndex = 0 VFirstIndex, VLastIndex = 0 //! Raised if UIndex1 < UIndex2 or VIndex1 < VIndex2 or UIndex1 < 1 || UIndex1 > NbUPoles or UIndex2 < 1 || UIndex2 > NbUPoles VIndex1 < 1 || VIndex1 > NbVPoles or VIndex2 < 1 || VIndex2 > NbVPoles characteristics of the surface
- param U
- type U
float
- param V
- type V
float
- param P
- type P
gp_Pnt
- param UIndex1
- type UIndex1
int
- param UIndex2
- type UIndex2
int
- param VIndex1
- type VIndex1
int
- param VIndex2
- type VIndex2
int
- param UFirstIndex
- type UFirstIndex
int
- param ULastIndex
- type ULastIndex
int
- param VFirstIndex
- type VFirstIndex
int
- param VLastIndex
- type VLastIndex
int
- rtype
None
-
NbUKnots
()¶ - Returns the number of knots in the U direction.
- rtype
int
-
NbUPoles
()¶ - Returns number of poles in the U direction.
- rtype
int
-
NbVKnots
()¶ - Returns the number of knots in the V direction.
- rtype
int
-
NbVPoles
()¶ - Returns the number of poles in the V direction.
- rtype
int
-
PeriodicNormalization
()¶ - returns the parameter normalized within the period if the surface is periodicotherwise does not do anything
- param U
- type U
float
- param V
- type V
float
- rtype
None
-
Pole
()¶ - Returns the pole of range (UIndex, VIndex). //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- rtype
gp_Pnt
-
Poles
()¶ - Returns the poles of the B-spline surface. //! Raised if the length of P in the U and V direction is not equal to NbUpoles and NbVPoles.
- param P
- type P
TColgp_Array2OfPnt
- rtype
None* Returns the poles of the B-spline surface.
- rtype
TColgp_Array2OfPnt
-
RemoveUKnot
()¶ - Reduces to M the multiplicity of the knot of index Index in the U parametric direction. If M is 0, the knot is removed. With a modification of this type, the table of poles is also modified. Two different algorithms are used systematically to compute the new poles of the surface. For each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is checked. If this distance is less than Tolerance it ensures that the surface is not modified by more than Tolerance. Under these conditions, the function returns true; otherwise, it returns false. A low tolerance prevents modification of the surface. A high tolerance ‘smoothes’ the surface. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of this BSpline surface.
- param Index
- type Index
int
- param M
- type M
int
- param Tolerance
- type Tolerance
float
- rtype
bool
-
RemoveVKnot
()¶ - Reduces to M the multiplicity of the knot of index Index in the V parametric direction. If M is 0, the knot is removed. With a modification of this type, the table of poles is also modified. Two different algorithms are used systematically to compute the new poles of the surface. For each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is checked. If this distance is less than Tolerance it ensures that the surface is not modified by more than Tolerance. Under these conditions, the function returns true; otherwise, it returns false. A low tolerance prevents modification of the surface. A high tolerance ‘smoothes’ the surface. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of this BSpline surface.
- param Index
- type Index
int
- param M
- type M
int
- param Tolerance
- type Tolerance
float
- rtype
bool
-
Resolution
()¶ - Computes two tolerance values for this BSpline surface, based on the given tolerance in 3D space Tolerance3D. The tolerances computed are: - UTolerance in the u parametric direction, and - VTolerance in the v parametric direction. If f(u,v) is the equation of this BSpline surface, UTolerance and VTolerance guarantee that| u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D
- param Tolerance3D
- type Tolerance3D
float
- param UTolerance
- type UTolerance
float
- param VTolerance
- type VTolerance
float
- rtype
None
-
Segment
()¶ - Segments the surface between U1 and U2 in the U-Direction. between V1 and V2 in the V-Direction. The control points are modified, the first and the last point are not the same. //! Parameters theUTolerance, theVTolerance define the possible proximity along the correponding direction of the segment boundaries and B-spline knots to treat them as equal. //! WarningsEven if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the surface <self> or if the surface makes loop. raises if U2 < U1 or V2 < V1. Standard_DomainError if U2 - U1 exceeds the uperiod for uperiodic surfaces. i.e. ((U2 - U1) - UPeriod) > Precision::PConfusion(). Standard_DomainError if V2 - V1 exceeds the vperiod for vperiodic surfaces. i.e. ((V2 - V1) - VPeriod) > Precision::PConfusion()).
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- param theUTolerance
default value is Precision::Confusion()
- type theUTolerance
float
- param theVTolerance
default value is Precision::Confusion()
- type theVTolerance
float
- rtype
None
-
SetPole
()¶ - Substitutes the pole of range (UIndex, VIndex) with P. If the surface is rational the weight of range (UIndex, VIndex) is not modified. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param P
- type P
gp_Pnt
- rtype
None* Substitutes the pole and the weight of range (UIndex, VIndex) with P and W. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
SetPoleCol
()¶ - Changes a column of poles or a part of this column. Raised if Vindex < 1 or VIndex > NbVPoles. //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles.
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Changes a column of poles or a part of this column with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. Raised if Vindex < 1 or VIndex > NbVPoles. //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles Raised if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp.
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
SetPoleRow
()¶ - Changes a row of poles or a part of this row with the corresponding weights. If the surface was rational it can become non rational. If the surface was non rational it can become rational. Raised if Uindex < 1 or UIndex > NbUPoles. //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles raises if the bounds of CPoleWeights are not the same as the bounds of CPoles. Raised if one of the weight value of CPoleWeights is lower or equal to Resolution from package gp.
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None* Changes a row of poles or a part of this row. Raised if Uindex < 1 or UIndex > NbUPoles. //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles.
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None
-
SetUKnot
()¶ - Substitutes the UKnots of range UIndex with K. //! Raised if UIndex < 1 or UIndex > NbUKnots //! Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1)
- param UIndex
- type UIndex
int
- param K
- type K
float
- rtype
None* Changes the value of the UKnots of range UIndex and increases its multiplicity. //! Raised if UIndex is not in the range [FirstUKnotIndex, LastUKnotIndex] given by the methods with the same name. //! Raised if K >= UKnots(UIndex+1) or K <= UKnots(UIndex-1) M must be lower than UDegree and greater than the previous multiplicity of the knot of range UIndex.
- param UIndex
- type UIndex
int
- param K
- type K
float
- param M
- type M
int
- rtype
None
-
SetUKnots
()¶ - Changes all the U-knots of the surface. The multiplicity of the knots are not modified. //! Raised if there is an index such that UK (Index+1) <= UK (Index). //! Raised if UK.Lower() < 1 or UK.Upper() > NbUKnots
- param UK
- type UK
TColStd_Array1OfReal
- rtype
None
-
SetUNotPeriodic
()¶ - Sets the surface U not periodic. Changes this BSpline surface into a non-periodic surface along U direction. If this surface is already non-periodic, it is not modified. Note: the poles and knots tables are modified.
- rtype
None
-
SetUOrigin
()¶ - Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction.
- param Index
- type Index
int
- rtype
None
-
SetUPeriodic
()¶ - Sets the surface U periodic. Modifies this surface to be periodic in the U parametric direction. To become periodic in a given parametric direction a surface must be closed in that parametric direction, and the knot sequence relative to that direction must be periodic. To generate this periodic sequence of knots, the functions FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2. These are the indexes, in the knot array associated with the given parametric direction, of the knots that correspond to the first and last parameters of this BSpline surface in the given parametric direction. Hence the period is: Knots(I1) - Knots(I2) As a result, the knots and poles tables are modified. Exceptions Standard_ConstructionError if the surface is not closed in the given parametric direction.
- rtype
None
-
SetVKnot
()¶ - Substitutes the VKnots of range VIndex with K. //! Raised if VIndex < 1 or VIndex > NbVKnots //! Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1)
- param VIndex
- type VIndex
int
- param K
- type K
float
- rtype
None* Changes the value of the VKnots of range VIndex and increases its multiplicity. //! Raised if VIndex is not in the range [FirstVKnotIndex, LastVKnotIndex] given by the methods with the same name. //! Raised if K >= VKnots(VIndex+1) or K <= VKnots(VIndex-1) M must be lower than VDegree and greater than the previous multiplicity of the knot of range VIndex.
- param VIndex
- type VIndex
int
- param K
- type K
float
- param M
- type M
int
- rtype
None
-
SetVKnots
()¶ - Changes all the V-knots of the surface. The multiplicity of the knots are not modified. //! Raised if there is an index such that VK (Index+1) <= VK (Index). //! Raised if VK.Lower() < 1 or VK.Upper() > NbVKnots
- param VK
- type VK
TColStd_Array1OfReal
- rtype
None
-
SetVNotPeriodic
()¶ - Sets the surface V not periodic. Changes this BSpline surface into a non-periodic surface along V direction. If this surface is already non-periodic, it is not modified. Note: the poles and knots tables are modified.
- rtype
None
-
SetVOrigin
()¶ - Assigns the knot of index Index in the knots table in the corresponding parametric direction to be the origin of this periodic BSpline surface. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this BSpline surface is not periodic in the given parametric direction. Standard_DomainError if Index is outside the bounds of the knots table in the given parametric direction.
- param Index
- type Index
int
- rtype
None
-
SetVPeriodic
()¶ - Sets the surface V periodic. Modifies this surface to be periodic in the V parametric direction. To become periodic in a given parametric direction a surface must be closed in that parametric direction, and the knot sequence relative to that direction must be periodic. To generate this periodic sequence of knots, the functions FirstVKnotIndex and LastVKnotIndex are used to compute I1 and I2. These are the indexes, in the knot array associated with the given parametric direction, of the knots that correspond to the first and last parameters of this BSpline surface in the given parametric direction. Hence the period is: Knots(I1) - Knots(I2) As a result, the knots and poles tables are modified. Exceptions Standard_ConstructionError if the surface is not closed in the given parametric direction.
- rtype
None
-
SetWeight
()¶ - Changes the weight of the pole of range UIndex, VIndex. If the surface was non rational it can become rational. If the surface was rational it can become non rational. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles //! Raised if weight is lower or equal to Resolution from package gp
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param Weight
- type Weight
float
- rtype
None
-
SetWeightCol
()¶ - Changes a column of weights of a part of this column. //! Raised if VIndex < 1 or VIndex > NbVPoles //! Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbUPoles. Raised if a weight value is lower or equal to Resolution from package gp.
- param VIndex
- type VIndex
int
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
SetWeightRow
()¶ - Changes a row of weights or a part of this row. //! Raised if UIndex < 1 or UIndex > NbUPoles //! Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbVPoles. Raised if a weight value is lower or equal to Resolution from package gp.
- param UIndex
- type UIndex
int
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
UDegree
()¶ - Returns the degree of the normalized B-splines Ni,n in the U direction.
- rtype
int
-
UIso
()¶ - Computes the U isoparametric curve. A B-spline curve is returned.
- param U
- type U
float
- rtype
opencascade::handle<Geom_Curve>* Computes the U isoparametric curve. If CheckRational=False, no try to make it non-rational. A B-spline curve is returned.
- param U
- type U
float
- param CheckRational
- type CheckRational
bool
- rtype
opencascade::handle<Geom_Curve>
-
UKnot
()¶ - Returns the Knot value of range UIndex. Raised if UIndex < 1 or UIndex > NbUKnots
- param UIndex
- type UIndex
int
- rtype
float
-
UKnotDistribution
()¶ - Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the U direction the B-spline surface can be- Uniform if all the knots are of multiplicity 1, - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the U direction The tolerance criterion is Resolution from package gp.
- rtype
GeomAbs_BSplKnotDistribution
-
UKnotSequence
()¶ - Returns the uknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. ExampleKu = {k1, k1, k1, k2, k3, k3, k4, k4, k4} //! Raised if the length of Ku is not equal to NbUPoles + UDegree + 1
- param Ku
- type Ku
TColStd_Array1OfReal
- rtype
None* Returns the uknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
- rtype
TColStd_Array1OfReal
-
UKnots
()¶ - Returns the knots in the U direction. //! Raised if the length of Ku is not equal to the number of knots in the U direction.
- param Ku
- type Ku
TColStd_Array1OfReal
- rtype
None* Returns the knots in the U direction.
- rtype
TColStd_Array1OfReal
-
UMultiplicities
()¶ - Returns the multiplicities of the knots in the U direction. //! Raised if the length of Mu is not equal to the number of knots in the U direction.
- param Mu
- type Mu
TColStd_Array1OfInteger
- rtype
None* Returns the multiplicities of the knots in the U direction.
- rtype
TColStd_Array1OfInteger
-
UMultiplicity
()¶ - Returns the multiplicity value of knot of range UIndex in the u direction. Raised if UIndex < 1 or UIndex > NbUKnots.
- param UIndex
- type UIndex
int
- rtype
int
-
VDegree
()¶ - Returns the degree of the normalized B-splines Ni,d in the V direction.
- rtype
int
-
VIso
()¶ - Computes the V isoparametric curve. A B-spline curve is returned.
- param V
- type V
float
- rtype
opencascade::handle<Geom_Curve>* Computes the V isoparametric curve. If CheckRational=False, no try to make it non-rational. A B-spline curve is returned. transformations
- param V
- type V
float
- param CheckRational
- type CheckRational
bool
- rtype
opencascade::handle<Geom_Curve>
-
VKnot
()¶ - Returns the Knot value of range VIndex. Raised if VIndex < 1 or VIndex > NbVKnots
- param VIndex
- type VIndex
int
- rtype
float
-
VKnotDistribution
()¶ - Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot in the V direction the B-spline surface can be- Uniform if all the knots are of multiplicity 1, - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree otherwise the surface is non uniform in the V direction. The tolerance criterion is Resolution from package gp.
- rtype
GeomAbs_BSplKnotDistribution
-
VKnotSequence
()¶ - Returns the vknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. ExampleKv = {k1, k1, k1, k2, k3, k3, k4, k4, k4} //! Raised if the length of Kv is not equal to NbVPoles + VDegree + 1
- param Kv
- type Kv
TColStd_Array1OfReal
- rtype
None* Returns the vknots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : Ku = {k1, k1, k1, k2, k3, k3, k4, k4, k4}
- rtype
TColStd_Array1OfReal
-
VKnots
()¶ - Returns the knots in the V direction. //! Raised if the length of Kv is not equal to the number of knots in the V direction.
- param Kv
- type Kv
TColStd_Array1OfReal
- rtype
None* Returns the knots in the V direction.
- rtype
TColStd_Array1OfReal
-
VMultiplicities
()¶ - Returns the multiplicities of the knots in the V direction. //! Raised if the length of Mv is not equal to the number of knots in the V direction.
- param Mv
- type Mv
TColStd_Array1OfInteger
- rtype
None* Returns the multiplicities of the knots in the V direction.
- rtype
TColStd_Array1OfInteger
-
VMultiplicity
()¶ - Returns the multiplicity value of knot of range VIndex in the v direction. Raised if VIndex < 1 or VIndex > NbVKnots
- param VIndex
- type VIndex
int
- rtype
int
-
Weight
()¶ - Returns the weight value of range UIndex, VIndex. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- rtype
float
-
Weights
()¶ - Returns the weights of the B-spline surface. //! Raised if the length of W in the U and V direction is not equal to NbUPoles and NbVPoles.
- param W
- type W
TColStd_Array2OfReal
- rtype
None* Returns the weights of the B-spline surface. value and derivatives computation
- rtype
TColStd_Array2OfReal *
-
property
thisown
¶ The membership flag
-
class
Geom_BezierCurve
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedCurve
- Creates a non rational Bezier curve with a set of poles CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2.
- param CurvePoles
- type CurvePoles
TColgp_Array1OfPnt
- rtype
None* Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights . If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp.
- param CurvePoles
- type CurvePoles
TColgp_Array1OfPnt
- param PoleWeights
- type PoleWeights
TColStd_Array1OfReal
- rtype
None
-
Degree
()¶ - Returns the polynomial degree of the curve. it is the number of poles - 1 point P and derivatives (V1, V2, V3) computation The Bezier Curve has a Polynomial representation so the parameter U can be out of the bounds of the curve.
- rtype
int
-
static
DownCast
(t)¶
-
Increase
()¶ - Increases the degree of a bezier curve. Degree is the new degree of <self>. Raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of <self>.
- param Degree
- type Degree
int
- rtype
None
-
InsertPoleAfter
()¶ - Inserts a pole P after the pole of range Index. If the curve <self> is rational the weight value for the new pole of range Index is 1.0. raised if Index is not in the range [1, NbPoles] //! raised if the resulting number of poles is greater than MaxDegree + 1.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- rtype
None* Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles] //! Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
InsertPoleBefore
()¶ - Inserts a pole P before the pole of range Index. If the curve <self> is rational the weight value for the new pole of range Index is 1.0. Raised if Index is not in the range [1, NbPoles] //! Raised if the resulting number of poles is greater than MaxDegree + 1.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- rtype
None* Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles] //! Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp.
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
IsRational
()¶ - Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp.
- rtype
bool
-
static
MaxDegree
()¶ - Returns the value of the maximum polynomial degree of any Geom_BezierCurve curve. This value is 25.
- rtype
int
-
NbPoles
()¶ - Returns the number of poles of this Bezier curve.
- rtype
int
-
Pole
()¶ - Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles]
- param Index
- type Index
int
- rtype
gp_Pnt
-
Poles
()¶ - Returns all the poles of the curve. //! Raised if the length of P is not equal to the number of poles.
- param P
- type P
TColgp_Array1OfPnt
- rtype
None* Returns all the poles of the curve.
- rtype
TColgp_Array1OfPnt
-
RemovePole
()¶ - Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles] Raised if Degree is lower than 2.
- param Index
- type Index
int
- rtype
None
-
Resolution
()¶ - Computes for this Bezier curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this Bezier curve, UTolerance ensures that: |t1-t0| < UTolerance ===> |f(t1)-f(t0)| < Tolerance3D
- param Tolerance3D
- type Tolerance3D
float
- param UTolerance
- type UTolerance
float
- rtype
None
-
Segment
()¶ - Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. WarningsEven if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <self> or if the curve makes loop. After the segmentation the length of a curve can be null.
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None
-
SetPole
()¶ - Substitutes the pole of range index with P. If the curve <self> is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles]
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- rtype
None* Substitutes the pole and the weights of range Index. If the curve <self> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp
- param Index
- type Index
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
SetWeight
()¶ - Changes the weight of the pole of range Index. If the curve <self> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp
- param Index
- type Index
int
- param Weight
- type Weight
float
- rtype
None
-
Weight
()¶ - Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles]
- param Index
- type Index
int
- rtype
float
-
Weights
()¶ - Returns all the weights of the curve. //! Raised if the length of W is not equal to the number of poles.
- param W
- type W
TColStd_Array1OfReal
- rtype
None* Returns all the weights of the curve.
- rtype
TColStd_Array1OfReal *
-
property
thisown
¶ The membership flag
-
class
Geom_BezierSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedSurface
- Creates a non-rational Bezier surface with a set of poles. Control points representationSPoles(Uorigin,Vorigin) ……………….SPoles(Uorigin,Vend) . . . . SPoles(Uend, Vorigin) …………………SPoles(Uend, Vend) For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. The weights are defaulted to all being 1. //! Raised if the number of poles of the surface is lower than 2 or greater than MaxDegree + 1 in one of the two directions U or V.
- param SurfacePoles
- type SurfacePoles
TColgp_Array2OfPnt
- rtype
None* —Purpose Creates a rational Bezier surface with a set of poles and a set of weights. For the double array the row indice corresponds to the parametric U direction and the columns indice corresponds to the parametric V direction. If all the weights are identical the surface is considered as non-rational (the tolerance criterion is Resolution from package gp). //! Raised if SurfacePoles and PoleWeights have not the same Rowlength or have not the same ColLength. Raised if PoleWeights (i, j) <= Resolution from gp; Raised if the number of poles of the surface is lower than 2 or greater than MaxDegree + 1 in one of the two directions U or V.
- param SurfacePoles
- type SurfacePoles
TColgp_Array2OfPnt
- param PoleWeights
- type PoleWeights
TColStd_Array2OfReal
- rtype
None
-
static
DownCast
(t)¶
-
ExchangeUV
()¶ - Exchanges the direction U and V on a Bezier surface As a consequence: - the poles and weights tables are transposed, - degrees, rational characteristics and so on are exchanged between the two parametric directions, and - the orientation of the surface is reversed.
- rtype
None
-
Increase
()¶ - Increases the degree of this Bezier surface in the two parametric directions. //! Raised if UDegree < UDegree <self> or VDegree < VDegree <self> Raised if the degree of the surface is greater than MaxDegree in one of the two directions U or V.
- param UDeg
- type UDeg
int
- param VDeg
- type VDeg
int
- rtype
None
-
InsertPoleColAfter
()¶ - Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1. //! Raised if Vindex < 1 or VIndex > NbVPoles. //! raises if VDegree is greater than MaxDegree. raises if the Length of CPoles is not equal to NbUPoles
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Inserts a column of poles and weights. If the surface was non-rational it can become rational. //! Raised if Vindex < 1 or VIndex > NbVPoles. Raised if . VDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbUPoles . a weight value is lower or equal to Resolution from package gp
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
InsertPoleColBefore
()¶ - Inserts a column of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1. //! Raised if Vindex < 1 or VIndex > NbVPoles. //! Raised if VDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbUPoles
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Inserts a column of poles and weights. If the surface was non-rational it can become rational. //! Raised if Vindex < 1 or VIndex > NbVPoles. Raised if : . VDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbUPoles . a weight value is lower or equal to Resolution from package gp
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
InsertPoleRowAfter
()¶ - Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1. //! Raised if Uindex < 1 or UIndex > NbUPoles. //! Raised if UDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbVPoles
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Inserts a row of poles and weights. If the surface was non-rational it can become rational. //! Raised if Uindex < 1 or UIndex > NbUPoles. Raised if : . UDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbVPoles . a weight value is lower or equal to Resolution from package gp
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
InsertPoleRowBefore
()¶ - Inserts a row of poles. If the surface is rational the weights values associated with CPoles are equal defaulted to 1. //! Raised if Uindex < 1 or UIndex > NbUPoles. //! Raised if UDegree is greater than MaxDegree. Raised if the Length of CPoles is not equal to NbVPoles
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Inserts a row of poles and weights. If the surface was non-rational it can become rational. //! Raised if Uindex < 1 or UIndex > NbUPoles. Raised if : . UDegree is greater than MaxDegree. . the Length of CPoles is not equal to NbVPoles . a weight value is lower or equal to Resolution from pacakage gp
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
IsURational
()¶ - Returns False if the weights are identical in the U direction, The tolerance criterion is Resolution from package gp. Example|1.0, 1.0, 1.0| if Weights = |0.5, 0.5, 0.5| returns False |2.0, 2.0, 2.0|
- rtype
bool
-
IsVRational
()¶ - Returns False if the weights are identical in the V direction, The tolerance criterion is Resolution from package gp. Example|1.0, 2.0, 0.5| if Weights = |1.0, 2.0, 0.5| returns False |1.0, 2.0, 0.5|
- rtype
bool
-
static
MaxDegree
()¶ - Returns the value of the maximum polynomial degree of a Bezier surface. This value is 25.
- rtype
int
-
NbUPoles
()¶ - Returns the number of poles in the U direction.
- rtype
int
-
NbVPoles
()¶ - Returns the number of poles in the V direction.
- rtype
int
-
Pole
()¶ - Returns the pole of range UIndex, VIndex Raised if UIndex < 1 or UIndex > NbUPoles, or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- rtype
gp_Pnt
-
Poles
()¶ - Returns the poles of the Bezier surface. //! Raised if the length of P in the U an V direction is not equal to NbUPoles and NbVPoles.
- param P
- type P
TColgp_Array2OfPnt
- rtype
None* Returns the poles of the Bezier surface.
- rtype
TColgp_Array2OfPnt
-
RemovePoleCol
()¶ - Removes a column of poles. If the surface was rational it can become non-rational. //! Raised if NbVPoles <= 2 after removing, a Bezier surface must have at least two columns of poles. Raised if Vindex < 1 or VIndex > NbVPoles
- param VIndex
- type VIndex
int
- rtype
None
-
RemovePoleRow
()¶ - Removes a row of poles. If the surface was rational it can become non-rational. //! Raised if NbUPoles <= 2 after removing, a Bezier surface must have at least two rows of poles. Raised if Uindex < 1 or UIndex > NbUPoles
- param UIndex
- type UIndex
int
- rtype
None
-
Resolution
()¶ - Computes two tolerance values for this Bezier surface, based on the given tolerance in 3D space Tolerance3D. The tolerances computed are: - UTolerance in the u parametric direction, and - VTolerance in the v parametric direction. If f(u,v) is the equation of this Bezier surface, UTolerance and VTolerance guarantee that: | u1 - u0 | < UTolerance and | v1 - v0 | < VTolerance ====> |f (u1,v1) - f (u0,v0)| < Tolerance3D
- param Tolerance3D
- type Tolerance3D
float
- param UTolerance
- type UTolerance
float
- param VTolerance
- type VTolerance
float
- rtype
None
-
Segment
()¶ - Modifies this Bezier surface by segmenting it between U1 and U2 in the u parametric direction, and between V1 and V2 in the v parametric direction. U1, U2, V1, and V2 can be outside the bounds of this surface. - U1 and U2 isoparametric Bezier curves, segmented between V1 and V2, become the two bounds of the surface in the v parametric direction (0. and 1. u isoparametric curves). - V1 and V2 isoparametric Bezier curves, segmented between U1 and U2, become the two bounds of the surface in the u parametric direction (0. and 1. v isoparametric curves). The poles and weights tables are modified, but the degree of this surface in the u and v parametric directions does not change. U1 can be greater than U2, and V1 can be greater than V2. In these cases, the corresponding parametric direction is inverted. The orientation of the surface is inverted if one (and only one) parametric direction is inverted.
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- rtype
None
-
SetPole
()¶ - Modifies a pole value. If the surface is rational the weight of range (UIndex, VIndex) is not modified. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param P
- type P
gp_Pnt
- rtype
None* Substitutes the pole and the weight of range UIndex, VIndex. If the surface <self> is not rational it can become rational. if the surface was rational it can become non-rational. //! raises if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param P
- type P
gp_Pnt
- param Weight
- type Weight
float
- rtype
None
-
SetPoleCol
()¶ - Modifies a column of poles. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Modifies a column of poles. If the surface was rational it can become non-rational If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbUPoles so you can modify just a part of the column. Raised if VIndex < 1 or VIndex > NbVPoles //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbUPoles Raised if CPoleWeights and CPoles have not the same bounds. Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.
- param VIndex
- type VIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
SetPoleRow
()¶ - Modifies a row of poles. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- rtype
None* Modifies a row of poles and weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoles can be lower but not greater than NbVPoles so you can modify just a part of the row. Raised if UIndex < 1 or UIndex > NbUPoles //! Raised if CPoles.Lower() < 1 or CPoles.Upper() > NbVPoles Raised if CPoleWeights and CPoles have not the same bounds. Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from gp.
- param UIndex
- type UIndex
int
- param CPoles
- type CPoles
TColgp_Array1OfPnt
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
SetWeight
()¶ - Modifies the weight of the pole of range UIndex, VIndex. If the surface was non-rational it can become rational. If the surface was rational it can become non-rational. //! Raised if UIndex < 1 or UIndex > NbUPoles or VIndex < 1 or VIndex > NbVPoles. Raised if Weight <= Resolution from package gp.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- param Weight
- type Weight
float
- rtype
None
-
SetWeightCol
()¶ - Modifies a column of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbUPoles. Raised if VIndex < 1 or VIndex > NbVPoles //! Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbUPoles Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.
- param VIndex
- type VIndex
int
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
SetWeightRow
()¶ - Modifies a row of weights. If the surface was rational it can become non-rational. If the surface was non-rational it can become rational. The length of CPoleWeights can be lower but not greater than NbVPoles. Raised if UIndex < 1 or UIndex > NbUPoles //! Raised if CPoleWeights.Lower() < 1 or CPoleWeights.Upper() > NbVPoles Raised if one of the weight value CPoleWeights (i) is lower or equal to Resolution from package gp.
- param UIndex
- type UIndex
int
- param CPoleWeights
- type CPoleWeights
TColStd_Array1OfReal
- rtype
None
-
UDegree
()¶ - Returns the degree of the surface in the U direction it is NbUPoles - 1
- rtype
int
-
VDegree
()¶ - Returns the degree of the surface in the V direction it is NbVPoles - 1
- rtype
int
-
Weight
()¶ - Returns the weight of range UIndex, VIndex //! Raised if UIndex < 1 or UIndex > NbUPoles, or VIndex < 1 or VIndex > NbVPoles.
- param UIndex
- type UIndex
int
- param VIndex
- type VIndex
int
- rtype
float
-
Weights
()¶ - Returns the weights of the Bezier surface. //! Raised if the length of W in the U an V direction is not equal to NbUPoles and NbVPoles.
- param W
- type W
TColStd_Array2OfReal
- rtype
None* Returns the weights of the Bezier surface.
- rtype
TColStd_Array2OfReal *
-
property
thisown
¶ The membership flag
-
class
Geom_BoundedCurve
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Curve
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
EndPoint
()¶ - Returns the end point of the curve.
- rtype
gp_Pnt
-
StartPoint
()¶ - Returns the start point of the curve.
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag
-
class
Geom_BoundedSurface
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Surface
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
Geom_CartesianPoint
(*args)¶ Bases:
OCC.Core.Geom.Geom_Point
- Returns a transient copy of P.
- param P
- type P
gp_Pnt
- rtype
None* Constructs a point defined by its three Cartesian coordinates X, Y and Z.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
static
DownCast
(t)¶
-
SetCoord
()¶ - Assigns the coordinates X, Y and Z to this point.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
SetPnt
()¶ - Set <self> to P.X(), P.Y(), P.Z() coordinates.
- param P
- type P
gp_Pnt
- rtype
None
-
SetX
()¶ - Changes the X coordinate of me.
- param X
- type X
float
- rtype
None
-
SetY
()¶ - Changes the Y coordinate of me.
- param Y
- type Y
float
- rtype
None
-
SetZ
()¶ - Changes the Z coordinate of me.
- param Z
- type Z
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Circle
(*args)¶ Bases:
OCC.Core.Geom.Geom_Conic
- Constructs a circle by conversion of the gp_Circ circle C.
- param C
- type C
gp_Circ
- rtype
None* Constructs a circle of radius Radius, where A2 locates the circle and defines its orientation in 3D space such that: - the center of the circle is the origin of A2, - the origin, ‘X Direction’ and ‘Y Direction’ of A2 define the plane of the circle, - A2 is the local coordinate system of the circle. Note: It is possible to create a circle where Radius is equal to 0.0. raised if Radius < 0.
- param A2
- type A2
gp_Ax2
- param Radius
- type Radius
float
- rtype
None
-
Circ
()¶ - returns the non transient circle from gp with the same geometric properties as <self>.
- rtype
gp_Circ
-
static
DownCast
(t)¶
-
Radius
()¶ - Returns the radius of this circle.
- rtype
float
-
SetCirc
()¶ - Set <self> so that <self> has the same geometric properties as C.
- param C
- type C
gp_Circ
- rtype
None
-
SetRadius
()¶ - Assigns the value R to the radius of this circle. Note: it is possible to have a circle with a radius equal to 0.0. Exceptions - Standard_ConstructionError if R is negative.
- param R
- type R
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Conic
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Curve
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Axis
()¶ - Returns the ‘main Axis’ of this conic. This axis is normal to the plane of the conic.
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Eccentricity
()¶ - Returns the eccentricity value of the conic e. e = 0 for a circle 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius) e > 1 for a hyperbola e = 1 for a parabola Exceptions Standard_DomainError in the case of a hyperbola if its major radius is null.
- rtype
float
-
Location
()¶ - Returns the location point of the conic. For the circle, the ellipse and the hyperbola it is the center of the conic. For the parabola it is the Apex of the parabola.
- rtype
gp_Pnt
-
Position
()¶ - Returns the local coordinates system of the conic. The main direction of the Axis2Placement is normal to the plane of the conic. The X direction of the Axis2placement is in the plane of the conic and corresponds to the origin for the conic’s parametric value u.
- rtype
gp_Ax2
-
SetAxis
()¶ - Changes the orientation of the conic’s plane. The normal axis to the plane is A1. The XAxis and the YAxis are recomputed. //! raised if the A1 is parallel to the XAxis of the conic.
- param A1
- type A1
gp_Ax1
- rtype
None
-
SetLocation
()¶ - changes the location point of the conic.
- param P
- type P
gp_Pnt
- rtype
None
-
SetPosition
()¶ - changes the local coordinate system of the conic.
- param A2
- type A2
gp_Ax2
- rtype
None
-
XAxis
()¶ - Returns the XAxis of the conic. This axis defines the origin of parametrization of the conic. This axis is perpendicular to the Axis of the conic. This axis and the Yaxis define the plane of the conic.
- rtype
gp_Ax1
-
YAxis
()¶ - Returns the YAxis of the conic. The YAxis is perpendicular to the Xaxis. This axis and the Xaxis define the plane of the conic.
- rtype
gp_Ax1
-
property
thisown
¶ The membership flag
-
class
Geom_ConicalSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_ElementarySurface
- A3 defines the local coordinate system of the conical surface. Ang is the conical surface semi-angle. Its absolute value is in range ]0, PI/2[. Radius is the radius of the circle Viso in the placement plane of the conical surface defined with ‘XAxis’ and ‘YAxis’. The ‘ZDirection’ of A3 defines the direction of the surface’s axis of symmetry. If the location point of A3 is the apex of the surface Radius = 0 . At the creation the parametrization of the surface is defined such that the normal Vector (N = D1U ^ D1V) is oriented towards the ‘outside region’ of the surface. //! Raised if Radius < 0.0 or Abs(Ang) < Resolution from gp or Abs(Ang) >= PI/2 - Resolution
- param A3
- type A3
gp_Ax3
- param Ang
- type Ang
float
- param Radius
- type Radius
float
- rtype
None* Creates a ConicalSurface from a non transient Cone from package gp.
- param C
- type C
gp_Cone
- rtype
None
-
Apex
()¶ - Computes the apex of this cone. It is on the negative side of the axis of revolution of this cone if the half-angle at the apex is positive, and on the positive side of the ‘main Axis’ if the half-angle is negative.
- rtype
gp_Pnt
-
Coefficients
()¶ - Returns the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate systemThese coefficients are normalized. A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
- param A1
- type A1
float
- param A2
- type A2
float
- param A3
- type A3
float
- param B1
- type B1
float
- param B2
- type B2
float
- param B3
- type B3
float
- param C1
- type C1
float
- param C2
- type C2
float
- param C3
- type C3
float
- param D
- type D
float
- rtype
None
-
Cone
()¶ - returns a non transient cone with the same geometric properties as <self>.
- rtype
gp_Cone
-
static
DownCast
(t)¶
-
RefRadius
()¶ - Returns the reference radius of this cone. The reference radius is the radius of the circle formed by the intersection of this cone and its reference plane (i.e. the plane defined by the origin, ‘X Direction’ and ‘Y Direction’ of the local coordinate system of this cone). If the apex of this cone is on the origin of the local coordinate system of this cone, the returned value is 0.
- rtype
float
-
SemiAngle
()¶ - Returns the semi-angle at the apex of this cone. Attention! Semi-angle can be negative.
- rtype
float
-
SetCone
()¶ - Set <self> so that <self> has the same geometric properties as C.
- param C
- type C
gp_Cone
- rtype
None
-
SetRadius
()¶ - Changes the radius of the conical surface in the placement plane (Z = 0, V = 0). The local coordinate system is not modified. Raised if R < 0.0
- param R
- type R
float
- rtype
None
-
SetSemiAngle
()¶ - Changes the semi angle of the conical surface. Semi-angle can be negative. Its absolute value Abs(Ang) is in range ]0,PI/2[. Raises ConstructionError if Abs(Ang) < Resolution from gp or Abs(Ang) >= PI/2 - Resolution
- param Ang
- type Ang
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Curve
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Geometry
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Continuity
()¶ - It is the global continuity of the curve C0only geometric continuity, C1continuity of the first derivative all along the Curve, C2continuity of the second derivative all along the Curve, C3continuity of the third derivative all along the Curve, G1tangency continuity all along the Curve, G2curvature continuity all along the Curve, CNthe order of continuity is infinite.
- rtype
GeomAbs_Shape
-
D0
()¶ - Returns in P the point of parameter U. If the curve is periodic then the returned point is P(U) with U = Ustart + (U - Uend) where Ustart and Uend are the parametric bounds of the curve. //! Raised only for the ‘OffsetCurve’ if it is not possible to compute the current point. For example when the first derivative on the basis curve and the offset direction are parallel.
- param U
- type U
float
- param P
- type P
gp_Pnt
- rtype
void
-
D1
()¶ - Returns the point P of parameter U and the first derivative V1. Raised if the continuity of the curve is not C1.
- param U
- type U
float
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- rtype
void
-
D2
()¶ - Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the curve is not C2.
- param U
- type U
float
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- param V2
- type V2
gp_Vec
- rtype
void
-
D3
()¶ - Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the curve is not C3.
- param U
- type U
float
- param P
- type P
gp_Pnt
- param V1
- type V1
gp_Vec
- param V2
- type V2
gp_Vec
- param V3
- type V3
gp_Vec
- rtype
void
-
DN
()¶ - The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the curve is not CN. //! Raised if the derivative cannot be computed easily. e.g. rational bspline and n > 3. Raised if N < 1.
- param U
- type U
float
- param N
- type N
int
- rtype
gp_Vec
-
static
DownCast
(t)¶
-
FirstParameter
()¶ - Returns the value of the first parameter. WarningsIt can be RealFirst from package Standard if the curve is infinite
- rtype
float
-
IsCN
()¶ - Returns true if the degree of continuity of this curve is at least N. Exceptions - Standard_RangeError if N is less than 0.
- param N
- type N
int
- rtype
bool
-
IsClosed
()¶ - Returns true if the curve is closed. Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp wich is a fixed criterion independant of the application.
- rtype
bool
-
IsPeriodic
()¶ - Is the parametrization of the curve periodic ? It is possible only if the curve is closed and if the following relation is satisfiedfor each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities. the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve. The general rule for this case isif a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic.
- rtype
bool
-
LastParameter
()¶ - Returns the value of the last parameter. WarningsIt can be RealLast from package Standard if the curve is infinite
- rtype
float
-
ParametricTransformation
()¶ - Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on <self>. //! Transformed(T)->Value(U * ParametricTransformation(T)) //! is the same point as //! Value(U).Transformed(T) //! This methods returns 1. //! It can be redefined. For example on the Line.
- param T
- type T
gp_Trsf
- rtype
float
-
Period
()¶ - Returns the period of this curve. Exceptions Standard_NoSuchObject if this curve is not periodic.
- rtype
float
-
Reverse
()¶ - Changes the direction of parametrization of <self>. The ‘FirstParameter’ and the ‘LastParameter’ are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.
- rtype
void
-
Reversed
()¶ - Returns a copy of <self> reversed.
- rtype
opencascade::handle<Geom_Curve>
-
ReversedParameter
()¶ - Returns the parameter on the reversed curve for the point of parameter U on <self>. //! me->Reversed()->Value(me->ReversedParameter(U)) //! is the same point as //! me->Value(U)
- param U
- type U
float
- rtype
float
-
TransformedParameter
()¶ - Returns the parameter on the transformed curve for the transform of the point of parameter U on <self>. //! me->Transformed(T)->Value(me->TransformedParameter(U,T)) //! is the same point as //! me->Value(U).Transformed(T) //! This methods returns <U> //! It can be redefined. For example on the Line.
- param U
- type U
float
- param T
- type T
gp_Trsf
- rtype
float
-
Value
()¶ - Computes the point of parameter U on <self>. If the curve is periodic then the returned point is P(U) with U = Ustart + (U - Uend) where Ustart and Uend are the parametric bounds of the curve. it is implemented with D0. //! Raised only for the ‘OffsetCurve’ if it is not possible to compute the current point. For example when the first derivative on the basis curve and the offset direction are parallel.
- param U
- type U
float
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag
-
class
Geom_CylindricalSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_ElementarySurface
- A3 defines the local coordinate system of the cylindrical surface. The ‘ZDirection’ of A3 defines the direction of the surface’s axis of symmetry. At the creation the parametrization of the surface is defined such that the normal Vector (N = D1U ^ D1V) is oriented towards the ‘outside region’ of the surface. WarningsIt is not forbidden to create a cylindrical surface with Radius = 0.0 Raised if Radius < 0.0
- param A3
- type A3
gp_Ax3
- param Radius
- type Radius
float
- rtype
None* Creates a CylindricalSurface from a non transient Cylinder from package gp.
- param C
- type C
gp_Cylinder
- rtype
None
-
Coefficients
()¶ - Returns the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate systemThese coefficients are normalized. A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
- param A1
- type A1
float
- param A2
- type A2
float
- param A3
- type A3
float
- param B1
- type B1
float
- param B2
- type B2
float
- param B3
- type B3
float
- param C1
- type C1
float
- param C2
- type C2
float
- param C3
- type C3
float
- param D
- type D
float
- rtype
None
-
Cylinder
()¶ - returns a non transient cylinder with the same geometric properties as <self>.
- rtype
gp_Cylinder
-
static
DownCast
(t)¶
-
Radius
()¶ - Returns the radius of this cylinder.
- rtype
float
-
SetCylinder
()¶ - Set <self> so that <self> has the same geometric properties as C.
- param C
- type C
gp_Cylinder
- rtype
None
-
SetRadius
()¶ - Changes the radius of the cylinder. Raised if R < 0.0
- param R
- type R
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Direction
(*args)¶ Bases:
OCC.Core.Geom.Geom_Vector
- Creates a unit vector with it 3 cartesian coordinates. //! Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None* Creates a transient copy of <self>.
- param V
- type V
gp_Dir
- rtype
None
-
Dir
()¶ - Returns the non transient direction with the same coordinates as <self>.
- rtype
gp_Dir
-
static
DownCast
(t)¶
-
SetCoord
()¶ - Sets <self> to X,Y,Z coordinates. //! Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
SetDir
()¶ - Converts the gp_Dir unit vector V into this unit vector.
- param V
- type V
gp_Dir
- rtype
None
-
SetX
()¶ - Changes the X coordinate of <self>. //! Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp.
- param X
- type X
float
- rtype
None
-
SetY
()¶ - Changes the Y coordinate of <self>. //! Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp.
- param Y
- type Y
float
- rtype
None
-
SetZ
()¶ - Changes the Z coordinate of <self>. //! Raised if Sqrt( X*X + Y*Y + Z*Z) <= Resolution from gp.
- param Z
- type Z
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_ElementarySurface
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Surface
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Axis
()¶ - Returns the main axis of the surface (ZAxis).
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Location
()¶ - Returns the location point of the local coordinate system of the surface.
- rtype
gp_Pnt
-
Position
()¶ - Returns the local coordinates system of the surface.
- rtype
gp_Ax3
-
SetAxis
()¶ - Changes the main axis (ZAxis) of the elementary surface. //! Raised if the direction of A1 is parallel to the XAxis of the coordinate system of the surface.
- param A1
- type A1
gp_Ax1
- rtype
None
-
SetLocation
()¶ - Changes the location of the local coordinates system of the surface.
- param Loc
- type Loc
gp_Pnt
- rtype
None
-
SetPosition
()¶ - Changes the local coordinates system of the surface.
- param A3
- type A3
gp_Ax3
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Ellipse
(*args)¶ Bases:
OCC.Core.Geom.Geom_Conic
- Constructs an ellipse by conversion of the gp_Elips ellipse E.
- param E
- type E
gp_Elips
- rtype
None* Constructs an ellipse defined by its major and minor radii, MajorRadius and MinorRadius, where A2 locates the ellipse and defines its orientation in 3D space such that: - the center of the ellipse is the origin of A2, - the ‘X Direction’ of A2 defines the major axis of the ellipse, i.e. the major radius MajorRadius is measured along this axis, - the ‘Y Direction’ of A2 defines the minor axis of the ellipse, i.e. the minor radius MinorRadius is measured along this axis, - A2 is the local coordinate system of the ellipse. Exceptions Standard_ConstructionError if: - MajorRadius is less than MinorRadius, or - MinorRadius is less than 0. Warning The Geom package does not prevent the construction of an ellipse where MajorRadius and MinorRadius are equal.
- param A2
- type A2
gp_Ax2
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- rtype
None
-
Directrix1
()¶ - This directrix is the line normal to the XAxis of the ellipse in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the ellipse, where e is the eccentricity of the ellipse. This line is parallel to the ‘YAxis’. The intersection point between directrix1 and the ‘XAxis’ is the ‘Location’ point of the directrix1. This point is on the positive side of the ‘XAxis’. Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle)
- rtype
gp_Ax1
-
Directrix2
()¶ - This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the ellipse. //! Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle).
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Elips
()¶ - returns the non transient ellipse from gp with the same
- rtype
gp_Elips
-
Focal
()¶ - Computes the focal distance. It is the distance between the the two focus of the ellipse.
- rtype
float
-
Focus1
()¶ - Returns the first focus of the ellipse. This focus is on the positive side of the ‘XAxis’ of the ellipse.
- rtype
gp_Pnt
-
Focus2
()¶ - Returns the second focus of the ellipse. This focus is on the negative side of the ‘XAxis’ of the ellipse.
- rtype
gp_Pnt
-
MajorRadius
()¶ - Returns the major radius of this ellipse.
- rtype
float
-
MinorRadius
()¶ - Returns the minor radius of this ellipse.
- rtype
float
-
Parameter
()¶ - Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
- rtype
float
-
SetElips
()¶ - Converts the gp_Elips ellipse E into this ellipse.
- param E
- type E
gp_Elips
- rtype
None
-
SetMajorRadius
()¶ - Assigns a value to the major radius of this ellipse. ConstructionError raised if MajorRadius < MinorRadius.
- param MajorRadius
- type MajorRadius
float
- rtype
None
-
SetMinorRadius
()¶ - Assigns a value to the minor radius of this ellipse. ConstructionError raised if MajorRadius < MinorRadius or if MinorRadius < 0.
- param MinorRadius
- type MinorRadius
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Geometry
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Copy
()¶ - Creates a new object which is a copy of this geometric object.
- rtype
opencascade::handle<Geom_Geometry>
-
static
DownCast
(t)¶
-
Mirror
()¶ - Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry.
- param P
- type P
gp_Pnt
- rtype
None* Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry.
- param A1
- type A1
gp_Ax1
- rtype
None* Performs the symmetrical transformation of a Geometry with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
- param A2
- type A2
gp_Ax2
- rtype
None
-
Mirrored
()¶ - Parameters
P –
- type P
gp_Pnt
- rtype
opencascade::handle<Geom_Geometry>:param A1:
- type A1
gp_Ax1
- rtype
opencascade::handle<Geom_Geometry>:param A2:
- type A2
gp_Ax2
- rtype
opencascade::handle<Geom_Geometry>
-
Rotate
()¶ - Rotates a Geometry. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
- param A1
- type A1
gp_Ax1
- param Ang
- type Ang
float
- rtype
None
-
Rotated
()¶ - Parameters
A1 –
- type A1
gp_Ax1
- param Ang
- type Ang
float
- rtype
opencascade::handle<Geom_Geometry>
-
Scale
()¶ - Scales a Geometry. S is the scaling value.
- param P
- type P
gp_Pnt
- param S
- type S
float
- rtype
None
-
Scaled
()¶ - Parameters
P –
- type P
gp_Pnt
- param S
- type S
float
- rtype
opencascade::handle<Geom_Geometry>
-
Transform
()¶ - Transformation of a geometric object. This tansformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations. (see class Transformation of the package Geom).
- param T
- type T
gp_Trsf
- rtype
void
-
Transformed
()¶ - Parameters
T –
- type T
gp_Trsf
- rtype
opencascade::handle<Geom_Geometry>
-
Translate
()¶ - Translates a Geometry. V is the vector of the tanslation.
- param V
- type V
gp_Vec
- rtype
None* Translates a Geometry from the point P1 to the point P2.
- param P1
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- rtype
None
-
Translated
()¶ - Parameters
V –
- type V
gp_Vec
- rtype
opencascade::handle<Geom_Geometry>:param P1:
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- rtype
opencascade::handle<Geom_Geometry>
-
property
thisown
¶ The membership flag
-
class
Geom_HSequenceOfBSplineSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_SequenceOfBSplineSurface
,OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Append
()¶
-
ChangeSequence
()¶
-
static
DownCast
(t)¶
-
Sequence
()¶
-
property
thisown
¶ The membership flag
-
class
Geom_Hyperbola
(*args)¶ Bases:
OCC.Core.Geom.Geom_Conic
- Constructs a hyperbola by conversion of the gp_Hypr hyperbola H.
- param H
- type H
gp_Hypr
- rtype
None* Constructs a hyperbola defined by its major and minor radii, MajorRadius and MinorRadius, where A2 locates the hyperbola and defines its orientation in 3D space such that: - the center of the hyperbola is the origin of A2, - the ‘X Direction’ of A2 defines the major axis of the hyperbola, i.e. the major radius MajorRadius is measured along this axis, - the ‘Y Direction’ of A2 defines the minor axis of the hyperbola, i.e. the minor radius MinorRadius is measured along this axis, - A2 is the local coordinate system of the hyperbola. Exceptions Standard_ConstructionError if: - MajorRadius is less than 0.0, - MinorRadius is less than 0.0.
- param A2
- type A2
gp_Ax2
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- rtype
None
-
Asymptote1
()¶ - In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 and the equation of the first asymptote is Y = (B/A)*X. Raises ConstructionError if MajorRadius = 0.0
- rtype
gp_Ax1
-
Asymptote2
()¶ - In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 and the equation of the first asymptote is Y = -(B/A)*X. Raises ConstructionError if MajorRadius = 0.0
- rtype
gp_Ax1
-
ConjugateBranch1
()¶ - This branch of hyperbola is on the positive side of the YAxis of <self>.
- rtype
gp_Hypr
-
ConjugateBranch2
()¶ - This branch of hyperbola is on the negative side of the YAxis of <self>. Note: The diagram given under the class purpose indicates where these two branches of hyperbola are positioned in relation to this branch of hyperbola.
- rtype
gp_Hypr
-
Directrix1
()¶ - This directrix is the line normal to the XAxis of the hyperbola in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the hyperbola, where e is the eccentricity of the hyperbola. This line is parallel to the YAxis. The intersection point between directrix1 and the XAxis is the location point of the directrix1. This point is on the positive side of the XAxis.
- rtype
gp_Ax1
-
Directrix2
()¶ - This line is obtained by the symmetrical transformation of ‘directrix1’ with respect to the YAxis of the hyperbola.
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Focal
()¶ - Computes the focal distance. It is the distance between the two focus of the hyperbola.
- rtype
float
-
Focus1
()¶ - Returns the first focus of the hyperbola. This focus is on the positive side of the XAxis of the hyperbola.
- rtype
gp_Pnt
-
Focus2
()¶ - Returns the second focus of the hyperbola. This focus is on the negative side of the XAxis of the hyperbola.
- rtype
gp_Pnt
-
Hypr
()¶ - returns the non transient parabola from gp with the same geometric properties as <self>.
- rtype
gp_Hypr
-
MajorRadius
()¶ - Returns the major or minor radius of this hyperbola. The major radius is also the distance between the center of the hyperbola and the apex of the main branch (located on the ‘X Axis’ of the hyperbola).
- rtype
float
-
MinorRadius
()¶ - Returns the major or minor radius of this hyperbola. The minor radius is also the distance between the center of the hyperbola and the apex of a conjugate branch (located on the ‘Y Axis’ of the hyperbola).
- rtype
float
-
OtherBranch
()¶ - Computes the ‘other’ branch of this hyperbola. This is the symmetrical branch with respect to the center of this hyperbola. Note: The diagram given under the class purpose indicates where the ‘other’ branch is positioned in relation to this branch of the hyperbola.
- rtype
gp_Hypr
-
Parameter
()¶ - Returns p = (e * e - 1) * MajorRadius where e is the eccentricity of the hyperbola. raised if MajorRadius = 0.0
- rtype
float
-
SetHypr
()¶ - Converts the gp_Hypr hyperbola H into this hyperbola.
- param H
- type H
gp_Hypr
- rtype
None
-
SetMajorRadius
()¶ - Assigns a value to the major radius of this hyperbola. Exceptions Standard_ConstructionError if: - MajorRadius is less than 0.0, or - MinorRadius is less than 0.0.Raised if MajorRadius < 0.0
- param MajorRadius
- type MajorRadius
float
- rtype
None
-
SetMinorRadius
()¶ - Assigns a value to the minor radius of this hyperbola. Exceptions Standard_ConstructionError if: - MajorRadius is less than 0.0, or - MinorRadius is less than 0.0.Raised if MajorRadius < 0.0
- param MinorRadius
- type MinorRadius
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Line
(*args)¶ Bases:
OCC.Core.Geom.Geom_Curve
- Creates a line located in 3D space with the axis placement A1. The Location of A1 is the origin of the line.
- param A1
- type A1
gp_Ax1
- rtype
None* Creates a line from a non transient line from package gp.
- param L
- type L
gp_Lin
- rtype
None* Constructs a line passing through point P and parallel to vector V (P and V are, respectively, the origin and the unit vector of the positioning axis of the line).
- param P
- type P
gp_Pnt
- param V
- type V
gp_Dir
- rtype
None
-
static
DownCast
(t)¶
-
Lin
()¶ - Returns non transient line from gp with the same geometric properties as <self>
- rtype
gp_Lin
-
Position
()¶ - Returns the positioning axis of this line; this is also its local coordinate system.
- rtype
gp_Ax1
-
SetDirection
()¶ - changes the direction of the line.
- param V
- type V
gp_Dir
- rtype
None
-
SetLin
()¶ - Set <self> so that <self> has the same geometric properties as L.
- param L
- type L
gp_Lin
- rtype
None
-
SetLocation
()¶ - changes the ‘Location’ point (origin) of the line.
- param P
- type P
gp_Pnt
- rtype
None
-
SetPosition
()¶ - changes the ‘Location’ and a the ‘Direction’ of <self>.
- param A1
- type A1
gp_Ax1
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_OffsetCurve
(*args)¶ Bases:
OCC.Core.Geom.Geom_Curve
- C is the basis curve, Offset is the distance between <self> and the basis curve at any point. V defines the fixed reference direction (offset direction). If P is a point on the basis curve and T the first derivative with non zero length at this point, the corresponding point on the offset curve is in the direction of the vector-product N = V ^ T where N is a unitary vector. If isNotCheckC0 = True checking if basis curve has C0-continuity is not made. WarningsIn this package the entities are not shared. The OffsetCurve is built with a copy of the curve C. So when C is modified the OffsetCurve is not modified //! Raised if the basis curve C is not at least C1. WarningsNo check is done to know if ||V^T|| != 0.0 at any point.
- param C
- type C
Geom_Curve
- param Offset
- type Offset
float
- param V
- type V
gp_Dir
- param isNotCheckC0
default value is Standard_False
- type isNotCheckC0
bool
- rtype
None
-
BasisCurve
()¶ - Returns the basis curve of this offset curve. Note: The basis curve can be an offset curve.
- rtype
opencascade::handle<Geom_Curve>
-
Direction
()¶ - Returns the reference vector of this offset curve. Value and derivatives WarningsThe exception UndefinedValue or UndefinedDerivative is raised if it is not possible to compute a unique offset direction. If T is the first derivative with not null length and V the offset direction the relation ||T(U) ^ V|| != 0 must be satisfied to evaluate the offset curve. No check is done at the creation time and we suppose in this package that the offset curve is well defined.
- rtype
gp_Dir
-
static
DownCast
(t)¶
-
GetBasisCurveContinuity
()¶ - Returns continuity of the basis curve.
- rtype
GeomAbs_Shape
-
Offset
()¶ - Returns the offset value of this offset curve.
- rtype
float
-
SetBasisCurve
()¶ - Changes this offset curve by assigning C as the basis curve from which it is built. If isNotCheckC0 = True checking if basis curve has C0-continuity is not made. Exceptions Standard_ConstructionError if the curve C is not at least ‘C1’ continuous.
- param C
- type C
Geom_Curve
- param isNotCheckC0
default value is Standard_False
- type isNotCheckC0
bool
- rtype
None
-
SetDirection
()¶ - Changes this offset curve by assigning V as the reference vector used to compute the offset direction.
- param V
- type V
gp_Dir
- rtype
None
-
SetOffsetValue
()¶ - Changes this offset curve by assigning D as the offset value.
- param D
- type D
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_OffsetSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_Surface
- Constructs a surface offset from the basis surface S, where Offset is the distance between the offset surface and the basis surface at any point. A point on the offset surface is built by measuring the offset value along a normal vector at a point on S. This normal vector is given by the cross product D1u^D1v, where D1u and D1v are the vectors tangential to the basis surface in the u and v parametric directions at this point. The side of S on which the offset value is measured is indicated by this normal vector if Offset is positive, or is the inverse sense if Offset is negative. If isNotCheckC0 = True checking if basis surface has C0-continuity is not made. Warnings- The offset surface is built with a copy of the surface S. Therefore, when S is modified the offset surface is not modified. - No check is made at the time of construction to detect points on S with multiple possible normal directions. Raised if S is not at least C1. WarningsNo check is done to verify that a unique normal direction is defined at any point of the basis surface S.
- param S
- type S
Geom_Surface
- param Offset
- type Offset
float
- param isNotCheckC0
default value is Standard_False
- type isNotCheckC0
bool
- rtype
None
-
BasisSurface
()¶ - Returns the basis surface of this offset surface. Note: The basis surface can be an offset surface.
- rtype
inline opencascade::handle<Geom_Surface>
-
static
DownCast
(t)¶
-
GetBasisSurfContinuity
()¶ - Returns continuity of the basis surface.
- rtype
inline GeomAbs_Shape
-
Offset
()¶ - Returns the offset value of this offset surface.
- rtype
inline float
-
OsculatingSurface
()¶ - Returns osculating surface if base surface is B-spline or Bezier
- rtype
inline opencascade::handle<Geom_OsculatingSurface>
-
SetBasisSurface
()¶ - Raised if S is not at least C1. WarningsNo check is done to verify that a unique normal direction is defined at any point of the basis surface S. If isNotCheckC0 = True checking if basis surface has C0-continuity is not made. Exceptions Standard_ConstructionError if the surface S is not at least ‘C1’ continuous.
- param S
- type S
Geom_Surface
- param isNotCheckC0
default value is Standard_False
- type isNotCheckC0
bool
- rtype
None
-
SetOffsetValue
()¶ - Changes this offset surface by assigning D as the offset value.
- param D
- type D
float
- rtype
None
-
Surface
()¶ - returns an equivalent surface of the offset surface when the basis surface is a canonic surface or a rectangular limited surface on canonic surface or if the offset is null.
- rtype
opencascade::handle<Geom_Surface>
-
UOsculatingSurface
()¶ - if Standard_True, L is the local osculating surface along U at the point U,V. It means that DL/DU is collinear to DS/DU . If IsOpposite == Standard_True these vectors have opposite direction.
- param U
- type U
float
- param V
- type V
float
- param IsOpposite
- type IsOpposite
bool
- param UOsculSurf
- type UOsculSurf
Geom_BSplineSurface
- rtype
bool
-
VOsculatingSurface
()¶ - if Standard_True, L is the local osculating surface along V at the point U,V. It means that DL/DV is collinear to DS/DV . If IsOpposite == Standard_True these vectors have opposite direction.
- param U
- type U
float
- param V
- type V
float
- param IsOpposite
- type IsOpposite
bool
- param VOsculSurf
- type VOsculSurf
Geom_BSplineSurface
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
Geom_OsculatingSurface
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Return type
None* detects if the surface has punctual U or V isoparametric curve along on the bounds of the surface relativly to the tolerance Tol and Builds the corresponding osculating surfaces. :param BS: :type BS: Geom_Surface :param Tol: :type Tol: float :rtype: None
-
BasisSurface
()¶ - Return type
opencascade::handle<Geom_Surface>
-
static
DownCast
(t)¶
-
Init
()¶ - Parameters
BS –
- type BS
Geom_Surface
- param Tol
- type Tol
float
- rtype
None
-
UOscSurf
()¶ - if Standard_True, L is the local osculating surface along U at the point U,V.
- param U
- type U
float
- param V
- type V
float
- param t
- type t
bool
- param L
- type L
Geom_BSplineSurface
- rtype
bool
-
VOscSurf
()¶ - if Standard_True, L is the local osculating surface along V at the point U,V.
- param U
- type U
float
- param V
- type V
float
- param t
- type t
bool
- param L
- type L
Geom_BSplineSurface
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
Geom_Parabola
(*args)¶ Bases:
OCC.Core.Geom.Geom_Conic
- Creates a parabola from a non transient one.
- param Prb
- type Prb
gp_Parab
- rtype
None* Creates a parabola with its local coordinate system ‘A2’ and it’s focal length ‘Focal’. The XDirection of A2 defines the axis of symmetry of the parabola. The YDirection of A2 is parallel to the directrix of the parabola. The Location point of A2 is the vertex of the parabola Raised if Focal < 0.0
- param A2
- type A2
gp_Ax2
- param Focal
- type Focal
float
- rtype
None* D is the directrix of the parabola and F the focus point. The symmetry axis (XAxis) of the parabola is normal to the directrix and pass through the focus point F, but its location point is the vertex of the parabola. The YAxis of the parabola is parallel to D and its location point is the vertex of the parabola. The normal to the plane of the parabola is the cross product between the XAxis and the YAxis.
- param D
- type D
gp_Ax1
- param F
- type F
gp_Pnt
- rtype
None
-
Directrix
()¶ - Computes the directrix of this parabola. This is a line normal to the axis of symmetry, in the plane of this parabola, located on the negative side of its axis of symmetry, at a distance from the apex equal to the focal length. The directrix is returned as an axis (gp_Ax1 object), where the origin is located on the ‘X Axis’ of this parabola.
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Focal
()¶ - Computes the focal distance of this parabola The focal distance is the distance between the apex and the focus of the parabola.
- rtype
float
-
Focus
()¶ - Computes the focus of this parabola. The focus is on the positive side of the ‘X Axis’ of the local coordinate system of the parabola.
- rtype
gp_Pnt
-
Parab
()¶ - Returns the non transient parabola from gp with the same geometric properties as <self>.
- rtype
gp_Parab
-
Parameter
()¶ - Computes the parameter of this parabola which is the distance between its focus and its directrix. This distance is twice the focal length. If P is the parameter of the parabola, the equation of the parabola in its local coordinate system is: Y**2 = 2.*P*X.
- rtype
float
-
SetFocal
()¶ - Assigns the value Focal to the focal distance of this parabola. Exceptions Standard_ConstructionError if Focal is negative.
- param Focal
- type Focal
float
- rtype
None
-
SetParab
()¶ - Converts the gp_Parab parabola Prb into this parabola.
- param Prb
- type Prb
gp_Parab
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Plane
(*args)¶ Bases:
OCC.Core.Geom.Geom_ElementarySurface
- Creates a plane located in 3D space with an axis placement three axis. The ‘ZDirection’ of ‘A3’ is the direction normal to the plane. The ‘Location’ point of ‘A3’ is the origin of the plane. The ‘XDirection’ and ‘YDirection’ of ‘A3’ define the directions of the U isoparametric and V isoparametric curves.
- param A3
- type A3
gp_Ax3
- rtype
None* Creates a plane from a non transient plane from package gp.
- param Pl
- type Pl
gp_Pln
- rtype
None* P is the ‘Location’ point or origin of the plane. V is the direction normal to the plane.
- param P
- type P
gp_Pnt
- param V
- type V
gp_Dir
- rtype
None* Creates a plane from its cartesian equation : Ax + By + Cz + D = 0.0 //! Raised if Sqrt (A*A + B*B + C*C) <= Resolution from gp
- param A
- type A
float
- param B
- type B
float
- param C
- type C
float
- param D
- type D
float
- rtype
None
-
Coefficients
()¶ - Computes the normalized coefficients of the plane’s cartesian equationAx + By + Cz + D = 0.0
- param A
- type A
float
- param B
- type B
float
- param C
- type C
float
- param D
- type D
float
- rtype
None
-
static
DownCast
(t)¶
-
Pln
()¶ - Converts this plane into a gp_Pln plane.
- rtype
gp_Pln
-
SetPln
()¶ - Set <self> so that <self> has the same geometric properties as Pl.
- param Pl
- type Pl
gp_Pln
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Point
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Geometry
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Coord
()¶ - returns the Coordinates of <self>.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
void
-
Distance
()¶ - Computes the distance between <self> and <Other>.
- param Other
- type Other
Geom_Point
- rtype
float
-
static
DownCast
(t)¶
-
Pnt
()¶ - returns a non transient copy of <self>
- rtype
gp_Pnt
-
SquareDistance
()¶ - Computes the square distance between <self> and <Other>.
- param Other
- type Other
Geom_Point
- rtype
float
-
X
()¶ - returns the X coordinate of <self>.
- rtype
float
-
Y
()¶ - returns the Y coordinate of <self>.
- rtype
float
-
Z
()¶ - returns the Z coordinate of <self>.
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Geom_RectangularTrimmedSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedSurface
- The U parametric direction of the surface is oriented from U1 to U2. The V parametric direction of the surface is oriented from V1 to V2. These two directions define the orientation of the surface (normal). If the surface is not periodic USense and VSense are not used for the construction. If the surface S is periodic in one direction USense and VSense give the available part of the surface. By default in this case the surface has the same orientation as the basis surface S. The returned surface is not closed and not periodic. ConstructionError Raised if S is not periodic in the UDirection and U1 or U2 are out of the bounds of S. S is not periodic in the VDirection and V1 or V2 are out of the bounds of S. U1 = U2 or V1 = V2
- param S
- type S
Geom_Surface
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- param USense
default value is Standard_True
- type USense
bool
- param VSense
default value is Standard_True
- type VSense
bool
- rtype
None* The basis surface S is only trim in one parametric direction. If UTrim = True the surface is trimmed in the U parametric direction else the surface is trimmed in the V parametric direction. In the considered parametric direction the resulting surface is oriented from Param1 to Param2. If S is periodic Sense gives the available part of the surface. By default the trimmed surface has the same orientation as the basis surface S in the considered parametric direction (Sense = True). If the basis surface S is closed or periodic in the parametric direction opposite to the trimming direction the trimmed surface has the same characteristics as the surface S in this direction. Warnings : In this package the entities are not shared. The RectangularTrimmedSurface is built with a copy of the surface S. So when S is modified the RectangularTrimmedSurface is not modified Raised if S is not periodic in the considered parametric direction and Param1 or Param2 are out of the bounds of S. Param1 = Param2
- param S
- type S
Geom_Surface
- param Param1
- type Param1
float
- param Param2
- type Param2
float
- param UTrim
- type UTrim
bool
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
BasisSurface
()¶ - Returns the Basis surface of <self>.
- rtype
opencascade::handle<Geom_Surface>
-
static
DownCast
(t)¶
-
SetTrim
()¶ - Modifies this patch by changing the trim values applied to the original surface The u parametric direction of this patch is oriented from U1 to U2. The v parametric direction of this patch is oriented from V1 to V2. USense and VSense are used for the construction only if the surface is periodic in the corresponding parametric direction, and define the available part of the surface; by default in this case, this patch has the same orientation as the basis surface. Raised if The BasisSurface is not periodic in the UDirection and U1 or U2 are out of the bounds of the BasisSurface. The BasisSurface is not periodic in the VDirection and V1 or V2 are out of the bounds of the BasisSurface. U1 = U2 or V1 = V2
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- param USense
default value is Standard_True
- type USense
bool
- param VSense
default value is Standard_True
- type VSense
bool
- rtype
None* Modifies this patch by changing the trim values applied to the original surface The basis surface is trimmed only in one parametric direction: if UTrim is true, the surface is trimmed in the u parametric direction; if it is false, it is trimmed in the v parametric direction. In the ‘trimmed’ direction, this patch is oriented from Param1 to Param2. If the basis surface is periodic in the ‘trimmed’ direction, Sense defines its available part. By default in this case, this patch has the same orientation as the basis surface in this parametric direction. If the basis surface is closed or periodic in the other parametric direction (i.e. not the ‘trimmed’ direction), this patch has the same characteristics as the basis surface in that parametric direction. Raised if The BasisSurface is not periodic in the considered direction and Param1 or Param2 are out of the bounds of the BasisSurface. Param1 = Param2
- param Param1
- type Param1
float
- param Param2
- type Param2
float
- param UTrim
- type UTrim
bool
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_SequenceOfBSplineSurface
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
ChangeFirst
()¶
-
ChangeLast
()¶
-
ChangeValue
()¶
-
Clear
()¶
-
Exchange
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
IsEmpty
()¶
-
Last
()¶
-
Length
()¶
-
Lower
()¶
-
Prepend
()¶
-
Remove
()¶
-
Reverse
()¶
-
Set
()¶
-
SetValue
()¶
-
Size
()¶
-
Split
()¶
-
Upper
()¶
-
Value
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
static
delNode
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
Geom_SphericalSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_ElementarySurface
- A3 is the local coordinate system of the surface. At the creation the parametrization of the surface is defined such as the normal Vector (N = D1U ^ D1V) is directed away from the center of the sphere. The direction of increasing parametric value V is defined by the rotation around the ‘YDirection’ of A2 in the trigonometric sense and the orientation of increasing parametric value U is defined by the rotation around the main direction of A2 in the trigonometric sense. WarningsIt is not forbidden to create a spherical surface with Radius = 0.0 Raised if Radius < 0.0.
- param A3
- type A3
gp_Ax3
- param Radius
- type Radius
float
- rtype
None* Creates a SphericalSurface from a non persistent Sphere from package gp.
- param S
- type S
gp_Sphere
- rtype
None
-
Area
()¶ - Computes the aera of the spherical surface.
- rtype
float
-
Coefficients
()¶ - Returns the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates systemThese coefficients are normalized. A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
- param A1
- type A1
float
- param A2
- type A2
float
- param A3
- type A3
float
- param B1
- type B1
float
- param B2
- type B2
float
- param B3
- type B3
float
- param C1
- type C1
float
- param C2
- type C2
float
- param C3
- type C3
float
- param D
- type D
float
- rtype
None
-
static
DownCast
(t)¶
-
Radius
()¶ - Computes the coefficients of the implicit equation of this quadric in the absolute Cartesian coordinate system: A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0 An implicit normalization is applied (i.e. A1 = A2 = 1. in the local coordinate system of this sphere).
- rtype
float
-
SetRadius
()¶ - Assigns the value R to the radius of this sphere. Exceptions Standard_ConstructionError if R is less than 0.0.
- param R
- type R
float
- rtype
None
-
SetSphere
()¶ - Converts the gp_Sphere S into this sphere.
- param S
- type S
gp_Sphere
- rtype
None
-
Sphere
()¶ - Returns a non persistent sphere with the same geometric properties as <self>.
- rtype
gp_Sphere
-
Volume
()¶ - Computes the volume of the spherical surface.
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Geom_Surface
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Geometry
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Bounds
()¶ - Returns the parametric bounds U1, U2, V1 and V2 of this surface. If the surface is infinite, this function can return a value equal to Precision::Infinite: instead of Standard_Real::LastReal.
- param U1
- type U1
float
- param U2
- type U2
float
- param V1
- type V1
float
- param V2
- type V2
float
- rtype
void
-
Continuity
()¶ - Returns the Global Continuity of the surface in direction U and VC0only geometric continuity, C1continuity of the first derivative all along the surface, C2continuity of the second derivative all along the surface, C3continuity of the third derivative all along the surface, G1tangency continuity all along the surface, G2curvature continuity all along the surface, CNthe order of continuity is infinite. ExampleIf the surface is C1 in the V parametric direction and C2 in the U parametric direction Shape = C1.
- rtype
GeomAbs_Shape
-
D0
()¶ - Computes the point of parameter U,V on the surface. //! Raised only for an ‘OffsetSurface’ if it is not possible to compute the current point.
- param U
- type U
float
- param V
- type V
float
- param P
- type P
gp_Pnt
- rtype
void
-
D1
()¶ - Computes the point P and the first derivatives in the directions U and V at this point. Raised if the continuity of the surface is not C1.
- param U
- type U
float
- param V
- type V
float
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- rtype
void
-
D2
()¶ - Computes the point P, the first and the second derivatives in the directions U and V at this point. Raised if the continuity of the surface is not C2.
- param U
- type U
float
- param V
- type V
float
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- param D2U
- type D2U
gp_Vec
- param D2V
- type D2V
gp_Vec
- param D2UV
- type D2UV
gp_Vec
- rtype
void
-
D3
()¶ - Computes the point P, the first,the second and the third derivatives in the directions U and V at this point. Raised if the continuity of the surface is not C2.
- param U
- type U
float
- param V
- type V
float
- param P
- type P
gp_Pnt
- param D1U
- type D1U
gp_Vec
- param D1V
- type D1V
gp_Vec
- param D2U
- type D2U
gp_Vec
- param D2V
- type D2V
gp_Vec
- param D2UV
- type D2UV
gp_Vec
- param D3U
- type D3U
gp_Vec
- param D3V
- type D3V
gp_Vec
- param D3UUV
- type D3UUV
gp_Vec
- param D3UVV
- type D3UVV
gp_Vec
- rtype
void
-
DN
()¶ - —Purpose ; Computes the derivative of order Nu in the direction U and Nv in the direction V at the point P(U, V). //! Raised if the continuity of the surface is not CNu in the U direction or not CNv in the V direction. Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
- param U
- type U
float
- param V
- type V
float
- param Nu
- type Nu
int
- param Nv
- type Nv
int
- rtype
gp_Vec
-
static
DownCast
(t)¶
-
IsCNu
()¶ - Returns the order of continuity of the surface in the U parametric direction. Raised if N < 0.
- param N
- type N
int
- rtype
bool
-
IsCNv
()¶ - Returns the order of continuity of the surface in the V parametric direction. Raised if N < 0.
- param N
- type N
int
- rtype
bool
-
IsUClosed
()¶ - Checks whether this surface is closed in the u parametric direction. Returns true if, in the u parametric direction: taking uFirst and uLast as the parametric bounds in the u parametric direction, for each parameter v, the distance between the points P(uFirst, v) and P(uLast, v) is less than or equal to gp::Resolution().
- rtype
bool
-
IsUPeriodic
()¶ - Checks if this surface is periodic in the u parametric direction. Returns true if: - this surface is closed in the u parametric direction, and - there is a constant T such that the distance between the points P (u, v) and P (u + T, v) (or the points P (u, v) and P (u, v + T)) is less than or equal to gp::Resolution(). Note: T is the parametric period in the u parametric direction.
- rtype
bool
-
IsVClosed
()¶ - Checks whether this surface is closed in the u parametric direction. Returns true if, in the v parametric direction: taking vFirst and vLast as the parametric bounds in the v parametric direction, for each parameter u, the distance between the points P(u, vFirst) and P(u, vLast) is less than or equal to gp::Resolution().
- rtype
bool
-
IsVPeriodic
()¶ - Checks if this surface is periodic in the v parametric direction. Returns true if: - this surface is closed in the v parametric direction, and - there is a constant T such that the distance between the points P (u, v) and P (u + T, v) (or the points P (u, v) and P (u, v + T)) is less than or equal to gp::Resolution(). Note: T is the parametric period in the v parametric direction.
- rtype
bool
-
ParametricTransformation
()¶ - Returns a 2d transformation used to find the new parameters of a point on the transformed surface. //! me->Transformed(T)->Value(U’,V’) //! is the same point as //! me->Value(U,V).Transformed(T) //! Where U’,V’ are obtained by transforming U,V with th 2d transformation returned by //! me->ParametricTransformation(T) //! This methods returns an identity transformation //! It can be redefined. For example on the Plane, Cylinder, Cone, Revolved and Extruded surfaces.
- param T
- type T
gp_Trsf
- rtype
gp_GTrsf2d
-
TransformParameters
()¶ - Computes the parameters on the transformed surface for the transform of the point of parameters U,V on <self>. //! me->Transformed(T)->Value(U’,V’) //! is the same point as //! me->Value(U,V).Transformed(T) //! Where U’,V’ are the new values of U,V after calling //! me->TranformParameters(U,V,T) //! This methods does not change <U> and <V> //! It can be redefined. For example on the Plane, Cylinder, Cone, Revolved and Extruded surfaces.
- param U
- type U
float
- param V
- type V
float
- param T
- type T
gp_Trsf
- rtype
void
-
UIso
()¶ - Computes the U isoparametric curve.
- param U
- type U
float
- rtype
opencascade::handle<Geom_Curve>
-
UPeriod
()¶ - Returns the period of this surface in the u parametric direction. raises if the surface is not uperiodic.
- rtype
float
-
UReverse
()¶ - Reverses the U direction of parametrization of <self>. The bounds of the surface are not modified.
- rtype
void
-
UReversed
()¶ - Reverses the U direction of parametrization of <self>. The bounds of the surface are not modified. A copy of <self> is returned.
- rtype
opencascade::handle<Geom_Surface>
-
UReversedParameter
()¶ - Returns the parameter on the Ureversed surface for the point of parameter U on <self>. //! me->UReversed()->Value(me->UReversedParameter(U),V) //! is the same point as //! me->Value(U,V)
- param U
- type U
float
- rtype
float
-
VIso
()¶ - Computes the V isoparametric curve.
- param V
- type V
float
- rtype
opencascade::handle<Geom_Curve>
-
VPeriod
()¶ - Returns the period of this surface in the v parametric direction. raises if the surface is not vperiodic.
- rtype
float
-
VReverse
()¶ - Reverses the V direction of parametrization of <self>. The bounds of the surface are not modified.
- rtype
void
-
VReversed
()¶ - Reverses the V direction of parametrization of <self>. The bounds of the surface are not modified. A copy of <self> is returned.
- rtype
opencascade::handle<Geom_Surface>
-
VReversedParameter
()¶ - Returns the parameter on the Vreversed surface for the point of parameter V on <self>. //! me->VReversed()->Value(U,me->VReversedParameter(V)) //! is the same point as //! me->Value(U,V)
- param V
- type V
float
- rtype
float
-
Value
()¶ - Computes the point of parameter U on the surface. //! It is implemented with D0 //! Raised only for an ‘OffsetSurface’ if it is not possible to compute the current point.
- param U
- type U
float
- param V
- type V
float
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag
-
class
Geom_SurfaceOfLinearExtrusion
(*args)¶ Bases:
OCC.Core.Geom.Geom_SweptSurface
- V is the direction of extrusion. C is the extruded curve. The form of a SurfaceOfLinearExtrusion can be. ruled surface (RuledForm), . a cylindrical surface if the extruded curve is a circle or a trimmed circle (CylindricalForm), . a plane surface if the extruded curve is a Line (PlanarForm). WarningsDegenerated surface cases are not detected. For example if the curve C is a line and V is parallel to the direction of this line.
- param C
- type C
Geom_Curve
- param V
- type V
gp_Dir
- rtype
None
-
static
DownCast
(t)¶
-
SetBasisCurve
()¶ - Modifies this surface of linear extrusion by redefining its ‘basis curve’ (the ‘extruded curve’).
- param C
- type C
Geom_Curve
- rtype
None
-
SetDirection
()¶ - Assigns V as the ‘direction of extrusion’ for this surface of linear extrusion.
- param V
- type V
gp_Dir
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_SurfaceOfRevolution
(*args)¶ Bases:
OCC.Core.Geom.Geom_SweptSurface
- Cis the meridian or the referenced curve. A1 is the axis of revolution. The form of a SurfaceOfRevolution can be. a general revolution surface (RevolutionForm), . a conical surface if the meridian is a line or a trimmed line (ConicalForm), . a cylindrical surface if the meridian is a line or a trimmed line parallel to the revolution axis (CylindricalForm), . a planar surface if the meridian is a line perpendicular to the revolution axis of the surface (PlanarForm). . a spherical surface, . a toroidal surface, . a quadric surface. WarningsIt is not checked that the curve C is planar and that the surface axis is in the plane of the curve. It is not checked that the revolved curve C doesn’t self-intersects.
- param C
- type C
Geom_Curve
- param A1
- type A1
gp_Ax1
- rtype
None
-
Axis
()¶ - Returns the revolution axis of the surface.
- rtype
gp_Ax1
-
static
DownCast
(t)¶
-
Location
()¶ - Returns the location point of the axis of revolution.
- rtype
gp_Pnt
-
ReferencePlane
()¶ - Computes the position of the reference plane of the surface defined by the basis curve and the symmetry axis. The location point is the location point of the revolution’s axis, the XDirection of the plane is given by the revolution’s axis and the orientation of the normal to the plane is given by the sense of revolution. //! Raised if the revolved curve is not planar or if the revolved curve and the symmetry axis are not in the same plane or if the maximum of distance between the axis and the revolved curve is lower or equal to Resolution from gp.
- rtype
gp_Ax2
-
SetAxis
()¶ - Changes the axis of revolution. WarningsIt is not checked that the axis is in the plane of the revolved curve.
- param A1
- type A1
gp_Ax1
- rtype
None
-
SetBasisCurve
()¶ - Changes the revolved curve of the surface. WarningsIt is not checked that the curve C is planar and that the surface axis is in the plane of the curve. It is not checked that the revolved curve C doesn’t self-intersects.
- param C
- type C
Geom_Curve
- rtype
None
-
SetDirection
()¶ - Changes the direction of the revolution axis. WarningsIt is not checked that the axis is in the plane of the revolved curve.
- param V
- type V
gp_Dir
- rtype
None
-
SetLocation
()¶ - Changes the location point of the revolution axis. WarningsIt is not checked that the axis is in the plane of the revolved curve.
- param P
- type P
gp_Pnt
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_SweptSurface
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Surface
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
BasisCurve
()¶ - Returns the referenced curve of the surface. For a surface of revolution it is the revolution curve, for a surface of linear extrusion it is the extruded curve.
- rtype
opencascade::handle<Geom_Curve>
-
Direction
()¶ - Returns the reference direction of the swept surface. For a surface of revolution it is the direction of the revolution axis, for a surface of linear extrusion it is the direction of extrusion.
- rtype
gp_Dir
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
Geom_ToroidalSurface
(*args)¶ Bases:
OCC.Core.Geom.Geom_ElementarySurface
- A3 is the local coordinate system of the surface. The orientation of increasing V parametric value is defined by the rotation around the main axis (ZAxis) in the trigonometric sense. The parametrization of the surface in the U direction is defined such as the normal Vector (N = D1U ^ D1V) is oriented towards the ‘outside region’ of the surface. WarningsIt is not forbidden to create a toroidal surface with MajorRadius = MinorRadius = 0.0 //! Raised if MinorRadius < 0.0 or if MajorRadius < 0.0
- param A3
- type A3
gp_Ax3
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- rtype
None* Creates a ToroidalSurface from a non transient Torus from package gp.
- param T
- type T
gp_Torus
- rtype
None
-
Area
()¶ - Computes the aera of the surface.
- rtype
float
-
Coefficients
()¶ - Returns the coefficients of the implicit equation of the surface in the absolute cartesian coordinate systemCoef(1) * X**4 + Coef(2) * Y**4 + Coef(3) * Z**4 + Coef(4) * X**3 * Y + Coef(5) * X**3 * Z + Coef(6) * Y**3 * X + Coef(7) * Y**3 * Z + Coef(8) * Z**3 * X + Coef(9) * Z**3 * Y + Coef(10) * X**2 * Y**2 + Coef(11) * X**2 * Z**2 + Coef(12) * Y**2 * Z**2 + Coef(13) * X**3 + Coef(14) * Y**3 + Coef(15) * Z**3 + Coef(16) * X**2 * Y + Coef(17) * X**2 * Z + Coef(18) * Y**2 * X + Coef(19) * Y**2 * Z + Coef(20) * Z**2 * X + Coef(21) * Z**2 * Y + Coef(22) * X**2 + Coef(23) * Y**2 + Coef(24) * Z**2 + Coef(25) * X * Y + Coef(26) * X * Z + Coef(27) * Y * Z + Coef(28) * X + Coef(29) * Y + Coef(30) * Z + Coef(31) = 0.0 Raised if the length of Coef is lower than 31.
- param Coef
- type Coef
TColStd_Array1OfReal
- rtype
None
-
static
DownCast
(t)¶
-
MajorRadius
()¶ - Returns the major radius, or the minor radius, of this torus.
- rtype
float
-
MinorRadius
()¶ - Returns the major radius, or the minor radius, of this torus.
- rtype
float
-
SetMajorRadius
()¶ - Modifies this torus by changing its major radius. Exceptions Standard_ConstructionError if: - MajorRadius is negative, or - MajorRadius - r is less than or equal to gp::Resolution(), where r is the minor radius of this torus.
- param MajorRadius
- type MajorRadius
float
- rtype
None
-
SetMinorRadius
()¶ - Modifies this torus by changing its minor radius. Exceptions Standard_ConstructionError if: - MinorRadius is negative, or - R - MinorRadius is less than or equal to gp::Resolution(), where R is the major radius of this torus.
- param MinorRadius
- type MinorRadius
float
- rtype
None
-
SetTorus
()¶ - Converts the gp_Torus torus T into this torus.
- param T
- type T
gp_Torus
- rtype
None
-
Torus
()¶ - Returns the non transient torus with the same geometric properties as <self>.
- rtype
gp_Torus
-
Volume
()¶ - Computes the volume.
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Geom_Transformation
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates an identity transformation.
- rtype
None* Creates a transient copy of T.
- param T
- type T
gp_Trsf
- rtype
None
-
Copy
()¶ - Creates a new object which is a copy of this transformation.
- rtype
opencascade::handle<Geom_Transformation>
-
static
DownCast
(t)¶
-
Form
()¶ - Returns the nature of this transformation as a value of the gp_TrsfForm enumeration.
- rtype
gp_TrsfForm
-
Invert
()¶ - Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
- rtype
None
-
Inverted
()¶ - Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
- rtype
opencascade::handle<Geom_Transformation>
-
IsNegative
()¶ - Checks whether this transformation is an indirect transformation: returns true if the determinant of the matrix of the vectorial part of the transformation is less than 0.
- rtype
bool
-
Multiplied
()¶ - Computes the transformation composed with Other and <self>. <self> * Other. Returns a new transformation
- param Other
- type Other
Geom_Transformation
- rtype
opencascade::handle<Geom_Transformation>
-
Multiply
()¶ - Computes the transformation composed with Other and <self> . <self> = <self> * Other.
- param theOther
- type theOther
Geom_Transformation
- rtype
None
-
Power
()¶ - Computes the following composition of transformations if N > 0 <self> * <self> * …….* <self>. if N = 0 Identity if N < 0 <self>.Invert() * ………* <self>.Invert() //! Raised if N < 0 and if the transformation is not inversible
- param N
- type N
int
- rtype
None
-
Powered
()¶ - Raised if N < 0 and if the transformation is not inversible
- param N
- type N
int
- rtype
opencascade::handle<Geom_Transformation>
-
PreMultiply
()¶ - Computes the matrix of the transformation composed with <self> and Other. <self> = Other * <self>
- param Other
- type Other
Geom_Transformation
- rtype
None
-
ScaleFactor
()¶ - Returns the scale value of the transformation.
- rtype
float
-
SetMirror
()¶ - Makes the transformation into a symmetrical transformation with respect to a point P. P is the center of the symmetry.
- param thePnt
- type thePnt
gp_Pnt
- rtype
None* Makes the transformation into a symmetrical transformation with respect to an axis A1. A1 is the center of the axial symmetry.
- param theA1
- type theA1
gp_Ax1
- rtype
None* Makes the transformation into a symmetrical transformation with respect to a plane. The plane of the symmetry is defined with the axis placement A2. It is the plane (Location, XDirection, YDirection).
- param theA2
- type theA2
gp_Ax2
- rtype
None
-
SetRotation
()¶ - Makes the transformation into a rotation. A1 is the axis rotation and Ang is the angular value of the rotation in radians.
- param theA1
- type theA1
gp_Ax1
- param theAng
- type theAng
float
- rtype
None
-
SetScale
()¶ - Makes the transformation into a scale. P is the center of the scale and S is the scaling value.
- param thePnt
- type thePnt
gp_Pnt
- param theScale
- type theScale
float
- rtype
None
-
SetTransformation
()¶ - Makes a transformation allowing passage from the coordinate system ‘FromSystem1’ to the coordinate system ‘ToSystem2’. ExampleIn a C++ implementationReal x1, y1, z1; // are the coordinates of a point in the // local system FromSystem1 Real x2, y2, z2; // are the coordinates of a point in the // local system ToSystem2 gp_Pnt P1 (x1, y1, z1) Geom_Transformation T; T.SetTransformation (FromSystem1, ToSystem2); gp_Pnt P2 = P1.Transformed (T); P2.Coord (x2, y2, z2);
- param theFromSystem1
- type theFromSystem1
gp_Ax3
- param theToSystem2
- type theToSystem2
gp_Ax3
- rtype
None* Makes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) } to the local coordinate system defined with the Ax2 ToSystem. Same utilisation as the previous method. FromSystem1 is defaulted to the absolute coordinate system.
- param theToSystem
- type theToSystem
gp_Ax3
- rtype
None
-
SetTranslation
()¶ - Makes the transformation into a translation. V is the vector of the translation.
- param theVec
- type theVec
gp_Vec
- rtype
None* Makes the transformation into a translation from the point P1 to the point P2.
- param P1
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- rtype
None
-
SetTrsf
()¶ - Converts the gp_Trsf transformation T into this transformation.
- param theTrsf
- type theTrsf
gp_Trsf
- rtype
None
-
Transforms
()¶ - Applies the transformation <self> to the triplet {X, Y, Z}.
- param theX
- type theX
float
- param theY
- type theY
float
- param theZ
- type theZ
float
- rtype
None
-
Trsf
()¶ - Returns a non transient copy of <self>.
- rtype
gp_Trsf
-
Value
()¶ - Returns the coefficients of the global matrix of transformation. It is a 3 rows X 4 columns matrix. //! Raised if Row < 1 or Row > 3 or Col < 1 or Col > 4
- param theRow
- type theRow
int
- param theCol
- type theCol
int
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Geom_TrimmedCurve
(*args)¶ Bases:
OCC.Core.Geom.Geom_BoundedCurve
- Constructs a trimmed curve from the basis curve C which is limited between parameter values U1 and U2. Note: - U1 can be greater or less than U2; in both cases, the returned curve is oriented from U1 to U2. - If the basis curve C is periodic, there is an ambiguity because two parts are available. In this case, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. - If the curve is closed but not periodic, it is not possible to keep the part of the curve which includes the junction point (except if the junction point is at the beginning or at the end of the trimmed curve). If you tried to do this, you could alter the fundamental characteristics of the basis curve, which are used, for example, to compute the derivatives of the trimmed curve. The rules for a closed curve are therefore the same as those for an open curve. Warning: The trimmed curve is built from a copy of curve C. Therefore, when C is modified, the trimmed curve is not modified. - If the basis curve is periodic and theAdjustPeriodic is True, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. When theAdjustPeriodic is False, parameters U1 and U2 will be the same, without adjustment into the first period. Exceptions Standard_ConstructionError if: - C is not periodic and U1 or U2 is outside the bounds of C, or - U1 is equal to U2.
- param C
- type C
Geom_Curve
- param U1
- type U1
float
- param U2
- type U2
float
- param Sense
default value is Standard_True
- type Sense
bool
- param theAdjustPeriodic
default value is Standard_True
- type theAdjustPeriodic
bool
- rtype
None
-
BasisCurve
()¶ - Returns the basis curve. Warning This function does not return a constant reference. Consequently, any modification of the returned value directly modifies the trimmed curve.
- rtype
opencascade::handle<Geom_Curve>
-
static
DownCast
(t)¶
-
SetTrim
()¶ - Changes this trimmed curve, by redefining the parameter values U1 and U2 which limit its basis curve. Note: If the basis curve is periodic, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. Warning If the basis curve is periodic and theAdjustPeriodic is True, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. When theAdjustPeriodic is False, parameters U1 and U2 will be the same, without adjustment into the first period. Exceptions Standard_ConstructionError if: - the basis curve is not periodic, and either U1 or U2 are outside the bounds of the basis curve, or - U1 is equal to U2.
- param U1
- type U1
float
- param U2
- type U2
float
- param Sense
default value is Standard_True
- type Sense
bool
- param theAdjustPeriodic
default value is Standard_True
- type theAdjustPeriodic
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Geom_Vector
(*args, **kwargs)¶ Bases:
OCC.Core.Geom.Geom_Geometry
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Angle
()¶ - Computes the angular value, in radians, between this vector and vector Other. The result is a value between 0 and Pi. Exceptions gp_VectorWithNullMagnitude if: - the magnitude of this vector is less than or equal to gp::Resolution(), or - the magnitude of vector Other is less than or equal to gp::Resolution().
- param Other
- type Other
Geom_Vector
- rtype
float
-
AngleWithRef
()¶ - Computes the angular value, in radians, between this vector and vector Other. The result is a value between -Pi and Pi. The vector VRef defines the positive sense of rotation: the angular value is positive if the cross product this ^ Other has the same orientation as VRef (in relation to the plane defined by this vector and vector Other). Otherwise, it is negative. Exceptions Standard_DomainError if this vector, vector Other and vector VRef are coplanar, except if this vector and vector Other are parallel. gp_VectorWithNullMagnitude if the magnitude of this vector, vector Other or vector VRef is less than or equal to gp::Resolution().
- param Other
- type Other
Geom_Vector
- param VRef
- type VRef
Geom_Vector
- rtype
float
-
Coord
()¶ - Returns the coordinates X, Y and Z of this vector.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
Cross
()¶ - Computes the cross product between <self> and <Other>. //! Raised if <self> is a ‘Direction’ and if <self> and <Other> are parallel because it is not possible to build a ‘Direction’ with null length.
- param Other
- type Other
Geom_Vector
- rtype
void
-
CrossCross
()¶ - Computes the triple vector product <self> ^(V1 ^ V2). //! Raised if <self> is a ‘Direction’ and if V1 and V2 are parallel or <self> and (V1 ^ V2) are parallel
- param V1
- type V1
Geom_Vector
- param V2
- type V2
Geom_Vector
- rtype
void
-
CrossCrossed
()¶ - Computes the triple vector product <self> ^(V1 ^ V2). //! Raised if <self> is a direction and if V1 and V2 are parallel or <self> and (V1 ^ V2) are parallel
- param V1
- type V1
Geom_Vector
- param V2
- type V2
Geom_Vector
- rtype
opencascade::handle<Geom_Vector>
-
Crossed
()¶ - Computes the cross product between <self> and <Other>. A new direction is returned. //! Raised if <self> is a ‘Direction’ and if the two vectors are parallel because it is not possible to create a ‘Direction’ with null length.
- param Other
- type Other
Geom_Vector
- rtype
opencascade::handle<Geom_Vector>
-
Dot
()¶ - Computes the scalar product of this vector and vector Other.
- param Other
- type Other
Geom_Vector
- rtype
float
-
DotCross
()¶ - Computes the triple scalar product. Returns me . (V1 ^ V2)
- param V1
- type V1
Geom_Vector
- param V2
- type V2
Geom_Vector
- rtype
float
-
static
DownCast
(t)¶
-
Magnitude
()¶ - Returns the Magnitude of <self>.
- rtype
float
-
Reverse
()¶ - Reverses the vector <self>.
- rtype
None
-
Reversed
()¶ - Returns a copy of <self> reversed.
- rtype
opencascade::handle<Geom_Vector>
-
SquareMagnitude
()¶ - Returns the square magnitude of <self>.
- rtype
float
-
Vec
()¶ - Converts this vector into a gp_Vec vector.
- rtype
gp_Vec
-
X
()¶ - Returns the X coordinate of <self>.
- rtype
float
-
Y
()¶ - Returns the Y coordinate of <self>.
- rtype
float
-
Z
()¶ - Returns the Z coordinate of <self>.
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Geom_VectorWithMagnitude
(*args)¶ Bases:
OCC.Core.Geom.Geom_Vector
- Creates a transient copy of V.
- param V
- type V
gp_Vec
- rtype
None* Creates a vector with three cartesian coordinates.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None* Creates a vector from the point P1 to the point P2. The magnitude of the vector is the distance between P1 and P2
- param P1
- type P1
gp_Pnt
- param P2
- type P2
gp_Pnt
- rtype
None
-
Add
()¶ - Adds the Vector Other to <self>.
- param Other
- type Other
Geom_Vector
- rtype
None
-
Added
()¶ - Adds the vector Other to <self>.
- param Other
- type Other
Geom_Vector
- rtype
opencascade::handle<Geom_VectorWithMagnitude>
-
Divide
()¶ - Divides <self> by a scalar.
- param Scalar
- type Scalar
float
- rtype
None
-
Divided
()¶ - Divides <self> by a scalar. A new vector is returned.
- param Scalar
- type Scalar
float
- rtype
opencascade::handle<Geom_VectorWithMagnitude>
-
static
DownCast
(t)¶
-
Multiplied
()¶ - Computes the product of the vector <self> by a scalar. A new vector is returned.
- param Scalar
- type Scalar
float
- rtype
opencascade::handle<Geom_VectorWithMagnitude>
-
Multiply
()¶ - Computes the product of the vector <self> by a scalar.
- param Scalar
- type Scalar
float
- rtype
None
-
Normalize
()¶ - Normalizes <self>. //! Raised if the magnitude of the vector is lower or equal to Resolution from package gp.
- rtype
None
-
Normalized
()¶ - Returns a copy of <self> Normalized. //! Raised if the magnitude of the vector is lower or equal to Resolution from package gp.
- rtype
opencascade::handle<Geom_VectorWithMagnitude>
-
SetCoord
()¶ - Assigns the values X, Y and Z to the coordinates of this vector.
- param X
- type X
float
- param Y
- type Y
float
- param Z
- type Z
float
- rtype
None
-
SetVec
()¶ - Converts the gp_Vec vector V into this vector.
- param V
- type V
gp_Vec
- rtype
None
-
SetX
()¶ - Changes the X coordinate of <self>.
- param X
- type X
float
- rtype
None
-
SetY
()¶ - Changes the Y coordinate of <self>
- param Y
- type Y
float
- rtype
None
-
SetZ
()¶ - Changes the Z coordinate of <self>.
- param Z
- type Z
float
- rtype
None
-
Subtract
()¶ - Subtracts the Vector Other to <self>.
- param Other
- type Other
Geom_Vector
- rtype
None
-
Subtracted
()¶ - Subtracts the vector Other to <self>. A new vector is returned.
- param Other
- type Other
Geom_Vector
- rtype
opencascade::handle<Geom_VectorWithMagnitude>
-
property
thisown
¶ The membership flag