Action:
|
Unites two bodies.
|
|
Filename:
|
sbool/sbool_scm/selective_scm.cxx
|
|
APIs:
|
api_boolean, api_selective_unite
|
|
Syntax:
|
(bool:sel-unite blank-body tool-body
|
|
|
option1 option2)
|
|
Arg Types:
|
blank-body
|
entity
|
|
tool-body
|
entity
|
|
option1
|
entity | #t
|
|
option2
|
entity | #t
|
|
Returns:
|
entity
|
|
Description:
|
This scheme extension performs a union operation between two bodies. The portions of bodies to keep is controlled by option1 and option2. The blank body is returned and the tool body is deleted.
|
|
|
blank-body is an input entity.
|
|
|
tool-body is an input entity.
|
|
|
option1 controls the portions of the body to be kept.
|
|
|
option2 controls the portions of the body to be kept.
|
|
Example:
|
; bool:sel-unite
|
|
; Define a couple of solids and then do a
|
|
; selective boolean.
|
|
(define c1
|
|
|
(solid:cylinder
|
|
|
(position 0 0 -1)
|
|
|
(position 0 0 1) 5))
|
|
;; c1
|
|
(define c2
|
|
|
(solid:cylinder
|
|
|
(position 0 0 -1)
|
|
|
(position 0 0 1) 4.5))
|
|
;; c2
|
|
(define subtract (bool:subtract c1 c2))
|
|
;; subtract
|
|
(define b
|
|
|
(solid:block
|
|
|
(position -6 -6 -0.25)
|
|
|
(position 6 1 0.25)))
|
|
;; b
|
|
(define pnt (position 0 0 0))
|
|
;; pnt
|
|
(define unite (bool:sel-unite c1 b #t pnt))
|
|
;; unite
|