Draft Sweeps with Angle Specifications
List of: Discussion Topic
Subjects: Sweeping
Contents: Sweeping

The option draft_angle is a real number that represents the angle with which the swept profile is to draft while sweeping. For closed profiles, a positive draft angle causes a draft out, while a negative draft angle causes a draft in. For example, if the profile is a circle in the xy plane, the path is a line along the z-axis, and the draft angle is 30 degrees, the result is an "upside-down" frustum. (A frustum is a cone with its tip cut off. It is "upside-down" in this case, because the draft angle out resulted in a top base larger than the bottom base.)

Negative draft angles can result in self-intersecting bodies, which are not permitted. However, the second graphic of Figure 1-15 illustrates a negative draft angle that does not result in a self-intersecting body. For open profiles, the positive draft angle is in the direction of the cross product of the tangent of the profile and the tangent to the path.

When a profile is provided, the start point of that profile is important. The sweeping operation moves the profile to this position and starts the sweep from there. In cases with draft angles or laws, the profile is placed at the location where the first degeneration (e.g., change of topology) occurs.

The following example illustrates how to use the Scheme extension sweep:law combined with sweep:options ("sweep_angle") to sweep a face with positive and nonself-intersecting negative draft angles.

Scheme Example

; draft_angle
(define path (edge:linear (position 0 0 0) (position 0 0 10)))
(define profile (edge:circular (position 0 0 0) 5))
(define opts (sweep:options "draft_angle" 30))
(define sweep (sweep:law profile path opts))
; redefine the options to create a negative draft angle.
; OUTPUT Positive Draft
(roll)
(define opts (sweep:options "draft_angle" -20))
(define sweep (sweep:law profile path opts))
; OUTPUT Negative Draft

Example 1-10. Sweeping with a Draft Angle


Figure 1-15. Sweeping with a Draft Angle

Scheme Example

; draft_angle
(define path (edge:linear (position 0 0 0) (position 0 0 20)))
(define profile (edge:linear (position 0 0 0) (position 0 30 0)))
(define opts (sweep:options "draft_angle" 15))
(define sweep (sweep:law profile path opts))
(define color (entity:set-color sweep 3))
; OUTPUT Original

Example 1-11. Linear Sweep with a Positive Draft Angle


Figure 1-16. Linear Sweep with a Positive Draft Angle

The next example illustrates how to use the Scheme extension sweep:law combined with sweep:options ("sweep_angle") to sweep a face with a positive draft angle.

Scheme Example

; sweep:law
; Sweep a positive draft angle.
; Create a solid block and get the faces.
(define block1 (solid:block (position -10 -10 -10)

(position 30 30 30)))
;; block1
(define faces (entity:faces block1))
;; faces
; Select face to sweep.
(define face2 (car faces))
;; face2
; OUTPUT Original

; Create a new solid by sweeping the face along
; a gvector.
(define sweep2 (sweep:law face2 (gvector 0 0 10)

(sweep:options "draft_angle" 15)))
;; sweep2
; OUTPUT Result

Example 1-12. Sweeping a Face With Positive Draft Angle


Figure 1-17. sweep:law - Sweeping a Face with Positive Draft Angle
PDF/SWP/01CMP.PDF
HTM/DATA/SWP/SWP/01CMP/0017.HTM