Face
From DocR21
A face is a connected region on a single geometric surface. Connected simply means that a path exists from any point in the interior of the face to any other point on the interior of the face without going outside the face. Multiple faces can exist on the same surface.
Contents |
Face Boundary Defined by Loops
Zero or more loops of edges constitute the boundary of a face. The following figure highlights the loop on the top face (there are six faces) of a rectangular block. Each loop separates the portion of the surface that is inside the face from the portion that is outside the face. In the case of the block, each surface is an infinite plane. A face is the portion of the plane bounded by the edges of the face. If the face has no loops, the whole of the surface on which it lies is considered to be inside the face. Faces on closed surfaces, such as spheres and tori, often do not have any bounding loops. Faces on infinite surfaces, such as planes and cones, typically do.
The inside and outside of the loops on a face must be consistent (any line in the surface that joins a point inside to one outside must cross at least one loop) and the inside must be connected (there must be a path between any two points on the interior that does not cross a loop) for the boundary of a face to be completely defined. A complete face whose inside is not bounded in space is said to be infinite. (For example, consider a semi-infinite cylindrical face with a single circular edge: the loop separates the inside from the outside, and all of the points on the interior of the face are connected.) It is normally not meaningful to ask whether an incomplete face is finite or infinite. (A planar face bounded by a series of edges that do not form a closed loop is an example of a face with an incomplete boundary.) There are severe restrictions in ACIS on the operations that can be applied to infinite or incompletely bounded faces. For instance, Boolean operations will generally not succeed if it encounters a face bounded by an open loop. Boolean operations may, however, work with some infinite faces. For example, a planar face with no loops may be used to subdivide a solid body. Local Operations with such faces generally will not succeed.
Face Sidedness, Sense, and Containment
ACIS defines three types of faces:
- Faces that bound a solid region. That is, they separate the "inside" from the "outside" of the solid. One side of the face points to the "inside" of the solid region and the other side points to the "outside" of the solid region.
- Faces that are completely contained within a solid region. These faces are sometimes referred to as embedded faces or internal faces. Both sides of these faces are "inside" of a solid region.
- Faces that exist outside of a solid region. These faces are often referred to as sheet faces or external faces. Both sides of these faces are "outside" of a solid region.
These face types are categorized by their sidedness, sense, and containment.
A face's sidedness indicates whether it is single-sided or double-sided. A single-sided face has material (a solid region) on one side (the "inside"), and is void on the other (the "outside"). A single-sided face either completely or partially bounds a solid region, and the face divides the inside from the outside. (A single-sided face is always part of a solid body, not a sheet body.) A double-sided face means that the points on either side are either all inside or all outside. If they are all outside, the face is considered to represent an idealized, infinitely thin sheet (a 2D region). If they are all inside, the face is an internal partition embedded in a solid.
The normal to a face at any position can be either the same direction as the normal of the underlying surface, or it can be in the opposite direction of the surface normal. If it is the same as the surface normal, the face's sense relative to the surface is forward; otherwise, its sense is reversed. A single-sided face's normal always points away from the solid region (the material), regardless of the face's sense. (In other words, the face's sense must be set such that the normals to the face point away from the solid region.) The following figure shows a solid body bounded by single-sided faces and the direction of a couple of face normals; each face normal points away from the material. (A double-sided face also has a sense and a normal direction, but its normal direction does not point away from a solid region.)
A double-sided face's containment indicates whether the face is embedded within a solid region or within a void region. If a double-sided face is embedded in a solid region, its containment is both-inside. If it exists in a void region, its containment is both-outside. Containment is not applicable to single-sided faces, because they bound solid regions.
Unlike representations that use a lamina (two back-to-back faces) to represent sheets, internal and external sheet faces are stored as a single face in ACIS. Faces that make up internal and external sheet regions are distinguished from faces that form the external boundary of a solid region by the face's sidedness, sense, and containment. Every ACIS face meets one of the three following combinations of sidedness, sense, and containment:
- Single-sided, either sense - The face bounds a solid region (either completely or partially), so there is material on one side of the face and the other side is void. The "inside" of the face is solid and the outside of the face is void. The face normal points away from the material.
- Double-sided, both-inside - The face is embedded in a solid. Both sides of the face are solid (there is material on both sides).
- Double-sided, both-outside - The face is a 2D region. Both sides of the face are void.
The following figure shows an ACIS model that contains three types of faces as defined by their combinations of sidedness, sense, and containment:
- Face 1 is a spherical face that bounds a solid ball region; it is single-sided. The face normal points away from the sphere. The surface normal in this case also points away from the sphere, so the sense of the face is forward.
- Face 2 is embedded in a solid sphere; it is double-sided, both-inside.
- Face 3 is a 2D dangling flap; it is double-sided, both-outside.
Implementation
The concept of a face is implemented in the ACIS FACE class. The FACE class is derived from the ENTITY class; therefore, FACEs are part of the persistent model and inherit all of the Model Management capabilities of the ENTITY class. In addition, the FACE class has methods (member functions) to determine a face's sidedness, sense, and containment:
- FACE::sides() - Returns an indicator of the number of sides in the face, either SINGLE_SIDED or DOUBLE_SIDED.
- FACE::sense() - Returns an indicator of the face's sense relative to the underlying surface normal, either FORWARD or REVERSED.
- FACE::cont() - Returns an indicator of a double-sided face's containment, either BOTH_OUTSIDE or BOTH_INSIDE. This does not apply to single-sided faces.
In addition to these methods, the FACE class has methods:
- to get a pointer to its underlying SURFACE, FACE::geometry(),
- to get a pointer to the first LOOP in its list of LOOPs, FACE::loop(),
- to get a pointer to its owning SHELL, FACE::shell(),
- to get a pointer to the next FACE in the SHELL, FACE::next(),
as well as wide range of other methods. In addition to methods of the FACE class, there are several global functions that are very useful. For instance:
- There are multiple API functions to obtain the bounding box of a FACE. Each has the name api_get_entity_box. The Direct Interface function to obtain the bounding box of a FACE is get_face_box. These functions are preferred over FACE::bound because the bound member function will return a NULL box if it has not been calculated. The global functions will calculate the box if it has not been calculated.
- The Direct Interface function to obtain the parameter space bounding box of a FACE is sg_get_face_par_box. There is no corresponding API function.
- The Direct Interface function to obtain the normal to a FACE at a point on the FACE is sg_get_face_normal. There is no corresponding API function.
- There are multiple API functions to determine if a position that is on the SURFACE of a FACE is within the boundaries of the FACE . Each has the name api_point_in_face. The Direct Interface function to make the same determination is sg_point_in_face.
- The API function to calculate the intersections between a ray and a FACE is api_raytest_ents. The Direct Interface function to calculate the intersections between a ray and a FACE is raytest_face.
- There are two API functions to calculate the the point on a FACE closest to a given point: api_entity_point_distance and api_find_cls_ptto_face. api_entity_point_distance is more efficient for most cases, especially when processing multiple points. Refer to Entity-Point Distance for information on distance calculations between a FACE and multiple points.
- The most efficient means to calculate the minimum distance between two FACEs is using api_entity_entity_distance. For more information on determining the spatial relationships between FACEs refer to Object Relationships.
- ACIS has many API functions to create and/or modify FACEs and their underlying SURFACEs. Some of these are described in Surfacing.
- The SURFACE class and its underlying surface class also provide many methods that may be very useful when evaluating or manipulating FACEs.
Single-Sided Faces versus Double-Sided Faces
A body that consists entirely of single-sided faces, but is not closed, is an incompletely defined solid body; it is not a sheet body. A sheet body is an infinitely thin body, consisting entirely of double-sided faces. ACIS considers an open body consisting of single-sided faces to be a incompletely defined solid. It is incompletely defined because the containment of points relative to the body is not defined everywhere. In contrast, a sheet body does not bound a solid region, but the containment of points relative to the body is defined everywhere. All single-sided faces bounding a solid region must be oriented consistently, with their face normals pointing away from the solid region. The orientation of double-sided faces generally is not important. The containment of double-sided faces is important: the containment of double-sided faces that exist inside a solid region must be BOTH_INSIDE and the containment of double-sided faces that exist outside a solid region must be BOTH_OUTSIDE. A double-sided face cannot be both inside and outside a solid region.
When ACIS makes a body from an open face using a function such as api_mk_by_faces, the body is an open solid, not a sheet body. Because the body is an open solid, subsequent solid modeling operations, such as Booleans, may or may not be well-defined, depending on how the open body is being used. For example, an open single-sided face is depicted in Figure. Single-sided Face and Its Normal Direction. If a solid body were constructed from this face and this single-sided face body were positioned relative to a solid cylinder as shown in Figure. Invalid Positioning for a Boolean Operation, it would be impossible to perform a Boolean operation between these two objects, because the face does not cleanly divide the solid cylinder into two regions, one "inside" the single-sided face body and one "outside" the single-sided face body. If the single-sided face body were positioned relative to a solid cylinder as shown in Figure. Valid Positioning for a Boolean Operation, it would be possible to perform a Boolean operation between these two objects, because the face does cleanly divide the solid cylinder into two regions, one "inside" the single-sided face body and one "outside" the single-sided face body. If you were to intersect the single-sided face body with the cylinder, the result would be the portion of the cylinder that is inside the single-sided face body (the portion of the cylinder that is below the single-sided face). If you were to subtract the single-sided face body from the cylinder, the result would be the portion of the cylinder that is outside the single-sided face body (the portion of the cylinder that is above the single-sided face). Alternatively, if the single-sided face were a double-sided face, it would be possible to perform Boolean operations between the sheet body and the cylindrical body using the configuration in either figure. In fact, the result of a unite of the sheet body with the cylindrical body would create a single body that looks exactly as shown in the two figures.
To summarize: a single-sided face always bounds a solid region, even if the region is not closed; a double-sided face always represents an infinitely thin solid or void region.
FAQs
For related information on FACEs, refer to FAQs on FACE.
