Defines a topological face. More...
Public Member Functions | |
| Face (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| Face (cadex.Geom.Surface theSurface, bool theMakeWire) | |
| Face (cadex.Geom.Surface theSurface) | |
| Face (cadex.Geom.Surface theSurface, cadex.ModelData.Wire theWire) | |
| Constructor. | |
| Face (cadex.Geom.Surface theSurface, double theUMin, double theUMax, double theVMin, double theVMax) | |
| Constructor. | |
| void | ParametricDomain (out double theUMin, out double theUMax, out double theVMin, out double theVMax) |
| bool | Append (cadex.ModelData.Wire theWire) |
| Adds a wire to the face. | |
| bool | Append (cadex.Collections.WireList theWires) |
| Adds a wires to the face. | |
| cadex.Geom.Surface | Surface () |
| Returns underlying surface. | |
| cadex.ModelData.Wire | OuterWire () |
| Returns outer wire. | |
| cadex.ModelData.IndexedTriangleSet | Triangulation () |
| Returns triangulation of the face. | |
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) |
| Cast operator. | |
| 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 |
Constructor.
Creates a face from a surface and explicitly defined wire:
The wire's edge must lie on a surface (within proximity of their tolerances).
|
inline |
Constructor.
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.
|
inline |
Adds a wires to the face.
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.
|
inline |
Adds a wire to the face.
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.
|
inlinestatic |
Cast operator.
Casts theShape to a face. If theShape is not a face then behavior is undefined (assert will be thrown in debug mode).
|
inlineprotectedvirtual |
Reimplemented from cadex.BaseObject.
|
inline |
Returns triangulation of the face.
An empty object may be returned.