Action:
|
Completes the selective Boolean process for the cells selected.
|
|
Filename:
|
sbool/sbool_scm/selective_scm.cxx
|
|
APIs:
|
api_selective_boolean_stage2
|
|
Syntax:
|
(bool:select2 in-body in-cells [acis-opts])
|
|
Arg Types:
|
in-body
|
entity
|
|
in-cells
|
graph | (entity ...)
|
|
acis-opts
|
acis-options
|
|
Returns:
|
entity
|
|
Description:
|
This extension modifies the
in-body body based on either the results of graph theory or a
Cellular Topology cell list in
in-cells. When
in-cells contains cell entities, these are the only entities that should be kept. When
in-cells is a graph, the graph could be the result of extensive graph theory operations. However, the resulting graph still maps to cells in the body and represents the cells to keep.
|
|
|
The mapping of cells in a graph to entities will not be the same from execution to execution.
|
|
|
in-body is an input entity.
|
|
|
in-cells is an input entity that contains either cell entities or a graph.
|
|
|
The optional
acis-opts contains parameters for versioning and journaling.
|
|
Example:
|
; bool:select2
|
|
; Create a selective boolean example.
|
|
(define blank (solid:block (position 0 0 0)
|
|
|
(position 25 10 10)))
|
|
;; blank
|
|
; blank => #[entity 2 1]
|
|
(define b2 (solid:block (position 5 0 0)
|
|
|
(position 10 5 10)))
|
|
;; b2
|
|
(define b3 (solid:block (position 15 0 0)
|
|
|
(position 20 5 10)))
|
|
;; b3
|
|
(define subtract (solid:subtract blank b2))
|
|
;; subtract
|
|
(define subtract2 (solid:subtract blank b3))
|
|
;; subtract2
|
|
(define tool (solid:cylinder
|
|
|
(position -5 2.5 5) (position 30 2.5 5)1))
|
|
;; tool
|
|
; Change the color of the tool for viewing.
|
|
(entity:set-color tool 3)
|
|
;; ()
|
|
(define g (bool:select1 blank tool))
|
|
;; g
|
|
; CAREFUL: The mapping of cell names to entities
|
|
; may not be the same each time this is run.
|
|
; Find the cells in the blank created by graph.
|
|
(define cells (entity:cells blank))
|
|
;; cells
|
|
; Put together list of things to keep.
|
|
; Leave out 2 and 6.
|
|
(define in-cells (list
|
|
|
(list-ref cells 0)
|
|
|
(list-ref cells 1)
|
|
|
(list-ref cells 3)
|
|
|
(list-ref cells 4)
|
|
|
(list-ref cells 5)
|
|
|
(list-ref cells 7)))
|
|
;; in-cells
|
|
; OUTPUT Original
|
|
|
(define select (bool:select2 blank in-cells))
|
|
;; select
|
|
; OUTPUT Result
|
|
|
|
|
Figure 2-2. bool:select2
|