abl:edge-blend
List of: Scheme Extensions
Subjects: Blending
Contents: Advanced Blending

Action: Creates an edge sequence blend.

Filename: abl/abl_scm/abl_scm.cxx

Syntax: (abl:edge-blend edge {vradius=null | vradius-pair


round1=-1.0 round2=-1.0}


[single=#f] [lofted-keyword loft-edge=null]


[section-keyword left-thumbweight=-1.0


right-thumbweight=-1.0]


[side-edge1=null [tangent-flag1=#f]]


[side-edge2=null [tangent-flag2=#f]]


[start-setback=-1.0 end-setback=1.0])

Arg Types: edge edge

vradius vradius

vradius-pair vradius . vradius

round1 real

round2 real

single boolean

lofted-keyword string | symbol

loft-edge edge

section-keyword string | symbol

left-thumbweight real

right-thumbweight real

side-edge1 edge

tangent-flag1 boolean

side-edge2 edge

tangent-flag2 boolean

start-setback real

end-setback real

Returns: edge

Description: This extensions performs edge sequence-following blending. It requires an edge on which to place the blend attribute. The edge must belong to a solid body. Next, one vradius object or a pair of vradius objects must be specified. vradius defines the blend to be applied to the edge.


If the single flag is set to #f (default), the attribute is placed on the entire set of edges and/or vertices forming the blendable network that is attached to the given edge. Otherwise, the blend attribute is placed only on the given edge.


A lofted-edge option is available which allows specification of an edge along which the blend is to be lofted. To specify a lofted edge, either the string "lofted" or the symbol 'lofted, followed by an edge should be entered.


A section form option is available which allows specification of thumbweights. Thumbweights provide a mechanism for custom designing a blend cross section by specifying two numbers, called left-thumbweight and right-thumbweight, which affect the shape of the cross section. For example, if both are set to unity (1), the cross section is circular. Increasing one thumbweight has the effect of pulling the section curve toward the corresponding end. The values for both thumbweights must be positive. To specify thumbweights, either the string "section" or the symbol 'section should be entered, followed by the thumbweight values.


This extension has two options (side-edge1 and side-edge2) for side entities for the sequence blend. Up to two such side entities can be selected. A side entity must be an edge belonging to the face having another edge that is to be blended. The side entity can be tangent to the face (tangent-flag* set to #t).


Different setbacks may be applied to each end of the blended edge using start-setback and end-setback. A setback defines a plane normal to the edge through a point on the edge, set back from the edge end by the given distance. The intersection of the setback plane with the blend surface for the edge defines a curve that may be used to bound part of the face for the blended vertex at the end of the edge. If the vertex is not blended, the setback has no effect. The setback distance along the edge is calculated by finding the tangent derivative at the edge end, and hence a distance in edge parameter corresponding to the setback value (given in global body space), and from that, a setback parameter value at which the defining point of the setback plane lies.


To complete the blending operations after various entities have been marked as having blends, the extension blend:network, which fixes the body, must be issued.


edge is an input edge.


vradius is the blend to be applied to the edge.


vradius-pair is the blend to be applied to the edge.


round1 is a rounded edge.


round2 is a rounded edge.


single is a flag used to set whether the attribute is placed on the entire set of edges.


lofted-keyword is a keyword or symbol.


loft-edge is an option available which allows specification of an edge along which the blend is to be lofted.


section-keywordis a keyword or symbol.


left-thumbweight is a thumbweight for custom designing a blend cross section.


right-thumbweight is a thumbweight for custom designing a blend cross section.


side-edge1 side entity for the sequence blend.


side-edge2 side entity for the sequence blend.


tangent-flag1 flag set for entity to be tangent to the face.


tangent-flag2flag set for entity to be tangent to the face.


start-setback setbacks applied to the start.


end-setback setbacks applied to the start.

Example: ; abl:edge-blend

; Create a solid block

(define block1 (solid:block (position -20 -20 -20)


(position 15 20 25)))

;; block1

; OUTPUT Original


; Create a two-ends vradius

(define rad1 (abl:two-ends-rad 5 10))

;; rad1

(define edges1 (entity:edges block1))

;; edges1

; Define an edge to put an attribute on

(define edge1 (car edges1))

;; edge1

; Put a blend attribute on the selected edge

(define blend (abl:edge-blend edge1 rad1))

;; blend

; Complete the blend

(blend:fix edge1)

;; #t

(define edge2 (car (cdr (cdr (cdr (cdr


(cdr (cdr edges1))))))))

;; edge2

(define rad2 (abl:rnd-ch-rad 5 10 8 12))

;; rad2

; Put a blend attribute on the selected edge

; This creates a chamfer blend that is rounded.

(define chamfer (abl:edge-blend edge2 rad2 0.5 0.5))

;; chamfer

; Complete the blend

(blend:fix edge2)

;; #t

; OUTPUT Result



Figure 3-8. abl:edge-blend
PDF/ABL/03SC.PDF
HTM/DATA/ABL/ABL/03SC/0008.HTM