Hide menu
Loading...
Searching...
No Matches
manufacturingtoolkit.CadExMTK.Geom_Surface Class Reference

Surface Surface.hxx cadex/Geom/Surface.hxx. More...

Inheritance diagram for manufacturingtoolkit.CadExMTK.Geom_Surface:
manufacturingtoolkit.CadExMTK.Geom_Geometry manufacturingtoolkit.CadExMTK.BaseObject manufacturingtoolkit.CadExMTK.Geom_BSplineSurface manufacturingtoolkit.CadExMTK.Geom_BezierSurface manufacturingtoolkit.CadExMTK.Geom_ElementarySurface manufacturingtoolkit.CadExMTK.Geom_OffsetSurface manufacturingtoolkit.CadExMTK.Geom_SweptSurface manufacturingtoolkit.CadExMTK.Geom_ConicalSurface manufacturingtoolkit.CadExMTK.Geom_CylindricalSurface manufacturingtoolkit.CadExMTK.Geom_Plane manufacturingtoolkit.CadExMTK.Geom_SphericalSurface manufacturingtoolkit.CadExMTK.Geom_ToroidalSurface manufacturingtoolkit.CadExMTK.Geom_SurfaceOfLinearExtrusion manufacturingtoolkit.CadExMTK.Geom_SurfaceOfRevolution

Public Member Functions

 __init__ (self, *args, **kwargs)
 
 Type (self)
 Returns a surface type.
 
 Continuity (self)
 Returns a continuity type of the surface.
 
 Value (self, theParameterU, theParameterV)
 Evaluates a point on the surface.
 
 Normal (self, theParameterU, theParameterV)
 
 IsUPeriodic (self)
 Returns true if the surface is periodic in U direction.
 
 IsVPeriodic (self)
 Returns true if the surface is periodic in V direction.
 
 UMin (self)
 Returns a minimum parameter of a definition domain in U direction.
 
 UMax (self)
 Returns a maximum parameter of a definition domain in U direction.
 
 VMin (self)
 Returns a minimum parameter of a definition domain in V direction.
 
 VMax (self)
 Returns a maximum parameter of a definition domain in V direction.
 
 Domain (self)
 Returns a definition domain.
 
 IsTrimmed (self)
 Returns whether surface is trimmed or not.
 
 SetTrim (self, theUFirst, theULast, theVFirst, theVLast)
 Trims surface with [theUFirst, theULast] x [theVFirst, theVLast] section.
 
 Transform (self, theTransformation)
 Applies transformation matrix to this object.
 
 Transformed (self, theTransformation)
 Returns a copy this object after applying transformation.
 
 D0 (self, theParameterU, theParameterV, theValue)
 
 D1 (self, theParameterU, theParameterV, theValue, theD1U, theD1V)
 
 D2 (self, theParameterU, theParameterV, theValue, theD1U, theD1V, theD2U, theD2V, theD2UV)
 
 DN (self, theParameterU, theParameterV, theDerivativeOrder, theValue, theD)
 Returns true if calculation was passed succsesfully, the returned vectors gives the value of the derivative for the order of derivation theDerivativeOrder.
 
 Curvature (self, *args)
 
 Mirror (self, *args)
 
 Mirrored (self, *args)
 
 Rotate (self, theAxis, theAngle)
 
 Rotated (self, theAxis, theAngle)
 
 Translate (self, theVector)
 
 Translated (self, theVector)
 
 Scale (self, thePoint, theScale)
 
 Scaled (self, thePoint, theScale)
 
- Public Member Functions inherited from manufacturingtoolkit.CadExMTK.BaseObject
 Id (self)
 Return unique identifier of public object.
 
 IsNull (self)
 

Static Public Member Functions

 CompareType (theObject)
 
- Static Public Member Functions inherited from manufacturingtoolkit.CadExMTK.Geom_Geometry
 Cast (theBase)
 

Detailed Description

Surface Surface.hxx cadex/Geom/Surface.hxx.

Base class for geometrical surfaces.

Surfaces in 3D space are used to represent boundaries of a body (e.g. solid or sheet body). Each face must refer to a surface.

Types

Refer to Surface Types for the list of supported surface types. Type() returns a surface type as enumeration value which can be used to downcast to a respective subclass type, for instance:

Surface aSurface = ...;
if (aSurface.Type() == Geom::ShapeType::Cylinder) {
const CylindricalSurface& aCylSurf = static_cast<const CylindricalSurface&> (aSurface);
double aRadius = aCylSurf.Radius();
...
}

Parametric Definition

Surface is defined using parametric definition as \(\mathbf{S}(u,v)\) where \(\mathbf{S}\) is a 3D radius-vector \((x,y,z)\) and \((u, v)\) are parameters from a definition domain \([u_{min}, u_{max}]\times[v_{min}, v_{max}]\).

UMin(), UMax() and VMin(), VMax(), and Domain() return parametric definition range. Parametric range can be bounded (e.g. \([0, 1]\times[0, 1]\) for Bezier surface), unbounded (e.g. \((-\infty, +\infty)\times(-\infty, +\infty)\) for a plane), or semi-unbounded (e.g. \([0, 2\pi]\times(-\infty, +\infty)\) for cylindrical surface).

Evaluation

At any parameter u and v within a definition domain, the surface can be evaluated as follows:

  • Value() and D0() return a 3D point;
  • D1(), D2() and DN() return a derivative of a respective order;
  • Curvature() returns a curvature;
  • Normal() returns a normal to the surface (i.e. perpendicular to a tangential plane).

The following example demonstrates computation of a point on a sphere at parameters \(u=\frac{\pi}{4}\), \(v=\frac{\pi}{6}\):

CylindricalSurface aSphere = ...;
Point aPoint = aSphere.Value (M_PI / 4, M_PI / 6);

If the surface is periodic in U and/or V (IsUPeriodic() and/or IsVPeriodic() return true) then the surface can be evaluated at any parameter U and/or V, otherwise behavior is undefined (e.g. an exception can be thrown or a weird value can be returned).

Continuity

Continuity() returns continuity (C0, C1, C2, CN) of the surface, minimum of U- and V- continuities, where C0 indicates continuity of the surface only, C1 - of its first derivative and so on.

Transformation

The surface can be modified using the following operations:

  • translation (Translate() and Translated());
  • rotation (Rotate() and Rotated());
  • mirroring (Mirror() and Mirrored());
  • scaling (Scale() and Scaled());
  • arbitrary transformation using 3x4 matrix (Transform() and Transformed()).
Warning
As the surface data is shared via internal pointer modification of the surface may affect other users of the surface (e.g. a face referring to it). So you might want to use method returning a modified copy of the surface (such as Transformed()).
See also
Surfaces, Curve, ModelData.Face.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ CompareType()

manufacturingtoolkit.CadExMTK.Geom_Surface.CompareType ( theObject)
static

◆ DN()

manufacturingtoolkit.CadExMTK.Geom_Surface.DN ( self,
theParameterU,
theParameterV,
theDerivativeOrder,
theValue,
theD )

Returns true if calculation was passed succsesfully, the returned vectors gives the value of the derivative for the order of derivation theDerivativeOrder.

Otherwise returns false. Throws exception if the continuity of the surface is not CN.

Parameters:

  • theDerivativeOrder must belong to range [0, 3].
  • theD should have enough size to store 2 for D1(), 5 for D2() or 9 for D3() derivatives.

The documentation for this class was generated from the following file:
  • CadExMTK.py