Action:
|
Creates a pattern of entities from a seed entity.
|
|
Filename:
|
intr/intr_scm/ilaw_scm.cxx
|
|
APIs:
|
api_set_entity_pattern
|
|
Syntax:
|
(entity:pattern entity pattern [copy-pat
|
|
|
[seed-index [no-cross-face-list] [check]]] [acis-opts])
|
|
Arg Types:
|
entity
|
entity
|
|
pattern
|
pattern
|
|
copy-pat
|
boolean
|
|
seed-index
|
integer
|
|
no-cross-face-list
|
entity | (entity ...)
|
|
check
|
boolean
|
|
acis-opts
|
acis-options
|
|
Returns:
|
entity
|
|
Description:
|
This Scheme extension applies the pattern to the seed entity
entity. By default, a copy of the pattern is made, and it is the copy that is actually applied to the entity. This behavior can be overridden by setting
copy-pat to
FALSE. However, when copying is overridden and
in-pat is shared by multiple bodies, a transform placed upon the bodies is transferred to the pattern multiple times, which is clearly undesirable. Also by default,
ent is associated with the first pattern element (index 0), but may be associated with another element by furnishing the associated zero-based
seed-index.
|
|
|
For cases in which the pattern is applied to a "bump" on a substrate rather than to an autonomous entity, the limits of the bump are automatically computed, but the user may choose to override the default limits by furnishing a list of
no-cross-faces.
|
|
|
For performance reasons, the extension does not check the generated pattern of entities for intersection, containment, or compatibility unless the user sets the flag
check to
TRUE.
|
|
|
The optional argument
acis-opts helps enable journaling and versioning options.
|
|
Example:
|
; entity:pattern
|
|
; Make a spherical body.
|
|
(define body (solid:sphere (position 0 0 0) 1))
|
|
;; body
|
|
; Make a circular pattern.
|
|
(define center (position 11 2 3))
|
|
;; center
|
|
(define normal (gvector 0 0 1))
|
|
;; normal
|
|
(define num 12)
|
|
;; num
|
|
(define pat (pattern:elliptical center normal num))
|
|
;; pat
|
|
; Apply the pattern to the body.
|
|
(define new-pattern (entity:pattern body pat))
|
|
;; new-pattern
|