abl:create-vradius-wire-from-edge
List of: Scheme Extensions
Subjects: Blending
Contents: Advanced Blending

Action: Creates a wire body corresponding to a particular vradius object (reparameterized).

Filename: abl/abl_scm/abl_scm.cxx

APIs: api_make_wire

Syntax: (abl:create-vradius-wire-from-edge svradius in-edge


max-iteration)

Arg Types: svradius vradius

in-edge edge

max-iteration integer

Returns: wire-body

Description: This Scheme extension copies the vradius object, uncalibrates the copy, reparameterizes the copy on the parameter interval of the input edge, calibrates the copy, evaluates the vradius copy "max-iteration" times on the interval of the input edge, uncalibrates the copy, and then returns a wire body with radii corresponding to the evaluation values.


svradius is the radius of an object.


in-edge is a input edge.


max-iteration is the maximum iteration.

Limitations: The input edge must have a finite parameter interval.

Example: ; abl:create-vradius-wire-from-edge

; create a vradius

(define blendvar (lambda (edge)


(let ((rad2 (abl:make-radius-param-rads-tan


(list 0.0 0.2 0.4 0.7 1.0)


(list 3.0 0.1 0.1 3.0 3.0)))) rad2)))

;; blendvar

(define a (solid:sphere (position 0 0 0) 50))

;; a

(define b (solid:torus (position 35 0 0) 55 25))

;; b

(define union (solid:unite a b))

;; union

(define edgelist (entity:edges union))

;; edgelist

(define e0 (list-ref edgelist 0))

;; e0

(define wireb (abl:create-vradius-wire-from-edge


(blendvar e0) e0 50))

;; wireb

(entity:set-color wireb 1)

;; ()

(zoom-all)

;; #[view 2033168]

; OUTPUT Original


(define sweep1 (sweep:law wireb


(position 0 0 0) (gvector 0 0 1)


(sweep:options "sweep_angle" 360 "solid" #t)))

;; sweep1

; OUTPUT Result



Figure 3-7. abl:create-vradius-wire-from-edge
PDF/ABL/03SC.PDF
HTM/DATA/ABL/ABL/03SC/0007.HTM