Scheme Extensions Aa thru Sk |
|
|
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. |
entity | entity |
Description
This extension uses a face as an input argument to retrieve the underlying laws
for the surface on which the face lies.
This extension is a two-step process with running the face:get-loft-laws extension as the first step followed by selecting the face for which you want the law information. No information is returned until a face is selected. Notice the mouse pointer becomes a cross-over-diamond shape when this extension has been generated and is waiting for a face to be selected. To select a face, position and select/click the mouse pointer on that face.
Returns an error if the face selected has no laws defined or is not a skin_spl_surface.
; face:get-loft-laws ; Define a point to loft to. (define pnt (wire-body:points (position 0 0 30))) ;; pnt ; Get the coedges off that point. (define cl1 (entity:coedges pnt)) ;; cl1 ; Define a block to loft from. (define blk (solid:block (position -20 -20 0) (position 20 20 10))) ;; blk ; Get the coedges off the block. (define cl2 (entity:coedges blk)) ;; cl2 ; Define a law for the point. (define lawa (law "vec(cos(t),sin(t),0)")) ;; lawa (define dom0 (law "domain(law1,law2,law3)" lawa (law:eval "0.0") (law:eval "2.0*Pi"))) ;; dom0 ; Make a section data structure for the point, its ; coedges, and its law. (define sec1 (section cl1 (list dom0) #f 20)) ;; sec1 ; Make a section data structure for the block; this ; has no explicit laws. (define sec2 (section (list (list-ref cl2 1) (list-ref cl2 3) (list-ref cl2 5) (list-ref cl2 7)) #f -1 #f)) ;; sec2 ; Loft the sections. (define loft (sheet:loft-wires (list sec1 sec2) #f #t #t)) (sheet:2d loft) ;; loft ; Get the law from the lofted face. ; This extension has two steps: run the ; face:get-loft-laws extension and select the face ; for which you want the law information. (No ; information is returned until a face is selected. ; To select a face, position and select/click the ; mouse pointer on that face. Notice the mouse ; pointer becomes a cross-over-diamond shape when ; this extension has been generated and is waiting ; for a face to be selected. (define law-list (face:get-loft-laws (pick-face))) ; There is no return until a face is selected. ; Mouse-select a face. ;; law-list |
[Top]
coedges[list] | coedge | (coedge ...) |
laws[list] | law | (law ...) |
in-flag | boolean |
take-off-factor | real |
no-loop-flag | boolean |
acis-opts | acis-options |
Description
The section Scheme data type creates a data structure used as input to the
sheet:loft-wires extension.
; section ; Establish the correct options for viewing. (option:set "cone_par" #t) ;; #f ; Define silhouette capability to "off" for faster ; calculation. (option:set "sil" #f) ;; #t ; Define "u" parameter lines. (option:set "u_par" 5 ) ;; -1 ; Define "v" parameter lines. (option:set "v_par" 7 ) ;; -1 ; Create a cylindrical face. (define face1 (face:cylinder (position 0 0 0) (position 0 20 0) 20 )) ;; face1 ; Create a second cylindrical face. (define face2 (face:cylinder (position 0 40 0) (position 0 60 0) 50)) ;; face2 ; Get the coedge of the first face. (define coedges1 (entity:coedges face1)) ;; coedges1 ; Get the coedges of the second face. (define coedges2 (entity:coedges face2)) ;; coedges2 ; Define a section with a large take-off vector. (define section1 (section (list (list-ref coedges1 1)) #f 10)) ;; section1 ; OUTPUT Original ; Define second section with a small take-off vector ; and reverse direction. (define section2 (section (list (list-ref coedges2 0)) #t 1)) ;; section2 ; Create a lofted sheet body. (define sheet1 (sheet:loft-wires (list section1 section2) #f #t #t)) ;; sheet1 ; Color created loft face to view better. (entity:set-color sheet1 6) ;; () ; OUTPUT Result ; To view this from different angles. ; (load "rotsph.scm") ; (rotsph #t) ; Move with mouse. |
[Top]
section-list | section | section ... |
skin-options | skin_options |
acis-opts | acis-options |
Description
The
sheet:loft-wires
extension is similar to the sheet:skin-wires extension, except in this case one
of the input curves has a surface attached. The resulting surface that is
skinned across the wireframe bodies is constrained to be tangential to the
input surface at the boundary.
If two section inputs used as arguments into the sheet:loft-wires extension are relatively close to one another and have large values for their take-off-factor SPAvector magnitudes, the lofted surface may have some undesirable anomalies. These anomalies can be removed by recreating the sections with adjusted (smaller) take-off-factor values. Small values for the weighting of the take-off vectors mean the transition from the tangent to the lofted surface happen abruptly. Large values for the weighting of the take-off SPAvector mean that the transition from the tangent to the lofted surface happen more gradually. Extremely high weight values could result in excessive whipping in the lofted surface, if not a self-intersecting surface.
; sheet:loft-wires ; Set options to establish the correct viewing and ; set silhouette to off for faster calculation. (option:set "cone_par" #t) ;; #f (option:set "sil" #f) ;; #t (option:set "u_par" 5) ;; -1 (option:set "v_par" 7) ;; -1 ; Create two cylindrical faces. (define face1 (face:cylinder (position 0 0 0) (position 0 20 0) 20)) ;; face1 (define face2 (face:cylinder (position 0 40 0) (position 0 60 0) 50)) ;; face2 ; OUTPUT Original ; Define the coedges of the faces. (define coedges1 (entity:coedges face1)) ;; coedges1 (define coedges2 (entity:coedges face2)) ;; coedges2 ; Define a section with a large take-off vector. (define section1 (section (list (list-ref coedges1 1)) #f 10)) ;; section1 ; Define another section except with a small take-off ; vector and reverse direction. (define section2 (section (list (list-ref coedges2 0)) #t 1)) ;; section2 ; Define the options. (define ops (skin:options "arc_length" #f "no_twist" #t "align" #t "solid" #f)) ; ops ; Create a lofted sheet body. (define sheet1 (sheet:loft-wires (list section1 section2) ops)) ;; sheet1 ; Color the loft face to view better. (entity:set-color sheet1 6) ;; () ; OUTPUT Result Figure. sheet:loft-wires |
[Top]
section-list | section | (section ...) |
guide-list | edge | (edge ...) |
skin-options | skin_options |
acis-opts | acis-options |
Description
The
sheet:loft-wires-guides
extension is similar to the sheet: sheet:loft-wires
extension, except in this case the surfaces are constrained to the follow the
guide curves. The rules and regulations of the guides follow skinning with
guides.
If two section inputs used as arguments into the sheet:loft-wires extension are relatively close to one another and have large values for their take-off-factor vector magnitudes, the lofted surface may have some undesirable anomalies. These anomalies can be removed by recreating the sections with adjusted (smaller smaller) take-off-factor values. Small values for the weighting of the take-off vectors mean the transition from the tangent to the lofted surface happen abruptly. Large values for the weighting of the take-off vector mean that the transition from the tangent to the lofted surface happen more gradually. Extremely high weight values could result in excessive whipping in the lofted surface, if not a self-intersecting surface.
; sheet:loft-wires-guides ; Define wires and guides (part:clear) ;; #t (define wire1 (wire-body (list (edge:circular-3pt (position 0 0 0) (position 5 2.5 0) (position 10 0 0)) (edge:linear (position 10 0 0) (position 10 -10 0)) (edge:linear (position 10 -10 0) (position 0 -10 0)) (edge:linear (position 0 -10 0) (position 0 0 0))))) ;; wire1 (sheet:planar-wire wire1) ;; #[entity 25 1] (define wire2 (wire-body (list (edge:linear (position 0 50 5) (position 10 50 5)) (edge:linear (position 10 50 5) (position 10 60 5)) (edge:linear (position 10 60 5) (position 0 60 5)) (edge:linear (position 0 60 5) (position 0 50 5))))) ;; wire2 (sheet:planar-wire wire2) ;; #[entity 30 1] (define guide (edge:spline (list (position 5.0 2.5 0 ) (position 5 25 8.0) (position 5 50 5)) (gvector 0 1 0) (gvector 0 1 0))) ;; guide (define section1 (section (list-ref (entity:coedges wire1) 0) #f 1)) ;; section1 (define section2 (section (list-ref (entity:coedges wire2) 0) #t 1)) ;; section2 (define final_body (sheet:loft-wires-guides (list section1 section2) (list guide) (skin:options "perpendicular" #t "guidePreference" "constrain_to_guide" "solid" #f))) ;; *** Warning (kernel/sg_husk/net:BAD_SPLINE_APPROX) ;; Bad spline approximation ;; final_body |
[Top]
section-list-v | section | (section ...) |
section-list-u | section | (section ...) |
align-directions | boolean |
simplify | boolean |
tolerance | real |
ao | acis-options |
Description
This extension interpolates a surface through a network of bidirectional
curves. The given sections define the cross-sections to be interpolated by the
resulting sheet body. There must be at least four sections, two in each
direction. The start points of the curves in the v direction must lie on
the first curve in the u direction, and vice versa. The end points of
the v curves must lie in the last curve in the u direction, and
vice versa. All curves must intersect each other within
SPAresabs in the interior of the surface. The sections are
assumed to be simple, can be open or closed, and should be C1 continuous
tangent. The sections are copies, i.e., the originals remain.
Net sections cannot produce a surface in which there is any one point on the surface in which the U and V directions are the same or opposite. That is, in no case can an underlying curve of the user-defined wire body in the U direction meet tangentially with a user-defined curve of the wire body in the V direction.
; sheet:net-sections ; Start setting options. (option:set u_param 7) ;; -1 (option:set v_param 5) ;; -1 (refinement:set-prop (refinement) max edge length 0.5) ;; () ; Create some wire bodies. (define v0 (wire-body:points (position 0 0 10))) ;; v0 (define v1 (wire-body:points (list (position 1 1 0) (position -1 1 0) (position -1 -1 0) (position 1 -1 0) (position 1 1 0) ))) ;; v1 ; Define the coedges from list1. (define coedge-list1 (entity:coedges v0)) ;; coedge-list1 ; Define the coedges from list2. (define coedge-list2 (entity:coedges v1)) ;; coedge-list2 (define sec1 (section coedge-list1 #f)) ;; sec1 (define sec2 (section coedge-list2 #t)) ;; sec2 ; Create a lofted sheet body. (define ops (skin:options arc_length #f no_twist #t align #t perpendicular #f)) ;; ops ; Loft between the wires. (define loft1 (sheet:loft-wires (list sec1 sec2) ops)) ;; loft1 (define zoom (zoom-all))) ;; zoom ; Define transformation. (define trans1 (transform:translation (gvector 5 0 0))) ;; trans1 ; Apply transformation. (define transform (entity:transform loft1 trans1)) ;; transform ; Convert transformed body into double-sided sheet. (define convert (sheet:2d loft1)) ;; convert ; Define a couple laws. (define lawa (law vec (cos (t),sin (t),0))) ;; lawa (define lawb (law vec (0,0,-1))) ;; lawb ; Define a couple law domains. (define dom0 (law domain (law1,law2,law3) lawa (law:eval 0.0) (law:eval 2.0*Pi))) ;; dom0 (define dom1 (law domain (law1,0,1) lawb)) ;; dom1 ; Create list of coedges for first law domain. (define sec3 (section coedge-list1 (list dom0) #f 20)) ;; sec3 ; Create list of coedges for second law domain. (define sec4 (section coedge-list2 (list dom1 dom1 dom1 dom1) #t 1)) ;; sec4 ; Loft (with laws). (sheet:net-sections (list sec3 sec4) (entity:coedges v1)) ;; #t |
[Top]
body-list-v | wire-body | wire-body ... |
body-list-u | wire-body | wire-body ... |
skin-options | skin_options |
align-directions | boolean |
simplify | boolean |
tolerance | real |
acis-opts | acis-options |
Description
The
sheet:net-wires
extension is similar to the sheet:skin-wires extension.
This extension interpolates a surface through a network of bidirectional
curves. The given wires define the cross-sections to be interpolated by the
resulting sheet body. There must be at least four wire bodies, two in each
direction. The start points of the curves in the v direction must lie on
the first curve in the u direction, and vice versa. The end points of
the v curves must lie in the last curve in the u direction, and
vice versa. All curves must intersect each other within
SPAresabs in the interior of the surface. The wire bodies are
assumed to be simple, meaning only the first wire of each body is used for the
net surface. The wires can be open or closed. The wires are copies, i.e., the
originals remain. The wires should be C1 continuous tangent.
Net sections cannot produce a surface in which there is any one point on the surface in which the U and V directions are the same or opposite. That is, in no case can an underlying curve of the user-defined wire body in the U direction meet tangentially with a user-defined curve of the wire body in the V direction.
; sheet:net-wires ; Establish the correct options for viewing (option:set "sil" #f) ;; #t (option:set "u_par" 5) ;; -1 (option:set "v_par" 7) ;; -1 ; Create a series of points to use later for splines. (define v1 (list (position 0 0 0) (position 5 10 0) (position 10 5 0) (position 15 15 0) (position 20 0 0))) ;; v1 (define v2 (list (position 0 10 5) (position 5 5 5) (position 10 15 5) (position 15 10 5) (position 20 10 5))) ;; v2 (define v3 (list (position 0 20 10) (position 5 15 10) (position 10 20 10) (position 15 5 10) (position 20 20 10))) ;; v3 (define v4 (list (position 0 15 15) (position 5 10 15) (position 10 15 15) (position 15 0 15) (position 20 15 15))) ;; v4 (define u1 (list (position 0 0 0) (position 0 10 5) (position 0 20 10) (position 0 15 15))) ;; u1 (define u2 (list (position 10 5 0) (position 10 15 5) (position 10 20 10) (position 10 15 15))) ;; u2 (define u3 (list (position 20 0 0) (position 20 10 5) (position 20 20 10) (position 20 15 15))) ;; u3 ; Create a series of spline curve wire-bodies ; in the u and v direction. (define v1 (wire-body (edge:spline v1))) ;; v1 (define v2 (wire-body (edge:spline v2))) ;; v2 (define v3 (wire-body (edge:spline v3))) ;; v3 (define v4 (wire-body (edge:spline v4))) ;; v4 (define u1 (wire-body (edge:spline u1))) ;; u1 (define u2 (wire-body (edge:spline u2))) ;; u2 (define u3 (wire-body (edge:spline u3))) ;; u3 ; Create a net surface from the uv curves. (define ops (skin:options "align" #t)) ;; ops (define net1 (sheet:net-wires (list v1 v2 v3 v4) (list u1 u2 u3) ops)) ;; net1 ; OUTPUT Example - net1 ; Additional Example ; Clear the previous part (part:clear) ;; #t (define c0 (edge:circular (position 0 0 0) 20 0 180)) ;; c0 (define c1 (edge:circular (position 0 -40 0) 20 180 360)) ;; c1 (define u0 (wire-body c0)) ;; u0 (define u1 (wire-body c1)) ;; u1 (define v0 (wire-body:points (list (position 15 -60 0) (position 15 20 0)))) ;; v0 (define v1 (wire-body:points (list (position 10 -60 10) (position 10 20 10)))) ;; v1 (define v2 (wire-body:points (list (position -10 -60 10) (position -10 20 10)))) ;; v2 (define v3 (wire-body:points (list (position -15 -60 0) (position -15 20 0)))) ;; v3 (wire-body:offset v2 "4+4*sin (x*.25)" #f)) ;; vo2 (define t1 (transform:rotation (position -10 -60 10 ) (gvector 0 1 0) 90)) (define vo2 ;; t1 (define new-t (entity:transform vo2 t1)) ;; new-t (define ops (skin:options "align" #t "simplify" #f)) ;; ops (define net2 (sheet:net-wires (list v0 v1 vo2 v3) (list u0 u1) ops 11.0)) ;; net2 ; OUTPUT Example - net2 Figure 2. sheet:net-wires |
[Top]
body-list | wire-body | (wire-body ...) |
path | wire-body |
skin-options | skin_options |
acis-opts | acis-options |
Description
The given wires define the cross-sections to be interpolated by the resulting
sheet body. There must be at least two wire bodies. The wire bodies are assumed
to be simple, meaning only the first wire of each body is used for skinning.
The wires can be open or closed. The wires are copies, i.e., the originals
remain. The wires can share end points and do not have to be C1 continuous
tangent.
; sheet:skin-wires ; Create a wire body 1 from a circular edge. ; Set v and u parameters. (option:set "v_par" 5) ;; -1 (option:set "u_par" 5) ;; -1 (define wire-body1 (wire-body (edge:circular (position 0 0 40) 40 0 270))) ;; wire-body1 ; Create a wire body 2 from a circular edge 2 (define wire-body2 (wire-body (edge:circular (position 0 0 0) 40 0 270))) ;; wire-body2 ; Create a wire body 3 from a circular edge 3. (define wire-body3 (wire-body (edge:circular (position 20 0 -10) 40 0 270))) ;; wire-body3 ; OUTPUT Original ; Make a sheet body by skinning wires. (define sheet1 (sheet:skin-wires (list wire-body1 wire-body2 wire-body3) "solid" #f)) ;; sheet1 ; OUTPUT Result Figure. sheet:skin-wires ; Additional Example; Create edge 1. (part:clear) ;; #t (define edge1 (edge:linear (position -20 -10 0) (position 10 -10 0))) ;; edge1 ; Create edge 2. (define edge2 (edge:circular (position 10 0 0) 10 270 360)) ;; edge2 ; Create edge 3. (define edge3 (edge:linear (position 20 0 0) (position 20 20 0))) ;; edge3 ; Create edge 4. (define edge4 (edge:linear (position 20 20 0) (position -10 20 0))) ;; edge4 ; Create edge 5. (define edge5 (edge:circular (position -10 10 0) 10 90 180)) ;; edge5 ; Create edge 6. (define edge6 (edge:linear (position -20 10 0) (position -20 -10 0))) ;; edge6 ; Create a wire-body from the edges. (define wirebody1 (wire-body (list edge1 edge2 edge3 edge4 edge5 edge6))) ;; wirebody1 (define new-edge (edge:circular (position 0 0 10) 15 0 360)) ;; new-edge ; OUTPUT Original (define wirebody2 (wire-body (list new-edge))) ;; wirebody2 (option:set "sil" #f) ;; #t (option:set "u_par" 2) ;; 5 (option:set "v_par" 4) ;; 5 ; Create a roll name state. (roll:name-state "before") ;; "before" ; Skin a surface between these two wire bodies ; permitting twist and alignment ; without twist minimization. (define skin1 (sheet:skin-wires (list wirebody1 wirebody2) #f #f #t #f)) ;; skin1 ; OUTPUT Surface with twist ; Roll back before the skinning. (roll "before") ;; 1 (view:refresh) ;; #[view 239847912] ; With twist minimization (define skin1 (sheet:skin-wires (list wirebody1 wirebody2) #f #t #t #f)) ;; skin1 ; OUTPUT Surface without twist Figure. sheet:skin-wires without and with Twist Minimization |
[Top]
trunk-list | wire-body | (wire-body ...) |
branch-list | wire-body | (wire-body ...) |
normal-type | string |
skin-options | skin_options |
acis-opts | acis-options |
Description
The given wires define the cross-sections to be interpolated by the resulting
sheet body. Unlike regular skinning, however; multiple body lists can be given.
Unlike regular skinning, the order of the wire-bodies in the lists are
important. The branches attach to the last body in the trunk. In
addition, the first bodies in the branch list are the ends in which they attach
to the trunk.
; sheet:skin-wires-branch ; Create four wire bodies to illustrate command. (define wire1 (wire-body (list (edge:circular (position 0 0 70) 30 0 360)))) ;; wire1 (define wire2 (wire-body (list (edge:circular (position 0 0 0) 30 0 360)))) ;; wire2 (define wire3 (wire-body (list (edge:circular (position -50 0 -100) 30 180 (+ 180 360))))) ;; wire3 (define wire4 (wire-body (list (edge:circular (position 50 0 -100) 30 0 360)))) ;; wire4 ; Create the branched body. (define zoom (zoom-all)) ;; zoom (define refresh (refresh-all)) ;; refresh ; OUTPUT Original (define body (sheet:skin-wires-branch (list wire1 wire2) (list wire3) (list wire4))) ;; body ; OUTPUT Result (define blend (solid:blend-edges (list-ref (entity:edges body) 6) 5)) ;; blend (define thicken (shell:sheet-thicken body -2)) ;; thicken Figure. sheet:skin-wires-branch |
[Top]
body-list | wire-body | (wire-body ...) |
angle1 | real |
angle2 | real |
guides | edge | (edge ...) |
skin-options | skin_options |
magnitude1 | real |
magnitude2 | real |
start_normal | gvector |
end_normal | gvector |
acis-opts | acis-options |
Description
The given wires define the cross-sections to be interpolated by the resulting
sheet body. There must be at least two wire bodies. The wire bodies are assumed
to be simple and well behaved. The wires can be open or closed. The wires are
copies, i.e., the originals remain. The wires can share end points and do not
have to be C1 continuous tangent. angle1 and angle2 define the
direction in which the created surfaces leave the first and last wires. More
specifically, the take-off direction (or take-off vectors), are generated by
the angle (draft) off the wire plane. If the wire profiles are not planar, the
approximate wire plane is used.
The optional arguments magnitude1 and magnitude2 define the weight of the generated take-off vectors.
; sheet:skin-wires-draft ; Create two wire bodies to illustrate command. (define wire_0 (wire-body (list (edge:linear (position 0 0 0) (position 50 0 0)) (edge:linear (position 50 0 0) (position 50 50 0)) (edge:linear (position 50 50 0) (position 0 50 0)) (edge:linear (position 0 50 0) (position 0 0 0))))) ;; wire_0 (define wire_3 (wire-body (list (edge:linear (position 0 0 100) (position 50 0 100)) (edge:linear (position 50 0 100) (position 50 50 100)) (edge:linear (position 50 50 100) (position 0 50 100)) (edge:linear (position 0 50 100) (position 0 0 100))))) ;; wire_3 ; OUTPUT Original ; Create the sheet body and interpolate wires at ; specified angle. (define body (sheet:skin-wires-draft (list wire_0 wire_3) 45 45 100 100)) ;; body ; OUTPUT Result ; Example using guide curves (part:clear) ;; #t (view:dl) ;; #[view 28704984] (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0)) ;; #[entity 52 1] (define wire_0 (wire-body (list (edge:circular (position 0 0 0) 30)))) ;; wire_0 (define wire_1 (wire-body (list (edge:circular (position 0 0 50) 50)))) ;; wire_1 (define guide1 (edge:spline (list (position 0 30 0) (position 0 60 25) (position 0 50 50)) (gvector 0 1 1) (gvector 0 -1 1))) ;; guide1 (entity:set-color (list guide1) 1) ;; () (define body (sheet:skin-wires-draft (list wire_0 wire_1) 45 45 (list guide1))) ;; body Figure. sheet:skin-wires-draft |
[Top]
body-list | wire-body | (wire-body ...) |
guides | edge | (edge ...) |
skin-options | skin_options |
acis-opts | acis-options |
Description
The given wires define the cross-sections to be interpolated by the resulting
sheet body. The wire bodies are assumed to be simple and well-behaved. The
wires can be open or closed. The wires are copies, i.e., the originals remain.
The wires can share end points and do not have to be C1 continuous/tangent.
; sheet:skin-wires-guides ; Build the wires. (define wire-1 (wire-body (list (edge:circular (position 0 0 0) 5 0 360)))) ;; wire-1 (define wire-2 (wire-body (edge:circular (position 0 0 70) 5 0 360))) ;; wire-2 (define myWires (list wire-1 wire-2)) ;; myWires ; Build the guides. (define guide1 (edge:linear (position 5 0 0) (position 5 0 70))) ;; guide1 (define guide2 (edge:spline (list (position 0 5 0) (position 0 5 8) (position 0 6 16) (position 0 3 24) (position 0 6 32) (position 0 3 40) (position 0 6 48) (position 0 3 54) (position 0 9 62) (position 0 5 70)))) ;; guide2 (define guide3 (edge:linear (position 0 -5 0) (position 0 -5 70))) ;; guide3 (define guide4 (edge:linear (position -5 0 0) (position -5 0 70))) ;; guide4 (define myGuides (list guide1 guide2 guide3 guide4)) ;; myGuides (define ops (skin:options "arc_length" #f "no_twist" #t "align" #t "simplify" #f "closed" #f "solid" #t)) ;; ops ; Make the body. (define myBody (sheet:skin-wires-guides myWires myGuides #f #t #t #f #f #t)) ;; myBody ; Use Skin_Options class. (define opts (skin:options "solid" #f)) ;; opts (define myBody (sheet:skin-wires-guides myWires myGuides opts)) ;; myBody ; Zoom on picture. (define zoom (zoom-all)) ;; zoom Figure. sheet:skin-wires-guide |
[Top]
body-list | wire-body | (wire-body ...) |
normal-type | string |
skin-options | skin_options |
acis-opts | acis-options |
Description
The given wires define the cross-sections to be interpolated by the resulting
sheet body with the additional constraint of the surface take-off vectors
leaving normal to the plane of each of the wire bodies. There must be at least
two wire bodies. The wire bodies are assumed to be simple, meaning only the
first wire of each body is used for skinning. The wires can be open or closed.
The wires are copies, i.e., the originals remain. The wires can share end
points and do not have to be C1 continuous tangent.
; sheet:skin-wires-normal ; Create an ISO view (iso) ;; #[view 6161334] ; Create wire bodies (define wire1 (wire-body (list (edge:circular (position 0 0 0) 10 180 270) (edge:linear (position 0 -10 0) (position 100 -10 0)) (edge:circular (position 100 0 0) 10 270 360) (edge:linear (position 110 0 0) (position 110 25 0)) (edge:circular (position 100 25 0) 10 0 90) (edge:linear (position 100 35 0) (position 0 35 0)) (edge:circular (position 0 25 0) 10 90 180) (edge:linear (position -10 25 0 ) (position -10 0 0))))) ;; wire1 (define wire2 (wire-body (list (edge:circular (position 40 5 30) 10 180 270) (edge:linear (position 40 -5 30) (position 60 -5 30)) (edge:circular (position 60 5 30) 10 270 360) (edge:linear (position 70 5 30) (position 70 20 30)) (edge:circular (position 60 20 30) 10 0 90) (edge:linear (position 60 30 30) (position 40 30 30)) (edge:circular (position 40 20 30) 10 90 180) (edge:linear (position 30 20 30 ) (position 30 5 30))))) ;; wire2 (define my_wcs1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1))) ;; my_wcs1 (wcs:set-active my_wcs1) ;; () (define wire3 (wire-body (list (edge:circular (position 50 70 60) 20 0 360)))) ;; wire3 (wcs:set-active #f) ;; () ; OUTPUT Original ; Skin the wires (define body (sheet:skin-wires-normal (list wire1 wire2 wire3) "all_normal" "solid" #f)) ;; body ; Shell the body (define thicken (shell:sheet-thicken body -2)) ;; thicken (render) ;; () ; OUTPUT Result Figure. sheet:skin-wires-normal |
[Top]
body-list | wire-body | (wire-body ...) |
vector-list | gvector | (gvector ...) |
magnitude-list | real | (real ...) |
guide-list | edge | (edge ...) |
skin-options | skin_options |
acis-opts | acis-options |
Description
The wires provided in the
body-list
argument, define the cross-sections to be interpolated by the resulting sheet
body. There must be at least two wire bodies. The wire bodies are assumed to be
simple, meaning only the first wire of each body is used for skinning. The
wires can be open or closed. The wires are copies, i.e., the originals remain.
The wires can share end points and do not have to be C1 continuous tangent.
; sheet:skin-wires-vectors ; Create the geometry to demonstrate command. (define wire1 (wire-body (edge:circular (position 0 0 0) 2))) ;; wire1 (define wire2 (wire-body (list (edge:linear (position -4 0 4) (position -4 2 6)) (edge:linear (position -4 2 6) (position -4 0 8)) (edge:linear (position -4 0 8) (position -4 -2 6)) (edge:linear (position -4 -2 6) (position -4 0 4))))) ;; wire2 (define wire3 (wire-body (edge:circular (position -8 0 0) 2))) ;; wire3 (view:compute-extrema) ;; () (view:refresh) ;; #[view 6947634] (zoom .9) ;; #[view 6947634] ; OUTPUT Original ; Skinning operation: (define body (sheet:skin-wires-vectors (list wire1 wire2 wire3) (list (gvector 1 0 1) (gvector -1 0 0) (gvector 1 0 -1)))) ;; body ; OUTPUT Result ; OUTPUT Rendered Figure. sheet:skin-wires-vectors |
[Top]
name-of-option | string |
value | boolean |
skin-options | skin_options |
Description
Sets the skin_options scheme object that are used by the skinning and
lofting scheme extensions.
; skin:options ; create a wire-body (define wire1 (wire-body (list (edge:linear (position 1 0 0) (position 0 1 0)) (edge:linear (position 0 1 0) (position -1 0 0)) (edge:linear (position -1 0 0) (position 1 0 0))))) ;; wire1 (define wire2 (wire-body (list (edge:linear (position 1 0 3) (position 0 -1 3)) (edge:linear (position 0 -1 3) (position -1 0 3)) (edge:linear (position -1 0 3) (position 1 0 3))))) ;; wire2 ; use skin:options to set options: (define s (skin:options "solid" #f)) ;; s (define body1 (sheet:skin-wires (list wire1 wire2) s)) ;; body1 (zoom-all) ;; #[view 3999020] ; OUTPUT Original (define move (entity:move body1 3 0 0)) ;; move (define s (skin:options "no_twist" #f)) ;; s (define body2 (sheet:skin-wires (list wire1 wire2) s)) ;; body2 (zoom-all) ;; #[view 3474620] ; OUTPUT Result
|
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.