Scheme Extensions |
|
|
Technical Article |
Scheme is a public domain programming language, based on the LISP language,
that uses an interpreter to run commands. ACIS provides extensions (written in
C++) to the native Scheme language that can be used by an application to
interact with ACIS through its Scheme Interpreter. The C++ source files for
ACIS Scheme extensions are provided with the product. Spatials Scheme based
demonstration application, Scheme ACIS Interface Driver Extension (Scheme
AIDE), also uses these Scheme extensions and the Scheme Interpreter.
|
blank | body |
radius | real |
limit-list | edge | (edge ...) |
acis-opts | acis-options |
; abl:abh-edge-offset
; Create a block
(define a (solid:block
(position -25 -25 -25)
(position 25 25 25)))
;; a
(define b (bool:unite a (solid:block
(position -25 -25 -25)
(position -5 25 45))))
;; b
(define e1 (list (list-ref (entity:edges a) 8)))
;; e1
(entity:set-color e1 3)
;; ()
; OUTPUT Original
(define n (abl:abh-edge-offset a 10 e1))
;; n
(entity:set-color e1 3)
;; ()
; OUTPUT Result
Figure. abl:abh-edge-offset |
[Top]
blank | body |
edge | edge |
distance | real |
direction | gvector |
left | boolean |
sequence | boolean |
acis-opts | acis-options |
; abl:abh-edge-project
; Create a block
(define b (solid:block
(position 0 0 0)
(position 1 1 1)))
;; b
(zoom-all)
;; #[view 263342]
(define e (list-ref (entity:edges b) 3))
;; e
(entity:set-color e 1)
;; ()
; OUTPUT Original
(define e2 (abl:abh-edge-project b e .1
(gvector -3 5 1) #f #f))
;; e2
; OUTPUT Result
Figure. abl:abh-edge-project |
[Top]
int-graph | body |
edge-list | edge | (edge ...) |
acis-opts | acis-options |
; abl:abh-imprint
; Create a block
(define a (solid:block
(position -25 -25 -25)
(position 25 25 25)))
;; a
(define b (bool:unite a (solid:block
(position -25 -25 -25)
(position -5 25 45))))
;; b
(define e1 (list (list-ref (entity:edges a) 8)))
;; e1
(entity:set-color e1 3)
;; ()
; OUTPUT Original
(define n (abl:abh-edge-offset a 10 e1))
;; n
(define n1 (abl:abh-slice a n))
;; n1
(define e2 (list-ref (entity:edges n1)2))
;; e2
(entity:set-color e1 1)
;; ()
; OUTPUT Intermediate
(abl:abh-imprint n1 e2)
;; #t
(entity:delete n1)
;; ()
(entity:delete n)
;; ()
(render:rebuild)
;; ()
; OUTPUT Result
Figure. abl:abh-imprint |
[Top]
blank | body |
tool | body |
acis-opts | acis-options |
; abl:abh-slice
; Create a block
(define a (solid:block
(position -25 -25 -25)
(position 25 25 25)))
;; a
(define b (bool:unite a (solid:block
(position -25 -25 -25)
(position -5 25 45))))
;; b
(define e1 (list (list-ref (entity:edges a) 8)))
;; e1
(entity:set-color e1 3)
;; ()
; OUTPUT Original
(define n (abl:abh-edge-offset a 10 e1))
;; n
(define n1 (abl:abh-slice a n))
;; n1
(entity:set-color n1 1)
;; ()
; OUTPUT Result
Figure. abl:abh-slice |
[Top]
bl-ents | (entity ...) |
hl-ents |
(entity ...) |
find-smooth-bl |
|
find-smooth-hl |
|
acis-opts |
; abl:blend-holdline
; define some geometry for blending
(define c1(solid:cylinder
(position 0 0 -10)
(position 0 0 10) 20))
;; c1
(define c2(solid:cylinder
(position 6 0 -5)
(position 6 0 50) 6))
;; c2
(define c(bool:unite c1 c2))
;; c
; Pick the edge to be the holdline
(ray:queue 10.8852 -404.643 294.282
-0.0489231 0.826696 -0.560517 1)
;; #[ray (10.8852 -404.643 294.282) (-0.0489231 0.826696 -0.560517)]
(define e1(pick-edge))
;; e1
(entity:set-color e1 1)
;; ()
; Pick the edge to be blended.
(ray:queue 31.7696 -410.036 284.506
-0.0489231 0.826696 -0.560517 1)
;; #[ray (31.7696 -410.036 284.506) (-0.0489231 0.826696 -0.560517)]
(define e2(pick-edge))
;; e2
(entity:set-color e2 3)
;; ()
; blend the edge
(abl:blend-holdline e2 e1)
;; #[entity 11 1]
; OUTPUT Rendered Result
Figure. abl:blend-holdline |
[Top]
left_face_list | entity | (entity...) |
right_face_list | entity | (entity...) |
center_face_list | entity | (entity...) |
find_smooth_bl | boolean |
hlp_pos | position |
convexity | boolean |
acis-opts | acis-options |
; abl:blend-three-ent
; Create a block (define block1 (solid:block -20 -20 -20 20 20 20) ) ;; block1 ; Pick the supports of the blend (ray:queue 49.7368 -63.7312 34.9329 -0.408248 0.816497 -0.408248 1) (define left-face (pick-face)) ;; left-face (ray:queue 30.0582 -64.8682 52.3375 -0.408248 0.816497 -0.408248 1) (define center-face (pick-face)) ;; center-face (ray:queue -67.176 -38.8504 42.5509 0.615359 0.577399 -0.536604 1) (define right-face (pick-face)) ;; right-face ; Put a three entity blend attribute (define blend (abl:blend-three-ent left-face right-face center-face)) ;; blend ; Complete the blend (blend:fix block1) ;; #t |
[Top]
radius | real |
acis-opts | acis-options |
; abl:const-rad
; Create a block
(define block1 (solid:block
(position -20 -20 -20)
(position 15 20 25)))
;; block1
; OUTPUT Original
; Create a vradius
(define rad1 (abl:const-rad 20))
;; rad1
; Define an edge
(define edges1 (entity:edges block1))
;; edges1
; Put a blend attribute on the selected edge
(define blend (abl:edge-blend
(car edges1) rad1))
;; blend
; Complete the blend
(blend:fix (car edges1))
;; #t
; OUTPUT Result
Figure. abl:const-rad |
[Top]
svradius | vradius |
min-param | real |
max-param | real |
max-iteration | integer |
; abl:create-vradius-wire
; Define a vradius
(define vrad (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)))
;; vrad
(define wireb (abl:create-vradius-wire vrad 0.0 10.0 200))
;; wireb
; OUTPUT Original
(define sweep1 (sweep:law wireb
(position 0 0 0) (gvector 0 0 1)
(sweep:options "sweep_angle" 360 "solid" #t)))
;; sweep1
(zoom-all)
;; #[view 984568]
; OUTPUT Result
Figure. abl:create-vradius-wire |
[Top]
svradius | vradius |
in-edge | edge |
max-iteration | integer |
; 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. abl:create-vradius-wire-from-edge |
[Top]
edge | edge |
vradius | vradius |
vradius-pair | vradius . vradius |
round1 | real |
round2 | real |
single | boolean |
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 |
start-setback-diff | real |
end-setback-diff | real |
start-stop-angle | real |
end-stop-angle | real |
lofted-keyword | string | symbol |
loft-edge | edge |
acis-opts | acis-options |
; 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. abl:edge-blend |
[Top]
ref-face-left | boolean |
major1 | real |
min1 | real |
angle1 | real |
angle2 | real |
major2 | real |
min2 | real |
acis-opts | acis-options |
; abl:ell-rad
; Create a solid block
(define block1 (solid:block
(position -20 -20 -20)
(position 15 20 25)))
;; block1
; OUTPUT Original
; Create an elliptical vradius
(define rad1 (abl:ell-rad #t 10 20 35 10 20 25))
;; 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:ell-rad #t 10 20 35))
;; 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
; Render the result
(render)
;; ()
; OUTPUT Rendered Result
Figure. abl:ell-rad |
[Top]
face1 | face |
edge1 | edge |
tangent-keyword | string | symbol |
tangent-face1 | face |
face2 | face |
edge2 | edge |
tangent-face2 | face |
vradius | vradius |
vradius-pair | vradius . vradius |
round1 | real |
round2 | real |
position | position |
convexity | boolean |
def-edge | edge |
section-keyword | string | symbol |
left-thumbweight | real |
right-thumbweight | real |
acis-opts | acis-options |
; abl:ent-ent-blend ; Create a solid block (define block1 (solid:block (position -30 -30 -5) (position 30 30 5))) ;; block1 (define sphere1 (solid:sphere (position 0 0 25) 15)) ;; sphere1 (define blob1 (bool:unite sphere1 block1)) ;; blob1 ; Set the color for blob1 (entity:set-color sphere1 3) ;; () ; OUTPUT Original ; Create a vradius (define rad1 (abl:const-rad 10)) ;; rad1 (define face1 (pick:face (ray (position 0 0 0) (gvector 0 0 1)) 1)) ;; face1 (entity:set-color face1 4) ;; () (define face2 (pick:face (ray (position 0 0 20) (gvector 1 0 0)) 1)) ;; face2 (entity:set-color face2 6) ;; () ; Create an entity-entity blend. (define blend (abl:ent-ent-blend face1 face2 rad1 (position 25 0 10) #f)) ;; blend ; Complete the blend (blend:fix blob1) ;; #t ; OUTPUT Result ; Render the result (render) ;; () ; OUTPUT Rendered Result Figure. abl:ent-ent-blend |
[Top]
svradius | vradius |
sreal | real |
min-param | real |
max-param | real |
; abl:eval-vradius-value ; Create a vradius (define vrad (abl:make-radius-param-rads-tan (list 0.0 0.2 0.4 0.7 1.0) (list 3 0.1 0.1 3 3))) ;; vrad (abl:eval-vradius-value vrad 10.0 1.0 100.0) ;; 1.15890308039068 |
[Top]
svradius | vradius |
sreal | real |
in-edge | edge |
; abl:eval-vradius-value-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 (abl:eval-vradius-value-from-edge (blendvar e0) 3.0 e0) ;; 2.67393877928773 |
[Top]
width | real |
acis-opts | acis-options |
; abl:fixed-width-rad ; Create a solid block (define block1 (solid:block (position -20 -20 -20) (position 15 20 25))) ;; block1 ; OUTPUT Original ; Create a fixed-width vradius (define rad1 (abl:fixed-width-rad 10)) ;; rad1 (define edges1 (entity:edges block1)) ;; edges1 (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 ; OUTPUT Result Figure. abl:fixed-width-rad |
[Top]
holdline | edge | curve |
acis-opts |
; abl:holdline-rad ; create a cube (solid:block -10 -10 -10 10 10 10) ;; #[entity 1 1] ; define an edge to be used as a holdline for holdline blending (define e1 (edge:linear (position -10 -10 5) (position 10 -10 0))) ;; e1 (entity:set-color e1 1) ;; () ; pick an edge to blend (ray:queue 202.603 -406.772 208.597 -0.408248 0.816497 -0.408248 1) ;; #[ray (202.603 -406.772 208.597) (-0.408248 0.816497 -0.408248)] (define e2 (pick-edge)) ;; e2 (entity:set-color e2 3) ;; () ; define the holdline variable radius object (define vrad(abl:holdline-rad e1)) ;; vrad ; set the blend attribute on the edge using the holdline radius object (abl:edge-blend e2 vrad) ;; #[entity 3 1] ; fix the blend on the edge (blend:fix e2) ;; #t Figure. abl:holdline-rad |
[Top]
param-list | real | (real ...) |
radii-list | real | (real ...) |
acis-opts | acis-options |
; abl:make-radius-param-rads ; Create geometry to illustrate extension. ; Create a solid block, a cylinder, and unite them. (define block (solid:block (position -20 -20 -20) (position 20 20 20))) ;; block (define cylinder (solid:cylinder (position 20 0 -20) (position 20 0 20) 20)) ;; cylinder (define my-part (solid:unite block cylinder)) ;; my-part ; Pick an edge on the body. (define def-edge (pick:edge (ray (position 10 -20 100) (gvector 0 0 -1)))) ;; def-edge ; Display the edge in red. (define set-color (entity:set-color def-edge RED)) ;; set-color ; OUTPUT Original ; Define a list of parameter values. (define param-list (list 0.0 40.0 102.8318 142.8318)) ;; param-list ; Define a list of radius values. (define radii-list (list 10 4 6 8)) ;; radii-list ; Create the v-radius object. (define v-radius (abl:make-radius-param-rads param-list radii-list)) ;; v-radius ; Complete the blend. (define blend1 (abl:edge-blend def-edge v-radius)) ;; blend1 (define blend2 (blend:network (blend:get-network def-edge))) ;; blend2 ; OUTPUT Result ;; () ; OUTPUT Rendered Result
Figure. abl:make-radius-param-rad |
[Top]
param-list | real | (real ...) |
radii-list | real | (real ...) |
slope-keyword | string |
slope | real |
acis-opts | acis-options |
; abl:make-radius-param-rads-tan ; Create geometry to illustrate extension. ; Create a solid block, a cylinder, and unite them. (define block (solid:block (position -20 -20 -20) (position 20 20 20))) ;; block (define cylinder (solid:cylinder (position 20 0 -20) (position 20 0 20) 20)) ;; cylinder (define my-part (solid:unite block cylinder)) ;; my-part ; Pick an edge on the body. (define def-edge (pick:edge (ray (position 10 -20 100) (gvector 0 0 -1)))) ;; def-edge ; Display the edge in red. (define set-color (entity:set-color def-edge RED)) ;; set-color ; Define a list of parameter values. (define param-list (list 0.0 40.0 102.8318 142.8318)) ;; param-list ; Define a list of radius values. (define radii-list (list 10 4 6 8)) ;; radii-list ; Create the v-radius object. (define v-radius (abl:make-radius-param-rads-tan param-list radii-list)) ;; v-radius ; OUTPUT Original ; Complete the blend. (define blend1 (abl:edge-blend def-edge v-radius)) ;; blend1 (define blend2 (blend:network (blend:get-network def-edge))) ;; blend2 ; OUTPUT Result (render) ;; () ; OUTPUT Rendered
Figure. abl:make-radius-param-rads-tan |
[Top]
position-list | position | (position ...) |
radii-list | real | (real ...) |
curve-edge | edge | curve |
start-tan | string |
end-tan | string |
transform | transform |
acis-opts | acis-options |
; Example-1 abl:pos-rad ; Create a solid block. (define block1 (solid:block (position -20 -30 -20) (position 15 30 25))) ;; block1 ; OUTPUT Original ; Define the edges. (define edges1 (entity:edges block1)) ;; edges1 ; Define which edge to attach the attribute. (define edge1 (car edges1)) ;; edge1 ; Define the vertex. (define vert1 (entity:vertices edge1)) ;; vert1 (define start1 (vertex:position (car vert1))) ;; start1 (define end1 (vertex:position (car (cdr vert1)))) ;; end1 (define rad1 (abl:pos-rad (list start1 (position 15 -5 25) (position 15 0 25) (position 15 5 25) end1) (list 5 10 15 3 1) edge1)) ;; rad1 ; Put a blend attribute on the selected edge. (define blend (abl:edge-blend edge1 rad1)) ;; blend ; Complete the blend. (blend:fix edge1) ;; #t ; OUTPUT Result ; Render the result. (render) ;; () ; OUTPUT Rendered Result Figure. Example-1 abl:pos-rad ; Example-2 :abl:pos-rad. ; Create the geometry to illustrate command. Create ; a block and a cylinder and unite them. (part:clear) ;; #t (define block (solid:block (position -20 -20 -20) (position 20 20 20))) ;; block (define cylinder (solid:cylinder (position 20 0 -20) (position 20 0 20) 20)) ;; cylinder (define united (solid:unite block cylinder)) ;; united ; Create a list of all entities. (define entity-list (part:entities)) ;; entity-list ; Get the first entity from the entity list. (define first-entity (car entity-list)) ;; first-entity ; Transform the body. (define transform (body:get-transform united)) ;; transform ; Pick an edge on the body. (define chosen-one (pick:edge (ray (position 10 -20 100) (gvector 0 0 -1)))) ;; chosen-one ; Display it in red. (define redshoes (entity:set-color chosen-one RED)) ;; redshoes ; Get all of the edges that are smooth to the ; selected edge. (define smooth (blend:get-smooth-edges chosen-one)) ;; smooth ; Display them in blue. (define bluemonday (entity:set-color smooth BLUE)) ;; bluemonday ; Construct a curve approximating the smooth edges. (define smooth-curve-list (blend:smooth-edges-to-curve smooth)) ;; smooth-curve-list ; Find the calibration curve. (define smooth-curves (car smooth-curve-list)) ;; smooth-curves ; Define a position list. (define positions (list (position -20 -20 -20) (position 20 -20 20) (position 20 20 20) (position -20 20 20))) ;; positions ; Define a radii list. (define radii-list (list 8 5 5 8)) ;; radii-list ; Build the v-radius object. (if transform (define v-radius (abl:pos-rad positions radii-list smooth-curves transform)) (define v-radius (abl:pos-rad positions radii-list smooth-curves))) ;; v-radius ; OUTPUT Original ; Complete the blend. (define blend (abl:edge-blend chosen-one v-radius)) ;; blend (define complete (blend:network (blend:get-network chosen-one))) ;; complete ; OUTPUT Result Figure. Example-2 abl:pos-rad |
[Top]
left1 | real |
right1 | real |
left2 | real |
right2 | real |
acis-opts | acis-options |
; abl:rnd-ch-rad ; Create a solid block (define block1 (solid:block (position -20 -20 -20) (position 15 20 25))) ;; block1 ; OUTPUT Original ; Define an edge for the blend. (define edges1 (entity:edges block1)) ;; edges1 ; Define an edge to put an attribute on (define edge1 (car edges1)) ;; edge1 ; Define the radius. (define rad1 (abl:rnd-ch-rad 5 30 10 15)) ;; rad1 ; Put a blend attribute on the selected edge (define blend (abl:edge-blend edge1 rad1 1 1)) ;; blend ; Complete the blend (blend:fix edge1) ;; #t ; OUTPUT Result Figure. abl:rnd-ch-rad |
[Top]
edge-list | entity | (entity ...) |
vradius | vradius |
vradius-pair | vradius | vradius |
section-keyword | string |
value1 | real |
value2 | real |
calibration-keyword | string |
calibration-curve | curve |
start-edge | edge |
end-edge | edge |
side-edge1 | edge |
tangent-flag1 | boolean |
side-edge2 | edge |
tangent-flag2 | boolean |
start-setback | real |
end-setback | real |
start-setback-diff | real |
end-setback-diff | real |
start-stop-angle | real |
end-stop-angle | real |
lofted-keyword | string |
loft-edge | edge |
acis-opts | acis-options |
; abl:set-abh-blends ; Create geometry to demonstrate command. ; Create a solid block. (define block1 (solid:block (position -20 -20 -20) (position 15 20 25))) ;; block1 ; Define an edge for the blend. (define edges1 (entity:edges block1)) ;; edges1 ; Define an edge to put an attribute on. (define att-edge (car edges1)) ;; att-edge ; Define the calibration curve. (define curve (car (blend:smooth-edges-to-curve att-edge))) ;; curve ; Define the radius. (define rad1 (abl:rnd-ch-rad 5 30 10 15)) ;; rad1 ; Put a blend attribute on the selected edge. (define blend (abl:set-abh-blends att-edge rad1 'calibration-curve curve att-edge att-edge 'rounded-chamfer 0 0)) ;; blend ; OUTPUT Original ; Complete the blend. (define finish (blend:fix att-edge)) ;; finish ; OUTPUT Result Figure. abl:set-abh-blends |
[Top]
entity | face | edge | vertex |
action | integer |
position | position |
acis-opts | acis-options |
Value |
Instruction |
1 |
roll on |
2 |
cap |
other |
unknown |
The roll on instruction (action=1) is used to tell the blend to roll on to the encountered entity, when the normal default would have been to cap the blend at that point. The cap instruction (action=2) is used to tell the blend to begin capping the existing blend face rather than to roll on to the new entities. If the action passed is unknown, all instructions on the entity are deleted.
The position argument may be provided to associate a position with the instruction to resolve ambiguities. Only one instruction per owner is allowed to refer to any particular position, and likewise, only one instruction per owner may be specified without a position.
; abl:set-instruction ; Create a solid block (define block1 (solid:block (position -20 -20 -20) (position 20 20 20))) ;; block1 (define cylinder1 (solid:cylinder (position 20 0 -20) (position 20 0 20) 20)) ;; cylinder1 (define blob1 (solid:unite block1 cylinder1)) ;; blob1 (define topface1 (pick:face (ray (position 0 0 0) (gvector 0 0 1)) 1)) ;; topface1 (define planarface1 (pick:face (ray (position 0 0 0) (gvector 0 -1 0)) 1)) ;; planarface1 (define curveface1 (pick:face (ray (position 0 0 0) (gvector 1 0 0)) 1)) ;; curveface1 ; OUTPUT Original ; Define the radius. (define rad1 (abl:const-rad 10)) ;; rad1 (abl:set-instruction curveface1 2) ;; "cap" ; Put a blend attribute on the selected edge (define blend (abl:ent-ent-blend topface1 planarface1 rad1 (position 0 0 0) #t)) ;; blend ; Complete the blend (blend:fix blob1) ;; #t ; OUTPUT Result Figure. Resulting blend from abl:set-instruction is between the red and cyan colored faces. The blue-colored face (curveface1) is the capping face. |
[Top]
edge | edge |
acis-opts | acis-options |
; abl:spline-rad ; Create a bs3_edge (define edge1 (edge:bezier (position 5 0 0) (position 15 0 20) (position 25 0 20) (position 35 0 0))) ;; edge1 ; Create a vradius (abl:spline-rad edge1) ;; #[functional vradius 595a2a0] |
[Top]
radius1 | real |
radius2 | real |
acis-opts | acis-options |
; abl:two-ends-rad ; 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 10 25)) ;; 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 ; OUTPUT Result Figure. abl:two-ends-rad |
[Top]
edge | edge |
radius-1 | real |
radius-2 | real |
fix | string |
single | string |
acis-opts | acis-options |
; abl:var-round ; Create block topology to illustrate this command. (define block1 (solid:block (position -20 -10 -30) (position 15 25 10))) ;; block1 ; OUTPUT Original (define eds1 (entity:edges block1)) ;; eds1 (define blend1 (abl:var-round (list-ref eds1 9) 2 3 "fix")) ;; blend1 (define eds2 (entity:edges block1)) ;; eds2 (define blend2 (abl:var-round (list-ref eds2 8) 2 3 "fix")) ;; blend2 ; OUTPUT Result Figure. abl:var-round |
[Top]
edge-list | edge | (edge ...) |
position-list | position | (position ...) |
radii-list | real | (real ...) |
start-slope | real |
end-slope | real |
acis-opts | acis-options |
; solid:blend-edges-pos-rads ; Define an xyz plus radius. (define N 9) ;; N (define H 10) ;; H (define R (* 0.4 H)) ;; R ; Define a solid prism. (define p (solid:prism (* 4 H) H H N)) ;; p ; Define the edges for the prism. (define all_edges (entity:edges p)) ;; all_edges (define blend1 (solid:blend-edges all_edges R)) ;; blend1 ; Define a solid block. (define b (solid:block (position (- 0 H) (- 0 H) (- 0 H)) (position H H 0))) ;; b (define intersect (solid:intersect p b)) ;; intersect ; Blend bottom edges with some CONST radius sections. (define face (pick:face (ray (position 0 0 (* H -0.5)) (gvector 0 0 -1)))) ;; face (define bottom_edges (entity:edges face)) ;; bottom_edges (define z0 (- 0 H)) ;; z0 ; Define list of positions. (define pos_list (list (position H 0 z0) (position 0 H z0) (position (- 0 H) 0 z0) (position 0 (- 0 H) z0))) ;; pos_list ; Define the radius list. (define rad_list (list (* 0.7 R) (* 0.7 R) (* 0.1 R) (* 0.1 R))) ;; rad_list ; OUTPUT Original ; Blend the edges using the defined pairs. (define blend2 (solid:blend-edges-pos-rads bottom_edges pos_list rad_list)) ;; blend2 ; OUTPUT Result Figure. solid:blend-edges-pos-rads |
[Top]
entity-list | entity | (entity ...) |
left-beginning-range | real |
right-beginning-range | real |
left-end-range | real |
right-end-range | real |
left-round-chamfer-radius | real |
right-round-chamfer-radius | real |
acis-opts | acis-options |
; solid:var-chamfer-edges ; Create a wiggle to illustrate command. (define wiggle1 (solid:wiggle 40 40 20 -1 0 1 0)) ;; wiggle1 ; Chamfer a top edge. (define edge (pick:edge (ray (position 0 0 0) (gvector 0 20 10)))) ;; edge ; Define details of rotation. (define rotate (transform:rotation (position 0 0 0) (gvector -5 0 0) 45)) ;; rotate ; Apply the rotation to the wiggle1 entity. (define apply (entity:transform wiggle1 rotate)) ;; apply ; OUTPUT Original ; Execute the chamfer command. (define chamfer (solid:var-chamfer-edges (list edge) 10 5 0.5 0.5)) ;; chamfer ; OUTPUT Result Figure. solid:var-chamfer-edges |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.