Feature Naming


Sweep annotations allow features, created during sweeping, to be named. With feature naming, the underlying geometry might be altered, but the feature can still be referenced through the name. To use the annotations, the annotation option must be set to TRUE. (For more information, refer to the section Feature Naming.)

Sweep annotations contain information identifying the inputs and outputs of a sweep operation. The inputs to the sweep operation include the edges and vertices of the profile. The inputs also include the edges of the path, when a path is specified. If sweeping is called using a vector, distance, or axis in place of the path, no path input is present in the annotation. In some miter situations the path vertex may also be included in the inputs. Use the path edge entities instead of path vertices. Annotations on faces should be used before annotations on edges or vertices, since the face annotations are the least subject to algorithmic changes. The following section presents a series of sweep examples illustrating some of the various annotations scenarios.

The following classes are derived from the base class SWEEP_ANNOTATION:

SWEEP_ANNO_EDGE_LAT
Identifies the lateral (side) topology created from a profile edge during sweeping. If faces have been merged, there are two path input edges.
Inputs:
Profile - edge
Path   - edge
Output:
Lateral_face - face

SWEEP_ANNO_EDGE_TOP
Defines the top (ending) topology created from a profile edge during sweeping.
Inputs:
Profile - edge
Path   - edge
Output:
Top_edge - edge

SWEEP_ANNO_END_CAPS
Identifies the faces at the start and end of the sweep. Does not have the inputs and outputs in the same style as the other sweep annotations. An annotation of this kind can have a pointer to a start and an end, or just one or the other.
Inputs:
none
Outputs:
Start_face - face
End_face  - face

SWEEP_ANNO_VERTEX_LAT
Identifies the lateral (side) topology created from a profile vertex during sweeping.
Inputs:
Profile - vertex
Path   - edge
Outputs:
Right_lateral_face  - face
Left_lateral_face    - face
Right_lateral_edge - edge
Left_lateral_edge   - edge
Mid_lateral_edge   - edge

SWEEP_ANNO_VERTEX_TOP
Identifies the top (ending) topology created from a profile vertex during sweeping. The vertex is the input profile vertex and the output mid_top_vertex
Inputs:
Profile - vertex
Path   - edge
Outputs:
Right_top_edge   - edge
Left_top_edge     - edge
Right_top_vertex - vertex
Left_top_vertex   - vertex
Mid_top_vertex   - vertex

Sweeping an Open Path Without Draft

This example demonstrates the most common annotations scenario. Subsequent examples only demonstrate annotations particular to that scenario.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 3 0 0) (position 3 3 0) (position 0 3 0)
       (position 0 0 0))))
(define path (wire-body:points (list
       (position 1.5 1.5 0) (position 1.5 1.5 8.5)
       (position 10 1.5 8.5))))
(zoom-all)
(define swp (sweep:law profile path))

Example. Sweep Open Path without Draft

Figure. Sweep Open Path without Draft

A SWEEP_ANNO_EDGE_LAT annotation has an input profile edge (E1), an input path edge (E5), and an output lateral_face (F3). Another SWEEP_ANNO_EDGE_LAT annotation has an output lateral_face (F2) and an input profile edge (E2). Because faces have been merged there are two path input edges (E4 and E5).

A SWEEP_ANNO_EDGE_TOP annotation has an input profile edge (E3), an input path edge (E5), and an output top_edge (E7).

A SWEEP_ANNO_VERTEX_LAT annotation has an input profile vertex (V1), an input path edge (E5), and an output mid_lateral_edge (E6). E6 is labeled as a mid_lateral_edge because in later examples with draft other identifiers are used.

A SWEEP_ANNO_VERTEX_TOP annotation has an input profile vertex (V1), an input path edge (E5), and an output mid_top_vertex (V2).

SWEEP_ANNO_END_CAPS annotations do not have the inputs and outputs in the same style as the other sweep annotations. An annotation of this kind can have a pointer to a start_face (F1) and an end_face (F4), or just one or the other.

Sweeping a Closed Path Without Draft

In this case the profile edges and vertices are equivalent to the top edges and vertices.

This sweep would not have a SWEEP_ANNO_END_CAPS annotation, unless the sweep options were set to keep the start face. If the option is set, face (F1) is the start_face and the end_face.

Scheme Example

(define profile (wire-body (list (edge:linear
       (position 0 0 0)(position 3 0 0))
       (edge:linear (position 3 0 0) (position 1.5 1.5 0))
       (edge:linear (position 1.5 1.5 0) (position 0 0 0)))))
(define path (wire-body (list (edge:linear
       (position 1.5 0.75 0) (position 1.5 0.75 5))
       (edge:ellipse (position 1.5 -2.5 5) (gvector 1 0 0)
       (gvector 0 3.25 0) 1 0 180)
       (edge:linear (position 1.5 -5.75 5) (position 1.5 -5.75 0))
       (edge:ellipse (position 1.5 -2.5 0) (gvector -1 0 0)
       (gvector 0 3.25 0) 1 0 180))))
(define swp (sweep:law profile path))
(define zoom (zoom-all))
(define torus (list swp path))
(define rotate (entity:rotate torus 0 1 0 105))
(define rotate (entity:rotate torus 1 0 0 70))

Example. Sweep Closed Path without Draft

Figure. Sweep Closed Path without Draft

A SWEEP_ANNO_EDGE_TOP annotation has an input path edge (E1). The edge (E2) is both an input profile edge and an output mid_top_edge.

A similar SWEEP_ANNO_VERTEX_TOP annotation has an input path edge (E1). The vertex (V1) is both the input profile vertex and the output mid_top_vertex.

This sweep would not have a SWEEP_ANNO_END_CAPS annotation, unless the sweep options were set to keep the start face. If the option is set, face (F1) is the start_face and the end_face.

Sweeping With Draft Resulting in No Gap Faces

Here the annotations are the same as without draft.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 2 -2 0) (position 4 0 0) (position 0 4 0)
       (position -4 0 0) (position -2 -2 0) (position 0 0 0))))
(define path (edge:linear (position 6 0 0) (position 6 0 10)))
(define opts (sweep:options "draft_angle" 5))
(define swp (sweep:law profile path opts))

Example. Sweep with Draft for No Gap Face

Figure. Sweep with Draft for No Gap Face

A SWEEP_ANNO_EDGE_LAT annotation has an input profile edge (E1), an input path edge (E2), and an output lateral_face (F1).

A SWEEP_ANNO_EDGE_TOP annotation has an input profile edge (E1), an input path edge (E2), and an output top_edge (E3).

A SWEEP_ANNO_VERTEX_LAT annotation has an input profile vertex (V1), an input path edge (E2), and an out put mid_lateral_edge (E4).

A SWEEP_ANNO_VERTEX_TOP annotation has an input profile vertex (V1), an input path edge (E2), and an output mid_top_vertex (V2).

Sweeping With Draft Resulting in One Gap Face

With the introduction of gap faces, the right, left, and mid modifiers take on significance.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 2 -2 0) (position 4 0 0) (position 0 4 0)
       (position -4 0 0) (position -2 -2 0) (position 0 0 0))))
(define path (edge:linear (position 6 0 0) (position 6 0 10)))
(define opts (sweep:options "draft_angle" -3 "gap_type"
        "rounded"))
(define swp (sweep:law profile path opts))

Example. Sweep with Draft - One Gap Face

Figure. Sweep with Draft - One Gap Face

A SWEEP_ANNO_VERTEX_LAT annotation has an input profile vertex (V1), an input path edge (E1), and an output left_lateral_edge (E2).

A SWEEP_ANNO_VERTEX_LAT annotation has the input profile vertex (V1), the input path edge (E1), and an output right_lateral_edge (E4).

A SWEEP_ANNO_VERTEX_LAT annotation has the input profile vertex (V1), the input path edge (E1), and an output right_lateral_face (F1). When a single gap face results from the sweep, the output face (F1) is labeled as a right_lateral_face.

A SWEEP_ANNO_VERTEX_TOP annotation has an input profile vertex (V1), an input path edge (E2), and an output left_top_vertex (V2).

A SWEEP_ANNO_VERTEX_TOP annotation has the input profile vertex (V1), the input path edge (E1), and an output right_top_vertex (V3).

A SWEEP_ANNO_VERTEX_TOP annotation has the input profile vertex (V1), the input path edge (E1), and an output right_top_edge (E5). When a single gap face results from the sweep, the output edge (E5) is labeled as a right_top_edge.

Sweep With Draft Results - Two Gap Faces

This case shows how sweep annotations identify two faces resulting from one profile vertex.

Scheme Example

(define edge1 (edge:circular-3pt (position 0 0 0)
       (position 1 -1.5 0) (position 2 -2 0)))
(define edge2 (edge:linear (position 2 -2 0) (position 4 0 0)))
(define edge3 (edge:circular-3pt (position 4 0 0)
       (position 0 4 0) (position -4 0 0)))
(define edge4 (edge:linear (position -4 0 0) (position -2 -2 0)))
(define edge5 (edge:circular-3pt (position -2 -2 0)
       (position -1 -1.5 0) (position 0 0 0)))
(define profile (wire-body (list edge1 edge2 edge3 edge4 edge5)))
(define path (edge:linear (position 6 0 0) (position 6 0 10)))
(define opts (sweep:options "draft_angle" -3 "gap_type"
       "extended"))
(define swp (sweep:law profile path opts))
(zoom-all)
(entity:rotate swp 0 0 1 20)

Example. Sweep with Draft - Two-Gap Face

Figure. Sweep with Draft - Two-Gap Face

The annotations particular to this sweeping case all have an input profile vertex (V1) and an input path edge (E1).

SWEEP_ANNO_VERTEX_LAT annotations are each present with the following outputs: left_lateral_edge (E2), mid_lateral_edge (E3), right_lateral_edge (E4), left_lateral_face (F1), and right_lateral_face (F2).

SWEEP_ANNO_VERTEX_TOP annotations are each present with the following outputs: left_top_vertex (V2), mid_top_vertex (V3), right_top_vertex (V4), left_top_edge (E5), and right_top_edge (E6).

Sweep With Draft Resulting in Degenerate Topology

This example demonstrates when the sweep profile degenerates because of sweeping with draft.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 3.75 0 0) (position 4 0.25 0) (position 4 4 0)
       (position 0 4 0) (position 0 0 0))))
(define opts (sweep:options "draft_angle" -15))
(define swp (sweep:law profile (gvector 0 0 5) opts))

Example. Demonstrating Degenerate Topology

Figure. Demonstrating Degenerate Topology

Two SWEEP_ANNO_VERTEX_LAT annotations with mid_lateral_edges (E1 and E2, respectively) are present with input profile vertices (V1 and V2, respectively). The SWEEP_ANNO_VERTEX_LAT annotation with an output mid_lateral_edge (E3) has two input profile vertices (V1 and V2).

A SWEEP_ANNO_VERTEX_TOP annotation with an output mid_top_vertex (V3) has two input profile vertices (V1 and V2). The SWEEP_ANNO_VERTEX_TOP annotation with an output mid_top_vertex (V4) has two input profile vertices (V1 and V2).

Here is another sweep example demonstrating degeneracy resulting from draft.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 4 0 0) (position 4 2 0) (position 0 2 0)
       (position 0 0 0))))
(define opts (sweep:options "draft_angle" -30))
(define swp (sweep:law profile (gvector 0 0 10) opts))

Example. Degenerate Topology

Figure. Degenerate Topology

The SWEEP_ANNO_EDGE_TOP annotation with an output top_edge (E2) has two input profile edges (E1 and E3).

The SWEEP_ANNO_VERTEX_TOP annotation with an output mid_top_vertex (V3) has two input profile vertices (V1 and V2).

This sweep degenerates to just one vertex.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 4 0 0) (position 4 4 0) (position 0 4 0)
       (position 0 0 0))))
(define opts (sweep:options "draft_angle" -30))
(define swp (sweep:law profile (gvector 0 0 10) opts))

Example. Degenerate Topology

Figure. Degenerate Topology

The SWEEP_ANNO_VERTEX_TOP annotation with an output mid_top_vertex (V1) has four input profile vertices (V2, V3, V4, and V5).

Sweep With Miter

Topology that results from miters will generally not have sweep annotations.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 3 0 0) (position 3 3 0) (position 0 3 0)
       (position 0 0 0))))
(define path (wire-body:points (list
       (position 1.5 1.5 0) (position 1.5 1.5 8.5)
       (position 10 1.5 8.5))))
(define opts (sweep:options "miter" "crimp"))
(define swp (sweep:law profile path opts))
(define model (list swp path))
(entity:rotate model 0 0 1 35)

Example. Sweep with Miter

Figure. Sweep with Miter

Although E2 and E4 are resulting from E1 and E3, there are no annotations on E2 and E4. Similarly there are no annotations on V3 and V4. Edges and vertices such as these that are a result of the sweep operation proceeding through a miter are not annotated.

There is a SWEEP_ANNO_EDGE_LAT annotation with an input profile edge (E1) and an output lateral_face (F1) in this sweep miter that results in the creation of a face. There is also a SWEEP_ANNO_VERTEX_LAT annotation with an input profile vertex (V1) and an output mid_lateral_edge (E5). Most miters do not produce lateral topology like this situation. It should also be noted that the two annotations described here do not have an input path edge.

Sweeps With End Caps Merge

The end caps merge when the sweep results in the merging of the start_face and the end_face.

Scheme Example

(define profile (wire-body:points (list (position 0 0 0)
       (position 3 0 0) (position 3 3 0) (position 0 3 0)
       (position 0 0 0))))
;; define a sweep angle of 180 degrees.
(define opts (sweep:options "sweep_angle" 180))
(define swp (sweep:law profile (position 0 0 0) (gvector 0 1 0)
       opts))
(zoom-all)
; OUTPUT 180 degree sweep

(define profile2 (wire-body:points (list
       (position 0 5 0) (position 3 5 0) (position 3 8 0)
       (position 0 8 0) (position 0 5 0))))
;; define a sweep angle of 120 degrees.
(define opts2 (sweep:options "sweep_angle" 120))
(define swp2 (sweep:law profile2 (position 0 0 0)
       (gvector 0 1 0) opts2))
;; Size model again for better viewing.
(define body (list swp swp2))
(view:compute-extrema)
(entity:scale body .9)
(refresh-all)
(entity:set-color swp2 3)
; OUTPUT 120 degree sweep

Example. Sweeps with End Caps Merge

Figure. Sweeps with End Caps Merge

The first (lower) body in the above figure is created by sweeping 180 degrees. Here F3 is a start_face and an end_face.

The second (upper) body also in the above figure is created by sweeping 120 degrees. Here there are two end cap faces, F1 being the start_face and F2 being the end_face.

[Top]