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. |
body | body |
changed-face-list | face | (face ...) |
ao | acis-options |
Description
Self-intersecting bodies have mutually intersecting faces, that is,
faces intersecting in places other than any common boundaries between
them.
This extension is intended to repair any self-intersections on a body that
may result from local operations or shelling. This extension does not
handle topology changes which presently prevent these operations from
completing. Instead, it repairs self-intersections resulting from completed
operations. The elementary checks in the operations to prevent self-intersecting
bodies are removed.
Body self-intersections made by other operations such as sweeping or blending
may be repaired if the body is in a suitable state. Refer to the Limitations
section below.
There are a set of faces known to have been changed by the operation. The
remaining faces in the body fall into a set of unchanged faces, and the
faces in this set do not intersect one another unless along common boundary
edges or vertices. In any body the set of unchanged faces may be empty.
When the set of changed faces is unknown it defaults to all the faces
in the body, and the unchanged faces to an empty set.
; rbi:rep-self-int ; Example 1 ; Set the eye position for a standard view. (view:set (position 75 25 50) (position 0 0 0) (gvector 0 0 1)) ;; #[view 1076820424] ; Turn off the perspective view. (view:set-perspective #f) ;; #f ; Create a block (define b1 (solid:block (position -25 -25 -25) (position 25 25 25))) ;; b1 ; Create a cylinder (define c2 (solid:cylinder (position 0 0 0) (position 0 0 50) 10)) ;; c2 ; Subtract the cylinder from the block. (define subtract (solid:subtract b1 c2)) ;; subtract ; OUTPUT Original ; Render the image (render) ;; () ; OUTPUT Rendered ; rbi:rep-self-int - Example 2 ; Refresh the view (view:refresh) ;; #[view 1077168320] ; Pull hole out of block into a boss (option:set "lop_check_invert" #f) ;; #t ; Offset one of the faces. (define offset (lop:offset-faces (pick:face (ray (position 0 0 0) (gvector 0 0 1))) 50)) ;; offset ; Repair the intersections (define repair (rbi:rep-self-int b1)) ;; repair ; Check the body (entity:check b1) ; checked: ; 1 lumps ; 1 shells ; 0 wires ; 8 faces ; 10 loops ; 28 coedges ; 14 edges ; 10 vertices ;; () ; OUTPUT Original ; Render the image (render) ;; () ; OUTPUT Rendered ; rbi:rep-self-int - Example 3 ; Refresh the view (view:refresh) ;; #[view 1077168320] ; Slide boss off block (define move (lop:move-faces (pick:face (ray (position 0 0 30) (gvector 1 0 0))) (gvector 0 50 0))) ;; move ; OUTPUT Original ; Repair the self-intersections. (define repair (rbi:rep-self-int b1)) ;; repair ; Check the body again. Notice the increase in lumps, ; shells, and faces. (entity:check b1) ; checked: ; 2 lumps ; 2 shells ; 0 wires ; 9 faces ; 10 loops ; 28 coedges ; 14 edges ; 10 vertices ;; () ; Render the image. (render) ;; () ; OUTPUT Rendered ; rbi:rep-self-int - Example 4 ; Clear the part (part:clear) ;; #t ; Recreate the original block and cylinder (define b1 (solid:block (position -25 -25 -25) (position 25 25 25))) ;; b1 (define c2 (solid:cylinder (position 0 0 5) (position 0 0 45) 10)) ;; c2 (define unite (solid:unite b1 c2)) ;; unite ; Make a body with inconsistent face loops (define incon (lop:offset-faces (pick:face (ray (position 0 0 0) (gvector 0 0 1))) -40)) ;; incon ; OUTPUT Original ; Repair the face loops (define repair (rbi:rep-self-int b1)) ;; repair (entity:check b1) ; checked: ; 1 lumps ; 1 shells ; 0 wires ; 8 faces ; 10 loops ; 28 coedges ; 14 edges ; 10 vertices ;; () ; OUTPUT Repaired Loops ; rbi:rep-self-int - Example 5 ; Refresh the view (view:refresh) ;; #[view 1077168320] ; Make a self-intersecting body (define offset (lop:offset-faces (pick:face (ray (position 0 0 0) (gvector 0 0 1))) -50)) ;; offset ; OUTPUT Original ; Repair self-intersecting body (define self (rbi:rep-self-int b1)) ;; self (entity:check b1) ; checked: ; 1 lumps ; 1 shells ; 0 wires ; 7 faces ; 10 loops ; 28 coedges ; 14 edges ; 10 vertices ;; () ; OUTPUT Repaired Body ; rbi:rep-self-int - Example 6 ; Make a self-intersecting body with self ; intersecting faces by moving the cylinder (define move (lop:move-faces (pick:face (ray (position 0 0 0) (gvector 1 0 0)) 1) (gvector 25 0 0))) ;; move ; OUTPUT Original ; Repair self-intersecting body and faces (define repair (rbi:rep-self-int b1)) ;; repair ; OUTPUT Repaired (entity:check b1) ; checked: ; 1 lumps ; 1 shells ; 0 wires ; 8 faces ; 8 loops ; 36 coedges ; 18 edges ; 12 vertices ;; () ; Render the image. (render) ;; () ; OUTPUT Rendered |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.