Action:
|
Subtracts a list of solids from a solid.
|
|
Filename:
|
bool/bool_scm/bool_scm.cxx
|
|
APIs:
|
api_subtract
|
|
Syntax:
|
(solid:subtract body-1 body-2 [...body-n] [acis-opts])
|
|
Arg Types:
|
body-1
|
body
|
|
body-2
|
body
|
|
body-n
|
body
|
|
acis-opts
|
acis-options
|
|
Returns:
|
body
|
|
Description:
|
Subtracts a list of solids from a solid. All bodies must refer to solid bodies.
body-2 through
body-n are subtracted from
body-1. This extension returns the name of
body-1 and deletes body-2 through
body-n.
|
|
|
body-1,
body-2,
body-n are input bodies.
|
|
|
acis-opts contains parameters for versioning and journaling.
|
|
Example:
|
; solid:subtract
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block (position -20 -20 -20)
|
|
|
(position 10 10 10)))
|
|
;; block1
|
|
; Set color for block1.
|
|
(entity:set-color block1 2)
|
|
;; ()
|
|
; Create another solid block.
|
|
(define block2
|
|
|
(solid:block (position -12 -12 -12)
|
|
|
(position 30 30 30)))
|
|
;; block2
|
|
; Set color for block2.
|
|
(entity:set-color block2 3)
|
|
;; ()
|
|
; OUTPUT Original
|
|
|
; Subtract block 1 from 2.
|
|
(define subtract (solid:subtract block1 block2))
|
|
;; subtract
|
|
; OUTPUT Result
|
|
|
|
|
Figure 2-29. solid:subtract
|