A Computational Framework For Boundary Representation of Solid Sweeps
A Computational Framework For Boundary Representation of Solid Sweeps
A Computational Framework For Boundary Representation of Solid Sweeps
ABSTRACT
This paper proposes a robust algorithmic and computational framework to address the problem of
modeling the volume obtained by sweeping a solid along a trajectory of rigid motions. The boundary
representation (simply brep) of the input solid naturally induces a brep of the swept volume. We show
that it is locally similar to the input brep and this serves as the basis of the framework. All the same, it
admits several intricacies: (i) geometric, in terms of parametrizations and, (ii) topological, in terms of
orientations. We provide a novel analysis for their resolution. More specifically, we prove a non-trivial
lifting theorem which allows to locally orient the output using the orientation of the input. We illustrate
the framework by providing many examples from a pilot implementation.
Keywords: Solid sweep, swept volume, solid modeling, boundary representation, parametric curves and
surfaces.
1 INTRODUCTION
This paper is about the theory and implementation of the solid sweep as a primitive solid modeling operation. A special case
of this, viz., blends is already an important operation and used extensively. Prospective uses for the sweep are in NC-
machining verification [1], [5], [8], [9], collision detection, assembly planning [1] and in packaging [7].
The solid sweep is the envelope surface of the swept volume generated by a given solid moving along a one-
parameter family of rigid motions in . We use the industry standard boundary representation (brep) format to input the
solid and to output the envelope . The brep of course is the topological data of vertices, edges and co-edges, loops
bounding the faces and orientation of these, and the underlying geometric data of the surfaces and curves. As we show, the
brep of , while intimately connected to that of , has several intricate issues of orientation and parametrization which need
resolution.
Much of the mathematics of self-intersection, of passing body-check and of overall geometry have been described in the
earlier work [4]. This paper uncovers the topological aspects of the solid sweep and its construction as a solid model. Here,
we restrict ourselves to the simple generic case, i.e., smooth and a smooth which is free from self-intersections. This
serves to illustrate our approach and its implementation. The general case is also implemented and a sample sweep appears
in Fig. 1.
Our main contributions are (i) a clear topological description of the sweep, and (ii) an architectural framework for its
construction. This, coupled with [4], which constructs the geometry/parametrizations of the surfaces, was used to build a
pilot implementation of the solid sweep using the popular ACIS solid modeling kernel [3]. We give several illustrative
2
examples produced by our implementation to demonstrate the effectiveness of the algorithm. To the best of our knowledge,
this is the first work which explicates the complete brep structure of .
The solid sweep has been extensively studied [1], [2], [5], [6], [11], mostly for the geometric aspects of the problem. In
[2] the envelope is modeled as the solution set of the rank-deficiency condition of the Jacobian of the sweep map. This
method uses symbolic computation and cannot handle general input such as splines. In [5] the authors derive a differential
equation whose solution is the envelope. An approximate envelope surface is fitted through the points sampled on the
envelope. In [6] the authors give a membership test for a point to belong inside, outside or on the boundary of the swept
volume. This does not yield a parametric definition of the envelope. In [12] the trajectory is approximated by a screw motion
in order to compute the swept volume. In [11] the evolution speed of the curve of contact is studied in order to achieve a
prescribed sampling density of points on the envelope, through which a surface is fit to obtain an approximation to the
envelope. For a more comprehensive survey of the previous work, we refer the reader to [1]. Much of the work has focused
on the mathematics of the surface. To the best of our knowledge, the exact topological structure has not been investigated in
any significant detail.
We now outline the structure of the paper. In Section 2 we give the preliminaries of the sweep problem. The solid
induces a brep structure on via the natural correspondence between the solid boundary and . The faces, edges and
vertices of give rise to corresponding faces, edges and vertices respectively, on .
In Section 3 we give the overall framework of our algorithm. We point out the issues related to the brep of the envelope
that must be handled such as the adjacency relations amongst entities of and their orientations. While the global brep
structure of may be very different from that of , the two are locally similar.
In Section 4, we perform the topological analysis of via the funnel which is a two dimensional sub-manifold of the
parameter space and serves as the basis for computing the geometric and topological data for the envelope. We present two
key theorems which enable us to lift the topological data of to that of . The first theorem shows that the correspondence
respects the adjacency relations while the second theorem characterizes the sets of points on where is orientation
preserving/reversing.
In Section 5, we elaborate all the steps of the main algorithm given in Section 3, using the key theorems in Section 4 for
proof of correctness. First we compute the 0-skeleton, i.e., the vertices of . This is followed by the computation of the 1-
skeleton, i.e., the oriented loops which will bound faces of . Finally the faces are oriented and parametrized to produce the
complete brep of .
We conclude the paper in Section 6 by giving several illustrative examples of solid sweep generated from a pilot
implementation of our algorithm using the popular ACIS solid modeling kernel [3]. We make remarks on further extensions
of this work.
Definition 2. The swept volume is the union and the envelope is defined as the boundary of the swept
volume .
An example of a swept volume appears in Fig. 1.
We will denote the interior of a set by and the boundary of by . It is clear that .
Therefore, if , then for all , . Thus, the points in the interior of do not contribute to at
all. Clearly, for each point of there must be an and a such that .
For a point , define the as the map given by and the
velocity as . For a point , let be the unit outward normal to at .
Define the function as
(Equation 2.1)
Thus, is the dot product of the velocity vector with the unit normal at the point .
Proposition 3 gives a necessary condition for a point to contribute a point on at time , namely, , and is a
rewording in our notation of the statement in [5] that the candidate set is the union of the ingress, the egress and the grazing
set of points.
Proposition 3. Let and such that . Then either (i) or (ii) and
, or (iii) and .
For a proof refer to [4].
Definition 4. For a fixed time instant , the set is referred to as the curve of
contact at and denoted by . Observe that . The union of the curves of contact is referred to as the
contact set and denoted by , i.e., . The sets and
are referred to as left end-cap and right end-cap respectively.
Fig. 2: (a) A dumbbell being swept along -axis while undergoing rotation about -axis. The curve of contact at initial time is
shown imprinted on solid in red. (b) A cone being swept along a helical path. Curves of contact at few time instants are
shown on the envelope in red.
The curves of contact are referred to as the characteristic curves in [11]. Fig. 2 shows the contact set and the curve of
contact at a few discrete time instants in red. As noted in Proposition 3, . Clearly, the left and the right
end-caps can be easily computed from the solid at the initial and the final position respectively.
In general, a point on the contact set may not appear on the complete envelope as it may get occluded by an interior
point of the solid at a different time instant. In such cases, the correct construction of the envelope requires appropriate
trimming of the contact-set. We refer the reader to [4] for a comprehensive mathematical analysis of the trimming and the
related subtle issues arising due to local/global intersections of the family . In this paper, we focus on the case of
simple sweeps.
Definition 5. A sweep is said to be simple if . Clearly, in a simple sweep, every point on
the contact-set appears on the envelope, and thus, no trimming of the contact-set is needed in order to obtain the envelope.
Lemma 6. For a simple sweep, for , . In other words, no two distinct curves of contact intersect
each other.
Proof. Suppose that for . As already noted, and . Hence,
. By the assumption about general position of , and intersect transversally. Hence
. It follows that there exists such that contradicting the fact that the sweep is
simple.
4
Henceforth, we assume that is a simple sweep. We now define the natural correspondence . Let
. We set
Observe that, thanks to Lemma 6, the in the last condition is unique and hence, the above map is well-defined.
Clearly, the map associates to a point on the envelope, the natural point on the boundary of the solid which transforms
to through the sweeping process. The map is the central object of this paper and it sets up the boundary representation of
the swept volume .
Recall that the brep of models as a collection of faces which meet each other across edges which in turn meet at
vertices. The brep structure comes equipped with parametrizations underlying the faces, edges and vertices which describe
the geometry of these entities. Furthermore, it also carries the important combinatorial/topological information such as
adjacencies/incidences across these entities, outward normals to faces, loops (sequences of co-edges) bounding the faces and
their orientations which are consistent with the outward normals.
Now we outline the point-sets of the entities in the brep of . Let be an entity of the brep of such as a face
or an edge or a vertex. We define . It turns out that, under the assumption that is smooth and
is in general position, is of the same dimension as that of . Clearly, where the union varies over all
the entities of the brep of . This natural covering of , induced from that of via the map , provides the basis for a
natural brep structure on . Sometimes, we refer to it as the envelope brep.
In the sweep example shown in Fig. 2, the map is illustrated via color coding, i.e., the points and are shown in
the same color. This highlights the induced brep structure on the swept volume.
The induced brep structure on and is exactly identical to that of restricted appropriately and henceforth
we focus our attention to only the brep structure of the contact-set . Further, by abuse of notation, henceforth by we mean
the restriction of to , that is, .
Now we describe some notation which will be used throughout this paper. Let be a face of . We denote by
the set generated by . For an edge and a vertex , the sets and are similarly
defined and said to be generated by and respectively.
Fig. 3: The face labeled on gives rise to two faces labeled and on the envelope. Curves of contact at two time
instants are shown imprinted on and .
In general, a face/edge/vertex of may generate multiple faces/edges/vertices on the envelope. Roughly speaking, our
first main theorem (cf Section 4: Theorem 11) establishes that even in the presence of these `multiplicities', the local
incidence-relationships between the entities of the envelope brep are naturally derived from the corresponding incidence-
relationships between the entities of the solid brep. Thus, while the global brep structure of the envelope may be
very different from that of the solid, there exists local similarity between the two. This crucial fact is the basis of our
5
algorithm which iterates over the entities of the solid brep and computes the generated entities of the envelope brep. Further,
before computing an entity , its boundary is computed as well as oriented. Thanks to the above theorem, is
generated by the boundary of the entity which generates .
Next we discuss some issues related to the orientation of the envelope brep. Somewhat surprisingly, the orientation of
the envelope may not match that of the solid! In other words, the correspondence may be orientation preserving as well as
reversing at different points on the envelope. In the sweep example of Fig. 4, for . The map is
orientation preserving at and reversing at , as evident from the order of colors of the adjacent faces at the vertices. The
change in orientation results due to intersections of the curves on the solid . See the sweep example of Fig. 3,
which shows two intersecting curves for imprinted on the solid. Observe that the curves of contact do
not intersect each other. In Section 4, we show that the points on the envelope where the map looses the orientation are
precisely the `swiveling' points for which is a `stationary' point on .
Fig. 4: The map is orientation preserving at and reversing at . The curve is shown in red.
Our second main theorem (cf Section 4: Theorem 12) gives a complete characterization of the sets of points where is
orientation preserving and reversing, and provides an efficient test for membership in these sets. The algorithm crucially uses
this test to consistently `lift' the orientation of faces and the bounding loops of the solid brep to that of the generated faces
and their bounding loops of the envelope brep.
Finally, the geometry of the envelope is far from obvious. For most non-trivial sweeps, there is no closed form
parametrization for the faces and edges of the envelope. We handle this via the procedural paradigm (see [4], [10], [13]) in
which the parametric definitions of faces and edges are stored as numerical procedures.
4 TOPOLOGICAL ANALYSIS OF
In this section we show that the adjacency relations between geometric entities of are preserved by the correspondence .
Further, we give a complete characterization of the set of points of where is orientation preserving/reversing
respectively. Fix a face . We define the restriction of the map to , as .
6
Definition 8. For a sweep interval and a face , define . The set will be
referred to as the funnel. The set will be referred to as the p-curve of contact and denoted by
Define .
The sets , and are illustrated schematically in Fig. 5. The funnel in this example has two components viz.,
and .
By the assumption about the general position of it follows that for all , the gradient
. As a consequence, is a smooth, orientable surface in the parameter space.
Definition 9. The sweep map from the prism to the object space is defined as
. Note that, is a smooth map.
The curve of contact at in the face is defined as . The contact set
corresponding to face is indeed . Note that and are the subsets of and respectively
corresponding to the face . It is easily verified that .
Further, observe that and by Lemma 6, is a bijection. As is smooth, is in
fact a diffeomorphism. Therefore there is a matching between the components of and those of .
Fig. 6: The face , its domain, the funnel, the contact-set and their respective orientations. The above diagram commutes.
Recall that each face of is oriented so that the unit normal points in the exterior of the solid . If is the unit
outward normal at the point , the unit outward normal to at is . Further, since
and the interior of the swept volume is , it follows that the unit outward normal to
at is given by .
It is easy to verify that the determinant of the linear transform relating to is given by
, where, . Here are the coordinates expressing in terms of
(the Jacobian being rank deficient at ), i.e., . For a simple sweep, is positive on the funnel (see
[4] for more details). Hence, points in the exterior of the swept volume and for later discussion we fix the
orientation of determined by the ordered frame . The manifolds , , and along with the
respective choice of orientations are shown in Fig. 6. Under the above choices of orientations, the map is
orientation preserving.
8
We refine Lemma 10 by characterizing the set of points of where is orientation preserving/reversing respectively.
Theorem 12. For , let . The map is orientation preserving/reversing at if is
positive/negative respectively.
Proof. Define the projection as . Note that the diagram shown in Fig. 6 commutes, i.e.,
. Since the maps and are both orientation preserving under the above choice of orientations, the map
is orientation preserving/reversing if and only if the map is orientation preserving/reversing respectively. Denote the
Jacobian of by . Expressing in terms of it is easy to see that the map is orientation
preserving/reversing if and only if is positive/negative respectively.
The following Lemma explains the geometric meaning of the set of points where the hypothesis of Theorem 12 does
not hold.
Lemma 13. Consider a point . Then iff where is the Jacobian of and
is the velocity at the point .
Proof. For clarity of notation, we will suppress as the argument and all the evaluations will be understood to be done at
throughout this proof, unless otherwise stated. Let . Note that and .
Since the diagram shown in Fig. 6 commutes, by chain rule, and hence .
As is a diffeomorphism, iff iff . Hence iff .
this purpose. This gives us a discrete set of points in which are interpolated to obtain an approximation to . Thereafter,
we use the 'procedural' parametrization (see [10], [13]) to obtain the exact edge .
Proposition 14. For a co-edge bounding a face of , let and . Further let
be the unique point with and be the orientation of . If then is the
orientation of and if then is the orientation of
Note that for a co-edge of , it is sufficient to compute at a single point on in order to orient . Further,
suppose that for some , for belong to the edges for respectively of , so that,
are sorted in ascending order. Let where is the parameter identifying . It follows by the mean value
theorem that alternates sign at each point . This is illustrated schematically in Fig. 8 where alternates
at points and . Hence, it is sufficient to compute at any one of the points in order
to orient all the edges for .
Fig. 10: (a) A face of bound by four co-edges. (b) A corresponding face (c) Prism with domains for co-edges .
The method GetNextCoedge described in Algorithm 3 takes as input a free co-edge and a free vertex and returns the co-
edge bounding adjacent to the free co-edge via the free vertex. Let be the sweep interval. The three cases are
as follows.
Case (i): If the free co-edge belongs to or , then the method GetAdjEdgToCoc returns the co-edge adjacent
to or respectively, via the free vertex. For instance, in Fig. 10, if is the free co-edge and is the free
vertex, the co-edge is returned.
Case (ii): If the free co-edge does not belong to but free vertex belongs to or (vertex in Fig.
10), the method GetCoc returns the component of or , respectively, adjacent to the free vertex ( in Fig.
10).
Case (iii): The vertex and co-edge corresponding to the free vertex and free co-edge respectively are obtained by the
method Source. Thereafter, the method AdjacentCoedge returns the co-edge of adjacent to via . Finally the method
AdjSweptEdge returns the co-edge corresponding to the co-edge adjacent to the free vertex. For instance, in Fig. 10 if the
free co-edge and free vertex are and respectively, then the co-edge adjacent to via is searched for amongst the
co-edges corresponding to co-edge , being adjacent to via in .
Algorithm 2 CreateLoop(freeCoedge)
loop
startVertex start(freeCoedge)
endVertex end(freeCoedge)
append freeEdge to loop
while startVertex freeVertex do
(nextFreeCoedge, nextFreeVertex) GetNextCoedge(freeCoedge, freeVertex)
(freeCoedge, freeVertex) (nextFreeCoedge, nextFreeVertex)
append freeCoedge to loop
end while
return loop
In the brep format, each face of is oriented so that the unit normal points in the exterior of the solid . If is the
unit outward normal at a point , the unit outward normal to at is . Further,
since and the interior of the swept volume is , it follows that the unit outward normal to
face at is given by .
This completes the details of all the steps in the main algorithm.
The implementation has been tested for over 40 solids with number of faces between 5 and 25 and with fairly complex
trajectories. Figure 11 illustrates some of the outputs. For all instances, the time taken to output the solid has ranged between
half and three minutes for a machine with 2.0 GHz quad-core processor and 2 GB RAM. A more elaborate and full
implementation, which solves for sharp and smooth solids and for local and global intersections as well is in the pipeline.
1
6 CONCLUSION
We have explicated the complete brep of the solid sweep as a primitive solid modeling operation and provided a novel
algorithmic framework for its computation. Our algorithm marches over the entities of the brep of the input solid in the order
increasing dimension, constructs corresponding entities of the output brep and simultaneously resolves the intricate issues of
incidences and orientations locally. We show several illustrative examples generated by a pilot implementation of our
algorithm to demonstrate the robustness of the method. Coupled with our earlier work ([4]), this algorithm readily extends to
`non-simple' sweeps which involve local/global self-intersections. This work can also be further extended to non-smooth
input solids.
REFERENCES
[1] Abdel-Malek K.; M.; Blackmore D.; Joy K.: Swept Volumes: Foundations, Perspectives and Applications, I nternational
Journal of Shape Modeling. 12(1), 2006, 87-127.
[2] Abdel-Malek K.; Yeh H.J.: Geometric representation of the swept volume using Jacobian rank-deficiency conditions,
Computer-Aided Design. 29(6), 1997, 457-468.
[3] ACIS 3D Modeler, SPATIAL, http://www.spatial.com/products/3d_acis_modeling
[4] Adsul B.; Machchhar J.; Sohoni M.: Local and Global Analysis of Parametric Solid Sweeps, Cornell University
Library arXiv. 2013. http://arxiv.org/abs/1305.7351
[5] Blackmore D.; Leu M.C.; Wang L.: Sweep-envelope differential equation algorithm and its application to NC machining
verification, Computer-Aided Design. 29(9), 1997, 629-637.
[6] Erdim H.; Ilies H. T.: Classifying points for sweeping solids, Computer-Aided Design. 40(9), 2008, 987-998.
[7] Kinsley Inc. Timing screw for grouping and turning. https://www.youtube.com/watch?v=LooYoMM5DEo
[8] Lee S. W.; Nestler A.: Complete swept volume generation, Part I: Swept volume of a piecewise C1-continuous cutter at
five-axis milling via Gauss map, Computer-Aided Design. 43(4), 2011, 427-441.
[9] Lee S. W.; Nestler A.: Complete swept volume generation, Part II: NC simulation of self-penetration via comprehensive
analysis of envelope profiles, Computer-Aided Design. 43(4), 2011, 442-456.
[10] Markot R.; Magedson R. L.: Procedural method for evaluating the intersection curves of two parametric surfaces,
Computer-Aided Design. 23(6), 1990, 395-404.
[11] Peternell M.; Pottmann H.; Steiner T.; Zhao H.: Swept volumes, Computer-Aided Design and Applications. 2(5), 2005,
599-608.
[12] Rossignac J.; Kim J. J.; Song; Suh K. C.; Joung C. B.: Boundary of the volume swept by a free-form solid in screw
motion, Computer-Aided Design. 39, 2007, 745-755.
[13] Sohoni M.: Computer aided geometric design course notes. http://www.cse.iitb.ac.in/~sohoni/336/main.ps