Scheme Extensions Sli to Zz |
|
|
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. Spatial's Scheme based demonstration
application, Scheme ACIS Interface Driver Extension (Scheme AIDE), also uses these Scheme
extensions and the Scheme Interpreter.
|
interface | SLInterface |
acis-opts | acis-options |
Description
Returns a list of edges that represent the mapping curves. The edges are owned by the
caller and their responsibility to delete.
; slinterface:show-mapping-curves ; Build the wire bodies. (define w1 (wire-body:points (list (position 0 0 0) (position 0 2 0) (position 1 3 0) (position 3 3 0) (position 4 2 0) (position 4 0 0) (position 0 0 0)))) ;; w1 (define w2 (wire-body:points (list (position 0 0 10) (position 0 3 10) (position 4 3 10) (position 4 0 10) (position 0 0 10)))) ;; w2 ; Get the coedges off the wire. (define coedges1 (entity:coedges w1)) ;; coedges1 (define coedges2 (entity:coedges w2)) ;; coedges2 ; Make sections from the coedges. (define section1 (section coedges1 #f 1)) ;; section1 (define section2 (section coedges2 #t 1)) ;; section2 (define mySect (list section1 section2)) ;; mySect ; Make the lofting interface. (define myInterface (slinterface:lofting mySect)) ;; myInterface (define loftingWires (slinterface:wires myInterface)) ;; loftingWires ; Align and minimize twist. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t ; Make two mapping curves. (define positionList (list (position 1 3 0) (position 0 3 10))) ;; positionList (slinterface:mapping-curve myInterface positionList) ;; #t (define positionList (list (position 3 3 0) (position 4 3 10))) ;; positionList (slinterface:mapping-curve myInterface positionList) ;; #t ; breakup the wires based on the new mapping curves (slinterface:breakup-wires myInterface) ;; #t ; Show the mapping curves. (define myCurves (slinterface:show-mapping-curves myInterface)) ;; myCurves ; Delete the curves. (entity:delete myCurves) ;; () ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Removes the G1 vertices of the intermediate wire profiles by merging the adjacent
coedges/edges. This reduces the coedge/edge count which reduces the amount of surfaces and
eliminates near tangent edges which improves blending and shelling.
; slinterface:simplify-wires ; Create the geometry to illustrate this command. ; Create a wire body from list of edges. (define wire_1 (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))))) ;; wire_1 ; Create some law scheme data types. (define dom1 (law "domain (vec (0, 0, 1), -3.14, -1.57)")) ;; dom1 (define dom2 (law "domain (vec (0, 0, 1), 0, 100) ")) ;; dom2 (define dom3 (law "domain (vec (0, 0, 1), -1.57, 0)")) ;; dom3 (define dom4 (law "domain (vec (0, 0, 1), 0, 25)")) ;; dom4 (define dom5 (law "domain (vec (0, 0, 1), 0, 1.57)")) ;; dom5 (define dom6 (law "domain (vec (0, 0, 1), 0, 100)")) ;; dom6 (define dom7 (law "domain (vec (0, 0, 1), 1.57, -3.14)")) ;; dom7 (define dom8 (law "domain (vec(0, 0, 1), 0, 25)")) ;; dom8 ; Combine the laws. (define laws1 (list dom1 dom2 dom3 dom4 dom5 dom6 dom7 dom8)) ;; laws1 ; Create the 2nd wire body. (define wire_2 (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))))) ;; wire_2 ; Create the 2nd set of laws and combine them. (define dom1 (law "domain (vec (0, 0, 1), -3.14, -1.57)")) ;; dom1 (define dom2 (law "domain (vec (0, 0, 1), 0, 15)")) ;; dom2 (define dom3 (law "domain (vec (0, 0, 1), -1.57, 0)")) ;; dom3 (define dom4 (law "domain (vec (0, 0, 1), 0, 25)")) ;; dom4 (define dom5 (law "domain (vec (0, 0, 1), 0, 1.57)")) ;; dom5 (define dom6 (law "domain (vec (0, 0, 1), 0, 15)")) ;; dom6 (define dom7 (law "domain (vec (0, 0, 1), 1.57, -3.14)")) ;; dom7 (define dom8 (law "domain (vec (0, 0, 1), 0, 25)")) ;; dom8 (define laws2 (list dom1 dom2 dom3 dom4 dom5 dom6 dom7 dom8)) ;; laws2 ; Create the work coordinate system. (define my_wcs1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1))) ;; my_wcs1 ; Set the work coordinate system to my_wcs1. (wcs:set-active my_wcs1) ;; () ; Create the 3rd wire body. (define wire_3 (wire-body (list (edge:circular (position 50 70 60) 20 0 360)))) ;; wire_3 ; Reset the wcs to it's initial state of inactive. (wcs:set-active #f) ;; () ; Define another law. (define dom1 (law "domain (vec (0, -1, 0), 0.0, 3.14)")) ;; dom1 (define laws3 (list dom1)) ;; laws3 ; Get the coedges from wirebodies 1, 2, and 3. (define coedges1 (entity:coedges wire_1)) ;; coedges1 (define coedges2 (entity:coedges wire_2)) ;; coedges2 (define coedges3 (entity:coedges wire_3)) ;; coedges3 ; Create a data structure. (define section1 (section coedges1 laws1 #f 100)) ;; section1 (define section2 (section coedges2 laws2 #f 50)) ;; section2 (define section3 (section coedges3 laws3 #t 200)) ;; section3 (define mySect (list section1 section2 section3)) ;; mySect ; Create the lofting interface structure. (define interface (slinterface:lofting (list section1 section2 section3) "solid" #f)) ;; interface ; Make all the contortions for the interface. (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t ; Remove the GI vertices from the intermediate wire ; profiles. (slinterface:simplify-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t ; Build the lofted body. (define body (slinterface:build-body interface)) ;; body ; Delete the lofted interface. (slinterface:delete-interface interface) ;; #t ; Delete the defined list of entities. (entity:delete (list wire_1 wire_2 wire_3)) ;; () ; Check the data structure, topology, and geometry. (entity:check body 20) ; checked: ; 1 lumps ; 1 shells ; 0 wires ; 1 faces ; 1 loops ; 4 coedges ; 3 edges ; 2 vertices ;; () ; Create a solid body from the sheet. (define thicken (shell:sheet-thicken body -3)) ;; thicken ; Find the position of the vertex. (define pos (vertex:position (list-ref (entity:vertices body) 2))) ;; pos ; Do the entity-to-entity blend. (define ent (abl:ent-ent-blend (list-ref (entity:faces body) 2) (list-ref (entity:faces body) 1) (abl:const-rad 0.5) pos #t)) ;; ent ; Create a blend on the edges and vertices listed. (define blend (blend:network body)) ;; blend ; Make a cylindrical blend on the list of edges. (define bledges (solid:blend-edges (list-ref (entity:edges body) 7) 0.5)) ;; bledges |
[Top]
interface | SLInterface |
edge | edge |
acis-opts | acis-options |
Description
Adds a guide curve to the skinning interface. Guide curves can be placed on the
skinning profiles and the surface will follow, exactly, that curve.
; slinterface:skin-guide ; Make the wire bodies. (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 ; Make 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 ; Make the interactive interface. (define myInterface (slinterface:skinning myWires)) ;; myInterface ; Align, do a minimize twist, and breakup the ; temporary lofting wires. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t ; Add the guides to the interface. (slinterface:skin-guide myInterface guide1) ;; #t (slinterface:skin-guide myInterface guide2) ;; #t (slinterface:skin-guide myInterface guide3) ;; #t (slinterface:skin-guide myInterface guide4) ;; #t ; Build the body. (define myBody (slinterface:build-body myInterface)) ;; myBody (slinterface:delete-interface myInterface) ;; #t |
[Top]
body-list | wire-body | wire-body ... |
options | skin_options |
acis-opts | acis-options |
Description
Creates a skinning interface data structure. The data structure is used as input to the
additional skinning API's each performing some stage of the skinning operation.
; slinterface:skinning ; Build the wire bodies to be skinned. (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-1 (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-1 (define myWires (list wire-0 wire-1)) ;; myWires ; Build the skinning interface. (define myInterface (slinterface:skinning myWires)) ;; myInterface (define skinningWires (slinterface:wires myInterface)) ;; skinningWires ; Align, minimize twist, and breakup the wires. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t ; Build the body and delete the interface. (define myBody (slinterface:build-body myInterface)) ;; myBody (slinterface:delete-interface myInterface) ;; #t ; Zoom to see the whole model (define zoom (zoom-all)) ;; zoom |
[Top]
body-list | wire-body | wire-body ... |
angle1 | real |
angle2 | real |
magnitude1 | real |
magnitude2 | real |
options | skin_options |
acis-opts | acis-options |
Description
Creates a skinning interface data structure. The data structure is used as input to the
additional skinning APIs which perform some stages of the skinning operation.
; slinterface:skinning-draft ; Build the wire bodies to be skinned. (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-1 (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-1 (define myWires (list wire-0 wire-1)) ;; myWires ; Build the skinning interface. (define myInterface (slinterface:skinning-draft myWires 30 30 100 100)) ;; myInterface (define skinningWires (slinterface:wires myInterface)) ;; skinningWires ; Align, minimize twist, and breakup the wires. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t ; Build the body and delete the interface. (define myBody (slinterface:build-body myInterface)) ;; myBody (slinterface:delete-interface myInterface) ;; #t ; Zoom to see the whole model (zoom-all) ;; #[view 1180850] |
[Top]
body-list | wire-body | wire-body ... |
normals | string |
options | skin_options | acis-opts | acis-options |
Description
Creates a skinning interface data structure. The data structure is used as input to the
additional skinning API's each performing some stage of the skinning operation.
; slinterface:skinning-normal ; Build the wire bodies to be skinned. (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) ;; () (define interface (slinterface:skinning-normal (list wire1 wire2 wire3) "all_normal" "solid" #f)) ;; interface (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t (slinterface:simplify-wires interface) ;; #t (define body (slinterface:build-body interface)) ;; body (slinterface:delete-interface interface) ;; #t (define thicken (shell:sheet-thicken body -2)) ;; thicken |
[Top]
interface | SLInterface |
options | skin_options |
arc-length | boolean |
arc-length-u | boolean |
no-twist | boolean |
align-directions | boolean |
simplify | boolean |
closed | boolean |
solid | boolean |
periodic | boolean |
virtualGuides | boolean |
allow_same_uv | boolean |
acis-opts | acis-options |
Description
Resets the options in a skinning interface structure
; slinterface:skinning-options ; Build the wire bodies to be skinned. (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-1 (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-1 (define myWires (list wire-0 wire-1)) ;; myWires ; Build the skinning interface. (define myInterface (slinterface:skinning myWires)) ;; myInterface ; Set new options for the interface. (slinterface:skinning-options myInterface) ;; #f |
[Top]
body-list | wire-body | wire-body ... |
options | skin_options |
acis-opts | acis-options |
Description
Creates a skinning interface data structure. The data structure is used as input to the
additional skinning API's each performing some stage of the skinning operation.
; slinterface:skinning-ruled ; create four wire-bodies (define wire1 (wire-body (list (edge:circular (position 0 0 0) 30)))) ;; wire1 (define wire2 (wire-body (list (edge:circular (position 0 0 50) 30)))) ;; wire2 (define wire3 (wire-body (list (edge:circular (position 0 0 75) 50)))) ;; wire3 (define wire4 (wire-body (list (edge:circular (position 0 0 100) 50)))) ;; wire4 (define interface (slinterface:skinning-ruled (list wire1 wire2 wire3 wire4))) ;; interface (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t (slinterface:simplify-wires interface) ;; #t (define body (slinterface:build-body interface)) ;; body (slinterface:delete-interface interface) ;; #t |
[Top]
body-list | wire-body | wire-body ... |
vector-list | gvector | gvector ... |
magnitude-list | real | real ... |
options | skin_options | acis-opts | acis-options |
Description
This function creates a skinning interface data structure. The data structure is used
as input to the additional skinning API's each performing some stage of the skinning
operation.
; slinterface:skinning-vectors ; Create 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 interface (slinterface:skinning-vectors (list wire1 wire2 wire3) (list (gvector 1 0 1) (gvector -1 0 0) (gvector 1 0 -1)))) ;; interface (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t (slinterface:simplify-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t (define body (slinterface:build-body interface)) ;; body (view:compute-extrema) ;; () (zoom .9) ;; #[view 6947634] (render:rebuild) ;; () ; OUTPUT Result ; OUTPUT Rendered
|
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Returns the list of temporary wires used in the skinning or lofting operation. The
temporary wires will be deleted when the skinning/lofting interface is deleted.
; slinterface:wires ; Build the wire bodies to be skinned. (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-1 (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-1 (define myWires (list wire-0 wire-1)) ;; myWires ; Build the skinning interface. (define myInterface (slinterface:skinning myWires)) ;; myInterface (define skinningWires (slinterface:wires myInterface)) ;; skinningWires ; Align, minimize twist, and breakup the wires. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t ; Build the body and delete the interface. (define myBody (slinterface:build-body myInterface)) ;; myBody (slinterface:delete-interface myInterface) ;; #t ; Zoom to see the whole model. (define zoom (zoom-all)) ;; zoom |
[Top]
face0 | face |
take-off-factor0 | real |
face1 | face |
take-off-factor1 | real |
skin-options | skin_options |
acis-opts | acis-options |
Description
When a solid is lofted, the face provided as an argument is removed from the body.
(This is one of the differences between lofting between solids and sheets.) Peripheral
edges from the first face are used to skin the peripheral edges of the second face. The
result is one body. However, this command does not conduct a self-intersect check on that
body. (Refer to Limitations below.)
Lofting uses the surface information from the adjacent surfaces to determine take-off vectors. (Take-off vectors are pre-established and cannot be changed.) Skinning does not use take-off vectors.
When ACIS makes a BODY from a FACE using api_loft_faces, it creates a single-sided face body. A single-sided face body is really a solid, not a sheet (infinitely thin) body. When a face body is single-sided, basic solid modeling concepts (and ACIS) consider the body to be a solid which extends from the back side of the face out to infinity with ill defined boundaries extending where the edges of the original face extend backward. The way in which the single-sided face body is used determines whether subsequent operations, such as Booleans, work properly.
; solid:loft-faces ; Loft from a block to a block. ; Define silhouette capability (turn off for ; faster calculation.) (option:set "sil" #f) ;; #t ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Define list of faces from block1. (define face-list1 (entity:faces block1)) ;; face-list1 ; Create a second solid block. (define block2 (solid:block (position 30 10 0) (position 40 20 10))) ;; block2 ; OUTPUT Original ; Define list of faces from block2. (define face-list2 (entity:faces block2)) ;; face-list2 ; Loft between the two blocks/bodies. (define loft1 (solid:loft-faces (list-ref face-list1 5) (list-ref face-list2 3) #f #t #t #f #f)) ;; loft1 ; OUTPUT Result Figure. solid:loft-faces between two solid bodies Figure. solid:loft-faces between two sheet bodies ; Loft from face to face.; Restart the ACIS 3D Toolkit. ; Note: a zero height block creates a face. ; create a solid block. (define block3 (solid:block (position 0 0 0) (position 10 10 0))) ;; block3 ; Define list of faces from block3. (define face-list3 (entity:faces block3)) ;; face-list3 ; create a second solid block. (define block4 (solid:block (position 0 0 3) (position 10 60 3))) ;; block4 ; OUTPUT Original ; Define list of faces from block4. (define face-list4 (entity:faces block4)) ;; face-list4 ; Loft between selected faces. (define loft3 (solid:loft-faces (list-ref face-list4 0) (list-ref face-list3 0) #f #t #t #t)) ;; loft3 ; OUTPUT Result Figure. solid:loft-faces between two faces |
[Top]
face0 | face |
take-off-factor0 | real |
face1 | face |
take-off-factor1 | real |
guides | list of guides |
skin-options | skin_options |
acis-opts | acis-options |
Description
When a solid is lofted, the face provided as an argument is removed from the body.
(This is one of the differences between lofting between solids and sheets.) Peripheral
edges from the first face are used to skin the peripheral edges of the second face. The
result is one body. However, this command does not conduct a self-intersect check on
that body. (Refer to Limitations below.)
Lofting uses the surface information from the adjacent surfaces to determine take-off vectors. (Take-off vectors are pre-established and cannot be changed.) Skinning does not use take-off vectors.
When ACIS makes a BODY from a FACE using api_loft_faces, it creates a single-sided face body. A single-sided face body is really a solid, not a sheet (infinitely thin) body. When a face body is single-sided, basic solid modeling concepts (and ACIS) consider the body to be a solid which extends from the back side of the face out to infinity with ill defined boundaries extending where the edges of the original face extend backward. The way in which the single-sided face body is used determines whether subsequent operations, such as Booleans, work properly.
; solid:loft-faces-guides ; Define the faces and guides (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0)) ;; #[entity 1 1] (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 6 1] (shell:sheet-thicken wire1 5) ;; #[entity 6 1] (define guide (edge:spline (list (position 5 2.5 0) (position 5 10 3.5) (position 5 20 2.5)) (gvector 0 1 0) (gvector 0 1 0))) ;; guide (define body2 (solid:block (position 0 20 2.5) (position 10 30 -2.5))) ;; body2 (define front_face1 (list-ref (entity:faces wire1) 2)) ;; front_face1 (define front_face2 (list-ref (entity:faces body2) 2)) ;; front_face2 ;Apply lofting with the guides (define final_body (solid:loft-faces-guides front_face1 front_face2 (list guide))) ;; final_body |
[Top]
face0 | face |
face1 | face |
options | skin_options |
acis-opts | acis-options |
Description
The edges of the given faces define the cross-sections to be interpolated by the
resulting sheet body. There must be at least two faces, but only one face from each body
is used.
; solid:skin-faces ; Demo skinning from a block to a block. ; Define silhouette capability (turn off for ; faster calculation.) (option:set "sil" #f) ;; #t ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Define list of faces from block1. (define face-list1 (entity:faces block1)) ;; face-list1 ; Create second solid block. (define block2 (solid:block (position 30 10 0) (position 40 20 10))) ;; block2 ; OUTPUT Original ; Define list of faces from block2. (define face-list2 (entity:faces block2)) ;; face-list2 ; Skin between the bodies/solid blocks. (define skin1 (solid:skin-faces (list-ref face-list1 5) (list-ref face-list2 3) #f #t #t #t)) ;; skin1 ; OUTPUT Result Figure. solid:skin-faces between two solid bodies ; Demo skinning from a square face to a square face.(part:clear) ;; #t ; Create a solid block. (define block3 (solid:block (position 0 0 0) (position 1 1 0))) ;; block3 ; Define list of faces from block3. (define face-list3 (entity:faces block3)) ;; face-list3 ; Create solid block4. (define block4 (solid:block (position 0 0 3) (position 2 2 3))) ;; block4 ; Define list of faces from block4. (define face-list4 (entity:faces block4)) ;; face-list4 (define zoom (zoom-all)) ;; zoom ; OUTPUT Original ; Skin between the two sheet bodies. (define skin2 (solid:skin-faces (list-ref face-list4 0) (list-ref face-list3 0) #f #t #t #t)) ;; skin2 ; OUTPUT Result Figure. solid:skin-faces between two sheet bodies ; Another example comparing skinning and lofting.; This example and the next one are exactly the ; same except for the last command. Because the ; previous example used the zoom:all command, please ; restart acis3dt in order to properly view the ; result. ; Define silhouette capability (turn off for ; faster calculation.). (option:set "sil" #f) ;; #f ; Create a solid block. (define block1 (solid:block (position 0 -10 0) (position 10 10 10))) ;; block1 ; Define list of faces from block1. (define face-list1 (entity:faces block1)) ;; face-list1 ; Create a second solid block. (define block2 (solid:block (position 30 10 0) (position 40 40 40))) ;; block2 ; Define list of faces from block2. (define face-list2 (entity:faces block2)) ;; face-list2 ; Loft between block1 and block2. (define loft1 (solid:loft-faces (list-ref face-list1 5) 1 (list-ref face-list2 3) 1 #f #t #t #f #f)) ;; loft1 ; OUTPUT Lofting ; Example - skinning ; Clear the previous entities. (part:clear) ;; #t ; Create a solid block. (define block1 (solid:block (position 0 -10 0) (position 10 10 10))) ;; block1 ; Define list of faces from block1. (define face-list1 (entity:faces block1)) ;; face-list1 ; Create second solid block. (define block2 (solid:block (position 30 10 0) (position 40 40 40))) ;; block2 ; Define list of faces from second block. (define face-list2 (entity:faces block2)) ;; face-list2 ; Skin between block1 and block2. (define skin2 (solid:skin-faces (list-ref face-list1 5) (list-ref face-list2 3) #f #t #t #t)) ;; skin2 ; OUTPUT Skinning Figure. Comparison of lofting and skinning |
[Top]
face | entity |
Description
This extension takes a face as an input argument. It retrieves all of the underlying u
direction curves of the face as wires. The wires are then converted to Scheme entities.
This entity list is then returned.
; wire:get-net-curves-u ; Create a series of curves in the v direction. (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 ; Create a series of curves in the u direction. (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 (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 sheet body that interpolates the series ; of wires defined above. (define net1 (sheet:net-wires (list v1 v2 v3 v4) (list u1 u2 u3) #t)) ;; net1 ; Make figure easier to view. (define sheet (sheet:2d net1)) ;; sheet ; Delete the u direction entities. (entity:delete (list u1 u2 u3)) ;; () ; Delete the v direction entities. (entity:delete (list v1 v2 v3 v4)) ;; () ; Return the list of u direction curves for the ; underlying skinned surface. (define u-list (wire:get-net-curves-u (car (entity:faces net1)))) ;; u-list ; (#[entity 18 1] #[entity 19 1] #[entity 20 1]) |
[Top]
face | entity |
Description
This extension takes a face as an input argument. It retrieves all of the v
direction curves underlying the face as wires. The wires are then converted to Scheme
entities. This entity list is then returned.
; wire:get-net-curves-v ; Example not available for this release ; Create a series of curves in the v direction. (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 ; Create a series of curves in the u direction. (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 (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 sheet body that interpolates the series ; of wires defined above. (define net1 (sheet:net-wires (list v1 v2 v3 v4) (list u1 u2 u3) #t)) ;; net1 ; Make figure easier to view. (define sheet (sheet:2d net1)) ;; sheet ; Delete the u direction entities. (entity:delete (list u1 u2 u3)) ;; () ; Delete the v direction entities. (entity:delete (list v1 v2 v3 v4)) ;; () ; Return the list of v direction curves for the ; underlying skinned surface. (define v-list (wire:get-net-curves-v (car (entity:faces net1)))) ;; v-list v-list ;; (#[entity 18 1] #[entity 19 1] #[entity 20 1] ;; #[entity 21 1]) |
[Top]
face | entity |
Description
This extension takes a face as an input argument and retrieves all underlying curves of
the face as wires. The wires are converted into Scheme entities and the entity list is
returned.
; wire:get-skin-curves ; Create the necessary geometry and ; get the skin curves. (define wire_1 (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_1 (define wire_2 (wire-body (list (edge:linear(position 0 0 50) (position 50 0 50)) (edge:linear(position 50 0 50) (position 50 50 50)) (edge:linear(position 50 50 50) (position 0 50 50)) (edge:linear (position 0 50 50) (position 0 0 50))))) ;; wire_2 (define body (sheet:skin-wires (list wire_1 wire_2))) ;; body (define skinning-wires (wire:get-skin-curves (list-ref (entity:faces body) 4)) ; set the skinning wires to red (entity:set-color skinning-wires 1) |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.