Action:
|
Creates a data structure used by selective Booleans.
|
|
Filename:
|
sbool/sbool_scm/selective_scm.cxx
|
|
Syntax:
|
(tube:options [keep-law-string keep-law]
|
|
|
[keep-branches-string branch-bool]
|
|
|
[bool-type-string bool-type]
|
|
|
["connected" logical]
|
|
|
["merge" logical]
|
|
|
["only_from" integer])
|
|
Arg Types:
|
keep-law-string
|
string
|
|
keep-law
|
law
|
|
keep-branches-string
|
string
|
|
branch-bool
|
boolean
|
|
bool-type-string
|
string
|
|
bool-type
|
string
|
|
"connected"
|
string
|
|
logical
|
boolean
|
|
"merge"
|
string
|
|
logical
|
boolean
|
|
"only_from"
|
integer
|
|
Returns:
|
entity
|
|
Description:
|
The purpose of the
Tube-Options data structure is to hold information between selective Boolean operations stages 1 and 2 and to make selective Booleans accessible by other modeling operations. Sweeping, among other modeling operations, creates and uses this data structure. The data structure is used as input to
bool:tube.
|
|
|
The options are explained in detail in the discussion topic
Options for a Law Sweep and include:
|
|
|
-
|
bool_type
|
|
-
|
keep_branches
|
|
-
|
keep_law
|
|
Example:
|
; tube:options
|
|
; Define some entities
|
|
(define b (solid:block (position 0 0 0)
|
|
|
(position 10 10 10)))
|
|
;; b
|
|
(define c1 (solid:cylinder (position -5 5 2)
|
|
|
(position 15 5 2)1))
|
|
;; c1
|
|
(define c2 (solid:cylinder (position -5 5 8)
|
|
|
(position 15 5 8)1))
|
|
;; c2
|
|
(define c (solid:unite c1 c2))
|
|
;; c
|
|
(define start (list (list-ref (entity:faces c) 1)
|
|
|
(list-ref (entity:faces c) 4)))
|
|
;; start
|
|
(define end (list (list-ref (entity:faces c) 2)
|
|
|
(list-ref (entity:faces c) 5)))
|
|
;; end
|
|
(define opt1 (tube:options "keep_law" "x=0"
|
|
|
"bool_type" "UNITE"))
|
|
;; opt1
|
|
(define tube (bool:tube b c start end opt1)))
|
|
;; tube
|
|
|
; Another Example.
|
|
(define b (solid:block (position 0 0 0)
|
|
|
(position 10 10 10)))
|
|
;; b
|
|
(define c (solid:cylinder (position -5 5 5)
|
|
|
(position 15 5 5)2))
|
|
;; c
|
|
(define start (list-ref (entity:faces c) 1))
|
|
;; start
|
|
(define end (list-ref (entity:faces c) 2))
|
|
;; end
|
|
(define opt1 (tube:options "keep_law"
|
|
|
"x=0" "bool_type" "unite"))
|
|
;; opt1
|
|
opt1
|
|
; #[Tube_Options "keep_law" X=0 "keep_branches"
|
|
|
#f"unite"]
|
|
(define d (bool:tube b c start end opt1))
|
|
;; d
|