ACIS also provides techniques for creating more free-form solids. These include revolving faces about an axis, revolving wires about an axis, sweeping planar faces along a path, rigid sweeping, and using law mathematical functions to do nonplanar sweeps.
|
|
The most flexible of the solid creation techniques is sweeping using law mathematical functions. Laws in sweeping permit:
|
|
Drafting the profile
|
As the profile is swept, the ending profile has been offset an equal distance, which facilitates removal of the item from a mold.
|
|
Twisting the profile
|
This enables not only solid contours whose profile "corkscrews" around the sweep path, but also solid contours whose profile meanders or zigzags along the sweep path.
|
|
Orienting the profile
|
Twisting orients the profile based on the "travel distance" along the path. A rail law, on the other hand, specifies the orientation of the profile with respect to local features of the sweep path.
|
|
Filling gaps
|
The curves can be extended along their natural curves, along straight lines until they intersect, or as rounded corners.
|
|
Scaling the profile
|
Scaling results in proportional changes that do not affect the topology.
|
|
|
|
Figure 8-4. Drafting versus Scaling
|
|
As is evident from the control that laws add to sweeping, sweeping is a very powerful tool in creating free-form solids. The sweep path no longer is restricted to being planar. Sweeping does have the limitation that only planar (surface) profiles can be swept. However, a profile can be swept to meet a given face and that face does not have to be planar. Moreover, Boolean operations using nonplanar profiles can be performed on the end caps of the swept body to achieve the desired shape.
|
|
When a wire body is swept, it can be specified whether or not end capping is performed. In other words, the result can be specified to be either a solid or a "straw." When a surface (profile) is swept, it can be either one-sided or two-sided. The resulting solid is created with the end caps being single-sided and having their orientation in the proper direction for a solid.
|
|
The following example creates a wire offset. Because the wire offset in the example is planar and bounded, it can be used as a wire body profile for a solid sweep operation. Although not required, the wire body could be made into a simple surface profile using covering techniques, such as
sheet:cover-wires. In addition, the simple surface profile can be (optionally) turned into a double-sided sheet using
sheet:2d.
|
|
Scheme Example
|
|
;--------- Copy of the Offsetting a Wire Body Example
|
;--------- (below this line)
|
; Define the positions to be used
|
(define my_point1 (position 0 0 0))
|
;; my_point1
|
(define my_point2 (position 20 0 0))
|
;; my_point2
|
(define my_point3 (position 20 10 0))
|
;; my_point3
|
(define my_point4 (position 0 10 0))
|
;; my_point4
|
|
; Create edge 1 as a sine edge.
|
(define my_linear1 (edge:linear my_point1 my_point2))
|
;; my_linear1
|
; Create edge 2 as a linear edge.
|
(define my_linear2 (edge:linear my_point2 my_point3))
|
;; my_linear2
|
; Create edge 3 as a spline curve.
|
(define my_linear3 (edge:linear my_point3 my_point4))
|
;; my_linear3
|
; Create edge 4 as a spline curve.
|
(define my_linear4 (edge:linear my_point4 my_point1))
|
;; my_linear4
|
|
; Create a wire-body from a list of edges.
|
(define my_wirebody (wire-body
|
|
(list my_linear1 my_linear2 my_linear3 my_linear4)))
|
;; my_wirebody
|
(define my_offset (wire-body:offset my_wirebody 5 "r"))
|
;; my_offset
|
(entity:delete my_wirebody)
|
;; ()
|
;--------- Copy of the Offsetting a Wire Body Example
|
;--------- (above this line)
|
|
(define my_profile my_offset)
|
;; my_profile
|
; Create a list of edges for use later.
|
(define my_list (entity:edges my_profile))
|
;; my_list
|
|
; Create a vector path for sweeping.
|
(define my_vec_path (gvector 0 0 20))
|
;; my_vec_path
|
|
; Sweep the profile along this vector. Create it as a solid.
|
(define my_sweep (sweep:along-vector my_profile #t
|
|
my_vec_path))
|
;; my_sweep
|
; Save the results to an output file.
|
(part:save "tmpsweep1.sat")
|
;; #t
|
|
|
|
Figure 8-5. Sweeping a Surface to a Solid
|
|
This sweeping example does not use laws, because the sweeping path is planar and it is desired that the resulting surface have no twist. It defines a vector to be used for sweeping. The offset profile is swept along this vector into a solid.
|
|
A new variable,
my_profile, which references the same entity as
my_offset is defined in this example. Its purpose is to make the example somewhat clearer in that the created wire offset,
my_offset, is now used as the profile for the sweeping operation.
|
|
Some of the Scheme extensions related to sweeping are:
|
|
solid:revolve-face
|
Creates a solid by revolving a face about an axis.
|
|
solid:revolve-wire
|
Creates a solid by revolving a wire about an axis.
|
|
solid:sweep-face
|
Creates a solid by sweeping a planar face along a vector.
|
|
solid:sweep-wire
|
Creates a solid by sweeping a planar wire along a vector.
|
|
sweep:about-axis
|
Sweeps a face or a wire about an axis as a sheet or as a solid.
|
|
sweep:law
|
Creates a surface or solid by sweeping a profile along a path.
|
|
sweep:rigid
|
Does a rigid sweep of a face or a wire along a path or a vector.
|