Scheme Extensions Sl thru Sli |
|
|
Technical Article |
interface | SLInterface |
coedge | coedge |
acis-opts | acis-options |
Description
Adds a vertex on the middle of the selected coedge of an intermediate skinning
or lofting wire. The new vertex is added in the corresponding coedge of
every section to be lofted.
; slinterface:add-vertex ; Build all the necessary geometry for the sweeper (part:clear) (define Frame1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0))) ;; Frame1 (entity:set-color Frame1 1) ;; () (define Frame2 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1))) ;; Frame2 (wcs:set-active Frame2) ;; () (entity:set-color Frame2 1) ;; () (define wire_5 (wire-body (list (edge:circular (position 50 50 60) 20 0 360)))) ;; wire_5 (define wire_6 (wire-body (list (edge:circular (position 50 50 90) 20 0 360)))) ;; wire_6 (wcs:set-active Frame1) ;; () (define wire_1 (wire-body (list (edge:linear (position -20 30 0) (position 120 30 0)) (edge:linear (position 120 30 0) (position 120 20 0)) (edge:linear (position 120 20 0) (position -20 20 0)) (edge:linear (position -20 20 0) (position -20 30 0))))) ;; wire_1 (define dom1 (law "domain(vec(0, 0, 1), 0, 140)")) ;; dom1 (define dom2 (law "domain(vec(0, 0, 1), 0, 10)")) ;; dom2 (define dom3 (law "domain(vec(0, 0, 1), 0, 140)")) ;; dom3 (define dom4 (law "domain(vec(0, 0, 1), 0, 10)")) ;; dom4 (define laws1 (list dom1 dom2 dom3 dom4)) ;; laws1 (define wire_2 (wire-body (list (edge:linear (position 10 30 30) (position 90 30 30)) (edge:linear (position 90 30 30) (position 90 20 30)) (edge:linear (position 90 20 30) (position 10 20 30)) (edge:linear (position 10 20 30) (position 10 30 30))))) ;; wire_2 (define dom1 (law "domain(vec(0, 0, 1), 0, 80)")) ;; dom1 (define dom2 (law "domain(vec(0, 0, 1), 0, 10)")) ;; dom2 (define dom3 (law "domain(vec(0, 0, 1), 0, 80)")) ;; dom3 (define dom4 (law "domain(vec(0, 0, 1), 0, 10)")) ;; dom4 (define laws2 (list dom1 dom2 dom3 dom4)) ;; laws2 (define wire_3 (wire-body (list (edge:linear (position 20 20 50) (position 80 20 50)) (edge:linear (position 80 20 50) (position 80 13 43)) (edge:linear (position 80 13 43) (position 20 13 43)) (edge:linear (position 20 13 43) (position 20 20 50))))) ;; wire_3 (define dom1 (law "domain(vec (0, -0.7, 0.7), 0, 40)")) ;; dom1 (define dom2 (law "domain(vec (0, -0.7, 0.7), 0, 10)")) ;; dom2 (define dom3 (law "domain(vec (0, -0.7, 0.7), 0, 40)")) ;; dom3 (define dom4 (law "domain(vec (0, -0.7, 0.7), 0, 10)")) ;; dom4 (define laws3 (list dom1 dom2 dom3 dom4)) ;; laws3 (define coedges1 (entity:coedges wire_1)) ;; coedges1 (define coedges2 (entity:coedges wire_2)) ;; coedges2 (define coedges3 (entity:coedges wire_3)) ;; coedges3 (define coedges5 (entity:coedges wire_5)) ;; coedges5 (define coedges6 (entity:coedges wire_6)) ;; coedges6 (define section1 (section coedges1 laws1 #f 100)) ;; section1 (define section2 (section coedges2 laws2 #f 50)) ;; section2 (define section3 (section coedges3)) ;; section3 (define section5 (section coedges5)) ;; section5 (define section6 (section coedges6)) ;; section6 (iso) ;; #[view 66764] (zoom-all) ;; #[view 66764] (render:rebuild) ;; () (define ao (acisoptions:set "journal" (acis_journal:set "file" "modifyvertex"))) ;; ao (acis_journal:start ao) ;; #t ; Start the lofting step (define Sect (list section1 section2 section3 section5 section6)) ;; Sect (define Interface (slinterface:lofting Sect #f #t #t #f #f #f #f ao)) ;; Interface (define tempWires (slinterface:wires Interface)) ;; tempWires (entity:set-color tempWires 1) ;; () ; Align, breakup and minimize the temporary ; lofting wires (slinterface:align-wires Interface ao) ;; #t (slinterface:minimizetwist-wires Interface ao) ;; #t (slinterface:breakup-wires Interface ao) ;; #t ; Spend some time looking at the edges (define previewEdges (slinterface:build-edges Interface)) ;; previewEdges ; Delete the edges (entity:delete previewEdges) ;; () ; Add some vertices around (slinterface:add-vertex Interface (list-ref (entity:coedges (list-ref tempWires 0))1)) ;; #t (render:rebuild) ;; () (define previewEdges (slinterface:build-edges Interface ao)) ;; previewEdges (entity:delete previewEdges) ;; () ; Remove the added vertices (slinterface:remove-vertex Interface (list-ref tempWires 0) (position 120 25 0)) ;; #t (render:rebuild) ;; () (define previewEdges (slinterface:build-edges Interface ao)) ;; previewEdges (entity:delete previewEdges) ;; () ; We like them now, so build the body (define body (slinterface:build-body Interface)) ;; body (slinterface:delete-interface Interface) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Aligns the direction normals of the temporary skinning or lofting profiles.
; slinterface:align-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]
interface | SLInterface |
acis-opts | acis-options |
Description
Breaks up each of the temporary lofting/skinning profiles such they have
an equal amount of coedges. The breakup is done based on the notion of
matching normals of vertices and the construction of extreme points.
; slinterface:breakup-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]
interface | SLInterface |
acis-opts | acis-options |
Description
Builds the lofting/skinning body. It should be called after the temporary
lofting/skinning profiles have been aligned, twist minimized, broken up
and the guide and mapping curves have been added. It returns a body, however
the user may roll back and make any changes desired to the previous steps
and build the body again.
; slinterface:build-body ; 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]
interface | SLInterface |
acis-opts | acis-options |
Description
Builds a list of edges that represent an approximation of the surface extents
that would exist if the profiles were to be lofted or skinned. The ownership
of the edges belongs to the caller and is his responsibility to delete.
; slinterface:build-edges ; Build the wires. (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 ; Show the edges that represent an approximation of ; the surface extents. (define myEdges (slinterface:build-edges myInterface)) ;; myEdges ; Delete the edges when done viewing. (define delete (entity:delete myEdges)) ;; delete ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t ; Zoom to see the whole model. (define zoom (zoom-all)) ;; zoom |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Builds a list of faces that represent an approximation of the face that
would exist if the profiles were to be lofted or skinned. The ownership
of the faces belongs to the caller and is his responsibility to delete.
; slinterface:build-faces ; 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 ; Show the edges that represent an approximation ; of the surface extents. (define myFaces (slinterface:build-faces myInterface)) ;; myFaces ; Delete the faces when done viewing. (entity:delete myFaces) ;; () ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t ; Zoom to see the whole model. (define zoom (zoom-all)) ;; zoom |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Clears all the guide curves from the interactive interface.
; slinterface:clear-guide-curves ; define the profiles: (define wire1 (wire-body (list (edge:linear (position -60 0 0) (position 60 0 0)) (edge:linear (position 60 0 0) (position 60 50 0)) (edge:linear (position 60 50 0) (position -60 50 0)) (edge:linear (position -60 50 0) (position -60 0 0))))) ;; wire1 (define wire2 (wire-body (list (edge:linear (position -30 0 100) (position 30 0 100)) (edge:linear (position 30 0 100) (position 30 40 100)) (edge:linear (position 30 40 100) (position -30 40 100)) (edge:linear (position -30 40 100) (position -30 0 100))))) ;; wire2 (define wire3 (wire-body (list (edge:circular (position 0 -85 150) 25 0 360)))) ;; wire3 (define guide1 (edge:spline (list (position 0 0 0) (position 0 20 50) (position 0 0 100) (position 0 -20 160) (position 0 -50 160) (position 0 -60 150)))) ;; guide1 (iso) ;; #[view 655944] (zoom-all) ;; #[view 1180214] (render:rebuild) ;; () ; interface: (define interface (slinterface:skinning (list wire1 wire2 wire3) virtualGuides #t )) ;; interface (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t (slinterface:skin-guide interface guide1) ;; #t ; display the guide curves: (define virtual_guides (slinterface:show-guide-curves interface)) ;; virtual_guides (entity:set-color virtual_guides 1) ;; () (slinterface:clear-guide-curves interface) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Removes all the mapping curves from the skinning/lofting interface. However,
if the mapping curves are removed after the breakup API has been called
the resulting vertices from the breakup remain. The user must roll back
the breakup step in order to have the temporary wires in the state before
the mapping curves.
; slinterface:clear-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) ;; () ; Remove the mapping curves from the interface. (slinterface:clear-mapping-curves myInterface) ;; #t ; Show the mapping curves; they should be gone. (define myCurves (slinterface:show-mapping-curves myInterface)) ;; myCurves ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
This function will remove a degenerate coedge in each wire of a list of
wires. In order for the coedges to be removed, each wire in the list must
contain a degenerate coedge at the same position. That is, if the fifth
coedge of wire one is degenerate, it and the other coedges will only be
removed if the fifth coedge of every other wire is degenerate as well.
; slinterface:collapse-wires ; Example not available for this release. |
[Top]
interface | SLInterface |
; slinterface:debug ; 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 ; Use the debug command to display/list general ; information about the entity. (slinterface:debug myInterface) ; Lofting interface: ; number of wires: 2 ; wires: ; (entity 16) (entity 17) ; lofting options: ; arc_length = #f ; noTwist = #t ; align = #t ; simplify = #t ; perpendicular = #t ; solid = #t ; closed = #f ; mapping curves: ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Deletes the skinning/lofting interface. In addition to the deletion of
the interface the temporary skinning/lofting profiles are deleted as well.
; slinterface:delete-interface ; 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
Creates a lofting interface data structure when lofting from faces. The
data structure, SLInterface, is used as input to the additional APIs each
performing some stage of the lofting operation.
When a solid is lofted, the face provided as an argument is removed from the body. (Which is one of the differences between lofting between solids and sheets.) Peripheral edges from the first face are used to skin to the peripheral edges of the second face. The result is one body. However, command does not conduct a self-intersect check on that body.
Lofting uses the surface information from the adjacent surfaces to determine 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. Depending on how the single-sided face body is used determines whether subsequent operations, such as Booleans, work properly.
; slinterface:face-lofting ; Example not available for this release. |
[Top]
interface | SLInterface |
need-optimal | boolean |
acis-opts | acis-options |
Description
This extension returns a list of doubles as noted below. When need-optimal
is #t, this extension returns four numbers that reflect the minimum bound
of tangent factor scale, the upper bound of tangent factor scale, the
optimum tangent factor scale, and the minimum radius of curvature. When
need-optimal is #f, this extension
returns only the minimum and upper bounds of tangent factor scale.
; slinterface:get-tanfac-scale ; 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) (positio (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 ; Build the body. (define myBody (slinterface:build-body myInterface)) ;; myBody ; get-tanfac command with need_optimal set to false. (slinterface:get-tanfac-scale myInterface #f) ;; (1 0) ; need_optimal argument set to true. (slinterface:get-tanfac-scale myInterface #t) ;; (1 0 0.5 1000000) |
[Top]
interface | SLInterface |
acis-opts | acis-options |
; slinterface:get-tangent-factors ; Define wires and coedges (option:set match_paren #f) ;; #t (define w0 (wire-body:points (position 0 0 10))) ;; w0 (define w1 (wire-body:points (list (position 1 1 0) (position -1 1 0)(position -1 -1 0) (position 1 -1 0)(position 1 1 0)))) ;; w1 (define coedge_list1 (entity:coedges w0)) ;; coedge_list1 (define coedge_list2 (entity:coedges w1)) ;; coedge_list2 ; Define laws (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 (define lawb (law vec(0,0,-1))) ;; lawb (define dom1 (law domain(law1,0,1) lawb)) ;; dom1 ; Define Section list (define sec1 (section coedge_list1(list dom0) #f 20)) ;; sec1 (define sec2 (section coedge_list2(list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 (define sectList (list sec1 sec2)) ;; secList ; Define skin options (define sopts (skin:options arc_length #f no_twist #t align #t perpendicular #f simplify #t closed #t ;acis_options o1 )) ;; sopts ; Define body interface (define interface (slinterface:lofting sectList sopts)) ;; interface (define block (slinterface:build-body interface)) ;; block ; Apply law (entity:check block) ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 5 faces ;; 5 loops ;; 16 coedges ;; 8 edges ;; 5 vertices ;; () (law:equal-test (car (solid:area block)) 187 1) ;; #t ; Define laws (define lawa (law vec(sin(t),cos(t),0))) ;; lawa (define dom0 (law domain(law1,law2,law3) lawa (law:eval 0.0) (law:eval 2.0*Pi))) ;; dom0 (define lawb (law vec(0,10,1))) ;; lawb (define dom1 (law domain(law1,1,0) lawb)) ;; dom1 ; Define sections (define sec1 (section coedge_list1(list dom0) #f 20)) ;; sec1 (define sec2 (section coedge_list2(list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 ; Get the tangent factors (slinterface:reenter-coedges interface (list sec1 sec2) ) ;; (#[entity 119 1] #[entity 120 1]) (define tanFactors (slinterface:get-tangent-factors interface )) ;; tanFactors (define block (slinterface:build-body interface)) ;; block ; Apply law (entity:check block) ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 5 faces ;; 5 loops ;; 24 coedges ;; 12 edges ;; 9 vertices ;; () (law:equal-test (car (solid:area block)) 194 1) ;; #t (slinterface:delete-interface interface ) ;; #t |
[Top]
interface | SLInterface |
wire | wire |
acis-opts | acis-options |
; slinterface:get-valid-vertices ; Example not available for this release. |
[Top]
section-list | section | section ... |
skin-options | skin_options |
acis-opts | acis-options |
Description
Creates a lofting interface data structure. The data structure is used
as input to the additional lofting APIs each performing some stage of
the lofting operation.
; slinterface:lofting ; Build the wire bodies. (define w0 (wire-body:points (position 0 0 10))) ;; w0 (define w1 (wire-body:points (list (position 1 1 0) (position -1 1 0) (position -1 -1 0) (position 1 -1 0) (position 1 1 0)))) ;; w1 ; Get the coedges from the wires. (define coedge-list1 (entity:coedges w0)) ;; coedge-list1 (define coedge-list2 (entity:coedges w1)) ;; coedge-list2 ; Make some laws to apply to the wires or coedges. (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 (define lawb (law "vec (0,0,-1)")) ;; lawb (define dom1 (law "domain (law1,0,1)" lawb)) ;; dom1 ; Make the sections. (define sec1 (section coedge-list1 (list dom0) #f 20)) ;; sec1 (define sec2 (section coedge-list2 (list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 ; Call the incremental interface to loft the ; sections. (define myInterface (slinterface:lofting (list sec1 sec2))) ;; myInterface (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t (define myBody (slinterface:build-body myInterface)) ;; myBody (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
skin-options | skin_options |
arc-length | boolean |
no-twist | boolean |
align | boolean |
perpendicular | boolean |
simplify | boolean |
closed | boolean |
solid | boolean |
periodic | boolean |
acis-opts | acis-options |
Description
Sets the options in lofting interface.
; slinterface:lofting-options ; Build the wire bodies. (define w0 (wire-body:points (position 0 0 10))) ;; w0 (define w1 (wire-body:points (list (position 1 1 0) (position -1 1 0) (position -1 -1 0) (position 1 -1 0) (position 1 1 0)))) ;; w1 ; Get the coedges from the wires. (define coedge-list1 (entity:coedges w0)) ;; coedge-list1 (define coedge-list2 (entity:coedges w1)) ;; coedge-list2 ; Make some laws to apply to the wires or coedges. (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 (define lawb (law "vec(0,0,-1)")) ;; lawb (define dom1 (law "domain(law1,0,1)" lawb)) ;; dom1 ; Make the sections. (define sec1 (section coedge-list1 (list dom0) #f 20)) ;; sec1 (define sec2 (section coedge-list2 (list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 ; Call the incremental interface to loft the ; sections. (define myInterface (slinterface:lofting (list sec1 sec2))) ;; myInterface ; Set the options in the lofting interface. (slinterface:lofting-options myInterface (list sec1 sec2))) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Removes the surface conditions from the lofting profiles. Essentially it
turns the loft into a skinning operation.
; slinterface:lose-surface ; Make the wires. (define w0 (wire-body:points (position 0 0 10))) ;; w0 (define w1 (wire-body:points (list (position 1 1 0) (position -1 1 0) (position -1 -1 0) (position 1 -1 0) (position 1 1 0)))) ;; w1 ; Make the list of coedges. (define coedge-list1 (entity:coedges w0)) ;; coedge-list1 (define coedge-list2 (entity:coedges w1)) ;; coedge-list2 ; Define the laws. (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 (define lawb (law "vec(0,0,-1)")) ;; lawb (define dom1 (law "domain(law1,0,1)" lawb)) ;; dom1 ; Make the sections. (define sec1 (section coedge-list1 (list dom0) #f 20)) ;; sec1 (define sec2 (section coedge-list2 (list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 ; Make an interactive user interface. (define myInterface (slinterface:lofting (list sec1 sec2))) ;; myInterface ; Align, minimize twist, and breakup the ; temporary wires. (slinterface:align-wires myInterface) ;; #t (slinterface:minimizetwist-wires myInterface) ;; #t (slinterface:breakup-wires myInterface) ;; #t ; Lose all the vectors laws they we put on earlier. (slinterface:lose-surface myInterface) ;; #t ; Make a body, notice that it is a pyramid. ; the laws got lost (define myBody (slinterface:build-body myInterface)) ;; myBody ; Delete the interactive interface. (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
position-list | position | (position ...) |
acis-opts | acis-options |
Description
Adds a mapping curve to the skinning/lofting interface. The mapping curve
is comprised of a list of positions, each position being exactly a vertex
on a lofting/skinning profile. After the breakup the each mapping curve
is guaranteed to be aligned.
; slinterface:mapping-curve ; 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 ; Build the body. (define myBody (slinterface:build-body myInterface)) ;; myBody ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Estimates the minimum radius of curvature of the skin surfaces of the body.
This helps the user estimate the maximum thickness the skin surface can
be shelled and the maximum blend radii that can be applied to the edges
of the skin body. This works on skin and loft bodies.
; slinterface:min-rad ; Create 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 ; Build the body. (define myBody (slinterface:build-body myInterface)) ;; myBody ; Get the estimated magnitude of the tangent vector ; field. (slinterface:min-rad myInterface) ;; 1000000 |
[Top]
interface | SLInterface |
skin-options | skin_options |
Description
Aligns the start vertex of each of the temporary lofting/skinning profiles
in order to minimize the twist of the resulting surface.
; slinterface:minimizetwist-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]
interface | SLInterface |
acis-opts | acis-options |
; slinterface:modify-vertex ; Build all the necessary geometry for the sweeper (define Frame1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0))) ;; Frame1 (entity:set-color Frame1 1) ;; () (define Frame2 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1))) ;; Frame2 (wcs:set-active Frame2) ;; () (entity:set-color Frame2 1) ;; () (define wire_5 (wire-body (list (edge:circular (position 50 50 60) 20 0 360)))) ;; wire_5 (define wire_6 (wire-body (list (edge:circular (position 50 50 90) 20 0 360)))) ;; wire_6 (wcs:set-active Frame1) ;; () (define wire_1 (wire-body (list (edge:linear (position -20 30 0) (position 120 30 0)) (edge:linear (position 120 30 0) (position 120 20 0)) (edge:linear (position 120 20 0) (position -20 20 0)) (edge:linear (position -20 20 0 ) (position -20 30 0))))) ;; wire_1 (define dom1 (law domain(vec(0, 0, 1), 0, 140))) ;; dom1 (define dom2 (law domain(vec(0, 0, 1), 0, 10))) ;; dom2 (define dom3 (law domain(vec(0, 0, 1), 0, 140))) ;; dom3 (define dom4 (law domain(vec(0, 0, 1), 0, 10))) ;; dom4 (define laws1 (list dom1 dom2 dom3 dom4)) ;; laws1 (define wire_2 (wire-body (list (edge:linear (position 10 30 30) (position 90 30 30)) (edge:linear (position 90 30 30) (position 90 20 30)) (edge:linear (position 90 20 30) (position 10 20 30)) (edge:linear (position 10 20 30) (position 10 30 30))))) ;; wire_2 (define dom1 (law domain(vec(0, 0, 1), 0, 80))) ;; dom1 (define dom2 (law domain(vec(0, 0, 1), 0, 10))) ;; dom2 (define dom3 (law domain(vec(0, 0, 1), 0, 80))) ;; dom3 (define dom4 (law domain(vec(0, 0, 1), 0, 10))) ;; dom4 (define laws2 (list dom1 dom2 dom3 dom4)) ;; laws2 (define wire_3 (wire-body (list (edge:linear (position 20 20 50) (position 80 20 50)) (edge:linear (position 80 20 50) (position 80 13 43)) (edge:linear (position 80 13 43) (position 20 13 43)) (edge:linear (position 20 13 43) (position 20 20 50))))) ;; wire_3 (define dom1 (law domain(vec(0, -0.7, 0.7), 0, 40))) ;; dom1 (define dom2 (law domain(vec(0, -0.7, 0.7), 0, 10))) ;; dom2 (define dom3 (law domain(vec(0, -0.7, 0.7), 0, 40))) ;; dom3 (define dom4 (law domain(vec(0, -0.7, 0.7), 0, 10))) ;; dom4 (define laws3 (list dom1 dom2 dom3 dom4)) ;; laws3 (define coedges1 (entity:coedges wire_1)) ;; coedges1 (define coedges2 (entity:coedges wire_2)) ;; coedges2 (define coedges3 (entity:coedges wire_3)) ;; coedges3 (define coedges5 (entity:coedges wire_5)) ;; coedges5 (define coedges6 (entity:coedges wire_6)) ;; coedges6 (define section1 (section coedges1 laws1 #f 100)) ;; section1 (define section2 (section coedges2 laws2 #f 50)) ;; section2 (define section3 (section coedges3)) ;; section3 (define section5 (section coedges5)) ;; section5 (define section6 (section coedges6)) ;; section6 (top) ;; #[view 3277706] (zoom-all) ;; #[view 3277706] (render:rebuild) ;; () ; Start the lofting step (define Sect (list section2 section3 section5 section6)) ;; Sect (define Interface (slinterface:lofting Sect #f #t #t #f #f #f #f acis-opts)) ;; Interface (define tempWires (slinterface:wires Interface)) ;; tempWires (entity:set-color tempWires 1) ;; () ; Align, breakup and minimize the temporary lofting wires (slinterface:align-wires Interface) ;; #t (slinterface:minimizetwist-wires Interface ) ;; #t (slinterface:breakup-wires Interface ) ;; #t ; Preview the edges (define previewEdges (slinterface:build-edges Interface)) ;; previewEdges ; Delete the edges (entity:delete previewEdges) ;; () ; Move some vertices around (slinterface:modify-vertex Interface (list-ref tempWires 3) (position 30.2667875017707 -90 53.255813953488) (position 40.288231 -90 67.483751)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 3) (position 69.7332124982292 -90 53.255813953488) (position 59.71176899999 -90 67.483751)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 3) (position 69.7332124982292 -90 46.744186046511) (position 66.098883 -90 61.867012)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 3) (position 30.2667875017708 -90 46.744186046511) (position 33.901117 -90 61.867012)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 2) (position 30.2667875017707 -60 53.255813953488) (position 40.288231 -60 67.483751)) ;; #f (slinterface:modify-vertex Interface (list-ref tempWires 2) (position 69.7332124982292 -60 53.255813953488) (position 59.71176899999 -60 67.483751)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 2) (position 69.7332124982292 -60 46.744186046511) (position 66.098883 -60 61.867012)) ;; #t (slinterface:modify-vertex Interface (list-ref tempWires 2) (position 30.2667875017708 -60 46.744186046511) (position 33.901117 -60 61.867012)) ;; #f ; Spend some time looking at the edges (define previewEdges (slinterface:build-edges Interface )) ;; previewEdges ; Delete the edges (entity:delete previewEdges) ;; () ; Build the body (define body (slinterface:build-body Interface )) ;; body (slinterface:delete-interface Interface ) ;; #t |
[Top]
interface | SLInterface |
sections | section | section ... |
acis-opts | acis-options |
Description
Reenters the lofting profiles and deletes references to the original lofting
sections and the original temporary lofting wires.
; slinterface:reenter-coedges ; Build the wire bodies. (define w0 (wire-body:points (position 0 0 10))) ;; w0 (define w1 (wire-body:points (list (position 1 1 0) (position -1 1 0) (position -1 -1 0) (position 1 -1 0) (position 1 1 0)))) ;; w1 ; Get the coedges from the wires. (define coedge-list1 (entity:coedges w0)) ;; coedge-list1 (define coedge-list2 (entity:coedges w1)) ;; coedge-list2 ; Make some laws to apply to the wires or coedges. (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 (define lawb (law "vec(0,0,-1)")) ;; lawb (define dom1 (law "domain(law1,0,1)" lawb)) ;; dom1 ; Make the sections. (define sec1 (section coedge-list1 (list dom0) #f 20)) ;; sec1 (define sec2 (section coedge-list2 (list dom1 dom1 dom1 dom1) #t 1)) ;; sec2 ; Call the incremental interface to loft the ; sections. (define myInterface (slinterface:lofting (list sec1 sec2))) ;; myInterface ; Set the options in the lofting interface. (slinterface:lofting-options myInterface (list sec1 sec2))) ;; #t ; Remove surface conditions from lofting profiles. (define surface (slinterface:reenter-coedges myInterface (list sec1 sec2))) ;; surface |
[Top]
interface | SLInterface |
index | integer |
acis-opts | acis-options |
Description
Removes a mapping curve from the skinning/lofting interface. However, if
the mapping curve is removed after the breakup API has been called the
resulting vertices from the breakup remain. The user must roll back the
breakup step in order to have the temporary wires in the state before
the mapping curve.
; slinterface:remove-mapping-curve ; 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 ; Show the mapping curves. (define myCurves (slinterface:show-mapping-curves myInterface)) ;; myCurves ; Delete the copy of mapping curves. (entity:delete myCurves) ;; () ; Remove a mapping curve. (slinterface:remove-mapping-curve myInterface 0) ;; #t ; Show the mapping curves. (define myCurves (slinterface:show-mapping-curves myInterface)) ;; myCurves ; Delete the mapping curve. (entity:delete myCurves) ;; () ; Delete the interface. (slinterface:delete-interface myInterface) ;; #t |
[Top]
interface | SLInterface |
body | wire-body |
position | position |
acis-opts | acis-options |
Description
Removes the vertex located at that position and every corresponding vertex
in the temporary list.
; slinterface:remove-vertex ; Build all the necessary geometry for the sweeper (define Frame1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0))) ;; Frame1 (entity:set-color Frame1 1) ;; () (define Frame2 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1))) ;; Frame2 (wcs:set-active Frame2) ;; () (entity:set-color Frame2 1) ;; () (define wire_5 (wire-body (list (edge:circular (position 50 50 60) 20 0 360)))) ;; wire_5 (define wire_6 (wire-body (list (edge:circular (position 50 50 90) 20 0 360)))) ;; wire_6 (wcs:set-active Frame1) ;; () (define wire_1 (wire-body (list (edge:linear (position -20 30 0) (position 120 30 0)) (edge:linear (position 120 30 0) (position 120 20 0)) (edge:linear (position 120 20 0) (position -20 20 0)) (edge:linear (position -20 20 0) (position -20 30 0))))) ;; wire_1 (define dom1 (law domain(vec(0, 0, 1), 0, 140))) ;; dom1 (define dom2 (law domain(vec(0, 0, 1), 0, 10))) ;; dom2 (define dom3 (law domain(vec(0, 0, 1), 0, 140))) ;; dom3 (define dom4 (law domain(vec(0, 0, 1), 0, 10))) ;; dom4 (define laws1 (list dom1 dom2 dom3 dom4)) ;; laws1 (define wire_2 (wire-body (list (edge:linear (position 10 30 30) (position 90 30 30)) (edge:linear (position 90 30 30) (position 90 20 30)) (edge:linear (position 90 20 30) (position 10 20 30)) (edge:linear (position 10 20 30) (position 10 30 30))))) ;; wire_2 (define dom1 (law domain(vec(0, 0, 1), 0, 80))) ;; dom1 (define dom2 (law domain(vec(0, 0, 1), 0, 10))) ;; dom2 (define dom3 (law domain(vec(0, 0, 1), 0, 80))) ;; dom3 (define dom4 (law domain(vec(0, 0, 1), 0, 10))) ;; dom4 (define laws2 (list dom1 dom2 dom3 dom4)) ;; laws2 (define wire_3 (wire-body (list (edge:linear (position 20 20 50) (position 80 20 50)) (edge:linear (position 80 20 50) (position 80 13 43)) (edge:linear (position 80 13 43) (position 20 13 43)) (edge:linear (position 20 13 43) (position 20 20 50))))) ;; wire_3 (define dom1 (law domain(vec (0, -0.7, 0.7), 0, 40))) ;; dom1 (define dom2 (law domain(vec (0, -0.7, 0.7), 0, 10))) ;; dom2 (define dom3 (law domain(vec (0, -0.7, 0.7), 0, 40))) ;; dom3 (define dom4 (law domain(vec (0, -0.7, 0.7), 0, 10))) ;; dom4 (define laws3 (list dom1 dom2 dom3 dom4)) ;; laws3 (define coedges1 (entity:coedges wire_1)) ;; coedges1 (define coedges2 (entity:coedges wire_2)) ;; coedges2 (define coedges3 (entity:coedges wire_3)) ;; coedges3 (define coedges5 (entity:coedges wire_5)) ;; coedges5 (define coedges6 (entity:coedges wire_6)) ;; coedges6 (define section1 (section coedges1 laws1 #f 100)) ;; section1 (define section2 (section coedges2 laws2 #f 50)) ;; section2 (define section3 (section coedges3)) ;; section3 (define section5 (section coedges5)) ;; section5 (define section6 (section coedges6)) ;; section6 (iso) ;; #[view 66764] (zoom-all) ;; #[view 66764] (render:rebuild) ;; () (define ao (acisoptions:set journal (acis_journal:set file modifyvertex))) ;; ao (acis_journal:start ao) ;; #t ; Start the lofting step (define Sect (list section1 section2 section3 section5 section6)) ;; Sect (define Interface (slinterface:lofting Sect #f #t #t #f #f #f #f ao)) ;; Interface (define tempWires (slinterface:wires Interface)) ;; tempWires (entity:set-color tempWires 1) ;; () ; Align, breakup and minimize the temporary ; lofting wires (slinterface:align-wires Interface ao) ;; #t (slinterface:minimizetwist-wires Interface ao) ;; #t (slinterface:breakup-wires Interface ao) ;; #t ; Spend some time looking at the edges (define previewEdges (slinterface:build-edges Interface)) ;; previewEdges ; Delete the edges (entity:delete previewEdges) ;; () ; Add some vertices around (slinterface:add-vertex Interface (list-ref (entity:coedges (list-ref tempWires 0))1)) ;; #t (render:rebuild) ;; () (define previewEdges (slinterface:build-edges Interface ao)) ;; previewEdges (entity:delete previewEdges) ;; () ; Remove the added vertices (slinterface:remove-vertex Interface (list-ref tempWires 0) (position 120 25 0)) ;; #t (render:rebuild) ;; () (define previewEdges (slinterface:build-edges Interface ao)) ;; previewEdges (entity:delete previewEdges) ;; () ; We like them now, so build the body (define body (slinterface:build-body Interface)) ;; body (slinterface:delete-interface Interface) ;; #t |
[Top]
interface | SLInterface |
wire-number | integer |
vertex-number | integer |
acis-opts | acis-options |
; slinterface:set-start-vertex ; Define the wires (option:set align_corners #t) ;; #t (option:set match_corners #t) ;; #t (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 ; List the wires (define myWires (list wire_0 wire_1)) ;; myWires ; Define guides (define guide1 (edge:circular-3pt (position 15 0 0) (position 15 -30 50) (position 15 0 100))) ;; guide1 (define guide2 (edge:circular-3pt (position 25 0 0) (position 25 -20 50) (position 25 0 100))) ;; guide2 (define guide3 (edge:circular-3pt (position 35 0 0) (position 35 -30 50) (position 35 0 100))) ;; guide3 ; Apply skinning on wires (define myInterface (slinterface:skinning myWires )) ;; myInterface (define skinningWires (slinterface:wires myInterface )) ;; skinningWires (entity:set-color skinningWires 1) ;; () ; Mininmize the twist (slinterface:align-wires myInterface ) ;; #t (slinterface:minimizetwist-wires myInterface ) ;; #t (slinterface:breakup-wires myInterface ) ;; #t ; Set the starting vertex (slinterface:skin-guide myInterface guide1 ) ;; #t (slinterface:skin-guide myInterface guide2 ) ;; #t (slinterface:skin-guide myInterface guide3 ) ;; #t (slinterface:set-start-vertex myInterface 0 0 ) ;; #t (define myBody (slinterface:build-body myInterface )) ;; myBody (slinterface:delete-interface myInterface ) ;; #t |
[Top]
interface | SLInterface |
tangent-factor | real |
acis-opts | acis-options |
Description
Resets the scale factors of the takeoff vectors for the lofting operation.
This extension allows the user to determine these values optimally and
reset the values in the skinning/lofting interface object.
; slinterface:set-tan-facs ; Example not available for this release. |
[Top]
interface | SLInterface |
acis-opts | acis-options |
Description
Returns a list of edges that represent the guide curves. The list contains
only the virtual guide curves (if that option is set). The edges and their
responsibility to delete are owned by the caller.
; slinterface:show-guide-curves ; define the profiles: (define wire1 (wire-body (list (edge:linear (position -60 0 0) (position 60 0 0)) (edge:linear (position 60 0 0) (position 60 50 0)) (edge:linear (position 60 50 0) (position -60 50 0)) (edge:linear (position -60 50 0) (position -60 0 0))))) ;; wire1 (define wire2 (wire-body (list (edge:linear (position -30 0 100) (position 30 0 100)) (edge:linear (position 30 0 100) (position 30 40 100)) (edge:linear (position 30 40 100) (position -30 40 100)) (edge:linear (position -30 40 100) (position -30 0 100))))) ;; wire2 (define wire3 (wire-body (list (edge:circular (position 0 -85 150) 25 0 360)))) ;; wire3 (define guide1 (edge:spline (list (position 0 0 0) (position 0 20 50) (position 0 0 100) (position 0 -20 160) (position 0 -50 160) (position 0 -60 150)))) ;; guide1 (iso) ;; #[view 655944] (zoom-all) ;; #[view 1180214] (render:rebuild) ;; () ; interface: (define interface (slinterface:skinning (list wire1 wire2 wire3) virtualGuides #t )) ;; interface (slinterface:align-wires interface) ;; #t (slinterface:minimizetwist-wires interface) ;; #t (slinterface:breakup-wires interface) ;; #t (slinterface:skin-guide interface guide1) ;; #t ; display the guide curves: (define virtual_guides (slinterface:show-guide-curves interface)) ;; virtual_guides (entity:set-color virtual_guides 1) ;; () (entity:delete virtual_guides) ;; () ; OUTPUT Original ; build the body: (define Body (slinterface:build-body interface)) ;; Body (slinterface:delete-interface interface) ;; #t ; OUTPUT Result ; Render the image (render) ;; () ; OUTPUT Rendered |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.