Defines a topological face. More...
Public Member Functions | |
| Face (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| Face (cadex.Geom.Surface theSurface, bool theMakeWire) | |
| Creates a face on entire surface's definition domain: | |
| Face (cadex.Geom.Surface theSurface) | |
| Face (cadex.Geom.Surface theSurface, cadex.ModelData.Wire theWire) | |
| Creates a face from a surface and explicitly defined wire: | |
| Face (cadex.Geom.Surface theSurface, double theUMin, double theUMax, double theVMin, double theVMax) | |
| Creates a face from a surface and its parametric definition domain: | |
| void | ParametricDomain (out double theUMin, out double theUMax, out double theVMin, out double theVMax) |
| bool | Append (cadex.ModelData.Wire theWire) |
| There must be single outer wire and zero, one or more inner wires (i.e. | |
| bool | Append (cadex.Collections.WireList theWires) |
| There must be single outer wire and zero, one or more inner wires (i.e. | |
| cadex.Geom.Surface | Surface () |
| Returns underlying surface. | |
| cadex.ModelData.Wire | OuterWire () |
| Returns outer wire. | |
| cadex.ModelData.IndexedTriangleSet | Triangulation () |
| An empty object may be returned. | |
Public Member Functions inherited from cadex.ModelData.Shape | |
| Shape (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| override int | GetHashCode () |
| cadex.ModelData.ShapeType | Type () |
| Returns a shape type. For a null object returns Undefined. | |
| cadex.ModelData.ShapeOrientation | Orientation () |
| Returns orientation flag. | |
| cadex.ModelData.Shape | Reversed () |
| Returns a shape that shares the same geometry and subshape graph but has opposite orientation. | |
| cadex.ModelData.Shape | Oriented (cadex.ModelData.ShapeOrientation theOrientation) |
| Returns a shape that shares the same geometry and subshape graph and has specified orientation. | |
| bool | IsEqual (cadex.ModelData.Shape theOther) |
| Returns true if the shape shares the same geometry and subshape graph, and has equal orientation. | |
| bool | IsSame (cadex.ModelData.Shape theOther) |
| Returns true if the shape shares the same geometry and subshape graph. | |
| void | SetName (cadex.UTF16String theName) |
| Sets the name. | |
| cadex.UTF16String | Name () |
| Returns the name. | |
| void | AddAssociatedPMI (cadex.PMI.Element theElement) |
| Adds the PMI element. | |
| void | AddAssociatedPMI (cadex.Collections.PMIElementList theElements) |
| Adds the PMI elements. | |
| cadex.Collections.PMIElementList | AssociatedPMI () |
| Returns the PMI elements. | |
| override bool | Equals (System.Object o) |
Public Member Functions inherited from cadex.BaseObject | |
| BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| bool | IsNull () |
| ulong | Id () |
| Return unique identifier of public object. | |
| bool | IsEqual (cadex.BaseObject theObj) |
| override int | GetHashCode () |
| override bool | Equals (System.Object o) |
Static Public Member Functions | |
| static cadex.ModelData.Face | Cast (cadex.ModelData.Shape theShape) |
| Casts theShape to a face. | |
| static new bool | CompareType (cadex.BaseObject theObject) |
| Check the type of object. Returns true if the specified object is this class type. | |
Static Public Member Functions inherited from cadex.ModelData.Shape | |
| static bool | CompareType (cadex.BaseObject theObject) |
| Check the type of object. Returns true if the specified object is this class type. | |
| static cadex.ModelData.Shape | Cast (cadex.BaseObject theBase) |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Protected Member Functions inherited from cadex.ModelData.Shape | |
| override void | Dispose (bool disposing) |
Defines a topological face.
The following image depicts an example of a face:
Face resides on a geometrical surface (returned by Surface()) and is bounded by one or several wires. A face must always have at least one explicit outer wire even if it corresponds to a naturally bounded surface (e.g. torus or a sphere).
Orientation() defines whether face normal matches the normal of the underlying surface, or is opposite to it.
Face wires must always be closed, both in 3D and in 2D (i.e. parametric space of the underlying surface). Therefore a face lying on a periodical surface on its full period must have an explicit seam-edge (an edge corresponding to surface boundaries).
A face outer wire can be distinguished using the OuterWire() method.
Face wires must be oriented such that they define a closed portion of material. If to look in the direction opposite to a surface normal, p-curves of an outer wire (taking into account edge orientations) must be oriented counter-clockwise, and p-curve of inner wires (if present) - clockwise. This ensures that the face has a finite area.
The following image depicts an example of face with two wires and p-curves in parametric space of the face surface. P-curves of edges with forward orientation are displayed in green, p-curves of edges with reversed orientation are displayed in red:
Face with two wires |
P-curves in surface parametric space |
The following code snippet demonstrates how to iterate over face edges p-curves:
Face p-curves define a closed contour (or a set of contours in the case of face with holes) in surface parametric space. A 2D bounding box in this surface parametric space can be returned using the Measurements.ComputeBoundingBox() method (its overload accepting ModelData.Face). The following images demonstrate a face lying on a cylindrical surface and its 2D contour and bounding box:
Face on cylindrical surface |
2D bounding box |
The following example demonstrates how to retrieve this bounding box. Note aHeight below would designate a 3D length of this cylindrical face and if it occupied entire U-range of the cylindrical surface (Geom.CylindricalSurface) then it would correspond to a cylinder's height:
|
inline |
Creates a face on entire surface's definition domain:
The surface must have bounded definition domain (see ModelData.Surface.Domain()). This is the case for instance for Geom.BSplineSurface.
theMakeWire specifies whether the wire must be automatically constructed and added to the face. Constructor.
|
inline |
Creates a face from a surface and explicitly defined wire:
The wire's edge must lie on a surface (within proximity of their tolerances). Constructor.
|
inline |
Creates a face from a surface and its parametric definition domain:
Input surface |
Surface definition domain |
The parameters must be within surface's definition domain (see ModelData_Surface.Domain()) unless it is periodic. theUMax must be greater than theUMin by at least 1e-9. Constructor.
|
inline |
There must be single outer wire and zero, one or more inner wires (i.e.
holes). It is strongly recommended (although not required) that the first wire being added is an outer wire.
Returns false if one of the theWires is null and true otherwise. Adds a wires to the face.
|
inline |
There must be single outer wire and zero, one or more inner wires (i.e.
holes). It is strongly recommended (although not required) that the first wire being added is an outer wire.
Returns false if theWire is null and true otherwise. Adds a wire to the face.
|
inlinestatic |
Casts theShape to a face.
If theShape is not a face then behavior is undefined (assert will be thrown in debug mode). Cast operator.
|
inlinestatic |
Check the type of object. Returns true if the specified object is this class type.
|
inlineprotectedvirtual |
Reimplemented from cadex.BaseObject.
|
inline |
Returns outer wire.
|
inline |
Returns underlying surface.
|
inline |
An empty object may be returned.
Returns triangulation of the face.