Skip to content

.NET API

PatternApi

Rectangular array of an object, optionally flowed onto a surface (the ArtisanPattern tool).

from ArtisanPlugin.Scripting import PatternApi

See also the guide, Accessories › Pattern, and the Python package, ra.pattern.

Methods

Method
CreateRepeats the source object in a columns x rows grid (defaults 2x3), then, when surfaceId is given, flows the whole grid onto that surface (Sporph).

Create

IReadOnlyList<Guid> PatternApi.Create(
    Guid objectId,
    Guid? surfaceId = null,
    int columns = 0,
    int rows = 0,
    double xPadding = 0,
    double yPadding = 0,
    double rotation = 0,
    double zMove = 0,
    double maxThickness = 0,
    int reverseMode = -1)

Repeats the source object in a columns x rows grid (defaults 2x3), then, when surfaceId is given, flows the whole grid onto that surface (Sporph). rotation (deg) accumulates per cell around Z; zMove lifts the source before arraying; maxThickness > 0 also rescales the source in Z to that thickness. reverseMode mirrors the flow surface: 0 none, 1 reverse U, 2 reverse V, 3 both (-1 keeps the default). Paddings, rotation and zMove of 0 keep the saved/tool defaults (which are 0). Returns the created object ids; the source object is left untouched, exactly like the panel.

ParameterTypeDefault
objectIdGuidrequired
surfaceIdGuid?null
columnsint0
rowsint0
xPaddingdouble0
yPaddingdouble0
rotationdouble0
zMovedouble0
maxThicknessdouble0
reverseModeint-1

Returns IReadOnlyList<Guid>.