Options |
|
|
Technical Article |
Options may be set to modify the behavior of ACIS. An option's value may be a flag (indicating an on/off state), a number (integer or real number), or a string. Options may be set in a Scheme application (such as Scheme AIDE) using the Scheme extension option:set, in the ACIS Test Harness using the command option, or in a C++ application using one of several API functions. |
Type | Values | Default |
---|---|---|
boolean | #t, #f | #f |
Type | Values | Default |
---|---|---|
logical | TRUE,FALSE | FALSE |
Description
In a Local Operation, a face is classified as inverted when its face normal no longer
possesses the correct orientation with respect to the modified body. An example is provided below.
When rbi_remove_inv_face is set to TRUE, the API
api_repair_body_self_ints attempts to remove faces of a body that are inverted as a result of
repairing the body's self-intersections. The gap in the body is healed using the remaining faces.
When rbi_remove_inv_face is set to FALSE or the healing of the gap was unsuccessful,
the inverted faces remain with the correct orientation with respect to the modified body.
Note that from version R14 onwards, the APIs api_edge_taper_faces,
api_move_faces, and
api_taper_faces
attempt to remove inverted faces if the API api_repair_body_self_ints is called implicitly.
(Prior to R15, this was controlled by the option lop_repair_self_int which was FALSE by default.
From R15 onwards, this is controlled by a lop_options object, and is TRUE by default.)
From version R15 onwards, all offset operations implicitly repair body self-intersections and remove inverted faces.
Therefore, under normal circumstances, the value of this option should not need to be changed explicitly, except when using versioning.
From the example provided, note that inverted faces can often produce undesirable results. However, if you do not want inverted faces to be removed, follow these steps:
1. Create a lop_options object and call the method lop_options::set_repair_self_int (FALSE).
2. Set the option lop_check_invert to FALSE and perform the local operation with the lop_options object supplied.
3. Set the option rbi_remove_inv_face to FALSE and call api_repair_body_self_ints explicitly.
; rbi_remove_inv_face (view:gl) ;; Result --> #[view 21957246] (view:set-bg-color WHITE) ;; Result --> #[view 21957246] (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; Result --> block (iso) ;; Result --> #[view 21957246] (zoom-all) ;; Result --> #[view 21957246] (define block2 (solid:block (position 0 2 10) (position 10 10 9))) ;; Result --> block2 (define block (bool:subtract block block2)) ;; Result --> block (define block3 (solid:block (position 0 9 2) (position 10 10 10))) ;; Result --> block3 (define block (bool:subtract block block3)) ;; Result --> block (define cylinder (solid:cylinder (position 0 9 9) (position 10 9 9) 7)) ;; Result --> cylinder (define block (bool:subtract block cylinder)) ;; Result --> block ; OUTPUT block ; Perform an offset without implicit repair of the body. ; ***This is for demonstration purposes only.*** (roll:name-state "go") ;; Result --> "go" (define f1 (pick:face (ray (position 1 1 1) (gvector 0 0 1)))) ;; Result --> f1 (define f2 (pick:face (ray (position 1 1 1) (gvector 0 1 0)))) ;; Result --> f2 (define lopts (lop:options "repair_self_intersections" #f)) ;; Result --> lopts (option:set "lop_check_invert" #f) ;; Result --> #t (define offset1 (lop:offset-faces (list f1 f2) -2 lopts)) ;; Result --> offset1 ; OUTPUT offset1 ; Repair the body without removing inverted faces. ; Result has two undesirable knife edges. (roll:name-state "rbi") ;; Result --> "rbi" (option:set "rbi_remove_inv_face" #f) ;; Result --> #f (define repair1 (rbi:rep-self-int offset1)) ;; Result --> repair1 ;; OUTPUT repair1 (entity:check repair1) ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 9 faces ;; 9 loops ;; 42 coedges ;; 21 edges ;; 14 vertices ;; Result --> () ; Roll back, repair the body and remove inverted faces. (roll "rbi") ;; Result --> 1 (option:set "rbi_remove_inv_face" #t) ;; Result --> #f (define repair2 (rbi:rep-self-int offset1)) ;; Result --> repair2 ;; OUTPUT repair2 (entity:check repair2) ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 7 faces ;; 7 loops ;; 30 coedges ;; 15 edges ;; 10 vertices ;; Result --> () ; From R15 onwards, an offset will implicitly repair ; a body and remove inverted faces. To demonstrate this, we ; put all options back to their default values. They do ; not need to be changed. (roll "go") ;; Result --> 2 (option:set "lop_check_invert" #t) ;; Result --> #f (option:set "rbi_remove_inv_face" #f) ;; Result --> #t (define f1 (pick:face (ray (position 1 1 1) (gvector 0 0 1)))) ;; Result --> f1 (define f2 (pick:face (ray (position 1 1 1) (gvector 0 1 0)))) ;; Result --> f2 (define offset2 (lop:offset-faces (list f1 f2) -2)) ;; Result --> offset2 ;; OUTPUT offset2 (entity:check offset2) ;; checked: ;; 1 lumps ;; 1 shells ;; 0 wires ;; 7 faces ;; 7 loops ;; 30 coedges ;; 15 edges ;; 10 vertices ;; Result --> ()
|
[Top]
Type | Values | Default |
---|---|---|
boolean | #t, #f | #t |
Type | Values | Default |
---|---|---|
logical | TRUE,FALSE | TRUE |
Description
This option allows the user to chose between the minimum body and maximum
body during a call to
api_remove_and_repair_body,
when two final solutions with the same number of faces exist.
; rbi_rem_default_inside ; Control choice of minimum or maximum body. (define b1 (solid:block (position -25 -25 -25) (position 25 25 25))) ;; b1 (define b2 (entity:copy b1)) ;; b2 (define t1 (transform:translation (gvector 25 0 25))) ;; t1 (entity:transform b2 t1) ;; #[entity 3 1] (solid:subtract b1 b2) ;; #[entity 2 1] (define b3 (solid:cylinder (position 0 0 25) (position 0 0 35) 5)) ;; b3 (solid:unite b1 b3) ;; #[entity 2 1] ; to make remove_faces call rbi_remove (option:set "rem_use_rbi" #t) ;; #f ; Option rbi_rem_default_inside is on by default, ; but set just in case (option:set "rbi_rem_default_inside" #t) ;; #t (define f1 (pick:face (ray (position 1 0 1) (gvector 0 0 1)) 1)) ;; f1 (rem:remove-faces f1) ;; #[entity 2 1] ; option off (roll) ;; -1 (option:set "rbi_rem_default_inside" #f) ;; #t (define f1 (pick:face (ray (position 1 0 1) (gvector 0 0 1)) 1)) ;; f1 (rem:remove-faces f1) ;; #[entity 2 1] |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.