A Pattern is a visual copy of an object. It has none of the rules of the [[source]] object, but it uses the same geometry, and can be transformed independently.
Parameter Rules
count: | The number of copies to create. |
Example: | 3 |
frames: | The list of frames which place the copies. If does not contain count Frames, the last Frame is replicated. |
Example: | OK to leave blank, the default rule will create the array. |
pattern: | One of 'Linear', 'Circular', 'Rectangular', 'Cubic', or 'Supplied' |
Example: | "Linear" <Only the "Linear" pattern is working at this date 5/24/2021> |
rectangular pattern not yet available |
circular pattern not yet available |
cubic pattern not yet available |
source: | The object to copy. The source is treated as the first item in all of the patterns, but is not included in count. |
Example: | this.Block; |
spacing: | An object containing properties to control the spacing and layout of the frames. Each pattern expects different properties in this object. |
Linear patterns will use the first non-zero value of x, y, or z, in those directions, from the source object. |
Rectangular patterns will use the first two of x, y, or z in those directions. |
Cubic patterns will use all x, y, and z. Circular patterns will use center, axis, and angle. Supplied patterns do not access the spacing property. |
Example1: | ({"x":1.25,"y": 1,"z":1 }) ; |
Example2: | ({"x":0,"y": 1.25,"z":1 }); |
Example3: | ({"x":0,"y":0,"z":1.25 }); |
Mixins
PatternRenderMixin
Render3Mixin
FrameMixin
BaseAssembly
AssemblyRenderMixin
AssemblyMixin
RULE NAME |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
---|---|---|---|---|
count |
number |
1 |
Inputs |
Cached |
frames |
array |
this.source.transForm.generatePattern (this.pattern, this.count, this.spacing) |
Inputs |
Cached |
pattern |
string |
"Linear" |
Inputs |
Cached |
source |
model |
<Blank> |
Inputs |
Cached Required |
spacing |
any |
{} |
Inputs |
Cached |
Project Example:
In your kBridge Examples Projects folder, open the project called ‘PatternExample'.
Reference Location:
After you open the PatternExample project, click on the 'Run Custom UI' icon.
The Source (Block in blue) is included with the Pattern (Green) by default but can be hidden using the 'Include Source?' dropdown.
Set the Pattern dropdown to 'Linear'
Linear patterns will use the first non-zero value of x, y, or z, in those directions, from the source object.
Change the X: value to 0. Now the pattern will offset in the Y direction.