OCC.ElSLib module¶
- Purpose : Provides functions for basic geometric computation onelementary surfaces.This includes:- calculation of a point or derived vector on a surfacewhere the surface is provided by the gp package, ordefined in canonical form (as in the gp package), andthe point is defined with a parameter,- evaluation of the parameters corresponding to apoint on an elementary surface from gp,- calculation of isoparametric curves on an elementarysurface defined in canonical form (as in the gp package).Notes:- ElSLib stands for Elementary Surfaces Library.- If the surfaces provided by the gp package are notexplicitly parameterized, they still have an implicitparameterization, similar to that which they infer onthe equivalent Geom surfaces.Note: ElSLib stands for Elementary Surfaces Library.
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
class
elslib
¶ Bases:
object
-
static
ConeD0
()¶ Parameters: Return type: void
-
static
ConeD1
()¶ Parameters: Return type: void
-
static
ConeD2
()¶ Parameters: Return type: void
-
static
ConeD3
()¶ Parameters: Return type: void
-
static
ConeDN
()¶ Parameters: Return type:
-
static
ConeParameters
()¶ - parametrization P (U, V) = Location + V * ZDirection + (Radius + V * Tan (SemiAngle)) * (Cos(U) * XDirection + Sin(U) * YDirection)
Parameters: Return type: void
-
static
ConeUIso
()¶ - compute the U Isoparametric gp_Lin of the cone.
Parameters: Return type:
-
static
ConeVIso
()¶ - compute the V Isoparametric gp_Circ of the cone.
Parameters: Return type:
-
static
ConeValue
()¶ Parameters: Return type:
-
static
CylinderD0
()¶ Parameters: Return type: void
-
static
CylinderD1
()¶ Parameters: Return type: void
-
static
CylinderD2
()¶ Parameters: Return type: void
-
static
CylinderD3
()¶ Parameters: Return type: void
-
static
CylinderDN
()¶ Parameters: Return type:
-
static
CylinderParameters
()¶ - parametrization P (U, V) = Location + V * ZDirection + Radius * (Cos(U) * XDirection + Sin (U) * YDirection)
Parameters: Return type: void
-
static
CylinderUIso
()¶ - compute the U Isoparametric gp_Lin of the cylinder.
Parameters: Return type:
-
static
CylinderVIso
()¶ - compute the V Isoparametric gp_Circ of the cylinder.
Parameters: Return type:
-
static
CylinderValue
()¶ Parameters: Return type:
-
static
D0
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the point P of parameters (U, V).inline
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
static
D1
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes: - the point P of parameters (U, V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively.
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
static
D2
()¶ - For elementary surfaces from the gp package (cones, cylinders, spheres and tori), computes: - the point P of parameters (U, V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively, and - the second derivative vectors Vuu, Vvv and Vuv at this point.
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
-
static
D3
()¶ - For elementary surfaces from the gp package (cones, cylinders, spheres and tori), computes: - the point P of parameters (U,V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively, and - the second derivative vectors Vuu, Vvv and Vuv at this point, and - the third derivative vectors Vuuu, Vvvv, Vuuv and Vuvv at this point.
Parameters: - U (float) –
- V (float) –
- C (gp_Cylinder) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
- Vuuu (gp_Vec) –
- Vvvv (gp_Vec) –
- Vuuv (gp_Vec) –
- Vuvv (gp_Vec) –
- U –
- V –
- C –
- P –
- Vu –
- Vv –
- Vuu –
- Vvv –
- Vuv –
- Vuuu –
- Vvvv –
- Vuuv –
- Vuvv –
- U –
- V –
- S (gp_Sphere) –
- P –
- Vu –
- Vv –
- Vuu –
- Vvv –
- Vuv –
- Vuuu –
- Vvvv –
- Vuuv –
- Vuvv –
Return type: void
Return type: void
Return type: void
- Surface evaluation The following functions compute the point and the derivatives on elementary surfaces defined with their geometric characterisitics. You don’t need to create the surface to use these functions. These functions are called by the previous ones. Example : A cylinder is defined with its position and its radius.
Parameters: Return type: void
-
static
DN
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the derivative vector of order Nu and Nv in the u and v parametric directions respectively, at the point of parameters (U, V).
Parameters: Return type: Return type: Return type: Return type: Return type:
-
static
Parameters
()¶ - parametrization P (U, V) = Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection()
Parameters: Return type: void
- parametrization P (U, V) = Location + V * ZDirection + Radius * (Cos(U) * XDirection + Sin (U) * YDirection)
Parameters: - C (gp_Cylinder) –
- P (gp_Pnt) –
- U (float &) –
- V (float &) –
Return type: void
- parametrization P (U, V) = Location + V * ZDirection + (Radius + V * Tan (SemiAngle)) * (Cos(U) * XDirection + Sin(U) * YDirection)
Parameters: Return type: void
- parametrization P (U, V) = Location + Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + Radius * Sin (V) * ZDirection
Parameters: Return type: void
- parametrization P (U, V) = Location + (MajorRadius + MinorRadius * Cos(U)) * (Cos(V) * XDirection - Sin(V) * YDirection) + MinorRadius * Sin(U) * ZDirection
Parameters: Return type: void
-
static
PlaneD1
()¶ Parameters: Return type: void
-
static
PlaneDN
()¶ Parameters: Return type:
-
static
PlaneParameters
()¶ - parametrization P (U, V) = Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection()
Parameters: Return type: void
-
static
PlaneUIso
()¶ - compute the U Isoparametric gp_Lin of the plane.
Parameters: Return type:
-
static
PlaneVIso
()¶ - compute the V Isoparametric gp_Lin of the plane.
Parameters: Return type:
-
static
SphereD0
()¶ Parameters: Return type: void
-
static
SphereD1
()¶ Parameters: Return type: void
-
static
SphereD2
()¶ Parameters: Return type: void
-
static
SphereD3
()¶ Parameters: Return type: void
-
static
SphereDN
()¶ Parameters: Return type:
-
static
SphereParameters
()¶ - parametrization P (U, V) = Location + Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + Radius * Sin (V) * ZDirection
Parameters: Return type: void
-
static
SphereUIso
()¶ - compute the U Isoparametric gp_Circ of the sphere, (the meridian is not trimmed).
Parameters: Return type:
-
static
SphereVIso
()¶ - compute the V Isoparametric gp_Circ of the sphere, (the meridian is not trimmed).
Parameters: Return type:
-
static
SphereValue
()¶ Parameters: Return type:
-
static
TorusD0
()¶ Parameters: Return type: void
-
static
TorusD1
()¶ Parameters: Return type: void
-
static
TorusD2
()¶ Parameters: Return type: void
-
static
TorusD3
()¶ - The following functions compute the parametric values corresponding to a given point on a elementary surface. The point should be on the surface.
Parameters: Return type: void
-
static
TorusDN
()¶ Parameters: Return type:
-
static
TorusParameters
()¶ - parametrization P (U, V) = Location + (MajorRadius + MinorRadius * Cos(U)) * (Cos(V) * XDirection - Sin(V) * YDirection) + MinorRadius * Sin(U) * ZDirection
Parameters: Return type: void
-
static
TorusUIso
()¶ - compute the U Isoparametric gp_Circ of the torus.
Parameters: Return type:
-
static
TorusVIso
()¶ - compute the V Isoparametric gp_Circ of the torus.
Parameters: Return type:
-
static
TorusValue
()¶ Parameters: Return type:
-
static
Value
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the point of parameters (U, V).
Parameters: Return type: Return type: Return type: Return type: Return type:
-
thisown
¶ The membership flag
-
static
-
elslib_ConeD0
()¶ Parameters: Return type: void
-
elslib_ConeD1
()¶ Parameters: Return type: void
-
elslib_ConeD2
()¶ Parameters: Return type: void
-
elslib_ConeD3
()¶ Parameters: Return type: void
-
elslib_ConeDN
()¶ Parameters: Return type:
-
elslib_ConeParameters
()¶ - parametrization P (U, V) = Location + V * ZDirection + (Radius + V * Tan (SemiAngle)) * (Cos(U) * XDirection + Sin(U) * YDirection)
Parameters: Return type: void
-
elslib_ConeUIso
()¶ - compute the U Isoparametric gp_Lin of the cone.
Parameters: Return type:
-
elslib_ConeVIso
()¶ - compute the V Isoparametric gp_Circ of the cone.
Parameters: Return type:
-
elslib_ConeValue
()¶ Parameters: Return type:
-
elslib_CylinderD0
()¶ Parameters: Return type: void
-
elslib_CylinderD1
()¶ Parameters: Return type: void
-
elslib_CylinderD2
()¶ Parameters: Return type: void
-
elslib_CylinderD3
()¶ Parameters: Return type: void
-
elslib_CylinderDN
()¶ Parameters: Return type:
-
elslib_CylinderParameters
()¶ - parametrization P (U, V) = Location + V * ZDirection + Radius * (Cos(U) * XDirection + Sin (U) * YDirection)
Parameters: Return type: void
-
elslib_CylinderUIso
()¶ - compute the U Isoparametric gp_Lin of the cylinder.
Parameters: Return type:
-
elslib_CylinderVIso
()¶ - compute the V Isoparametric gp_Circ of the cylinder.
Parameters: Return type:
-
elslib_CylinderValue
()¶ Parameters: Return type:
-
elslib_D0
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the point P of parameters (U, V).inline
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
elslib_D1
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes: - the point P of parameters (U, V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively.
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
Return type: void
-
elslib_D2
()¶ - For elementary surfaces from the gp package (cones, cylinders, spheres and tori), computes: - the point P of parameters (U, V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively, and - the second derivative vectors Vuu, Vvv and Vuv at this point.
Parameters: Return type: void
Return type: void
Return type: void
Return type: void
-
elslib_D3
()¶ - For elementary surfaces from the gp package (cones, cylinders, spheres and tori), computes: - the point P of parameters (U,V), and - the first derivative vectors Vu and Vv at this point in the u and v parametric directions respectively, and - the second derivative vectors Vuu, Vvv and Vuv at this point, and - the third derivative vectors Vuuu, Vvvv, Vuuv and Vuvv at this point.
Parameters: - U (float) –
- V (float) –
- C (gp_Cylinder) –
- P (gp_Pnt) –
- Vu (gp_Vec) –
- Vv (gp_Vec) –
- Vuu (gp_Vec) –
- Vvv (gp_Vec) –
- Vuv (gp_Vec) –
- Vuuu (gp_Vec) –
- Vvvv (gp_Vec) –
- Vuuv (gp_Vec) –
- Vuvv (gp_Vec) –
- U –
- V –
- C –
- P –
- Vu –
- Vv –
- Vuu –
- Vvv –
- Vuv –
- Vuuu –
- Vvvv –
- Vuuv –
- Vuvv –
- U –
- V –
- S (gp_Sphere) –
- P –
- Vu –
- Vv –
- Vuu –
- Vvv –
- Vuv –
- Vuuu –
- Vvvv –
- Vuuv –
- Vuvv –
Return type: void
Return type: void
Return type: void
- Surface evaluation The following functions compute the point and the derivatives on elementary surfaces defined with their geometric characterisitics. You don’t need to create the surface to use these functions. These functions are called by the previous ones. Example : A cylinder is defined with its position and its radius.
Parameters: Return type: void
-
elslib_DN
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the derivative vector of order Nu and Nv in the u and v parametric directions respectively, at the point of parameters (U, V).
Parameters: Return type: Return type: Return type: Return type: Return type:
-
elslib_Parameters
()¶ - parametrization P (U, V) = Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection()
Parameters: Return type: void
- parametrization P (U, V) = Location + V * ZDirection + Radius * (Cos(U) * XDirection + Sin (U) * YDirection)
Parameters: - C (gp_Cylinder) –
- P (gp_Pnt) –
- U (float &) –
- V (float &) –
Return type: void
- parametrization P (U, V) = Location + V * ZDirection + (Radius + V * Tan (SemiAngle)) * (Cos(U) * XDirection + Sin(U) * YDirection)
Parameters: Return type: void
- parametrization P (U, V) = Location + Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + Radius * Sin (V) * ZDirection
Parameters: Return type: void
- parametrization P (U, V) = Location + (MajorRadius + MinorRadius * Cos(U)) * (Cos(V) * XDirection - Sin(V) * YDirection) + MinorRadius * Sin(U) * ZDirection
Parameters: Return type: void
-
elslib_PlaneD1
()¶ Parameters: Return type: void
-
elslib_PlaneDN
()¶ Parameters: Return type:
-
elslib_PlaneParameters
()¶ - parametrization P (U, V) = Pl.Location() + U * Pl.XDirection() + V * Pl.YDirection()
Parameters: Return type: void
-
elslib_PlaneUIso
()¶ - compute the U Isoparametric gp_Lin of the plane.
Parameters: Return type:
-
elslib_PlaneVIso
()¶ - compute the V Isoparametric gp_Lin of the plane.
Parameters: Return type:
-
elslib_SphereD0
()¶ Parameters: Return type: void
-
elslib_SphereD1
()¶ Parameters: Return type: void
-
elslib_SphereD2
()¶ Parameters: Return type: void
-
elslib_SphereD3
()¶ Parameters: Return type: void
-
elslib_SphereDN
()¶ Parameters: Return type:
-
elslib_SphereParameters
()¶ - parametrization P (U, V) = Location + Radius * Cos (V) * (Cos (U) * XDirection + Sin (U) * YDirection) + Radius * Sin (V) * ZDirection
Parameters: Return type: void
-
elslib_SphereUIso
()¶ - compute the U Isoparametric gp_Circ of the sphere, (the meridian is not trimmed).
Parameters: Return type:
-
elslib_SphereVIso
()¶ - compute the V Isoparametric gp_Circ of the sphere, (the meridian is not trimmed).
Parameters: Return type:
-
elslib_SphereValue
()¶ Parameters: Return type:
-
elslib_TorusD0
()¶ Parameters: Return type: void
-
elslib_TorusD1
()¶ Parameters: Return type: void
-
elslib_TorusD2
()¶ Parameters: Return type: void
-
elslib_TorusD3
()¶ - The following functions compute the parametric values corresponding to a given point on a elementary surface. The point should be on the surface.
Parameters: Return type: void
-
elslib_TorusDN
()¶ Parameters: Return type:
-
elslib_TorusParameters
()¶ - parametrization P (U, V) = Location + (MajorRadius + MinorRadius * Cos(U)) * (Cos(V) * XDirection - Sin(V) * YDirection) + MinorRadius * Sin(U) * ZDirection
Parameters: Return type: void
-
elslib_TorusUIso
()¶ - compute the U Isoparametric gp_Circ of the torus.
Parameters: Return type:
-
elslib_TorusVIso
()¶ - compute the V Isoparametric gp_Circ of the torus.
Parameters: Return type:
-
elslib_TorusValue
()¶ Parameters: Return type:
-
elslib_Value
()¶ - For elementary surfaces from the gp package (planes, cones, cylinders, spheres and tori), computes the point of parameters (U, V).
Parameters: Return type: Return type: Return type: Return type: Return type:
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases