Loop
From DocR21
A loop represents a connected portion of the boundary of a face. It consists of a chain of coedges which may be circular or open-ended. The coedges of a loop are oriented head to tail. If two coedges on the same face meet at a vertex, then the two coedges are part of the same loop.
If either end of an open-ended loop is at a finite point, then the face containing the loop is necessarily incomplete. If either end is at infinity, then the face is infinite. Although the ACIS data structure can represent incomplete or infinite faces, modeling algorithms generally do not handle such representations. (An exception to this is Boolean operations do handle unbounded, infinite planar faces; that is, planar faces with no loops.)
The following figure contains three closed loops. Each loop is the boundary of a complete, finite face. In the actual physical structure, the adjacent parallel lines are coincident. The orientation of the coedges of a loop is such that the inside of the face is to the left of the coedge. Thus, a loop of coedges separates the inside from the outside of a face.
Each loop on a face must be physically separate from all the other loops on the face. That is, loops on a face cannot touch each other. If two closed chains of coedges touch at a point, the coedges must be part of the same loop. The point at which they touch will mostly likely be a non-manifold vertex. Because each loop is distinct and a face may possess multiple loops, a face may have multiple disconnected boundaries. This provides a natural representation for faces with holes. Thus, a loop is analogous to a shell, which allows a lump to have multiple disconnected boundaries, which provides a natural representation for lumps with interior voids.
Contents |
Classification of Loops
Some applications need to classify loops as to whether they represent a hole in a face or the periphery of a face. Such a classification of a loop is not a topological evaluation; it is a geometric evaluation. This classification is relatively straight-forward for a loop on a planar face as shown in the figure below. This figure depicts a planar face with a rectangular hole. This face has two loops. The outer loop is a peripheral loop; the inner loop is a hole loop.
Classifying loops as either a peripheral loop or a hole loop works well for faces on surfaces that are open or closed in either direction, or for faces on periodic surfaces with seam edges; however, it is not adequate for faces on periodic surfaces that do not have a seam edge. This is illustrated by the spherical and cylindrical faces in the figures below. None of the loops in these figures is clearly a peripheral loop or a hole loop.
People often tend to classify loops by looking at the relative size of the loops on a face, or to mentally project the loops of a relatively flat face onto an arbitrary plane. This may be adequate for many cases, but it is not sufficient for many algorithms that depend on loop classification. Many of these algorithms operate in the parameter space of a surface where relative size and planar projection do not exist. However, the parameter space of a surface is a mapping of the surface into the (u,v) plane. By using this mapping, loops can be classified unambiguously; therefore, ACIS classifies loops by examining them in the parameter space of the surface.
Looking at peripheral and hole loops in the parameter space of a planar surface, you can observe:
- Peripheral loops form a counter-clockwise loop and have a winding number of 1 for any point on the interior of the face.
- Hole loops form a clockwise loop and have a winding number of 0 for any point on the interior of the face.
Loops that are closed in object space may be open or closed in parameter space. A loop on a face on a periodic surface that circumscribes the surface in the periodic direction is open in parameter space. In ACIS such a loop is referred to as a separation loop. If a surface is periodic in the v-direction, such a loop would divide the surface in the u-direction and is termed a u-separation loop. The two loops in Figure. A Cylindrical Face with Two Loops are u-separation loops. If a surface is periodic in the u-direction, such a loop would divide the surface in the v-direction and is termed a v-separation loop. If a surface is periodic in both the u and the v-directions, a loop could divide the surface in both the u and the v-directions and is termed a uv-separation loop. Parameter space representations of of u, v, and uv separation loops are depicted in the four figures below. The loop in the first figure of a uv-separation divides the surface in both the u and v directions. The loop in the second figure of a uv-separation spans the surface five times in the u-direction and once in the v-direction.
Each of the figures below depicts a torus with three faces. Each of the faces is bounded by two separation loops. In the first figure, each face is bounded by two u-separation loops. These three faces are periodic in the v-direction, but not in the u-direction. In the second figure, each face is bounded by two v-separation loops. These three faces are periodic in the u-direction, but not in the v-direction. In the third figure, each face is bounded by two uv-separation loops that span the surface once in the u-direction and once in the v-direction, as is depicted in Figure. Parameter Space Representation of a uv-separation Loop above. These three faces are periodic in both the u and v directions. In the fourth figure, each face is bounded by two uv-separation loops that span the surface five times in the u-direction and once in the v-direction, as is depicted in Figure. Parameter Space Representation of a uv-separation Loop above. These three faces are also periodic in both the u and v directions.
Rules About Loops
- Separation loops and peripheral loops are mutually exclusive. If a face has a peripheral loop, it will not have any separation loops. If a face has a separation loop, it will not have a peripheral loop.
- If a face has one separation loop, it will usually have two separation loops. The exception to this rule is a spherical face may be bounded by a single separation loop, because a spherical face does not need to be bounded at its poles. If a spherical face has a NULL edge (an isolated vertex) at one of its poles, this edge will constitute a u-separation loop.
- A conical face that includes its apex will have a u-separation loop at its apex. This separation loop will consist of a single NULL edge (an isolated vertex).
- A degenerate toroidal face that includes one or both of its singularities will have a u-separation loop at the singularity(ies). Each separation loop will consist of a single NULL edge (an isolated vertex).
- In general, if a surface is periodic in one direction and has a singularity in the other direction, and a face residing on the surface includes the singularity, and there are no other edges that pass through the singularity, then there will be a NULL edge (an isolated vertex) at the singularity. Moreover, there will be a separation loop that consists of a single coedge on the NULL edge. The exception to this rule is a spherical face, because a spherical face does not need to be bounded at its poles.
- For surfaces periodic in one direction: If a face has a seam edge, it will have a peripheral loop and no separation loops. If a face has a separation loop, it will not have a seam edge. For surfaces periodic in both directions: A seam edge can be a separation loop.
- A loop on a face on a periodic surface that does not have a seam edge can span the principal parameter range of the surface multiple times. That is, the face, or a loop on the face, can wrap around the surface multiple times. For example, a cylindrical face could have a helical hole in it that wraps around the face several times. The three faces in the second image Figure. Torus with uv-separation Loops are also examples of this.
- A hole loop can exist on any face.
- Faces on spherical and toroidal surfaces do not need any loops because the surfaces are bounded. Faces on other surface types must have loops to be bounded.
Below are several figures to illustrate the above rules.
Some applications restrict their topology to faces that have peripheral loops. These applications require a seam edge on each periodic face. ACIS supports such applications through the periodic_no_seam option and spline converting of analytic surfaces. Periodic faces can be split using api_split_periodic_faces. The new_periodic_splitting option controls the number and location of splits performed by api_split_periodic_faces. In addition, a closed or periodic spline face with a seam edge can be split along another isoparameter line using api_split_face to create an open face.
Implementation
The concept of a loop is implemented in the ACIS LOOP class. The LOOP class is derived from the ENTITY class; therefore, LOOPs are part of the persistent model and inherit all of the Model Management capabilities of the ENTITY class. Each instance of a LOOP contains a pointer to its parent FACE, a pointer to the next LOOP in a singly-linked list of LOOPs owned by its FACE, and a pointer to a COEDGE in a doubly-linked list of COEDGEs owned by the LOOP. In addition to the methods (member functions) inherited from the ENTITY class, the LOOP class has methods to:
- Get a pointer to its owning face LOOP::face(),
- Get a pointer to the next loop in the face LOOP::next(),
- Get a pointer to its list of coedges LOOP::start(),
as well as a wide range of other methods.
The API function to obtain the classification of a loop is api_loop_type. The Direct Interface function to obtain the classification of a loop is loop_type get_loop_type(LOOP *, ...). A loop_type is an enumeration with several possible values:
loop_periphery Closed loop bounding the "outside" of face. A face may have at most one periphery loop. loop_hole Closed loop bounding an interior "hole" in face. A face may have many hole loops. loop_u_separation Loop that crosses the "v" seam on a surface an odd number of times, separating the surface in the u direction. A face may have at most two u-separation loops. loop_v_separation Loop that crosses the "u" seam on a surface an odd number of times, separating the surface in the v direction. A face may have at most two v-separation loops. loop_uv_separation Loop that crosses both the "u" and "v" seams on a surface an odd number of times, separating the surface in both the u and v directions. A face may have at most two uv-separation loops. loop_unknown Unable to determine loop type.
api_loop_external determines if a loop is an internal loop or an external loop. Peripheral and separation loops are considered to be external loops. Hole loops are considered to be internal loops.
ACIS has multiple API functions to obtain the bounding box of a LOOP. Each has the name api_get_entity_box. The Direct Interface function to obtain the bounding box of a loop is get_loop_box(LOOP*, ...). These functions are preferred over LOOP::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.

