Functional Variations of Covering

Basic Planar Covering of Wires

Scheme Extensions: sheet:cover-wire-loops

Basic planar covering is the most efficient, planar covering operation. It fits a plane through a coplanar set of closed wires. This plane becomes the geometry underlying a single, double-sided face of a sheet body. The edges of the first wire are converted into the peripheral loop of the face. Any additional wires are converted into hole loops. Each wire must be closed and without branches. The wires must be physically disjoint; that is, they cannot intersect each other.

```; sheet:cover-wire-loops example
(part:clear)
(define wire1 (wire-body:points (list
(position 0 0 0) (position 40 0 0)
(position 40 40 0) (position 0 40 0)
(position 0 0 0) )))
(define wire2 (wire-body:points (list
(position 10 10 0) (position 30 10 0)
(position 30 20 0) (position 20 20 0)
(position 20 30 0) (position 10 30 0)
(position 10 10 0) )))
(define sheet (sheet:cover-wire-loops
(list wire1 wire2)))```
 Covering Input: Two Coplanar Wire Bodies Covering Output: A Planar Sheet Body

Enhanced Planar Covering of Wires

Scheme Extensions: sheet:planar-wires

Enhanced planar covering of wires performs a series of planar covering operations and Boolean operations. This supports the creation of a single face that covers a region bounded by multiple wires, or multiple faces that cover a branched wire, or multiple faces with multiple holes. It fits a plane through the coplanar set of closed wires. This plane becomes the geometry underlying one or more double-sided faces of a sheet body. The wires do not need to be physically disjoint; that is, they can intersect each other.

Enhanced planar covering of wires can be performed with or without consideration of "nesting." If nesting is not considered, each closed region on each wire is covered and all of the covered regions are united. If nesting is considered, each closed region on each wire is covered as before, but the containment of each closed region is determined with respect to the other closed regions. The outermost boundaries are considered to be peripheral. All of the boundaries directly contained by a peripheral boundary are considered to be holes. All of the boundaries directly contained by a hole boundary are considered to be peripheral.

The following examples demonstrate the covering of branched wires and nesting. The first example illustrates the results of covering of a branched, planar wire.

```; sheet:planar-wires example
(part:clear)
; Create a branched wire
(define wb0 (wire-body (edge:circular (position 0  0 0) 30)))
(define wb1 (wire-body (edge:circular (position 50 0 0) 10)))
(define circ0 (car (entity:edges wb0)))
(define circ1 (car (entity:edges wb1)))
(define entray00 (entray circ0 (ray (position 0 30 1) (gvector 0 0 -1))))
(define entray10 (entray circ1 (ray (position 50 10 1) (gvector 0 0 -1))))
(define wb2 (wire-body (edge:linear entray00 entray10)))
(define entray01 (entray circ0 (ray (position 0 -30 1) (gvector 0 0 -1))))
(define entray11 (entray circ1 (ray (position 50 -10 1) (gvector 0 0 -1))))
(define wb3 (wire-body (edge:linear entray01 entray11)))
(define wire0 (bool:nonreg-unite wb0 wb1 wb2 wb3))
; Cover the wire
(define ent (car (sheet:planar-wires wire0 "n" #f)))```
 Covering Input: A Branched Wire Body Covering Output: A Planar Sheet Body

The second example demonstrates the use of "nesting." If two additional wire bodies are created and "nesting" is set to TRUE, two inner loops are created in the sheet face. If "nesting" is set to FALSE, the result is identical to before.

```; sheet:planar-wires example 2
; Create a branched wire as before
; ...
; Create two additional wires to form holes
(define wire1 (wire-body (edge:circular (position 0  0 0) 25)))
(define wire2 (wire-body (edge:circular (position 50 0 0)  5)))
; Cover the wires
(define ent (car (sheet:planar-wires (list wire0 wire1 wire2) "n" #t)))```
 Covering Input: Three Coplanar Wire Bodies Covering Output: A Planar Sheet Body

The third example further demonstrates the use of "nesting." In this example, the wire bodies used in the previous example are replicated multiple times, and all of the wire bodies are covered in a single operation. The covering algorithm determines which wires form peripheral loops and which are contained within other wires (in other words, it determines how the wires are nested) and creates the faces accordingly. The result of this covering operation is one body with four lumps, four shells, and four faces.

```; sheet:planar-wires example 3
; Create the branched wire and the wires for the holes
; ...
; Create and transform copies of the wires
; ...
; Cover the twelve wire bodies
(define ent (car (sheet:planar-wires
(list wire00 wire10 wire20
wire01 wire11 wire21
wire02 wire12 wire22
wire03 wire13 wire23) "n" #t)))```
 Covering Input: Twelve Coplanar Wire Bodies Covering Output: A Planar Sheet Body with Four Faces

Enhanced Planar Covering of Edges

Scheme Extensions: sheet:planar-edges

Enhanced planar covering of edges is very similar to enhanced planar covering of wires; however, there are some significant differences, namely:

• It takes a list of edges, not wire bodies, as input.
• If any of the edges have higher-level topology (for instance, if an edge is part of a wire body or a sheet body), all the edges under the top level topological entity are copied, and the original top level entity is deleted!
• Wire bodies are created from connected sets of input edges. Adjacent input edges do not need to share vertices, but their end points must be coincident (within SPAresabs).

After this preprocessing, the enhanced planar covering of wires algorithm is used.

The first example demonstrates how a polyhedral solid can be constructed by covering closed circuits of linear edges, stitching, and converting the sheet body into a solid body. Note that the edges have been duplicated so that covering algorithm will get edges without higher level topology.

```; sheet:planar-edges example
(part:clear)
; Create the edges to be covered
(define pos0 (position      0      0 10.000))
(define pos1 (position  9.428      0 -3.333))
(define pos2 (position -4.714  8.165 -3.333))
(define pos3 (position -4.714 -8.165 -3.333))
(define e00 (edge:linear pos1 pos2))
(define e01 (edge:linear pos2 pos3))
(define e02 (edge:linear pos3 pos1))
(define e10 (edge:linear pos1 pos0))
(define e11 (edge:linear pos0 pos2))
(define e12 (edge:linear pos2 pos1))
(define e20 (edge:linear pos2 pos0))
(define e21 (edge:linear pos0 pos3))
(define e22 (edge:linear pos3 pos2))
(define e30 (edge:linear pos3 pos0))
(define e31 (edge:linear pos0 pos1))
(define e32 (edge:linear pos1 pos3))
; Cover the edges, creating four sheet bodies.
(define s0 (car (sheet:planar-edges (list e00 e01 e02) "n" #f)))
(define s1 (car (sheet:planar-edges (list e10 e11 e12) "n" #f)))
(define s2 (car (sheet:planar-edges (list e20 e21 e22) "n" #f)))
(define s3 (car (sheet:planar-edges (list e30 e31 e32) "n" #f)))
; Stitch the sheet bodies into one sheet body,
; and convert the sheet body into a solid body.
; (It turns out the solid is a void, so reverse it.)
(define st_opts (entity:exact-stch-options))
(define ent (sheet:1d (car (entity:stitch (list s0 s1 s2 s3) st_opts))))
(body:reverse ent)```
 Covering Input: Twelve Linear Edges Covering Output: A Tetrahedral Body

Enhanced planar covering of edges can be used by higher-level covering algorithms; for instance, it can be used to generate a set of planar faces to cover a hole in a sheet or solid body. This is achieved by copying free edges (that is, edges of faces with only one coedge) and adding new edges to create bounded planar regions, covering the planar circuit of edges with a planar face, and stitching the face into the existing body. This algorithm is illustrated with the figures below. The sheet body in Figure. Initial Sheet Body contains a hole, denoted by the highlighted edges. This hole can be covered with two planar faces as shown in Figure. Covering Result 1 or with three planar faces as shown in Figure. Covering Result 2.

 Initial Sheet Body Covering Result 1 Covering Result 2

Non-Planar Covering of a Single Wire

Scheme Extensions: sheet:cover-wire

The simplest algorithm to cover non-planar geometry is the algorithm that covers a single, closed, non-branched wire. The wire is converted into a peripheral loop on a face. If the wire cannot be converted into a loop, the function will produce a warning, not an error. The covering surface generation algorithm fits a surface through the edges of the newly created loop. Alternatively, an application can specify a surface that fits the edges of the input wire. This surface becomes the geometry underlying a single-sided face in an open (incomplete) solid body.

```; sheet:cover-wire example
(part:clear)
; Create a wire body
(define e0 (edge:spline (list (position 0 0 0)(position 0 5 5) (position 0 0 10)
(position 0 5 15) (position 0 0 20)(position 0 5 25) (position 0 0 30))
(gvector 0 0 1) (gvector 0 0 1)))
(define e1 (edge:spline (list
(position 30 0 0) (position 30 2.5 2.5) (position 30 0 5) (position 30 2.5 7.5)
(position 30 0 10)(position 30 2.5 12.5)(position 30 0 15)(position 30 2.5 17.5)
(position 30 0 20)(position 30 2.5 22.5)(position 30 0 25)(position 30 2.5 27.5)
(position 30 0 30))
(gvector 0 0 1) (gvector 0 0 1)))
(define e2 (edge:spline (list (position 0 0 0)(position 5 2.5 0) (position 10 7.5 0)
(position 15 10 0) (position 20 7.5 0)(position 25 2.5 0) (position 30 0 0))
(gvector 1 0 0) (gvector 1 0 0)))
(define e3 (edge:spline (list (position 0 0 30)(position 5 2.5 30) (position 10 7.5 30)
(position 15 10 30) (position 20 7.5 30)(position 25 2.5 30) (position 30 0 30))
(gvector 1 0 0) (gvector 1 0 0)))
(define b (wire-body (list e0 e1 e2 e3)))
; Cover the wire body and convert the incomplete solid body into a sheet body
(sheet:cover-wire b)
(sheet:2d b)```
 Covering Input: A Wire Body with Four Edges Covering Output: A Body with One Face

Non-Planar Covering of Multiple Wires

Scheme Extensions: sheet:cover-wires

The non-planar, multiple wire covering algorithm fits a surface through the edges of one or more closed wires. Alternatively, an application can specify a surface that fits the edges of the wires. This surface becomes the geometry underlying one or more single-sided faces in an open (incomplete) solid body. The wires must be closed, unbranched, and non-intersecting. The edges of each closed wire are converted into a loop on the face. If the covering surface generation algorithm cannot find a single surface to fit the loops, it attempts to cover the each loop with a planar face. Thus, this covering algorithm may create a single face with multiple loops or multiple faces, each with a single loop.

The first example demonstrates how multiple wires can be covered with a specified surface. There are a number of surfaces that contain the two circular edges (for instance, a conical surface, a spherical surface, and various surfaces of revolution). In this example, a spherical surface is specified. Note that the circular edges are in opposite directions. This forces the loops on the resulting face to be in opposite directions. The result of this covering operation is depicted in Figure. Covering Output: A Face with Two Loops.

```; sheet:cover-wires example 1
(part:clear)
; Create a wire body with two wires
(define edge1
(edge:circular (position 0 0 0) 25))
(define wb1 (wire-body edge1))
(define edge2
(edge:reverse (edge:circular (position 0 0 20) 15)))
(define wb2 (wire-body edge2))
(define ent (body:combine (list wb1 wb2)))
; Cover the wire body with a spherical face
(define f (face:sphere (position 0 0 0) 25))
(sheet:2d (sheet:cover-wires ent f))
(entity:erase f)```

If a surface is not specified, the covering surface generation algorithm cannot find a single surface that fits the two loops; therefore, it covers them with two planar surfaces. This is depicted in Figure. Covering Output: Two Planar Faces.

```; sheet:cover-wires example 2
; Create a wire body as before
; ...
; Cover the wire body without specifying a surface
(sheet:2d (sheet:cover-wires ent))```
 Covering Input: A Wire Body with Two Wires Covering Output: A Face with Two Loops Covering Output: Two Planar Faces

Non-Planar Covering of Free Edges

Scheme Extensions: sheet:cover

The non-planar, free edge, surface generation algorithm fits a surface through the free edges of a open (incomplete) solid body. Alternatively, an application can specify a surface that fits the free edges. This surface becomes the geometry underlying one or more single-sided faces in the solid body, thereby covering the holes in boundary of the solid body. Each circuit of free edges is converted into a loop on a new face.

Unlike the other overloaded API functions for covering non-planar boundaries, the two API signatures for covering circuits of free edges have somewhat different behavior. The signature that explicitly takes a covering surface outcome api_cover_sheet(BODY* sheet, surface const& surf, ENTITY_LIST& new_face_list, logical multiple_cover, AcisOptions* ao) can take a flag multiple_cover which changes it behavior. If the multiple_cover flag is set TRUE, it first identifies all the separate loops of external edges. Next, it checks if each of the loops can be covered with multiple planar surfaces. If so, it covers the loop with the planar surfaces resulting in multiple faces. Otherwise, it tries to cover the loop with a surface as it does without the option. This is demonstrated in the second example below.

The first example demonstrates how an open solid can be covered with a generated surface. The open solid is a "wiggle" with the B-spline face removed. The model input to the covering algorithm has four free edges (that is, edges with only one coedge). New coedges are added to the free edges, a new loop is created containing the new coedges, a new face is created containing the new loop, and a new B-spline surface that fits the curves underlying the free edges is generated for the new face.

```; sheet:cover example 1
; Create an open solid body
(define ent (solid:wiggle 20 20 20 "anti"))
(define faces (entity:faces ent))
(face:uncover (list-ref faces 0))
; Cover the opening
(sheet:cover ent)```
 Covering Input: An Open Solid Body Covering Output: A Closed Solid Body

The second example demonstrates how a single opening can be covered with multiple, planar faces.

```; sheet:cover example 2
; Create an open solid body
(define profile (wire-body:kwire (gvector 0 0 1)
(position 0 0 0)
0 (position 20 0 0)
180 (position 20 5 0)
0 (position 0 5 0)))
(define ent (sheet:1d
(sweep:law profile (position 0 0 0) (gvector 0 1 0)
(sweep:options "sweep_angle" -210 "solid" #f))))
; Cover the opening with multiple faces
(sheet:cover ent "multiple")```
 Covering Input: An Open Solid Body Covering Output: A Closed Solid Body

The third example demonstrates: (a) how a multiple openings can be covered with planar faces, but the opening whose boundary is not planar cannot be covered during the initial covering operation; and (b) how a subsequent covering operation will cover the opening with the non-planar boundary. The second covering operation obtains is covering surface from the intersection curve underlying the boundary edge.

```; sheet:cover example 3
; Create an open solid body with multiple openings
(define c1 (sheet:2d (sheet:face (face:cone (position 0 0 -5) (position 0 0 5) 10 5))))
(define c2 (solid:cone (position 7.5 -10 0) (position 7.5 10 0) 4 0))
(define ent (sheet:1d (solid:subtract c1 c2)))
; Cover the openings
(sheet:cover ent)
(sheet:cover ent)```
 Covering Input: An Open Solid Body Covering Output: A Closed Solid Body

The final example demonstrates the behavior when attempting covering a planar face. The model depicted in the first figure below consists of a single-sided face with one peripheral loop. If this face is covered with another single-sided face, planar face is created whose face normal is in the opposite direction to the original face. This creates a laminar solid. This is not a valid ACIS model, but may be used by applications as an intermediate step during the construction of a more complicated model. Sheet bodies are represented in ACIS by a single double-sided face, not two back-to-back single-sided faces. The model depicted in the second figure below is similar: it consists of a single-sided face with two loops. If this face is covered with another single-sided face, planar face with two loops is created whose face normal is in the opposite direction to the original face. In both cases, the covering algorithm is finding a surface that covers all the free edges and uses it to create a new face that closes the open solid.

 Covering Input: An Open Solid Body Covering Input: An Open Solid Body

Non-Planar Covering of Edge Circuits

Scheme Extensions: sheet:cover-circuit

The most general covering algorithm is the circuit covering algorithm. The surface generation algorithm fits a surface through the edges of one or more closed circuits of edges. Alternatively, an application can specify a surface that fits the circuits of edges. Each circuit is an ordered set of edges that will form a closed loop on a new face. The edges in the circuits may lie on faces or belong to wires. All edges must belong to the same body. The generated or specified surface becomes the geometry underlying one or more faces in a solid or sheet body. The sidedness and containment of the new faces depend upon the adjacent faces.

The first example demonstrates how an application can cover circuits consisting of edges on both wires and faces. The initial body is a solid block with three faces removed. As the sequence of images below indicates, wires may be added to the body to define the boundary of each face. The three newly created faces are single-sided faces, which close the solid body.

First Example Scheme Source File
```; Create an open solid body
(define ent (solid:block (position -10 -10 -10) (position 10 10 10)))))
(define face1 (face:unhook (pick:face (ray (position 0 0 0) (gvector 0 0 -1)))))
(define face2 (face:unhook (pick:face (ray (position 0 0 0) (gvector 0 -1 0)))))
(define face3 (face:unhook (pick:face (ray (position 0 0 0) (gvector -1 0 0)))))
(entity:delete (list face1 face2 face3))

; Add a wire to the body and cover the circuit
(define wire1 (wire-body:points (list
(position 10 -10 -10) (position -10 -10 -10) (position -10 10 -10))))
(bool:nonreg-unite ent wire1)
(define elist1 (list
(pick:edge (ray (position 0 0 0) (gvector 0 -1 -1)))
(pick:edge (ray (position 0 0 0) (gvector -1 0 -1)))
(pick:edge (ray (position 0 0 0) (gvector 0 1 -1)))
(pick:edge (ray (position 0 0 0) (gvector 1 0 -1)))))
(sheet:cover-circuit elist1)

; Add a wire to the body and cover the circuit
(define wire2 (wire-body:points (list
(position -10 -10 10) (position -10 -10 -10))))
(bool:nonreg-unite ent wire2)
(define elist2 (list
(pick:edge (ray (position 0 0 0) (gvector -1 -1 0)))
(pick:edge (ray (position 0 0 0) (gvector -1 0 1)))
(pick:edge (ray (position 0 0 0) (gvector -1 1 0)))
(pick:edge (ray (position 0 0 0) (gvector -1 0 -1)))))
(sheet:cover-circuit elist2)

; Cover the remaining circuit
(define elist3 (list
(pick:edge (ray (position 0 0 0) (gvector 0 -1 1)))
(pick:edge (ray (position 0 0 0) (gvector -1 -1 0)))
(pick:edge (ray (position 0 0 0) (gvector 0 -1 -1)))
(pick:edge (ray (position 0 0 0) (gvector 1 -1 0)))))
(sheet:cover-circuit elist3)```
 Initial Open Solid Body with Three Faces Body with Two Edge Wire Added Result of Covering First Circuit
 Body with One Edge Wire Added Result of Covering Second Circuit Result of Covering Final Circuit

The second example demonstrates how an application can specify a surface to cover a circuit of edges. This allows the application to determine and specify the covering surface to achieve a desired result. The initial body is a sheet body consisting of a single face with an L-shaped hole. The hole is covered with the surface underlying the surrounding face. Note that in this case the newly created face is a double-sided face, because the surrounding face is double-sided.

Second Example Scheme Source File
```; Create a sheet body from a B-spline surface
(define surf1 (splsurf))
; Set the control points.
(define ctrlpoints1 (list
(position -30  10 -30) (position -30  15 0) (position -30  10 30)
(position -20 -10 -30) (position -20  -5 0) (position -20 -10 30)
(position -10  10 -30) (position -10  15 0) (position -10  10 30)
(position   0 -10 -30) (position   0  -5 0) (position   0 -10 30)
(position  10  10 -30) (position  10  15 0) (position  10  10 30)
(position  20 -10 -30) (position  20  -5 0) (position  20 -10 30)
(position  30  10 -30) (position  30  15 0) (position  30  10 30) ))
(splsurf:set-ctrlpt-list surf1 ctrlpoints1 7 3)
; Set the u and v parameter values.
(splsurf:set-u-param surf1 3 0 0 0)
(splsurf:set-v-param surf1 2 0 0 0)
; Set the u and v knot values.
(define uknots (list 0 0 0 0 0.25 0.5 0.75 1 1 1 1))
(splsurf:set-u-knot-list surf1 uknots 11)
(define vknots (list 0 0 0 1 1 1))
(splsurf:set-v-knot-list surf1 vknots 6)
; Create the spline face.
(define spline (face:spline-ctrlpts surf1))
(define sheet1 (sheet:2d (sheet:face spline)))

; Create a tool body to punch a hole in the sheet body
(define b1 (solid:block (position -20 -20 -20) (position 20 20 20)))
(define b2 (solid:block (position   0 -20   0) (position 20 20 20)))
(define b3 (solid:subtract b1 b2))
(entity:rotate b3 0 1 0 30)

; Subtract the tool from the sheet
(define ent (bool:nonreg-subtract sheet1 b3))

; Now cover the hole using the existing surface
(define edges (entity:edges ent))
(define e0 (list-ref edges 0))
(define e1 (list-ref edges 1))
(define e2 (list-ref edges 2))
(define e3 (list-ref edges 3))
(define e4 (list-ref edges 4))
(define e5 (list-ref edges 5))
(define elist (list e0 e1 e2 e3 e4 e5))
(define faces (entity:faces ent))
(define f0 (list-ref faces 0))
(sheet:cover-circuit elist f0)```
 Covering Input: A Sheet Body Consisting of One Face with an L-shaped Hole Covering Output: A Sheet Body Consisting of Two Faces Residing on the Same Surface

The third example demonstrates how multiple circuits can be covered to create a single face. In this example each circuit consists of a single circular edge and a toroidal surface is specified to cover the two circuits.

Third Example Scheme Source File
```; Create a sheet body with two loops of free edges
(define c1 (sheet:2d (solid:torus (position 0 0 0) 20 10)))
(define c2 (solid:cylinder (position 0 0 -20) (position 0 0 20) 25))
(define ent (solid:intersect c1 c2))

; Cover the two circuits of the sheet body with a specified surface
(define elist1 (list (pick:edge (ray (position 25 0 0) (gvector 0 0 1)))))
(define elist2 (list (pick:edge (ray (position 25 0 0) (gvector 0 0 -1)))))
(define f0 (list-ref (entity:faces ent) 0))
(sheet:cover-circuit elist1 elist2 f0)```
 Covering Input: A Sheet Body Consisting of One Face with Two Loops Covering Output: A Sheet Body Consisting of Two Faces Residing on the Same Toroidal Surface

The fourth example demonstrates how a circuit of edges on a closed solid body can be covered to create a cellular solid; that is, a non-manifold solid with an internal face. In this case the circuit of edges (highlighted in red in Figure. Covering Input: A Closed Solid Body) is covered using the cylindrical surface underlying the original cylindrical body. The resulting face (shaded gold in Figure. Covering Output: Non-manifold Solid Body) is double-sided, both inside.

Fourth Example Scheme Source File
```; Create a solid body
(define c (solid:cylinder (position 0 0 -2)  (position 0 0 2) 2))
(define b (solid:block (position 0 -1 -1) (position 4 1 1)))
(blend:vertex (list-ref (entity:vertices b) 0))
(blend:vertex (list-ref (entity:vertices b) 1))
(blend:vertex (list-ref (entity:vertices b) 2))
(blend:vertex (list-ref (entity:vertices b) 3))
(blend:vertex (list-ref (entity:vertices b) 4))
(blend:vertex (list-ref (entity:vertices b) 5))
(blend:vertex (list-ref (entity:vertices b) 6))
(blend:vertex (list-ref (entity:vertices b) 7))
(blend:round  (list-ref (entity:edges b) 0) .2)
(blend:round  (list-ref (entity:edges b) 1) .2)
(blend:round  (list-ref (entity:edges b) 2) .2)
(blend:round  (list-ref (entity:edges b) 3) .2)
(blend:round  (list-ref (entity:edges b) 4) .2)
(blend:round  (list-ref (entity:edges b) 5) .2)
(blend:round  (list-ref (entity:edges b) 6) .2)
(blend:round  (list-ref (entity:edges b) 7) .2)
(blend:round  (list-ref (entity:edges b) 8) .2)
(blend:round  (list-ref (entity:edges b) 9) .2)
(blend:round  (list-ref (entity:edges b) 10) .2)
(blend:round  (list-ref (entity:edges b) 11) .2)
(blend:fix (list-ref (entity:vertices b) 0))
(define ent (solid:unite c b))

; Cover the circuit of edges.
(define edges (entity:edges ent))
(define e0 (list-ref edges 0))
(define e4 (list-ref edges 4))
(define e7 (list-ref edges 7))
(define e10 (list-ref edges 10))
(define e28 (list-ref edges 28))
(define e30 (list-ref edges 30))
(define e34 (list-ref edges 34))
(define e35 (list-ref edges 35))
(define elist (list e0 e4 e7 e10 e34 e30 e35 e28))
(define faces (entity:faces ent))
(define f17 (list-ref faces 17))
(sheet:cover-circuit elist f17)```
 Covering Input: A Closed Solid Body Covering Output: A Non-manifold Solid Body

The Covering Surface Generation Algorithm

The surface generation algorithm used by covering makes multiple attempts to find a surface that interpolates all the edges of a rubber face (that is, a face without surface geometry). It stops as soon as it is successful in creating such a surface.

1. It attempts to find a single planar surface that fits all the edges.
2. If there is a single edge whose underlying geometry is a surface-surface intersection curve and the "other" surface is an analytic surface, then the analytic surface will be attempted. Note: This technique applies only to covering holes in faces and does not apply to covering wires.'
3. If there are four non-procedural boundary curves, then a B-spline surface will be attempted.
4. If there are four boundary curves and two opposing sides are straight lines, then a ruled surface will be attempted.
5. If there are four boundary curves, then a net surface will be attempted.
6. If there are two boundary curves, then a ruled surface will be attempted.
7. If there are one, three, or more than four boundary curves, or the new_cover option is TRUE, then an n-sided surface will be attempted. Note: The n-sided surface was designed for vertex blends and requires a convex boundary.
8. A B-spline interpolant will be attempted.
9. If there are multiple boundary loops and each boundary loop is planar, then it attempts to find the planar surface that fits each planar loop.

The multi-step surface generation algorithm described above fits the edges of the first loop of the rubber face. If more than one loop exists on the face, the covering algorithm assumes that these loops reside on the same surface. If more than one loops exists, it is often advantageous for the application to determine and specify the surface.

Creation of Tolerant Entities by Covering

The four covering API functions that can construct non-planar geometry (api_cover_wire, api_cover_wires, api_cover_sheet, and api_cover_circuits) can create tolerant edges and vertices. Tolerant edges and vertices may be constructed if:

1. The API function is passed a cover_options object with a gap tolerance greater than SPAresabs, and
2. A covering surface is specified, or one or more planar faces is created.

For all other cases, the covering surface will precisely fit the boundary edges.