|
Blending is used frequently in mechanical engineering designs. It permits:
|
|
|
Chamfering or rounding sharp edges
|
|
Adding a chamfer or fillet between two faces (e.g., adding material)
|
|
Variable blending and chamfering (blend radius or chamfer size are not constant)
|
|
|
The following example picks up where Sweeping example left off. In the sweeping example, a wire body consisting of linear edges was created. This is offset, creating another wire body that has rounded corners. This wire body is then swept into a solid. The blending example takes some of the edges of that solid and applies a constant radius blend to them, as is shown in figure 8-7.
|
|
|
After creating the swept solid, defines the blend radius and assigns this to a list of edges. The list of edges,
my_list, is simply the list of edges obtained from the wire offset operation and then later used as the profile in sweeping. Either a single edge or a group of edges can have the blend attribute assigned to it. Once the edges have a blend attribute, the network of blend edges is passed into the
blend:network Scheme extension, which completes the blend.
|
|
|
Note
|
The blend:get-network Scheme extension is used to get all edges associated with a blend attribute from just one edge of the list.
|
|
|
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)
|
|
;; ()
|
|
(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
|
|
;--------- Copy of the Offsetting a Wire Body Example
|
|
;--------- (above this line)
|
|
|
; Modify the model by blending all of the edges along
|
|
; the base.
|
|
(blend:const-rad-on-edge my_list 3)
|
|
;; (#[entity 19 1] #[entity 23 1])
|
|
(blend:network (blend:get-network (car my_list)))
|
|
;; #[entity 19 1]
|
|
; Save the results to an output file.
|
|
(part:save "tmpblend1.sat")
|
|
;; #t
|
|
|
|
|
|
|
Figure 8-7. Blending Edges
|
|
|
Some of the Scheme extensions related to blending solids are:
|
|
|
blend:chamfer-on-edge
|
Attaches a chamfer blend attribute to each edge in the input list.
|
|
|
blend:complete
|
Executes the third phase of blending.
|
|
|
blend:const-rad-on-edge
|
Attaches a constant radius blend attribute to each edge in the input list.
|
|
|
blend:edge-info
|
Lists the edge blend type and internal data values.
|
|
|
blend:get-network
|
Gets a list of all edges and vertices that are in the same blend network as the given entity.
|
|
|
blend:get-smooth-edges
|
Gets a list of all edges that smoothly connect to a given edge.
|
|
|
blend:local
|
Creates a blend in a nonmanifold body by adding faces locally around a given edge, blending the edge, and removing the added faces.
|
|
|
blend:make-sheet
|
Executes the first phase of blending which creates a blend sheet.
|
|
|
blend:make-wire
|
Executes the second phase of blending which creates a wire intersection.
|
|
|
blend:network
|
Creates blends on a list of edges and vertices that make up a single blend network.
|
|
|
blend:on-vertex
|
Attaches vertex blend attributes to each vertex in the input list.
|
|
|
blend:remove-from-edge
|
Removes blend attributes, if any, from the input edge.
|
|
|
blend:remove-from-vertex
|
Removes blend attributes, if any, from the input vertex.
|
|
|
blend:var-rad-on-edge
|
Attaches a variable radius blend attribute to each edge in the input list.
|
|
|
blend:vertex-info
|
Lists the vertex blend type and internal data values.
|
|
|
edge:fillet
|
Creates a fillet blend on two edge
entrays (entities with rays).
|
|
|
solid:blend-edges
|
Creates a cylindrical blend on a list of edges.
|
|
|
solid:chamfer-edges
|
Creates a chamfer blend on a list of edges.
|