Action:
|
Determines if a Scheme object is a mixed body.
|
|
Filename:
|
kern/kern_scm/ent_scm.cxx
|
|
Syntax:
|
(mixed-body? object)
|
|
Arg Types:
|
object
|
scheme-object
|
|
Returns:
|
boolean
|
|
Description:
|
A body is considered to be mixed if it has at least one face and at least one
LUMP with a
SHELL, and at least one
WIRE and one
FACE are attached to that
SHELL, but no
WIREs are attached to the
BODY directly.
|
|
|
object specifies the
scheme-object that has to be queried for a mixed body.
|
|
Example:
|
; mixed-body?
|
|
; Create a solid block.
|
|
(define block1
|
|
|
(solid:block (position -20 -20 -20)
|
|
|
(position 20 20 20)))
|
|
;; block1
|
|
; Determine if the block is a mixed body.
|
|
(mixed-body? block1)
|
|
;; #f
|
|
; Create a wire body.
|
|
(define wirebody1
|
|
|
(wire-body:points (list (position 20 0 0)
|
|
|
(position 50 0 0))))
|
|
;; wirebody1
|
|
; Determine if the wire body is a mixed body.
|
|
(mixed-body? wirebody1)
|
|
;; #f
|
|
; Unite the entities.
|
|
(define mixed
|
|
|
(bool:nonreg-unite block1 wirebody1))
|
|
;; mixed
|
|
; Determine if the resulting body is a mixed body.
|
|
(mixed-body? mixed)
|
|
;; #t
|