Action:
|
Subtracts one or more bodies from a body.
|
|
Filename:
|
bool/bool_scm/bool_scm.cxx
|
|
Syntax:
|
(bool:subtract body1 ... bodyn [keep-opt]
|
|
|
[acis-opts])
|
|
Arg Types:
|
body1
|
body
|
|
bodyn
|
body
|
|
keep-opt
|
string
|
|
acis-opts
|
acis-options
|
|
Returns:
|
body
|
|
Description:
|
This extension subtracts one or more bodies from the first body. By default, the result of the subtract is returned as
body1 and the remaining bodies are deleted.
|
|
|
The optional
keep-opt specifies whether some or all input bodies should be preserved. Value "keep_blank" preserves
body1 and returns the result of the subtraction as a new body. "keep_tool" preserves
body2 ... bodyn. "keep_both" preserves all input bodies and returns the result of the subtraction as a new body.
|
|
|
This extension performs a regularized subtraction. Any faces, edges, and/or vertices not needed to support the topology are removed before returning the resulting body.
|
|
|
body1 is the first body of subtraction.
|
|
|
bodyn is the nth body of subtraction.
|
|
|
keep-opt specifies whether some or all input bodies should be preserved.
|
|
|
acis-opts contains parameters for versioning and journaling.
|
|
Example:
|
; bool:subtract
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block
|
|
|
(position -20 -20 -20) (position 0 0 0)))
|
|
;; block1
|
|
; Set color for block1.
|
|
(entity:set-color block1 2)
|
|
;; ()
|
|
; Create another solid block.
|
|
(define block2
|
|
|
(solid:block
|
|
|
(position -20 -20 -20) (position 20 20 20)))
|
|
;; block2
|
|
; Set color for block2.
|
|
(entity:set-color block2 3)
|
|
;; ()
|
|
; OUTPUT Original
|
|
|
; Subtract solid blocks 1 from 2.
|
|
(define subtract (bool:subtract block2 block1))
|
|
;; subtract
|
|
; #[entity 3 1]
|
|
; OUTPUT Result
|
|
|
|
|
Figure 2-16. bool:subtract
|