Scheme Extensions Aa thru Ez |
|
|
Technical Article |
acis-opts1 | acis-options |
"option-name" | string |
acis-opts2 | acis-options |
Description
Makes or edits an acis-options object, sets the option arguments, and returns a
new acis-options object if no parameters are specified. If an acis-options
object is passed, it is modified and returns that object.
; acisoptions:set ; This example creates versiontag and journal ; Scheme objects that are going to be applied ; to a sweeping operation. (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define profile (solid:block (position 0 0 0) (position 2 2 0))) ;; profile (define path (wire-body:points (list (position 0 0 0) (position 0 0 2) (position 1 1 4)))) ;; path (define opts (sweep:options )) ;; opts (acis_journal:start ao) ;; #t (define journal (sweep:law profile path opts ao)) ;; journal (acis_journal:end ao) ;; #t |
[Top]
acis-opts | acis-options |
Description
Returns TRUE if operation was successful.
; acis_journal:end ; set a journal file (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define b1 (solid:block (position 0 0 0) (position 3 1 1))) ;; b1 (define b2 (solid:block (position 2 0 0) (position 3 6 1))) ;; b2 (define b3 (solid:block (position 0 5 0) (position 3 6 1))) ;; b3 (define b4 (solid:block (position 0 0 0) (position 1 6 1))) ;; b4 (zoom-all) ;; #[view 1049866] (acis_journal:start ao) ;; #t (define u (bool:unite b1 b2 ao)) ;; u (acis_journal:pause ao) ;; #t (define u1 (bool:unite b1 b3 ao)) ;; u1 (acis_journal:resume ao) ;; #t (define u2 (bool:unite b1 b4 ao)) ;; u2 (acis_journal:end ao) ;; #t |
[Top]
acis-opts | acis-options |
Description
Returns TRUE if operation was successful.
; acis_journal:pause ; set a journal file (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define b1 (solid:block (position 0 0 0) (position 3 1 1))) ;; b1 (define b2 (solid:block (position 2 0 0) (position 3 6 1))) ;; b2 (define b3 (solid:block (position 0 5 0) (position 3 6 1))) ;; b3 (define b4 (solid:block (position 0 0 0) (position 1 6 1))) ;; b4 (zoom-all) ;; #[view 1049866] (acis_journal:start ao) ;; #t (define u (bool:unite b1 b2 ao)) ;; u (acis_journal:pause ao) ;; #t (define u1 (bool:unite b1 b3 ao)) ;; u1 (acis_journal:resume ao) ;; #t (define u2 (bool:unite b1 b4 ao)) ;; u2 (acis_journal:end ao) ;; #t |
[Top]
acis-opts | acis-options |
Description
Resumes the journaling mechanism after a pause. Returns TRUE if the operation
is successful.
; acis_journal:resume ; set a journal file (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define b1 (solid:block (position 0 0 0) (position 3 1 1))) ;; b1 (define b2 (solid:block (position 2 0 0) (position 3 6 1))) ;; b2 (define b3 (solid:block (position 0 5 0) (position 3 6 1))) ;; b3 (define b4 (solid:block (position 0 0 0) (position 1 6 1))) ;; b4 (zoom-all) ;; #[view 1049866] (acis_journal:start ao) ;; #t (define u (bool:unite b1 b2 ao)) ;; u (acis_journal:pause ao) ;; #t (define u1 (bool:unite b1 b3 ao)) ;; u1 (acis_journal:resume ao) ;; #t (define u2 (bool:unite b1 b4 ao)) ;; u2 (acis_journal:end ao) ;; #t |
[Top]
journal | acis-journal |
acis-opts | acis-options |
"file" | string |
"filename" | string |
Description
Makes or edits an acis-journal object, sets the file name, and returns a new
journal object if no parameters are specified. If an acis-journal or
acis-options object is passed, it is modified and returns that object.
; acis_journal:set ; set a journal file (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define b1 (solid:block (position 0 0 0) (position 3 1 1))) ;; b1 (define b2 (solid:block (position 2 0 0) (position 3 6 1))) ;; b2 (define b3 (solid:block (position 0 5 0) (position 3 6 1))) ;; b3 (define b4 (solid:block (position 0 0 0) (position 1 6 1))) ;; b4 (zoom-all) ;; #[view 1049866] (acis_journal:start ao) ;; #t (define u (bool:unite b1 b2 ao)) ;; u (acis_journal:pause ao) ;; #t (define u1 (bool:unite b1 b3 ao)) ;; u1 (acis_journal:resume ao) ;; #t (define u2 (bool:unite b1 b4 ao)) ;; u2 (acis_journal:end ao) ;; #t |
[Top]
acis-opts | acis-options |
Description
Returns True if the operation is successful.
; acis_journal:start ; set a journal file (define j (acis_journal:set "file" "sweep_journal_example")) ;; j (define v (versiontag 7 0 0)) ;; v (define ao (acisoptions:set "journal" j "version" v)) ;; ao (define b1 (solid:block (position 0 0 0) (position 3 1 1))) ;; b1 (define b2 (solid:block (position 2 0 0) (position 3 6 1))) ;; b2 (define b3 (solid:block (position 0 5 0) (position 3 6 1))) ;; b3 (define b4 (solid:block (position 0 0 0) (position 1 6 1))) ;; b4 (zoom-all) ;; #[view 1049866] (acis_journal:start ao) ;; #t (define u (bool:unite b1 b2 ao)) ;; u (acis_journal:pause ao) ;; #t (define u1 (bool:unite b1 b3 ao)) ;; u1 (acis_journal:resume ao) ;; #t (define u2 (bool:unite b1 b4 ao)) ;; u2 (acis_journal:end ao) ;; #t |
[Top]
anno-save-name | string |
history | history |
member-name | string |
entity | entity |
Description
Searches the history stream for annotations of the given type as specified by
the name used to save it in a SAT file. If the history stream is not specified,
the stream from the active part is used. The remaining arguments are
(member-name, entity) pairs. You may have as many as necessary to fully
describe which entities should be in specific fields of the annotation.
If an annotation matching the description is not found, a sys_error (NO_ANNOTATION) is issued. If the described annotation does not exist, the operation returns a #t and aborts via an exception.
; annotation:assert ; Turn on annotation options (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Sweep open wire along vector (define profile (wire-body:points (list (position 0 0 0) (position 10 0 0)))) ;; profile (define sweep (sweep:along-vector profile #f (gvector 0 0 10))) ;; sweep ; Additional Example ; Turn on annotation options (part:clear) ;; #t (option:set "annotation" #t) ;; #f ; Sweep open wire along vector (define profile (wire-body:points (list (position 0 0 0) (position 10 0 0)))) ;; profile (define profile-edge (car (entity:edges profile))) ;; profile-edge (define sweep (sweep:along-vector profile #f (gvector 0 0 10))) ;; sweep ; Pick the top-edge (ray:queue 206.331 -403.49 211.434 -0.408248 0.816497 -0.408248 1) ;; #[ray (206.331 -403.49 211.434) ;; (-0.408248 0.816497 -0.408248)] ; Left mouse click on the top edge (define top-edge (pick-edge)) ;; top-edge ; Assert that the profile-edge is part of a ; profile annotation. The full save name, not just ; the leaf name, followed by pairs of annotation ; member names and the entities to which they refer, ; should be there. (define sweep_anno_edge (annotation:assert 'sweep_anno_edge_top-sweep_annotation-annotation 'profile profile-edge 'top_edge top-edge)) ;; sweep_anno_edge |
[Top]
anno-save-name | string |
history | history |
member-name | string |
entity | entity |
Description
Searches the history stream for annotations of the given type as specified by
the name used to save it in a SAT file. If the history stream is not specified,
the stream from the active part is used. The remaining arguments are
(member-name, entity) pairs. You can have as many as necessary to fully
describe which entities should be in which fields of the annotation.
If an annotation matching the description is found, a sys_error (BAD_ANNOTATION_FOUND) is issued. Returns a #t if the described annotation does not exist.
; annotation:assert-not ; annotate tests on bending. ; some resulting faces should have annotations, ; others should not. (option:set "match_paren" #f) ;; #t (cond ((= 0 (length (part:views))) (view:dl))) ;; #f (define view (view:set-bg-color 7)) ;; view (part:clear) ;; #t (define block1 (solid:block (position -30 -2 -10) (position 40 2 10))) ;; block1 (define view-edges (view:edges #t)) ;; view-edges (define view-poly (view:polygonoffset #t)) ;; view-poly (define radius 20) ;; radius (define bend-angle -100) ;; bend-angle (define width 0) ;; width (define center-bend #f) ;; center-bend ; set annotations to on (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t (define bend (entity:bend block1 (position 20 0 0) (gvector 0 0 1) (gvector 0 1 0) radius bend-angle width center-bend)) ;; bend ; pick 6 different faces from the body with ; 6 different rays. (define isovec (gvector -0.408248 0.816497 -0.408248)) ;; isovec (define r1 (ray (position 107 -247 103) isovec )) ;; r1 (define r2 (ray (position 110 -244 107) isovec )) ;; r2 (define r3 (ray (position 122 -235 113) isovec )) ;; r3 (define r4 (ray (position 142 -225 111) isovec )) ;; r4 (define r5 (ray (position 151 -221 111) isovec )) ;; r5 (define r6 (ray (position 110 -238 119) isovec )) ;; r6 (define f1 (pick:face r1 1)) ;; f1 (define f2 (pick:face r2 1)) ;; f2 (define f3 (pick:face r3 1)) ;; f3 (define f4 (pick:face r4 1)) ;; f4 (define f5 (pick:face r5 1)) ;; f5 (define f6 (pick:face r6 1)) ;; f6 ; check for transform annotations on f1 f2 f6. (annotation:assert "warp_anno_face-warp_annotation-annotation" "transformed_faces" f1) ;; #[entity 9 1] (annotation:assert "warp_anno_face-warp_annotation-annotation" "transformed_faces" f2) ;; #[entity 9 1] (annotation:assert "warp_anno_face-warp_annotation-annotation" "transformed_faces" f6) ;; #[entity 9 1] ; check for no transform annotations on f3 f4 f5. (annotation:assert-not "warp_anno_face-warp_annotation-annotation" "transformed_faces" f3) ;; #t (annotation:assert-not "warp_anno_face-warp_annotation-annotation" "transformed_faces" f4) ;; #t (annotation:assert-not "warp_anno_face-warp_annotation-annotation" "transformed_faces" f5) ;; #t |
[Top]
None |
; annotation:clear-all ; Create a swept part with annotations turned on. (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t (define prof (edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 1 0 0))) ;; prof (define path (gvector 0 0 1)) ;; path (define swp (sweep:law prof path)) ;; swp (define face1 (list-ref (entity:faces swp) 0)) ;; face1 ; Confirm annotation on face. (entity:annotations face1) ;; (#[entity 7 1]) ; Unhook annotations. (annotation:unhook-all) ;; () ; Annotation no longer accessible through face. (entity:annotations face1) ;; () ; Hook annotations. (annotation:hook-all) ;; () ; Annotation again accessible through face. (entity:annotations face1) ;; (#[entity 7 1]) ; Clear annotations (annotation:clear-all) ;; () ; Annotations no longer present. (entity:annotations face1) ;; () |
[Top]
None |
; annotation:hook-all ; Create a swept part with annotations turned on. (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t (define prof (edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 1 0 0))) ;; prof (define path (gvector 0 0 1)) ;; path (define swp (sweep:law prof path)) ;; swp (define face1 (list-ref (entity:faces swp) 0)) ;; face1 ; Confirm annotation on face. (entity:annotations face1) ;; (#[entity 7 1]) ; Unhook annotations. (annotation:unhook-all) ;; () ; Annotation no longer accessible through face. (entity:annotations face1) ;; () ; Hook annotations. (annotation:hook-all) ;; () ; Annotation again accessible through face. (entity:annotations face1) ;; (#[entity 7 1]) ; Clear annotations (annotation:clear-all) ;; () ; Annotations no longer present. (entity:annotations face1) ;; () |
[Top]
entity | entity |
no-tags | boolean |
Description
Returns the list of input entities for the given annotation entity. A profile
edge is an input to a sweep annotation, for example.
The option for annotation should be turned on (#t) in order for the annotations to be created during a sweep or blend operation. Likewise, the option for unhook_annotations should be turned off (#f) in order to view the annotations after the operation, otherwise they are automatically cleared out.
; annotation:inputs ; Turn on annotation options (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Create an ellipse edge. (define profile (edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 1 0 0))) ;; profile ; Create a linear edge. (define path (edge:linear (position 0 0 0) (position 0 0 10))) ;; path ; Sweep the profile and path. (define swp (sweep:law profile path)) ;; swp ; Get a list of the edges in swp. (define edge1 (list-ref (entity:edges swp) 0)) ;; edge1 ; Get a list of the annotation entities attached ; to edge1. (define anno1 (list-ref (entity:annotations edge1) 0)) ;; anno1 ; Get the list of input entities for anno1. (define anno_inputs (annotation:inputs anno1)) ;; anno_inputs ; Get the lists of annotation names attached to ; anno_inputs. (entity:annotation-names (list-ref anno_inputs 0)) ;; ("profile" "profile") (entity:annotation-names (list-ref anno_inputs 1)) ;; ("path" "path" "path") |
[Top]
annotation | entity |
entity | entity |
Description
The option for annotation should
be turned on (#t) in order for the annotations to be created during a sweep or
blend operation. Likewise, the option for unhook_annotations
should be turned off (#f) in order to view the annotations after the operation,
otherwise they are automatically cleared out.
; annotation:member-name ; Turn on annotation options (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Create a sweep path from a wire body of edges. (define path1 (wire-body (list (edge:linear (position 0 0 0) (position 0 20 0)) (edge:ellipse (position 10 20 0) (gvector 0 0 -1) (gvector -10 0 0) 1 0 90) (edge:linear (position 10 30 0) (position 20 30 0))))) ;; path1 ; Create the profile to use in sweeping (define profile1 (wire-body:points (list (position 3 0 3) (position 3 0 -3) (position -3 0 -3) (position -3 0 3) (position 3 0 3)))) ;; profile1 ; Sweep the profile along the path. (define sweep1 (sweep:law profile1 path1)) ;; sweep1 (entity:set-color path1 2) ;; () (entity:set-color profile1 3) ;; () (iso) ;; #[view 10814340] (zoom-all) ;; #[view 10814340] ; OUTPUT Original ; Create some lists for verification purposes. (define out-sw-faces (entity:faces sweep1)) ;; out-sw-faces (define out-sw-edges (entity:edges sweep1)) ;; out-sw-edges ; Select a face resulting from the sweep. (ray:queue 89.9693 -121.78 74.672 -0.408248 0.816497 -0.408248 1) ;; #[ray (89.9693 -121.78 74.672) ;; (-0.408248 0.816497 -0.408248)] (define face1 (pick-face)) ;; face1 (entity:set-color profile1 2) ;; () (entity:set-color face1 BLUE) ;; () (system:sleep 3500) ;; 3500 ; Get the annotations associated with the face. (define face1_annos (entity:annotations face1)) ;; face1_annos (define anno1 (list-ref face1_annos 0)) ;; anno1 (entity:debug anno1) ;; "sweep_anno_edge_lat" ; Get the inputs for this annotation. (define anno1_inputs (annotation:inputs anno1)) ;; anno1_inputs (define edge1 (list-ref anno1_inputs 0)) ;; edge1 (annotation:member-name anno1 edge1) ;; "profile" (entity:set-color edge1 6) ;; () (define edge2 (list-ref anno1_inputs 1)) ;; edge2 (annotation:member-name anno1 edge2) ;; "path" ; Get the outputs for this annotation (define anno1_outputs (annotation:outputs anno1)) ;; anno1_outputs (annotation:member-name anno1 (list-ref anno1_outputs 0)) ;; "lateral_face" (annotation:member-name anno1 face1) ;; "lateral_face" ; Find member names of a specific entity for ; all the associated annotations. (entity:annotation-names edge1) ;; ("profile" "profile" "profile" "profile") (entity:annotation-names edge2) ;; ("path" "path" "path" "path" "path" "path" "path" ;; "path" "path" "path" "path" "path" "path" "path" ;; "path" "path") Figure. annotation:member-name |
[Top]
annotation | entity |
Description
Returns the list of output entities for the given annotation entity. A lateral
face from a profile edge is an output from a sweep annotation, for example.
The option for annotation should be turned on (#t) in order for the annotations to be created during a sweep or blend operation. Likewise, the option for unhook_annotations should be turned off (#f) in order to view the annotations after the operation, otherwise they are automatically cleared out.
; annotation:outputs ; Turn on annotation options (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Create a sweep path from a wire body of edges. (define path1 (wire-body (list (edge:linear (position 0 0 0) (position 0 20 0)) (edge:ellipse (position 10 20 0) (gvector 0 0 -1) (gvector -10 0 0) 1 0 90) (edge:linear (position 10 30 0) (position 20 30 0))))) ;; path1 ; Create the profile to use in sweeping (define profile1 (wire-body:points (list (position 3 0 3) (position 3 0 -3) (position -3 0 -3) (position -3 0 3) (position 3 0 3)))) ;; profile1 ; Sweep the profile along the path. (define sweep1 (sweep:law profile1 path1)) ;; sweep1 (entity:set-color path1 2) ;; () (entity:set-color profile1 3) ;; () (iso) ;; #[view 10814340] (zoom-all) ;; #[view 10814340] ; OUTPUT Original ; Create some lists for verification purposes. (define out-sw-faces (entity:faces sweep1)) ;; out-sw-faces (define out-sw-edges (entity:edges sweep1)) ;; out-sw-edges ; Select a face resulting from the sweep. (ray:queue 89.9693 -121.78 74.672 -0.408248 0.816497 -0.408248 1) ;; #[ray (89.9693 -121.78 74.672) ;; (-0.408248 0.816497 -0.408248)] (define face1 (pick-face)) ;; face1 (entity:set-color profile1 2) ;; () (entity:set-color face1 BLUE) ;; () (system:sleep 3500) ;; 3500 ; Get the annotations associated with the face. (define face1_annos (entity:annotations face1)) ;; face1_annos (define anno1 (list-ref face1_annos 0)) ;; anno1 (entity:debug anno1) ;; "sweep_anno_edge_lat" ; Get the inputs for this annotation. (define anno1_inputs (annotation:inputs anno1)) ;; anno1_inputs (define edge1 (list-ref anno1_inputs 0)) ;; edge1 (annotation:member-name anno1 edge1) ;; "profile" (entity:set-color edge1 6) ;; () (define edge2 (list-ref anno1_inputs 1)) ;; edge2 (annotation:member-name anno1 edge2) ;; "path" ; Get the outputs for this annotation (define anno1_outputs (annotation:outputs anno1)) ;; anno1_outputs (annotation:member-name anno1 (list-ref anno1_outputs 0)) ;; "lateral_face" (annotation:member-name anno1 face1) ;; "lateral_face" ; Find member names of a specific entity for ; all the associated annotations. (entity:annotation-names edge1) ;; ("profile" "profile" "profile" "profile") (entity:annotation-names edge2) ;; ("path" "path" "path" "path" "path" "path" "path" ;; "path" "path" "path" "path" "path" "path" "path" ;; "path" "path") |
[Top]
None |
; annotation:unhook-all ; Create a swept part with annotations turned on. (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t (define prof (edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 1 0 0))) ;; prof (define path (gvector 0 0 1)) ;; path (define swp (sweep:law prof path)) ;; swp (define face1 (list-ref (entity:faces swp) 0)) ;; face1 ; Confirm annotation on face. (entity:annotations face1) ;; (#[entity 7 1]) ; Unhook annotations. (annotation:unhook-all) ;; () ; Annotation no longer accessible through face. (entity:annotations face1) ;; () ; Hook annotations. (annotation:hook-all) ;; () ; Annotation again accessible through face. (entity:annotations face1) ;; (#[entity 7 1]) ; Clear annotations (annotation:clear-all) ;; () ; Annotations no longer present. (entity:annotations face1) ;; () |
[Top]
arc | elliptical-curve | elliptical-edge |
Description
Circular curves and edges are subsets of elliptical curves and edges.
; arc:center ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; Get the center of the edge. (arc:center arc1) ;; #[position 15 25 0] |
[Top]
arc | elliptical-curve | elliptical-edge |
Description
This extension returns the end angle of the elliptical curve or edge in
degrees. Circular curves and edges are subsets of elliptical curves and edges.
; arc:end-angle ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; Get the end angle of the edge. (arc:end-angle arc1) ;; 185 |
[Top]
arc | elliptical-curve | elliptical-edge |
Description
Returns the gvector of the major axis of an elliptical curve or edge. The
gvector is measured from the center position to the starting position of the
underlying full curve. If the ellipse has a ratio greater than 1 (major axis to
minor axis), then the returned gvector specifies the direction of the ellipse's
minor axis.
; arc:major-axis ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; Get the gvector of the major axis of the edge. (arc:major-axis arc1) ;; #[gvector 25 0 0] |
[Top]
arc | elliptical-curve | elliptical-edge |
Description
Circular curves and edges are subsets of elliptical curves and edges. The
radius is measured from the center position to the starting position of the
underlying full curve. If the ellipse has a ratio greater than 1 (major axis to
minor axis), then the returned value specifies half of the ellipse's minor axis
length.
; arc:radius ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; Get the radius of the edge. (arc:radius arc1) ;; 25 |
[Top]
arc | elliptical-curve | elliptical-edge |
Description
This extension returns the start angle in degrees. Circular curves and edges
are subsets of elliptical curves and edges.
; arc:start-angle ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; Get the start angle of the edge. (arc:start-angle arc1) ;; 0 ; Set the start angle of the edge. (define arc (arc:set-start arc1 45)) ;; arc (arc:start-angle arc1) ;; 45 |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a body; otherwise, it returns #f.
; body? ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 15 15))) ;; block1 ; Determine if the solid block is a body. (body? block1) ;; #t |
[Top]
body | body |
part | part |
ao | acis-options |
Description
This extension returns a single body, which is the copy of the original body.
; body:get-transform ; create a solid block (define block1 (solid:block (position 0 0 0) (position 10 10 5))) ;; block1 ; make a copy of block1 (define copy1 (body:copy block1)) ; copy1 |
[Top]
body | body |
Description
If there is not a transform the command will return a #f.
; body:get-transform ; Define and body and get the transform ; attached to it. (define b (solid:block (position 0 0 0) (position 10 10 10))) ;; b (body:get-transform b) ;; #[transform 761912] |
[Top]
None |
Description
Displays int_cur and spl_sur global cache statistics.
Example
; get cache statistics (cache:stats) ;; (("ic-actual-size" . 98) ("ic-alloc-size" . 100) ("ic-max-size" . 100) ;; ("ic-run-mode" . 1) ("ss-actual-size" . 85) ("ss-alloc-size" . 100) ;; ("ss-max-size" . 100) ("ss-run-mode" . 1)) |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a coedge; otherwise, it returns #f.
; coedge? ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Determine if the solid block is a coedge. (coedge? block1) ;; #f ; Find the coedges of the solid block. (define coedges1 (entity:coedges block1)) ;; coedges1 ; Determine if a coedge of the solid block is ; actually a coedge. (coedge? (car coedges1)) ;; #t |
[Top]
None |
; coedge:types ; Create a solid cylinder (define solid (solid:cylinder (position 0 0 0) (position 0 0 30) 30)) ;; solid ; get a list of the coedge types (coedge:types) ;; #t |
[Top]
curve-list | edge | (edge ...) |
point-list | position | (position ...) |
param-list | real | (real ...) |
normal | gvector |
Description
All three B-splines must lie in the same plane. There are potentially many
circles lying tangent to the three curves. param-list provides starting
guesses for the parameter value at the point of tangency.
; curve:bs3-eval-arc-3curve ; Create spline edges. (define spl1 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)))) ;; spl1 (define spl2 (edge:spline (list (position -20 20 0) (position -15 25 0) (position -10 30 0) (position -5 35 0) (position -10 40 0) (position -15 45 0) (position -20 50 0)))) ;; spl2 (define spl3 (edge:spline (list (position 50 20 0) (position 45 25 0) (position 40 30 0) (position 35 35 0) (position 40 40 0) (position 45 45 0) (position 50 50 0)))) ;; spl3 (curve:bs3-eval-arc-3curve (list spl1 spl2 spl3) (list) (list 10 10 10) (gvector 0 0 1)) ; radius = 20.756587 ; center = (15.000000 40.756587 0.000000) ;; #t |
[Top]
curve | edge |
point | position |
guess-param | real |
Description
Determines a position on a bs3_curve where a line from a given
position is tangent to the curve. Uses a guess parameter value to aid the
solution (especially where there are multiple solutions).
; curve:bs3-eval-tan-pt ; Create a spline edge. (define spl (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)))) ;; spl ; Determine the tangent point on the curve that ; passes through the position (0 25 0). (curve:bs3-eval-tan-pt spl (position 0 25 0) 20) ;; #[position 15.6785064292946 19.8870807275491 0] |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a
curve:circular; otherwise, it returns #f.
; curve:circular? ; Create a circular curve. (define curve1 (curve:circular (position 0 0 0) 25 (gvector 0 1 0))) ;; curve1 ; Determine if it is indeed a circular curve. (curve:circular? curve1) ;; #t |
[Top]
edge | edge |
Description
Given an edge, returns the underlying curve's domain.
; curve:domain ; ; Create a circular curve. ; Define an edge (define ellipse1 (edge:elliptical (position 15 15 0) (position 25 15 0) 2 0 270)) ;; ellipse1 ; Determine the domain of the edge (curve:domain ellipse1) ; -3.1415926535898 : 3.1415926535898 ;; () |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a
curve:elliptical; otherwise, it returns #f.
; curve:elliptical? ; Create elliptical edge 1. (define edge1 (edge:elliptical (position 0 0 0) (position 20 0 0) .75 0 180)) ;; edge1 ; Create circular edge 2. (define edge2 (edge:circular (position 0 0 0) 20 0 180)) ;; edge2 ; Determine if edge1 is an elliptical curve. (curve:elliptical? (curve:from-edge edge1)) ;; #f ; Determine if edge2 is an elliptical curve. (curve:elliptical? (curve:from-edge edge2)) ;; #t |
[Top]
edge-or-curve | curve | edge |
Description
The parameterization of all curves is normalized to lie in the interval 0 to 1;
therefore, a return parameter=0 indicates the start point of the curve. This
extension returns the end parameter as a real.
; curve:end-param ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Get the end parameter of the edge. (curve:end-param edge1) ;; 3.22885911618951 |
[Top]
edge-or-curve | curve | edge |
Description
Returns the end position of an edge or a curve.
; curve:end-pos ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Get the end position of the edge. (curve:end-pos edge1) ;; #[position -24.9048674522936 -2.17889356869144 0] |
[Top]
edge-or-curve | curve | edge |
Description
Returns the end tangent of an edge or a curve.
; curve:end-tan ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Get the tangent end of the edge. (curve:end-tan edge1) ;; #[gvector 0.0871557427476575 -0.996194698091746 0] |
[Top]
edge-or-curve | curve | edge |
parameter | real |
integer-type | integer |
Description
This extension expects a normalized parameter value; that is, a value that has
been mapped from the true parameter range of the curve to the interval 0 to 1.
For example, evaluating at parameter=0 returns the start point of the curve.
; curve:eval ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Evaluate the edge at various ; parameters and derivatives. (curve:eval edge1 0.45 0) ;; (#[position 2.93843493644595 24.8267114238732 0]) (curve:eval edge1 0.45 1) ;; (#[position 2.93843493644595 24.8267114238732 0] ;; #[gvector -80.1619535059791 9.48779243187324 0]) (curve:eval edge1 0.45 2) ;; (#[position 2.93843493644595 24.8267114238732 0] ;; #[gvector -80.1619535059791 9.48779243187324 0] ;; #[gvector -30.6347450861677 -258.83165434934 0]) |
[Top]
edge-or-curve | curve | edge |
parameter | real |
Description
The parameterization of all curves is normalized to lie in the interval 0 to 1;
therefore, evaluating at parameter=0 indicates the start point of the curve.
; curve:eval-curvature ; Create a circular edge. (define edge1 edge:circular (position 0 0 0) 38 0 100)) ;; edge1 ; Evaluate the curvature at a specific parameter. (curve:eval-curvature edge1 0.23) ;; #[gvector -0.024223811932959 -0.0102823981181388 0] |
[Top]
edge-or-curve | curve | edge |
parameter | real |
Description
The parameterization of all curves is normalized to lie in the interval 0 to 1;
therefore, evaluating at parameter=0 indicates the start point of the curve.
; curve:eval-pos ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 38 0 100)) ;; edge1 ; Evaluate the edge at a specific parameter. (curve:eval-pos edge1 0.75) ;; #[position 9.83512371389579 36.7051813989846 0] |
[Top]
edge-or-curve | curve | edge |
parameter | real |
Description
The parameterization of all curves is normalized to lie in the interval 0 to 1;
therefore, evaluating at parameter=0 indicates the start point of the curve.
; curve:eval-tan ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 38 0 100)) ;; edge1 ; Evaluate the tangent at a specific parameter. (curve:eval-tan edge1 0.23) ;; #[gvector -0.390731128489274 0.92050485345244 0] |
[Top]
edge | edge |
Description
This extension creates a scheme-object containing an ACIS geometry curve class
from an
ENTITY class item (for example, edge).
Geometry classes must be attached to derived ENTITY class items (for example, edge) to be displayed and saved. By themselves, curve scheme-objects are useful for evaluating positional, directional, or curvature information without creating a (topology) entity.
; curve:from-edge ; Create a linear edge. (define edge1 (edge:linear (position 0 0 0) (position 30 30 30))) ;; edge1 ; Convert the edge to a curve data structure. (curve:from-edge edge1) ;; #[curve 1075640854] |
[Top]
tcoedge | tcoedge |
Description
This extension creates a scheme-object containing an ACIS geometry curve class
from an
ENTITY class item (for example, tcoedge).
Geometry classes must be attached to derived ENTITY class items (for example, tcoedge) to be displayed and saved. By themselves, curve scheme-objects are useful for evaluating positional, directional, or curvature information without creating a (topology) entity.
; curve:from-tcoedge ; example not available |
[Top]
edge-or-curve | curve | edge |
start | real |
end | real |
Note: If the parameter values for start and end are outside of 0 and 1, the curve is extrapolated. Spline curves cannot be reliably evaluated for parametric values outside of the interval 0 and 1.
; curve:length ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 35 5 205)) ;; edge1 ; Determine the length of the edge. (curve:length edge1) ;; 122.173047639603 |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a linear curve; otherwise, it
returns #f.
; curve:linear? ; Create a linear curve, and determine if the ; resulting object is actually a linear curve. (define curve1 (curve:linear (position 0 0 0) (position 30 30 30))) ;; curve1 (curve:linear? curve1) ;; #t (define edge1 (edge:linear (position 0 0 0) (position 30 30 30))) ;; edge1 (curve:linear? edge1) ;; #f |
[Top]
edge-or-curve | edge | curve |
Description
This extension returns a gvector that is normal to the given curve.
; curve:normal ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine the normal to the edge. (curve:normal edge1) ;; #[gvector 0 0 1] ; Create a linear edge. (define edge2 (edge:linear (position -10 -10 0) (position 20 20 0))) ;; edge2 ; Determine the normal to the edge, which ; should return #f because it is not a curve. (curve:normal edge2) ;; #f |
[Top]
edge-or-curve | edge | curve |
param-pos | position |
Description
This extension returns the parameter as a normalized real, ranging from 0 to 1.
; curve:param ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25)) ;; edge1 ; Determine the parameter value of the curve ; at a specific position. (curve:param edge1 (position 6 6 0)) ;; 0.125 |
[Top]
edge-or-curve | curve | edge |
distance | real |
parameter | real |
Description
This extension returns the normalized parameter as a real, ranging from 0 to 1.
; curve:param-at-dist ; Create a circular curve. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine the parameter values at specific ; distances along the curves. (curve:param-at-dist edge1 2.5) ;; 0.0309706916286932 (curve:param-at-dist edge1 2.5 0.44) ;; 0.470970691628693 (curve:param-at-dist edge1 3 1) ;; 1.03716482995443 |
[Top]
edge-or-curve | curve | edge |
in-pos | position |
parameter | real |
Description
This extension returns a pair (position . real). The first term
position is the orthogonal projection of the input test-position onto the input
curve curve. The second term real is the corresponding parameter value
in the range 0 to 1.
; curve:project-pos ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Compute the normal projection of two positions ; onto the edge. (curve:project-pos edge1 (position 0 0 0) 0.63) ;; (#[position -11.174465516778 22.3636159959506 0] ;; . 0.63) (curve:project-pos edge1 (position 25 25 25)) ;; (#[position 17.6776695296637 17.6776695296637 0] ;; . 0.243243243243243) |
[Top]
curve | curve |
pick-ray | ray |
entray | entray |
Description
The gvector on the curve can determine which end of a curve has been picked. If
(< 0.5 (cdr (curve:ray-pos pick))), the curve is picked near the start
position; otherwise, it is picked near the end position. This extension returns
a pair-pair, where the first element is the position on the curve closest to
the input ray. The second element is the corresponding parameter of the
position in the range 0 to 1.
; curve:ray-pos ; Create a spline edge. (define edge1 (edge:spline (list (position 0 0 0) (position 0 -30 0) (position -30 18 0)) 0 45)) ;; edge1 ; Determine the position on the edge that ; is closest to the specified position. (curve:ray-pos (entray edge1 (ray (position 0 -30 0) (gvector 0 0 1)))) ;; (#[position 8.88178419700125e-16 -30 0] . ;; 0.346404775941922) |
[Top]
edge-or-curve | curve | edge |
Description
This extension returns the normalized parameter value of the start of a curve
or edge as a real.
; curve:start-param ; Create circular edge 1. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Find circular edge 1's start parameter. (curve:start-param edge1) ;; 0 ; Create circular edge 2. (define edge2 (edge:circular (position 12 15 -3) 45 66 205)) ;; edge2 ; Find circular edge 2's start parameter. (curve:start-param edge2) ;; 1.15191730631626 |
[Top]
edge-or-curve | curve | edge |
Description
Returns the start position of an edge or curve.
; curve:start-pos ; Create circular edge 1. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine circular edges 1's start position. (curve:start-pos edge1) ;; #[position 25 0 0] ; Create circular edge 2. (define edge2 (edge:circular (position 5 10 10) 45 15 205)) ;; edge2 ; Determine circular edge 2's start position. (curve:start-pos edge2) ;; #[position 48.4666621830081 21.6468570296134 10] |
[Top]
edge-or-curve | curve | edge |
Description
Returns the tangent at the start of an edge or curve.
; curve:start-tan ; Create circular edge 1. (define edge1 (edge:circular (position 0 0 0) 15 0 145)) ;; edge1 ; Determine circular edge 1's start tangent vector. (curve:start-tan edge1) ;; #[gvector 0 1 0] ; Create circular edge 2. (define edge2 (edge:circular (position -5 -10 10) 35 25 245)) ;; edge2 ; Determine circular edge 2's start tangent vector. (curve:start-tan edge2) ;; #[gvector -0.422618261740699 0.90630778703665 0] |
[Top]
edge-or-curve | curve | edge |
transform | transform |
; curve:transform ; Create a circular curve. (define curve1 (curve:circular (position 0 0 0) 8)) ;; curve1 ; To view this curve, attach it to an entity. (define edge1 (edge:from-curve curve1)) ;; edge1 ; Modify the curve with a transform (curve:transform curve1 (transform:translation (gvector 0 5 0))) ;; #[curve 1075640854] ; OUTPUT Original ; To view this curve, attach it to an entity. (define edge1 (edge:from-curve curve1)) ;; edge1 ; OUTPUT Result Figure. curve:transform |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is one of the types of curves:
circular, elliptical, or linear. Otherwise, it returns #f.
; curve? ; Create a circular curve. (define curve1 (curve:circular (position 0 0 0) 25)) ;; curve1 ; Determine if the entity is a curve. (curve? curve1) ;; #t |
[Top]
level | string | integer |
base-level | string | integer |
; debug:all-modules ; Enable all debugging levels for all modules. (debug:all-modules "all" "all") ;; () (debug:all-modules "off" "off") ;; () |
[Top]
filename | string |
Description
entity:check, entity:debug,
part:debug,
roll:debug, and
view:debug are Scheme extensions that generate debug
information.
If no permissions are granted for the directory or file in question, this extension generates an error and returns #f.
; debug:file ; Create entity 1. (define block1 (solid:block (position 0 0 0) (position 30 30 30))) ;; block1 ; Redirect the debugging output to ; a file called errinfo.dbg. (debug:file "errinfo") ;; #[file-input-output-port "errinfo.dbg"] ; Set the debug level. (entity:debug block1 4) ;; "solid body" ; Redirect the debugging output to standard output. (debug:file "stdout") ;; #[file-input-output-port "stdout"] |
[Top]
level | string | integer |
Description
This extension returns a list of module names together with their current debug
levels.
; debug:list-modules ; List the debugging levels for all modules. ; Limit the list to 10 modules.(fluid-let ((print-length 10)) (print (debug:list-modules "off"))) ;; (("acis_to_vda" . "off") ;; ("annotation" . "off") ;; ("api" . "off") ;; ("at-pat" . "off") ;; ("atbool" . "off") ;; ("atndbool" . "off") ;; ("attrib" . "off") ;; ("bhl_anal_simg" . "off") ;; ("bhl_anal_stitch" . "off") ;; ("bhl_bend_surf" . "off") ...) |
[Top]
module-name | string |
level | string | integer |
; debug:module ; List the debugging levels for all modules. (fluid-let ((print-length 10)) (print (debug:list-modules))) ; Found 292 modules ; (("acis_to_vda" . "off") ; ("annotation" . "off") ; ("api" . "off") ; ("at-pat" . "off") ; ("atbool" . "off") ; ("atndbool" . "off") ; ("attrib" . "off") ; ("bhl_anal_simg" . "off") ; ("bhl_anal_stitch" . "off") ; ("bhl_bend_surf" . "off") ...) ; Set the debugging level for a module. (debug:module "boolean" "flow") ;; "off" ; Set the debugging level for a module. (debug:module "boolean" "off") ;; "flow" |
[Top]
tag | string |
Description
Returns the string stored in the derived_tag.
; derived-tag:string ; Create block. (define block (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block ; Pick an edge. (define e (pick:edge (ray (position 0 0 0) (gvector 1 1 0)))) ;; e ; Attach derived tag to an edge. (define attach (entity:attach-derived-tag e "blend_edge")) ;; attach ; Attach a constant radius blend attribute to edge. (define const-rad (blend:const-rad-on-edge e 6)) ;; const-rad ; Set annotation option to on. (define option1 (option:set "annotations" #t)) ;; option1 (define option2 (option:set "unhook_annotations" #f)) ;; option2 ; Create a blend function on a blend network/list of ; edges). (define blend (blend:network e)) ;; blend ; Pick a face. (define f (pick:face (ray (position 0 0 0) (gvector 1 1 0)))) ;; f (define anno (annotation:assert "blend_anno_edge-blend_annotation-annotation" "blend_face" f)) ;; anno ; Get a tag string from anno. (derived-tag:string (car (annotation:inputs anno #f))) ;; "blend_edge" |
[Top]
entity | entity |
string | string |
; dummy-name:add ; Set options (option:set 'annotations #t) ;; #f (option:set 'unhook_annotations #f) ;; #t ; Define a profile (define profile (wire-body:points (list (position 0 0 0) (position 10 0 0) (position 10 10 0) (position 0 10 0) (position 0 0 0)))) ;; profile ; Define a path (define path (edge:linear (position 0 0 0) (position 0 0 10))) ;; path ; Attach a DUMMY_NAME attribute to the edges of ; the profile (define dummy (dummy-name:add (entity:edges profile) "ProfileEdge")) ;; dummy ; Sweep the entity (define opt (sweep:options "draft_angle" 10 "gap_type" "n" 'solid #t)) ;; opt (define sweep (sweep:law profile path opt)) ;; sweep ; View annotations on a profile edge and verify the ; derived tag was created from the information in ; the dummy name (map entity:debug (entity:annotations (car (entity:edges profile))) (make-list 100 2)) ; sweep_anno_edge_top **** 471552: ; Rollback pointer: 450936 ; Attribute list: id_attribute 0 -10304 ; path : tag **** 578864 ; tag **** 578864: ; Rollback pointer:NULL ; Attribute list: NULL ; Owning entity : NULL ; Previous attrib :NULL ; Next attribute: NULL ; actual : edge **** -18120 ; StartVtx : point **** -12800: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinates : 0, 0, 0 ; EndVtx : point **** -12736: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinate : 0, 0, 10 ; ; profile : derived_tag **** 578912 ; derived_tag **** 578912: ; Rollback pointer:NULL ; Attribute list: NULL ; Owning entity : NULL ; Previous attrib :NULL ; Next attribute: NULL ; m_string : ProfileEdge ; actual : edge **** -17544 ; StartVt : point **** -13184: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinates : 0, 10, 0 ; EndVtx ; point **** -13512: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinates : 0, 0, 0 ; ; top_edge : edge **** 552608 ; actual : edge **** 552608 ; StartVtx : point **** 471936: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinates : -1.7632698070846, ; -1.7632698070846, 10 ; EndVtx : point **** 523392: ; Rollback pointer:NULL ; Attribute list: NULL ; Use count : 1 ; Coordinates : -1.7632698070846, ; 11.763269807085, 10 ;; ("sweep_anno_edge_top") |
[Top]
in-edge | edge |
extra-info | boolean |
; edge:bs ; Create topology to illustrate command. (define spline (edge:spline (list (position 0 0 0) (position 3 10 0) (position 8 0 0) (position 10 5 0))))) ;; spline ; Get the number of control points. (edge:bs spline) ;; 6 ; Obtain additional information for this B-spline. (edge:bs spline #t) ; ACIS bs3_curve form open ; open B-spline of degree 3 ; 6 control points: ; (0, 0, 0), 0 ; (0.82927811664237, 5.6047496784132, 0), 10.4 ; 40306508911 ; (2.546615525166, 17.211526819864, 0), 21.620 ; 646396409 ; (7.4352298011772, -4.7927993036719, 0), 27.0 ; 05811203544 ; (9.3707841024177, 2.5975293979431, 0), 27.00 ; 5811203544 ; (10, 5, 0), 27.005811203544 ;; 6 |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is a circular-edge.
; edge:circular? ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine if the circular edge is actually ; a circular edge. (edge:circular? edge1) ;; #t |
[Top]
object | scheme-object |
Description
This extension tests the scheme-object to determine if the edge is also a curve
or if any geometry is associated with edge of the vertex of a cone. Degenerate
edges, such as those at the vertices of cones, do not have geometry.
; edge:curve? ; Create a circular curve, and convert it to an edge. (define edge1 (edge:from-curve (curve:circular (position 0 0 0) 25))) ;; edge1 ; Determine if the result is a curve edge. (edge:curve? edge1) ;; #t (define block1 (solid:block (position 0 0 0) (position 25 10 0))) ;; block1 ; Determine if the result is a curve edge. (edge:curve? block1) ;; #f |
[Top]
edge | edge |
Description
Given an edge, returns the edge's domain.
; edge:domain ; Define an edge (define ellipse1 (edge:elliptical (position 15 15 0) (position 25 15 0) 2 0 270)) ;; ellipse1 ; Determine the domain of the edge (edge:domain ellipse1) ; Edge domain: ; 0 : 4.7123889803847 ;; (0 4.71238898038469) |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is an elliptical edge.
; edge:elliptical? ; Create an elliptical edge. (define ellipse1 (edge:elliptical (position 15 15 0) (position 25 15 0) 2 0 270)) ;; ellipse1 ; Determine if the edge is ; actually an elliptical edge. (edge:elliptical? ellipse1) ;; #t (define block1 (solid:block (position 15 15 0) (position 25 25 10))) ;; block1 ; Determine if the block is ; actually an elliptical edge. (edge:elliptical? block1) ;; #f |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is a linear-edge.
; edge:linear? ; Create a linear edge. (define edge1 (edge:linear (position 0 0 0) (position 40 40 0))) ;; edge1 ; Determine if the object is ; actually a linear edge. (edge:linear? edge1) ;; #t (define block1 (solid:block (position 0 0 0) (position 40 40 5))) ;; block1 ; Determine if the object is ; actually a linear edge. (edge:linear? block1) ;; #f |
[Top]
edge | edge |
Description
This function merges the defined edge between two coplanar surfaces.
; edge:merge ; Create a wire body (define wb (wire-body:points (list (position 0 0 0) (position 2 0 0) (position 2 2 0) (position 0 2 0) (position 0 0 0)))) ;; wb (define cover (sheet:cover-wires wb)) ;; cover (entity:set-color wb 1) ;; () (define e (wire-body (edge:linear (position 0 0 0) (position 2 2 0)))) ;; e (define unite (bool:nonreg-unite wb e)) ;; unite (zoom-all) ;; #[view 1770210] (entity:check wb) ;; () ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 2 faces ;; 2 loops ;; 6 coedges ;; 5 edges ;; 4 vertices (ray:queue 0.94986 0.935112 12.0251 0 0 -1 0.209715) ;; #[ray (0.94986 0.935112 12.0251) (0 0 -1)] (define em (pick-edge)) ;; em (edge:merge em) ;; #t (entity:check wb) ;; () ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 1 faces ;; 1 loops ;; 4 coedges ;; 4 edges ;; 4 vertices |
[Top]
in-edge | edge |
Description
Returns the minimum radius of curvature of a curve.
; edge:min-rad ; Create a circular curve and convert to an edge. (define edge1 (edge:from-curve (curve:circular (position 0 0 0) 15))) ;; edge1 (edge:min-rad edge1) ; Minimum Radius of Curvature: 15 ;; 15 ; Create a circular curve and convert to an edge. (define edge2 (edge:from-curve (curve:circular (position 0 0 0) 30))) ;; edge2 (edge:min-rad edge2) ; Minimum Radius of Curvature: 30 ;; 30 |
[Top]
edge | edge |
dist | gvector |
extend | boolean |
Description
This Scheme command creates a parallel edge at the specified vector by creating
a new edge with the same geometry and extending it. It is then imprinted in the
sheet body and the old edge is merged.
; edge:move ; create a wire body (define wb (wire-body:points (list (position 0 0 0) (position 2 0 0) (position 2 2 0) (position 0 2 0) (position 0 0 0)))) ;; wb (define cover (sheet:cover-wires wb)) ;; cover (entity:set-color wb 1) ;; () (define e (wire-body (edge:linear (position 0 0 0) (position 2 2 0)))) ;; e (define unite (bool:nonreg-unite wb e)) ;; unite (zoom-all) ;; #[view 1639204] (define e (wire-body (edge:linear (position 0 1.5 0) (position 2 1.5 0)))) ;; e (define wb (bool:nonreg-unite wb e)) ;; wb (define em (list-ref (entity:edges wb)0)) ;; em (entity:set-color em 3) ;; () (edge:move em -.25 ) ;; #t |
[Top]
in-edge | edge |
in-face | face |
Description
Only that part of the edge for which a perpendicular projection onto the face's
surface exists will be projected - parts that can only be projected to the
boundaries of the surface will be excluded. If no part of the edge can be
projected onto the surface, this extension will return false.
In cases where no perpendicular projection exists for any part of the curve, a NULL curve will be created.
; edge:project-to-face ; Create some geometry to show the example of ; projecting an edge to a face. (cond (( = 0 (length (part:views))) (view:gl))) ;; f (view:set-bg-color 7) ;; #[view 5375148] (view:edges #t) ;; #[view 5375148] (view:polygonoffset #t) ;; #[view 5375148] (part:clear) ;; #t ; Make a spring edge (define handiness #t) ;; handiness (define pitch1 40) ;; pitch1 (define pitch-degrees1 360) ;; pitch-degrees1 (define axis-point (position 0 0 0))) ;; axis-point (define axis-vector(gvector 0 1 0)) ;; axis-vector (define start-position (position 0 0 6)) ;; start-position (define spring (edge:spring axis-point axis-vector start-position handiness pitch1 pitch-degrees1)) ;; spring ; Make a face (define c (solid:cylinder (position 0 0 0) (position 0 50 0) 5)) ;; c (entity:set-color c RED) ;; () (define f(list-ref (entity:faces c ) 0)) ;; f (zoom-all) ;; #[view 5375148] ; Make an edge that is the first edge projected onto ; the face (define newcurve (edge:project-to-face spring f)) ;; newcurve |
[Top]
edge | edge |
plane-pos | position |
plane-normal | gvector |
accurate | boolean |
Description
This returns the new edge that is the projection of the given edge onto the
plane. The input edge is projected parallel to the input gvector. It gets
projected onto the place specified by the position and the gvector.
; edge:project-to-plane ; Create a linear edge. (define edge1 (edge:linear (position 0 0 0) (position 30 30 0))) ;; edge1 ; OUTPUT Original ; Project the edge onto a plane. (define project (edge:project-to-plane edge1 (position 20 20 0) (gvector 0 1 0))) ;; project ; OUTPUT Result Figure. edge:project-to-plane |
[Top]
edge | edge |
face | face |
Description
Given an edge and a face that the edge lies on, this extension determines if
the direction of the edge should be reversed when traversing the loop which
contains the edge. This extension returns #t if the edge is reversed;
otherwise, it returns #f.
; edge:reversed? ; Create a block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Get a list of the block's edges. (define edges1 (entity:edges block1)) ;; edges1 ; Get a list of the block's faces. (define faces1 (entity:faces block1)) ;; faces1 (define one-edge (car edges1)) ;; one-edge (define one-face (car faces1)) ;; one-face ; Determine if an edge is reverse ; with respect to a face. (edge:reversed? one-edge one-face) ;; #f |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is a spline-edge.
; edge:spline? ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine if the edge is actually a spline edge. (edge:spline? edge1) ;; #f ; Create a edge:spline. (define spline1 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) 0 45)) ;; spline1 ; Determine if the edge is actually a spline edge. (edge:spline? spline1) ;; #t |
[Top]
edge | edge |
Description
Returns edge type.
; edge:type ; Create some edges to test. (define e1 (edge:circular (position 0 0 0) 5)) ;; e1 (edge:type e1) ;; "ellipse" (define e2 (edge:linear (position 10 0 0) (position 20 0 0))) ;; e2 (edge:type e2) ;; "straight" |
[Top]
edge | edge |
; edge:types ; create a solid cylinder (define solid (solid:cylinder (position 0 0 0) (position 0 0 30) 30)) ;; solid ; get a list of the edge types (edge:types) ; entity:(entity 1 1) ; entity:(entity 2 1) ; edge:(entity 3 1) edge_type:circle ; edge:(entity 4 1) edge_type:circle ;; #t |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is an edge.
; edge? ; Create a circular edge. (define edge1 (edge:circular (position 0 0 0) 25 0 185)) ;; edge1 ; Determine if the circular edge is an edge. (edge? edge1) ;; #t (define block1 (solid:block (position 0 0 0) (position 25 10 18))) ;; block1 ; Determine if the block is an edge. (edge? block1) ;; #f |
[Top]
list | entity | (entity ...) |
entity | entity |
; eelist:add ; Make an EE_LIST (define a (eelist:new)) ;; a ; Make an entity to add (define s (solid:sphere (position 0 0 0) 10)) ;; s ; Add it to the list (define add (eelist:add a s)) ;; add |
[Top]
list | entity | (entity ...) |
; eelist:entities ; Make an EE_LIST (define a (eelist:new)) ;; a ; Make an entity to add (define s (solid:sphere (position 0 0 0) 10)) ;; s ; Add it to the list (eelist:add a s) ;; #[entity 2 1] ; See what is there (define ents (eelist:entities a)) ;; ents |
[Top]
None |
Description
Creates a new
EE_LIST entity. An EE_LIST is an
ENTITY wrapper for
ENTITY_LIST. Like all entities it participates in save/restore
and rollback.
; eelist:new ; Make a new EE_LIST (define newlist (eelist:new)) ;; newlist |
[Top]
list | entity | (entity ...) |
entity | entity |
; eelist:remove ; Make an EE_LIST (define a (eelist:new)) ;; a ; Make an entity to add (define s (solid:sphere (position 0 0 0) 10)) ;; s ; Add it to the list (eelist:add a s) ;; #[entity 1 1] ; Take it back out (eelist:remove a s) ;; #[entity 1 1] |
[Top]
entity-id | integer |
part | part |
Description
This extension returns the entity or #f if the entity is not found.
; entity ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 block1 ; Retrieve entity 4, if defined. (entity 4) ;; #f ; Retrieve entity 2, if defined. (entity 2) ;; #f ; Retrieve entity 1, if defined. (entity 1) ;; #[entity 1 1] |
[Top]
entity | entity |
Description
Returns the name of the selected entity as determined by an attached annotation
attribute.
The option for annotation should be turned on (#t) in order for the annotations to be created during a sweep or blend operation. Likewise, the option for unhook_annotations should be turned off (#f) in order to view the annotations after the operation, otherwise they are automatically cleared out.
; entity:annotation-names ; Turn on annotation options (option:set "annotation" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Create a sweep path from a wire body of edges. (define path1 (wire-body (list (edge:linear (position 0 0 0) (position 0 20 0)) (edge:ellipse (position 10 20 0) (gvector 0 0 -1) (gvector -10 0 0) 1 0 90) (edge:linear (position 10 30 0) (position 20 30 0))))) ;; path1 ; Create the profile to use in sweeping (define profile1 (wire-body:points (list (position 3 0 3) (position 3 0 -3) (position -3 0 -3) (position -3 0 3) (position 3 0 3)))) ;; profile1 ; Sweep the profile along the path. (define sweep1 (sweep:law profile1 path1)) ;; sweep1 (entity:set-color path1 2) ;; () (entity:set-color profile1 3) ;; () (iso) ;; #[view 10814340] (zoom-all) ;; #[view 10814340] ; Create some lists for verification purposes. (define out-sw-faces (entity:faces sweep1)) ;; out-sw-faces (define out-sw-edges (entity:edges sweep1)) ;; out-sw-edges ; Select a face resulting from the sweep. (ray:queue 89.9693 -121.78 74.672 -0.408248 0.816497 -0.408248 1) ;; #[ray (89.9693 -121.78 74.672) ;; (-0.408248 0.816497 -0.408248)] (define face1 (pick-face)) ;; face1 (entity:set-color profile1 2) ;; () (entity:set-color face1 BLUE) ;; () (system:sleep 3500) ;; 3500 ; Get the annotations associated with the face. (define face1_annos (entity:annotations face1)) ;; face1_annos (define anno1 (list-ref face1_annos 0)) ;; anno1 (entity:debug anno1) ;; "sweep_anno_edge_lat" ; Get the inputs for this annotation. (define anno1_inputs (annotation:inputs anno1)) ;; anno1_inputs (define edge1 (list-ref anno1_inputs 0)) ;; edge1 (annotation:member-name anno1 edge1) ;; "profile" (entity:set-color edge1 6) ;; () (define edge2 (list-ref anno1_inputs 1)) ;; edge2 (annotation:member-name anno1 edge2) ;; "path" ; Get the outputs for this annotation (define anno1_outputs (annotation:outputs anno1)) ;; anno1_outputs (annotation:member-name anno1 (list-ref anno1_outputs 0)) ;; "lateral_face" (annotation:member-name anno1 face1) ;; "lateral_face" ; Find member names of a specific entity for ; all the associated annotations. (entity:annotation-names edge1) ;; ("profile" "profile" "profile" "profile") (entity:annotation-names edge2) ;; ("path" "path" "path" "path" "path" "path" "path" ;; "path" "path" "path" "path" "path" "path" "path" ;; "path" "path") |
[Top]
entity | entity |
Description
Returns the list annotation entities attached to the given entity via an
annotation attribute. If there is only one annotation attached, it is returned
directly without a list.
The option for annotation should be turned on (#t) in order for the annotations to be created during a sweep or blend operation. Likewise, the option for unhook_annotations should be turned off (#f) in order to view the annotations after the operation; otherwise they are automatically removed.
(part:clear) ; entity:annotations ; Turn on annotation options (option:set "annotation" #t) (option:set "unhook_annotations" #f) ; Create a sweep path from a wire body of edges. (define path1 (wire-body (list (edge:linear (position 0 0 0) (position 0 20 0)) (edge:ellipse (position 10 20 0) (gvector 0 0 -1) (gvector -10 0 0) 1 0 90) (edge:linear (position 10 30 0) (position 20 30 0))))) ; Sweep the edges into a face body. (define a-body (sweep:law (edge:linear (position -3 0 -3) (position 3 0 -3)) (gvector 0 0 6)))) ; Create the profile to use in sweeping (define profile1 (car (entity:faces (sheet:2d a-body)))) ; Sweep the profile along the path. (define sweep1 (sweep:law profile1 path1)) (entity:set-color path1 2) (entity:set-color profile1 3) (iso) (zoom-all) ; Create some lists for verification purposes. (define top-cap-edges (entity:edges profile1)) (define out-sw-faces (entity:faces sweep1)) (define out-sw-edges (entity:edges sweep1)) ; Check the annotations attached to items. ; Create a list of annotations associated with an ; edge of the swept body. (define anno1 (entity:annotations (list-ref out-sw-edges 0))) anno1 ; Create a list of annotations that are inputs to the ; sweep operation. (define anno-input1 (annotation:inputs (list-ref anno1 0))) anno-input1 ; See what the annotation names are for a given ; input annotation. (entity:annotation-names (list-ref anno-input1 0)) (entity:annotation-names (list-ref anno-input1 1)) ; Create a second list of annotations from the first ; swept face. (define anno2 (entity:annotations (list-ref out-sw-faces 0))) ; See what the annotation names are for the ; annotation attached to the first swept face. (annotation:member-name (list-ref anno2 0) (list-ref out-sw-faces 0)) ; Create a list of annotations just from one of the ; edges in the top cap. (define anno3 (entity:annotations (list-ref top-cap-edges 0))) anno3 (annotation:member-name (list-ref anno3 0) (list-ref top-cap-edges 0)) ; Create a list of annotations that are inputs to ; the sweep operation. (define anno-input1 (annotation:inputs (list-ref anno1 0))) anno-input1 ; See what the annotation names are for a given ; input annotation. (entity:annotation-names (list-ref anno-input1 0)) (entity:annotation-names (list-ref anno-input1 1)) ; Create a second list of annotations from the first ; swept face. (define anno2 (entity:annotations (list-ref out-sw-faces 0))) anno2 ; See what the annotation names are for the ; annotation attached to the first swept face. (annotation:member-name (list-ref anno2 0) (list-ref out-sw-faces 0)) ; Create a list of annotations just from one of the ; edges in the top cap. (define anno3 (entity:annotations (list-ref top-cap-edges 0))) anno3 (annotation:member-name (list-ref anno3 0) (list-ref top-cap-edges 0)) |
[Top]
entity | entity |
string | string |
Description
Attaches a DERIVED_TAG, which is derived from
ATTRIB_TAG to the given entity.
; entity:attach-derived-tag ; Set options (option:set "annotations" #t) ;; #f (option:set "unhook_annotations" #f) ;; #t ; Define a profile (define profile (wire-body:points (list (position 0 0 0) (position 10 0 0) (position 10 10 0) (position 0 10 0) (position 0 0 0)))) ;; profile ; Define a path. (define path (edge:linear (position 0 0 0) (position 0 0 10))) ;; path ; Attach a DERIVED_TAG to the path (define attach (entity:attach-derived-tag path 'thePathEdge)) ;; attach ; Do the sweep (define opt (sweep:options "draft_angle" 10 "gap_type" "n" 'solid #t)) ;; opt ; Sweep profile along defined path. (define sweep (sweep:law profile path opt)) ;; sweep ; View annotations on the path and see that ; the derived tag was used (map entity:debug (entity:annotations path) (make-list 100 2)) ; returns the list of annotation entities ;; ("sweep_anno_vertex_lat" "sweep_anno_vertex_top" ;; "sweep_anno_edge_lat" "sweep_anno_edge_top" ;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top" ;; "sweep_anno_edge_lat" "sweep_anno_edge_top" ;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top" ;; "sweep_anno_edge_lat" "sweep_anno_edge_top" ;; "sweep_anno_vertex_lat" "sweep_anno_vertex_top" ;; "sweep_anno_edge_lat" "sweep_anno_edge_top") |
[Top]
entity | entity |
; entity:attribs |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of all of the coedges from the entity or list of
entities. If no coedges are found, this extension returns an empty list.
0 | patterned objects are created if they do not already exist, and are included in the list. |
1 | only those patterned objects that have already been created are included in the list. |
2 | no patterned objects besides seed pattern objects are included in the list. |
; entity:coedges ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Get a list of the block's coedges. (entity:coedges block1) ;; (#[entity 3 1] #[entity 4 1] #[entity 5 1] ;; #[entity 6 1] #[entity 7 1] #[entity 8 1] ;; #[entity 9 1] #[entity 10 1] #[entity 11 1] ;; #[entity 12 1] #[entity 13 1] #[entity 14 1] ;; #[entity 15 1] #[entity 16 1] #[entity 17 1] ;; #[entity 18 1] #[entity 19 1] #[entity 20 1] ;; #[entity 21 1] #[entity 22 1] #[entity 23 1] ;; #[entity 24 1] #[entity 25 1] #[entity 26 1]) |
[Top]
entity-list | entity | (entity ...) |
part | part |
ao | acis-options |
; entity:copy ; Create a block, making it entity 1. (define block1 (solid:block (position 0 0 0) (position 20 20 20))) ;; block1 ; Copy the block, making it entity 2. (define copy (entity:copy block1)) ;; copy ; Copy both blocks, making them entities 4 and 5. (entity:copy (list block1 copy)) ;; (#[entity 4 1] #[entity 5 1]) |
[Top]
entity | entity |
transform | transform |
ao | acis-options |
; entity:copy-contents ; Create a block (define block (solid:block (position 0 0 0) (position 10 10 5))) ;; block (define fa (car (entity:faces block))) ;; fa ; copy the face only (define copy (entity:copy-contents fa)) ;; copy (entity:delete block) ;; () ; there should be only a face left (entity:check copy) ; checked: ; 0 lumps ; 0 shells ; 0 wires ; 1 faces ; 1 loops ; 4 coedges ; 4 edges ; 4 vertices ;; (#[entity 9 1]) |
[Top]
entity | entity |
level | integer |
; entity:debug ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 20 20 20))) ;; block1 ; Print the debug information about the block. (entity:debug block1 1) ; body **** 1211232: ; Rollback pointer : NULL ; Attribute list : display_attribute 0 1330848 ; Lump list : lump 0 1318416 ; Wire list : NULL ; Transform : transform 0 1322480 ; Bounding box : NULL ;; "solid body" |
[Top]
entity-list | entity | (entity ...) |
part | part |
deepcopy-skip | boolean |
Description
The difference between entity:deep-copy and entity:copy
is that entity:deep-copy makes a copy of splf_splf, whereas entity:copy
creates a pointer to splf_splf.
The deep copy functionality is used instead of the regular copy when it is required that no links exist with shared information between the original and the deep copy.
; entity:deep-copy ; Create . (define block1 (solid:block (position 0 0 0) (position 20 20 20))) ;; block1 ; Create a cylinder. (define cyl2 (solid:cylinder (position 0 0 0) (position 5 5 10) 5)) ;; cyl2 ; Create another block. (define block3 (solid:block (position 0 0 0) (position -10 -10 -10))) ;; block3 ; Conduct the deep copy on the three entities. (define deepcopy (entity:deep-copy (list block1 cyl2 block3))) ;; deepcopy |
[Top]
entity-list | entity | (entity ...) |
; entity:delete ; Create a block. (define block1 (solid:block (position 0 0 0) (position 20 20 20))) ;; block1 ; Delete block1. (entity:delete block1) ;; () ; Create a cylinder. (define cyl2 (solid:cylinder (position 0 0 0) (position 5 5 10) 5)) ;; cyl2 ; Create another block. (define block3 (solid:block (position 0 0 0) (position -10 -10 -10))) ;; block3 ; Delete the cylinder and the second block. (entity:delete (list cyl2 block3)) ;; () |
[Top]
given-entity | entity |
containing-entity | entity |
Description
Returns the index of the given entity as listed in debug output when the
containing entity is debugged.
When a given containing entity does not actually contain the given entity, FALSE is returned.
; entity:dindex ; Create a block and get its index value. (define b (solid:block (position -10 -10 -10) (position 10 10 10))) ;; b (entity:dindex (pick:face (ray (position 0 0 0) (gvector 1 0 0)))) ;; 5 |
[Top]
entity | entity |
type | string |
index | integer |
Description
Returns wires, shells, faces, edges, tedges, coedges, tcoedges, tvertices or
vertices selected by the same index as listed in debug output of the given
entity. Note that usually the given entity will be a body.
An entity is returned if reasonable values are given, otherwise FALSE.
; entity:dspindex ; Create an entity and return its display ; index value. (define b (solid:block (position -10 -10 -10) (position 10 10 10))) ;; b (define c (entity:dspindex b "face" 3)) ;; c |
[Top]
body | body |
Description
As transformations are applied to a body, the system keeps track of the
resulting transformation as part of the body data structure. The fix command
applies a body transformation to all of the underlying geometry and replaces
the body transformation with NULL (indicating an id entity transformation).
This extension returns the input entity.
; entity:fix-transform ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position -25 -15 -10))) ;; block1 ; Transform the block. (define transform (entity:transform block1 (transform:axes (position 0 0 0) (gvector -8 0 0) (gvector 0 6 0)))) ;; transform ; Fix the body. (define fix (entity:fix-transform block1)) ;; fix |
[Top]
entity-list | entity | (entity ... ) |
entity-id-str-list | entity-id-str | (entity-id-str ... ) |
include-pat | integer |
acis-opts | acis-options |
Geometry IDs | TRANSFORM_ID SURFACE_ID PCURVE_ID CURVE_ID APOINT_ID |
Topology IDs | BODY_ID LUMP_ID SHELL_ID SUBSHELL_ID WIRE_ID FACE_ID LOOP_ID COEDGE_ID EDGE_ID VERTEX_ID |
;; entity:get-entities ;; define a block (define block (solid:block 0 0 0 10 10 10)) ;; block (entity:get-entities block "FACE_ID") ;; (#[entity 2 1] #[entity 3 1] #[entity 4 1] #[entity 5 1] #[entity 6 1] #[entity 7 1]) (entity:get-entities (entity 2) "SURFACE_ID") ;; (#[entity 12 1]) (entity:get-entities (entity 2) "EDGE_ID") ;; (#[entity 8 1] #[entity 9 1] #[entity 10 1] #[entity 11 1]) (entity:get-entities (entity 8) "COEDGE_ID") ;; (#[entity 12 1] #[entity 13 1]) (entity:get-entities (entity 8) "VERTEX_ID") ;; (#[entity 14 1] #[entity 15 1]) (entity:get-entities block "PCURVE_ID") ;; () (exit) ;; () |
[Top]
entity | entity |
; entity:get-id ; Create a block (define b (solid:block (position -10 -10 -10) (position 10 10 10))) ;; b (define lop (lop:offset-body b 5)) ;; lop (define f (pick:face (ray (position 0 0 0) (gvector 1 0 0)))) ;; f (entity:set-color f BLUE) ;; () (define id (entity:get-id f)) ;; id |
[Top]
entity1 | entity |
entity2 | entity |
scan-type | string |
Description
Occasionally there are unexpected connections between entities. This can cause
routines using the copy_scan() virtual function, such as entity:delete,
(corresponding to api
api_del_entity) and entity:copy
(corresponding to
api_copy_entity) to do more than what was expected.
This routine can help in understanding how two entities are connected by finding a path from one to the other. It uses copy_scan to find what is connected to the first entity and then copy_scan again to find what is connected to the next, and so on. This extension uses an ENTITY_LIST to keep track of what it has already looked at so that the search terminates.
If the second entity is found, this routine returns an ordered list representing the path from the first to the second. If no path is found, it returns an empty list.
; entity:how-connected ; Create a block (define b (solid:block (position 10 20 30) (position -10 -20 -30))) ;; b (define faces (car (entity:faces b))) ;; faces (entity:how-connected b faces) ; -> face ; -> shell ; -> lump ; -> body ;; (#[entity 3 1] #[entity 9 1] #[entity 10 1] ;; #[entity 2 1]) |
[Top]
entity | entity |
list | entity | (entity ...) |
Description
Returns the index of an entity. For example, if the input entity is an edge the
index is found in the result from
api_get_edges. The index is zero based and a -1 is returned if
none are found. Optionally, a list of entities can be input. Index is returned
based on the given entity list.
; entity:index ; Create topology to demonstrate command. (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block (define edges (entity:edges block)) ;; edges (define list (list-ref edges 0)) ;; list ; Find the index of a given edge. (entity:index (entity 6 1)) ;; 3 |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of the entity's loops. If no loops are found,
this extension returns an empty list.
; entity:loops ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 ; Get a list of the block's loops. (entity:loops block1) ;; (#[entity 3 1] #[entity 4 1] #[entity 5 1] ;; #[entity 6 1] #[entity 7 1] #[entity 8 1]) |
[Top]
entity | entity |
save-name | string |
Description
Scans the given entity and entities reachable from it for attributes and loses
them.
This routine does not lose the ID_ATTRIB or DISPLAY_ATTRIB used by the Scheme AIDE. This is because ID_ATTRIB and DISPLAY_ATTRIB are non-copyable and are not included in the scan. Similarly, other non-copyable attributes cannot be lost by this routine.
; entity:lose-attribs ; Create a block. (define b (solid:block (position -10 -10 -10) (position 10 10 10))) ;; b ; Attach color attributes to selected face and edge. (entity:set-color (pick:face (ray (position 0 0 0) (gvector 0 1 0))) 1) ;; () (entity:set-color (pick:edge (ray (position 0 0 0) (gvector 2 2 0))) 3) ;; () ; Lose the color attributes. (entity:lose-attribs b) ;; () (render:rebuild) ;; () |
[Top]
entity-list | entity | (entity ...) |
Description
This extension returns a list of the entity's lumps. If no lumps are found,
this extension returns an empty list.
; entity:lumps ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 ; Get a list of the block's lumps. (entity:lumps block1) ;; (#[entity 3 1]) |
[Top]
body-list | (entity | entity ...) |
xoffset | real |
yoffset | real |
zoffset | real |
fix-transform | boolean |
Description
This is a faster way to transform entities in Scheme. Before (entity:move),
one had to type:
(entity:transform ent);
(transform:translation (gvector x y z)));
This shorthand version lets you do the same operation with:
(entity:move ent x y z).
; entity:move ; Create a cylinder (define c (solid:cylinder (position 0 0 0) (position 10 10 10) 5)) ;; c ; Move the cylinder. (define move (entity:move c 10 0 0)) ;; move ; Scale the cylinder. (define scale1 (entity:scale c 3 1 1)) ;; scale1 ; Apply uniform scale. (define scale2 (entity:scale c 2)) ;; scale2 ; Rotate about (position 20 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate1 (entity:rotate c 20 0 0 0 0 1 90)) ;; rotate1 ; Rotate about (position 0 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate2 (entity:rotate c 0 0 1 90)) ;; rotate2 ; Reflect across (position 40 0 0) (vector 1 0 0). (define reflect1 (entity:reflect c 40 0 0 1 0 0)) ;; reflect1 ; Reflect across (position 0 0 0) (vector 1 0 0). (define reflect2 (entity:reflect c 1 0 0)) ;; reflect2 |
[Top]
entity | entity |
Description
Returns the next entity in an entity list.
; entity:next ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 ; Determine its owner. (entity:owner block1) ;; #[entity 2 1] ; Get the faces of the block. (define faces1 (entity:faces block1)) ;; faces1 ; faces1 ==> ; #[entity 3 1] #[entity 4 1] #[entity 5 1] ; #[entity 6 1] #[entity 7 1] #[entity 8 1] ; Determine the next face in the list. (entity:next (list-ref faces1 0)) ;; #[entity 4 1] |
[Top]
entity | entity |
Description
Returns the top level owner of the specified entity.
; entity:owner ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 ; Determine its owner. (entity:owner block1) ;; #[entity 2 1] ; Get the faces of the block. (define faces1 (entity:faces block1)) ;; faces1 ; Determine the owner of a face. (entity:owner (car faces1)) ;; #[entity 2 1] |
[Top]
entity | entity |
Description
Returns the previous
COEDGE in the entity list.
; entity:previous ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 (entity:owner block1) ;; #[entity 2 1] ; Get the faces of the block. (define faces1 (entity:faces block1)) ;; faces1 ; Get the coedges of one of the faces. (define coedges1 (entity:coedges (list-ref faces1 0))) ;; coedges1 ; coedges1 ==> ; #[entity 9 1] #[entity 10 1] ; #[entity 11 1] #[entity 12 1] ; Determine the previous coedge in the list. (entity:previous (list-ref coedges1 0)) ;; #[entity 12 1] |
[Top]
body-list | (entity | entity ...) |
xorigin | real |
yorigin | real |
zorigin | real |
xnormal | real |
ynormal | real |
znormal | real |
fix-transform | boolean |
Description
This is a faster way to reflect entities in Scheme. Before (entity:reflect),
one had to type:
(entity:transform ent (transform:reflection
(position x y z) (gvector x y z)));
This shorthand version lets you do the same operation with:
(entity:reflect ent x y z x y z);
; entity:reflect ; Create a cylinder (define c (solid:cylinder (position 0 0 0) (position 10 10 10) 5)) ;; c ; Move the cylinder. (define move (entity:move c 10 0 0)) ;; move ; Scale the cylinder. (define scale1 (entity:scale c 3 1 1)) ;; scale1 ; Apply uniform scale. (define scale2 (entity:scale c 2)) ;; scale2 ; Rotate about (position 20 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate1 (entity:rotate c 20 0 0 0 0 1 90)) ;; rotate1 ; Rotate about (position 0 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate2 (entity:rotate c 0 0 1 90)) ;; rotate2 ; Reflect across (position 40 0 0) (vector 1 0 0). (define reflect1 (entity:reflect c 40 0 0 1 0 0)) ;; reflect1 ; Reflect across (position 0 0 0) (vector 1 0 0). (define reflect2 (entity:reflect c 1 0 0)) ;; reflect2 |
[Top]
entity | entity |
Description
This extension removes all pcurves underlying the coedges on analytic faces of
the body or selected entity. The selected entity can be either an edge or a
face.
; entity:remove-pcurves ; Create an entity (define block1 (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block1 ; Add pcurves to all coedges (define add-p (entity:reset-pcurves block1 #t)) ;; add-p (entity:debug block1 3) ;; 1 body record, 40 bytes ;; 2 attrib records, 108 bytes ;; 1 lump record, 40 bytes ;; 1 transform record, 152 bytes ;; 1 shell record, 48 bytes ;; 6 face records, 312 bytes ;; 6 loop records, 240 bytes ;; 6 surface records, 1104 bytes ;; 24 coedge records, 1344 bytes ;; 12 edge records, 960 bytes ;; 24 pcurve records, 2496 bytes ;; 8 vertex records, 288 bytes ;; 12 curve records, 1632 bytes ;; 8 point records, 576 bytes ;; Total storage 9340 bytes ;; "solid body" ; Remove pcurves from coedges on analytic faces ; - all coedges in this case (define rem-p (entity:remove-pcurves block1)) ;; rem-p (entity:debug block1 3) ;; 1 body record, 40 bytes ;; 2 attrib records, 108 bytes ;; 1 lump record, 40 bytes ;; 1 transform record, 152 bytes ;; 1 shell record, 48 bytes ;; 6 face records, 312 bytes ;; 6 loop records, 240 bytes ;; 6 surface records, 1104 bytes ;; 24 coedge records, 1344 bytes ;; 12 edge records, 960 bytes ;; 8 vertex records, 288 bytes ;; 12 curve records, 1632 bytes ;; 8 point records, 576 bytes ;; Total storage 6844 bytes ;; "solid body" |
[Top]
entity | entity |
Description
This extension removes and replaces the bounding boxes from the selected body
and its subparts (or just the selected entity if it is not a body).
; entity:reset-boxes ; Create an entity (define b (solid:block (position -10 -10 -10) (position 10 10 10))) ;; b ; reset the bounding boxes (entity:box b) ;; (#[position -10 -10 -10] . #[position 10 10 10]) ; show a box is there (entity:debug b 2) ; body **** 629696: ; Rollback pointer: 690336 ; Attribute list: display_attribute 0 625648 ; Lump list : lump 0 629536 ; Wire list : NULL ; Transform : transform 0 628128 ; Bounding box : -10 : 10 ; : -10 : 10 ; : -10 : 10 ;; "solid body" (entity:reset-boxes b) ;; #[entity 2 1] ; show that box is gone (entity:debug b 2) ; body **** 629696: ; Rollback pointer: 690336 ; Attribute list: display_attribute 0 625648 ; Lump list : lump 0 629536 ; Wire list : NULL ; Transform : transform 0 628128 ; Bounding box : NULL ;; "solid body" |
[Top]
entity | entity |
coedges | boolean |
Description
The pcurve underlying each coedge of the body or the selected entity is first
removed and then regenerated. If pcurves are already assigned to spline
geometry (for example intcurves) then the pcurves are not necessarily
recomputed. The selected entity can be either an edge or a face. In the case of
an edge, the pcurve of each coedge of the edge is removed, and then
regenerated. In the case of a face, each pcurve of each coedge of each loop of
the face is removed and then regenerated.
When coedges are supplied and have a value of TRUE, all coedges (even those originally without pcurves) will have pcurves after this command is executed. Otherwise, only coedges on non-analytic faces will be given pcurves.
; entity:reset-pcurves ; Create an entity (define wiggle (solid:wiggle 10 10 10 -2 -1 2 1)) ;; wiggle ; Regenerate pcurves on coedges on spline faces (define reset (entity:reset-pcurves wiggle)) ;; reset (entity:debug wiggle 3) ;; 1 body record, 40 bytes ;; 2 attrib records, 108 bytes ;; 1 lump record, 40 bytes ;; 1 shell record, 48 bytes ;; 6 face records, 312 bytes ;; 6 loop records, 240 bytes ;; 6 surface records, 1112 bytes ;; 24 coedge records, 1344 bytes ;; 12 edge records, 960 bytes ;; 4 pcurve records, 416 bytes ;; 8 vertex records, 288 bytes ;; 12 curve records, 1600 bytes ;; 8 point records, 576 bytes ;; Total storage 7084 bytes ;; "solid body" ; Regenerate pcurves already present and ; add pcurves to any coedges lacking pcurves (define reset2 (entity:reset-pcurves wiggle #t)) ;; reset2 (entity:debug wiggle 3) ;; 1 body record, 40 bytes ;; 2 attrib records, 108 bytes ;; 1 lump record, 40 bytes ;; 1 shell record, 48 bytes ;; 6 face records, 312 bytes ;; 6 loop records, 240 bytes ;; 6 surface records, 1112 bytes ;; 24 coedge records, 1344 bytes ;; 12 edge records, 960 bytes ;; 24 pcurve records, 2496 bytes ;; 8 vertex records, 288 bytes ;; 12 curve records, 1600 bytes ;; 8 point records, 576 bytes ;; Total storage 9164 bytes ;; "solid body" |
[Top]
body-list | (entity | entity ...) |
xorigin | real |
yorigin | real |
zorigin | real |
xaxis | real |
yaxis | real |
zaxis | real |
angle | real |
fix-transform | boolean |
Description
This is a faster way to rotate entities in Scheme. Before (entity:rotate),
one had to type:
(entity:transform ent (transform:rotation (position x y z)
(gvector x y z) angle))
This shorthand version lets you do the same operation with: (entity:rotate ent
x y z x y z)
; entity:rotate ; Create a cylinder. (define c (solid:cylinder (position 0 0 0) (position 10 10 10) 5)) ;; c ; Move the cylinder. (define move (entity:move c 10 0 0)) ;; move ; Scale the cylinder. (define scale1 (entity:scale c 3 1 1)) ;; scale1 ; Apply uniform scale. (define scale2 (entity:scale c 2)) ;; scale2 ; Rotate about (position 20 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate1 (entity:rotate c 20 0 0 0 0 1 90)) ;; rotate1 ; Rotate about (position 0 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate2 (entity:rotate c 0 0 1 90)) ;; rotate2 ; Reflect across (position 40 0 0) (vector 1 0 0). (define reflect1 (entity:reflect c 40 0 0 1 0 0)) ;; reflect1 ; Reflect across (position 0 0 0) (vector 1 0 0). (define reflect2 (entity:reflect c 1 0 0)) ;; reflect2 |
[Top]
body-list | (entity | entity ...) |
xscale | real |
yscale | real |
zscale | real |
fix-transform | boolean |
Description
This is a faster way to scale entities in Scheme. Before (entity:scale),
one had to type:
(entity:transform ent (transform:scaling xscale [yscale zscale]))
This shorthand version lets you do the same operation with: (entity:scale ent
xscale [yscale zscale])
; entity:scale ; Create a cylinder (define c (solid:cylinder (position 0 0 0) (position 10 10 10) 5)) ;; c ; Move the cylinder. (define move (entity:move c 10 0 0)) ;; move ; Scale the cylinder. (define scale1 (entity:scale c 3 1 1)) ;; scale1 ; Apply uniform scale. (define scale2 (entity:scale c 2)) ;; scale2 ; Rotate about (position 20 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate1 (entity:rotate c 20 0 0 0 0 1 90)) ;; rotate1 ; Rotate about (position 0 0 0) (vector 0 0 1) ; by 90 degrees. (define rotate2 (entity:rotate c 0 0 1 90)) ;; rotate2 ; Reflect across (position 40 0 0) (vector 1 0 0). (define reflect1 (entity:reflect c 40 0 0 1 0 0)) ;; reflect1 ; Reflect across (position 0 0 0) (vector 1 0 0). (define reflect2 (entity:reflect c 1 0 0)) ;; reflect2 |
[Top]
in-entity | entity |
Description
This extension returns #t if the entity sense is FORWARD; otherwise, it returns
#f. The input entity in-entity can be a face, edge, or coedge.
; entity:sense ; Create some edges to test. (define e1 (edge:circular (position 0 0 0) 5)) ;; e1 (entity:sense e1) ;; #t (define e2 (edge:linear (position 10 0 0) (position 20 0 0))) ;; e2 (entity:sense e2) ;; #t |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of the entity's shells. If no shell entities are
found, this extension returns an empty list.
; entity:shells ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 25 15 5))) ;; block1 ; Get a list of the block's shells. (entity:shells block1) ;; (#[entity 3 1]) |
[Top]
ent-list | entity | (entity ...) |
simp-opts | simplify-options |
acis-opts | acis-options |
Description
This extention replaces the geometry of the faces and edges under the given
entity by analytic surfaces and curves, if possible within the user-specified
tolerance. The extension also provides the user with an option to replace the
existing procedural geometry by its approximate B-Spline geometry, in case
simplification with analytic geometry is not possible within the user-specified
tolerance. The extension also provides the user with an option to force
simplification, in which case simplification of the surface or curve (if
possible within the user-specified tolerance) even if simplification would
result in invalidities in the entity.
ent-list gives the list of entities or a single entity that can be a
body, shell, lump, wire, face or edge.
The optional argument simp-options sets the parameters which govern the
functionality of entity:simplify-face-edge. The constructor of simp-options
sets the values of all the parameters as -1.
The parameters that can be set are:
"simplify_pos_tol" | Default value is -1 |
"max_radius" | Default value is -1 |
"do_curve_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_surface_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_approximate" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_force_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"simplify_pos_tol" | SPAresabs |
"max_radius" | SPAresabs/ SPAresnor |
"do_curve_simplification" | 1 (curve-simplification is ON) |
"do_surface_simplification" | 1 (surface-simplification is ON) |
"do_approximate" | 0 (do_approximate is OFF) |
"do_force_simplification" | 0 (do_force_simplification is OFF) |
Note: The following scheme example is not a "standalone" script. It does not run to completion.
; entity:simplify-face-edge (part:clear) ;; #t ; Load the body (part:load "body1.sat") ;; (#[entity 2 1] #[entity 3 1] #[entity 4 1] ;; #[entity 5 1]) ; Call simplification (entity:simplify-face-edge (part:entities)) ;; (#[entity 2 1] #[entity 3 1] #[entity 4 1] ;; #[entity 5 1]) ; Alternatively call simplification with simplify-options ; Create a simplify-options object (define simp_opts (entity:simplify-options "do_surface_simplification" 0)) ;; simp_opts (entity:simplify-face-edge (part:entities) simp_opts ) ;; (#[entity 2 1] #[entity 3 1] #[entity 4 1] ;; #[entity 5 1]) |
[Top]
"name-of-option" | string |
value | integer |
options | simplify-options |
Description
This extension returns a simplify-options object for use in entity:simplify-face-edge.
This allows the user to set the simplification tolerance, maximum permissible
circle radius, the option of switching ON/OFF curve and face simplification,
the option to replace procedural geometry by B-Spline geometry, and to do force
simplification.
"name-of-option" is a string containing the name of the option. simplify-options
object sets the parameters which govern the functionality of entity:simplify-face-edge.
The parameters are:
"simplify_pos_tol" | Default value is -1 |
"max_radius" | Default value is -1 |
"do_curve_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_surface_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_approximate" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
"do_force_simplification" | Valid values are: -1 (default setting), 0 (OFF), 1 (ON) |
Note: The following scheme example is not a "standalone" script. It does not run to completion.
; entity:simplify-options ; Load the body (part:load "body1.sat") ;; (#[entity 2 1] #[entity 3 1] #[entity 4 1] ;; #[entity 5 1]) ; Make the simplification options object simplify-options (define so (entity:simplify-options "do_curve_simplification" 1 "simplify_pos_tol" 0.001)) ;; so ; To check the values of parameters of simplify-options ; type the option's name on the prompt so ;; #[Simplify_Options ;; simplify_pos_tol : 0.001000 ;; max_radius : Default ;; do_curve_simplification : 1 ;; do_surface_simplification : 1 ;; do_approximate : Default ;; do_force_simplification : Default] ; For updating the parameters of an existing simplify-options object ; the same scheme command (entity:simplify-options) can be used by ; passing the options object as the last argument. (entity:simplify-options "do_surface_simplification" 0 so) ;; #[Simplify_Options ;; simplify_pos_tol : 0.001000 ;; max_radius : Default ;; do_curve_simplification : 1 ;; do_surface_simplification : 0 ;; do_approximate : Default ;; do_force_simplification : Default] ; Call simplification (entity:simplify-face-edge (part:entities) so) ;; () |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of all of the tcoedges from the entity or list of
entities. If no coedges are found, this extension returns an empty list.
; entity:tcoedges ; Create a block (define block (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block (iso) ;; #[view 1049018] (zoom-all) ;; #[view 1049018] ; display the block's edges and make one tolerant (view:edges #t) ;; #[view 1049018] (define block_edges (entity:edges block)) ;; block_edges (define tol_edge (list-ref block_edges 0)) ;; tol_edge (entity:set-color tol_edge 3) ;; () ; get the tolerant coedge, edge, and vertices (entity:tcoedges block) ;; () (entity:tedges block) ;; () (entity:tvertices block) ;; () |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of all of the tedges from the entity or list of
entities. If no tedges are found, this extension returns an empty list.
; entity:tedges ; Create a block (define block (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block (iso) ;; #[view 1049018] (zoom-all) ;; #[view 1049018] ; display the block's edges and make one tolerant (view:edges #t) ;; #[view 1049018] (define block_edges (entity:edges block)) ;; block_edges (define tol_edge (list-ref block_edges 0)) ;; tol_edge (entity:set-color tol_edge 3) ;; () ; get the tolerant coedge, edge, and vertices (entity:tcoedges block) ;; () (entity:tedges block) ;; () (entity:tvertices block) ;; () |
[Top]
entity-list | entity | (entity ...) |
transform | transform |
ao | acis-options |
Description
This extension returns the input entity or entity-list. Refer to the
transform Scheme extensions for more information.
; entity:transform ; Define a WCS. (define wcs1 (wcs (position 0 0 0) (position 5 0 0) (position 0 5 0))) ;; wcs1 ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position -15 -25 -15))) ;; block1 ; OUTPUT Original ; Copy the block. (define copy (entity:copy block1)) ;; copy ; Set the color for the copy. (entity:set-color copy 3) ;; () ; Transform the solid block. (define transform (entity:transform copy (transform:axes (position 0 0 0) (gvector -8 0 0) (gvector 0 6 0)))) ;; transform (view:refresh) ;; #[view 107599568] ; OUTPUT Result Figure. entity:transform |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of all of the tvertices from the entity or list
of entities. If no tvertices are found, this extension returns an empty list.
; entity:tvertices ; Create a block (define block (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block (iso) ;; #[view 1049018] (zoom-all) ;; #[view 1049018] ; display the block's edges and make one tolerant (view:edges #t) ;; #[view 1049018] (define block_edges (entity:edges block)) ;; block_edges (define tol_edge (list-ref block_edges 0)) ;; tol_edge (entity:set-color tol_edge 3) ;; () ; get the tolerant coedge, edge, and vertices (entity:tcoedges block) ;; () (entity:tedges block) ;; () (entity:tvertices block) ;; () |
[Top]
entity-list | entity | (entity ...) |
include-pat | integer |
Description
This extension returns a list of the entity's wires. If no wire entities are
found, this extension returns an empty list.
; entity:wires ; Create circular edge 1. (define edge1 (edge:circular (position 0 0 0) 25 0 180)) ;; edge1 ; Create circular edge 2. (define edge2 (edge:circular (position 0 0 0) 25 180 270)) ;; edge2 ; Create linear edge 3. (define edge3 (edge:linear (position 0 0 0) (position 25 0 0))) ;; edge3 ; Create a wire body from the three edges. (define body1 (wire-body (list edge3 edge1 edge2))) ;; body1 ; Get a list of the body's wires. (entity:wires body1) ;; (#[entity 6 1]) |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is an entity.
; entity? ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 5 15 25))) ;; block1 ; Create something that is not an entity. (define stuff 123) ;; stuff ; Determine if the block is an entity. (entity? block1) ;; #t ; Determine if "stuff" is an entity. (entity? stuff) ;; #f |
[Top]
entity | entity |
ray | ray |
Description
An entray is a scheme-object with an entity component and a ray component. They
are not saved when a part is saved. Entrays are represented externally in the
form #[entray n p (x y z) (a b c)], indicating its entity components
are #[entity n p] and its ray components are #[ray (x y z) (a b c)].
; entray ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 10 15 5))) ;; block1 ; Create an entity ray using the block. (entray block1 (ray (position 0 0 0) (gvector 0 0 1))) ;; #[entray 2 1 (0 0 0) (0 0 1)] |
[Top]
entray | entray |
Description
Gets the entity component of an entray. An entray is a scheme-object with an
entity component and a ray component. Entrays are represented externally in the
form #[entray n p (x y z) (a b c)], indicating its entity components
are #[entity n p] and its ray components are #[ray (x y z) (a b c)].
; entray:entity ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 15 15))) ;; block1 ; Create an entity ray and then extract ; the entity portion. (entray:entity (entray block1 (ray (position 0 0 0) (gvector 0 0 1)))) ;; #[entity 2 1] |
[Top]
entray | entray |
Description
Gets the ray component of an entray. An entray is a scheme-object with an
entity component and a ray component. Entrays are represented externally in the
form #[entray n p (x y z) (a b c)], indicating its entity components
are #[entity n p] and its ray components are #[ray (x y z) (a b c)].
; entray:ray ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 15 15))) ;; block1 ; Create an entity ray and then extract ; the ray portion. (entray:ray (entray block1 (ray (position 0 0 0) (gvector 0 0 1)))) ;; #[ray (0 0 0) (0 0 1)] |
[Top]
object | scheme-object |
Description
Returns #t if a scheme-object is an entity-with-ray.
; entray? ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 15 15))) ;; block1 ; Create an entity ray consisting of ; the block and a ray, and determine if ; the result is an entity ray. (define entray1 (entray block1 (ray (position 0 0 0) (gvector 0 0 1)))) ;; entray1 ; Determine if the result is an entity ray. (entray? entray1) ;; #t |
[Top]
filename | string |
Description
Attempting to load a nonexistent file generates an "Access Violation" type
error message.
Note: The following scheme example is not a "standalone" script. It does not run to completion.
; env:load-state ; Load variables and their values from the file. (env:load-state "log.log") ;; #t |
[Top]
None |
Description
The
Fileinfo class contains additional file header information,
such as the ACIS product used to save the model, ACIS version, millimeters per
model unit, date the model was saved, ACIS save file version, and other
relevant model data. It is required that units and product ID in the save FileInfo
be populated before you can save a SAT file.
; env:restored-product-id ; Run the command. (env:save-product-id) ;; "ACIS/Scheme AIDE - 10.0" ; Get the saved product id from the FileInfo object. (env:restored-product-id) ;; "" |
[Top]
None |
Description
The
Fileinfo class contains additional file header information,
such as the ACIS product used to save the model, ACIS version, millimeters per
model unit, date model was saved, ACIS save file version, and other relevant
model data. It is required that units and product ID in the save Fileinfo
be populated before you can save a SAT file.
; env:restored-units-scale ; Get the restored units scale from the Fileinfo ; object. (env:restored-units-scale) ;; -1 |
[Top]
None |
Description
The
Fileinfo class contains additional file header information,
such as the ACIS product used to save the model, ACIS version, millimeters per
model unit, date model was saved, ACIS save file version, and other relevant
model data. It is required that units and product ID in the save Fileinfo
be populated before you can save a SAT file.
; env:save-product-id ; Get the save product id from the Fileinfo object. (env:save-product-id) ;; "ACIS/Scheme AIDE - 10.0" |
[Top]
filename | string |
; env:save-state ; Save the state into "state.log". (env:save-state "log.log") ;; #t |
[Top]
None |
Description
The
Fileinfo class contains additional file header information,
such as the ACIS product used to save the model, ACIS version, millimeters per
model unit, date model was saved, ACIS save file version, and other relevant
model data. It is required that units and product ID in the save Fileinfo
be populated before you can save a SAT file.
; env:save-units-scale ; Set the save units scale. (env:set-save-units-scale .5) ;; 0.5 ; Get the save units scale from the Fileinfo object. (env:save-units-scale) ;; 0.5 ; Change the save units scale. (env:set-save-units-scale .7) ;; 0.7 ; Get the new saved units scale. (env:save-units-scale) ;; 0.7 |
[Top]
scale | real |
Description
The
Fileinfo class contains additional file header information,
such as the ACIS product used to save the model, ACIS version, millimeters per
model unit, date model was saved, ACIS save file version, and other relevant
model data. It is required that units and product ID in the save Fileinfo
be populated before you can save a SAT file.
; env:set-save-units-scale ; Set the save units scale. (env:set-save-units-scale .5) ;; 0.5 ; Get the save units scale from the Fileinfo object. (env:save-units-scale) ;; 0.5 ; Change the save units scale. (env:set-save-units-scale .7) ;; 0.7 ; Get the new saved units scale. (env:save-units-scale) ;; 0.7 |
[Top]
resabs | real | boolean |
resnor | real | boolean |
resfit | real | boolean |
resmch | real | boolean |
Description
The system tolerances are set in the following order:
SPAresabs,
SPAresnor,
SPAresfit, and
SPAresmch. SPAresabs to SPAresnor gives the
largest numbers that can be represented. The previous values of each variable
are returned in a list.
Note: Changing these values can have a significant effect on modeling functionality and should only be undertaken when absolutely necessary!
; env:set-tolerance ; Change the resabs and resfit tolerances, leave ; resnor unchanged, and set resmch to the default. ; Get the list of system tolerances. (env:tolerance) ;; (1e-06 1e-10 0.001 1e-11) (env:set-tolerance 1e-3 #f 0.1 #t) ;; (0.001 1e-10 0.1 1e-11) ; Get the list of system tolerances. (env:tolerance) ;; (0.001 1e-10 0.1 1e-11) ; Reset the tolerances. (env:set-tolerance 1e-06 1e-10 0.001 1e-11) ;; (1e-06 1e-10 0.001 1e-11) |
[Top]
None |
Description
The system tolerances are returned in the following order:
SPAresabs,
SPAresnor,
SPAresfit, and
SPAresmch.
; env:tolerance ; Get the list of system tolerances. (env:tolerance) ;; (1e-006 1e-010 0.001 1e-011) |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.