pattern:linear
List of: Scheme Extensions
Subjects: Patterns
Contents: Kernel

Action: Creates a linear pattern.

Filename: kern/kern_scm/pattern_scm.cxx

APIs: api_linear_pattern

Syntax: (pattern:linear xvec xnum [yvec ynum [zvec znum]])

Arg Types: xvec gvector

xnum integer

yvec gvector

ynum integer

zvec gvector

znum integer

Returns: pattern

Description: Creates a linear pattern in one, two, or three dimensions based on the number of input arguments.


xvec, yvec and zvec specify the pattern directions (these do not have to be in the coordinate directions or orthogonal.)


xnum, ynum and znum specify the number of repetitions along xvec, yvec and zvec respectively.

Example: ; pattern:linear

; create a sphere at the origin

(define s (solid:sphere (position 0 0 0)10))

;; s

; define the pattern in three dimensions with 3

; repetitions along each axis

(define p (pattern:linear (gvector 30 10 0)


3(gvector 0 30 0)3(gvector 0 0 30)3))

;; p

; create an entity using sphere in the pattern

(define spherepat (entity:pattern s p))

;; spherepat

(entity:check spherepat)

; checked:

;
27 lumps

;
27 shells

;
0 wires

;
27 faces

;
0 loops

;
0 coedges

;
0 edges

;
0 vertices

;; ()
PDF/KERN/14SCI.PDF
HTM/DATA/KERN/KERN/14SCI/0069.HTM