Scheme Extensions |
|
|
Technical Article |
Scheme is a public domain programming language, based on the LISP language, that uses an interpreter to run commands. ACIS provides extensions (written in C++) to the native Scheme language that can be used by an application to interact with ACIS through its Scheme Interpreter. The C++ source files for ACIS Scheme extensions are provided with the product. Spatial's Scheme based demonstration application, Scheme ACIS Interface Driver Extension (Scheme AIDE), also uses these Scheme extensions and the Scheme Interpreter. |
token | integer |
body-list | body | (body ... ) |
acis-opts | acis-options |
Description
This extension removes and deletes any PHLV5 attributes with a matching
view token from the list of bodies.
When bodies are cleaned, attributes are removed via the lose function and
are not stored. These attributes cannot be retrieved using the phlv5:retrieve extension.
; phlv5:clean ; create a body (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block (iso) ;; #[view 395052] (zoom-all) ;; #[view 395052] (define data (phlv5:compute block 1)) ;; data (part:save "phlv5.sat") ;; #t (part:clear) ;; #t (define entities (part:load "phlv5.sat")) ;; entities (define data (phlv5:retrieve (car (part:entities)) 1)) ;; data (phlv5:draw data) ;; #[phlv5-data 8839cd8] (phlv5:clean 1 entities) ;; () (define data (phlv5:retrieve (car (part:entities)) 1)) ;; data (phlv5:draw data) ;; #[phlv5-data 8839d58] |
[Top]
token | integer |
body-list | wire-body | (wire-body ...) |
view | view |
phlv5-options | phlv5-options |
acis-opts | acis-options |
Description
This extension computes the hidden line removal data for the given viewing
parameters and list of bodies.
Note: The scheme command phlv5:compute can be set to render the polyline data or the modeling curve returned from the PHLV5_EDGE. To render the polyline data, set this global ACIS option to false (option:set "phlv5_render_curves" #f).
; phlv5:compute ; create a body (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block (iso) ;; #[view 526136] (zoom-all) ;; #[view 526136] (phlv5:compute ) ;; #t |
[Top]
phlv5-data | phlv5-data |
; phlv5:draw ; Compute and draw hidden lines for a view. ; create a body (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block (iso) ;; #[view 526124] (zoom-all) ;; #[view 526124] ; OUTPUT Original (define data (phlv5:compute block 1)) ;; data (phlv5:draw data) ;; #[phlv5-data 8839cd8] ; OUTPUT Result |
[Top]
"name-of-option" | string |
value | string | boolean | real |
"hidden_line_style" | string("hidden") |
"sag_resolution" | real(0.02) |
"resolution" | real (0.001) |
"self_calibrate" | boolean (#t) |
"use_surface_approx" | boolean (#t) |
"thick_and_thinning" | boolean (#f) |
; phlv5:options ; create a body (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block (iso) ;; #[view 657196] (zoom-all) ;; #[view 657196] ; OUTPUT Original (define opts (phlv5:options "hidden_line_style" "dashed")) ;; opts (phlv5:compute opts) ;; #f ; OUTPUT Result |
[Top]
token | integer |
body-list | body | (body ...) |
Description
This extension retrieves the data stored in PHLV5 attributes with a matching
view token and returns an ENTITY_LIST
of PHLV5_EDGEs.
All data returned is a copy of the data stored in attributes on the body.
; phlv5:retrieve (view:dl) ;; #[view 4589092] (part:clear) ;; #t ; create a body (define block (solid:block 0 0 0 1 1 1)) ;; block (iso) ;; #[view 526124] (zoom-all) ;; #[view 526124] (define data (phlv5:compute (part:entities) 1)) ;; data (part:save "c:/phlv5.sat") ;; #t (part:clear) ;; #t (part:load "c:/phlv5.sat") ;; (#[entity 2 1]) (define data (phlv5:retrieve (part:entities) 1)) ;; data (phlv5:draw data) ;; #[phlv5-data 8839cd8] |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.