Coedge
From DocR21
A coedge represents the use of an edge by a face or a wire. If the same face is on both sides of an edge, the edge is used twice by the face so the edge has two coedges that refer to the face. If a face is on only one side of a face, the edge is used once by the face and it has only one coedge that refers to the face. If an edge lies on more than one face, it has a coedge for each use by each face. Each edge in a wire is used only once by the wire, so each edge has only one coedge.
Each coedge that lies on a face is owned by a loop of that face. The coedges in a loop form a circuit, with the head of each coedge attached to the tail of the next coedge. Coedges in a loop form a doubly-linked list with each coedge pointing to its next and its previous coedges in the loop. Coedges are oriented such that the material of the face is always on the left side of the coedge, as viewed from an outward pointing face normal. The two figures below illustrates the orientation of coedges on a face. In Figure. Coedges on a Face with a Spur Edge, the spur edge has two coedges in the same loop. In Figure. Coedges on a Closed Face, the prop edge has two coedges in the same loop. These two examples demonstrate that an edge can be used twice by a face and if it is, its coedges are always in the same loop.
The direction of each coedge is specified with respect to its underlying edge. Each coedge contains a record of its sense relative to its edge. The direction of a coedge can be either the same or the opposite direction as its edge. The figure below depicts the edges (black) and coedges (navy blue) of a wire. Generally speaking, each edge of a wire will have one coedge. (The exception to this is an intersection graph.) Observe that the direction of the edges are not necessarily consistent. Moreover, the directions of the coedges may differ from the edges. The directions of the edges and coedges in a wire depend on the algorithms that created them and any algorithms that may have modified them since they were created. The coedges of a wire can be traversed by traversing the next and previous pointers of the coedges. If a wire is branched at a vertex, the next and previous pointers will form a circular list about the vertex.
Figure. Loops of Coedges on Three Faces of a Block depicts an orthographic view of a solid block. Each face is bounded by a single loop of coedges. Each edge has two coedges, one for each face that is adjacent to the edge. Coedges in a loop are oriented so that looking along the coedge with the outward pointing face normal upwards, the face is on the left. In Figure. Coedge Orientation with Face Normals, the directions of the face normals (red arrows) and coedges (blue arrows) for several faces of a body are shown to illustrate this orientation.
In a manifold solid body (such as the two bodies depicted above), each edge is adjacent to exactly two faces; therefore, each edge has two coedges, each associated with a loop in one of the faces (the two faces can be the same, and the loops can be the same). In the case of a manifold solid, the two coedges always go in opposite directions along an edge. In a non-manifold body, there may be more than two coedges associated with an edge. In this case, the coedges are ordered counterclockwise about the edge. The coedges associated with any given edge are connected using their partner pointers in a circularly-linked list. (Refer to Coedge Ordering for more information.)
In a sheet body, there may be edges that have only one coedge. These are knows as free edges and they mark the boundary of the sheet. If a free edge exists on a single-sided face, the inside and outside of the associated shell are not well-defined near the free edge and the shell is open or incompletely bounded. (Refer to Open Shell or Incomplete Shell for more information.)
A coedge may have a geometric entity associated with it. The geometry of a coedge is a pcurve. A pcurve represents the image of the edge's curve mapped into the parameter space of the surface underlying the face. The only coedges that are required to have pcurves are coedges that lie on spline surfaces and tolerant coedges. A pcurve never exists on the coedge of a wire edge. Pcurves on other coedges are optional.
Implementation
The concept of a coedge is implemented in the ACIS COEDGE class. The COEDGE class is derived from the ENTITY class; therefore, COEDGEs are part of the persistent model and inherit all of the Model Management capabilities of the ENTITY class. In addition, the COEDGE class has methods (member functions) to obtain the topological ENTITYs above and below it in the topological hierarchy, as well as any partner, geometry, and sense information. A COEDGE is owned by either a LOOP or a WIRE. A COEDGE owns an EDGE. Below is a list of the most frequently used COEDGE methods.
COEDGE::owner() Returns a pointer to the topological entity immediately above the COEDGE. COEDGE::loop() If the owner of the COEDGE is a LOOP, it returns a pointer to the LOOP. Otherwise, it returns NULL. COEDGE::wire() If the owner of the COEDGE is a WIRE, it returns a pointer to the WIRE. Otherwise, it returns NULL. COEDGE::edge() Returns a pointer to the EDGE underlying the COEDGE. COEDGE::next() Returns a pointer to the next COEDGE in the LOOP or the WIRE. COEDGE::previous() Returns a pointer to the previous COEDGE in the LOOP or the WIRE. COEDGE::partner() Returns a pointer to the partner COEDGE. If the underlying EDGE is a free edge or a wire edge, it returns NULL. COEDGE::geometry() Returns a pointer to the underlying PCURVE, if there is one; otherwise, it returns NULL. COEDGE::sense() Returns FORWARD if the COEDGE is the same direction as the underlying EDGE. Returns REVERSED if the COEDGE is the opposite direction as the underlying EDGE.
For information on the interface for calculating, resetting, and evaluating the PCURVEs underlying COEDGEs, refer to Parameter Space Curve.
ACIS has no functions to obtain the bounding box of a COEDGE. (COEDGEes do not have bounding boxes.)
FAQs
For related information on coedges, refer to FAQs on COEDGE.
