Builtin Library
README.md
attribute.copy
Copy a column under another name: name stays where it is and as holds the same values and the same type beside it. With a source, the column is read from that geometry and written onto this one, so the two classes hold the same number of elements; the copy comes out under as on the receiving geometry.
Inputs
geometry(Geometry). What receives the copy. A copy of it comes out carrying the column underas.source(Geometry, optional). Where the column is read from. Left empty, the geometry copies its own column.class(one of detail, edge, point, primitive, vertex). Default"point". Which class of elements the column lives on, on both geometries.name(String). Default"". The column copied. A name the class does not carry is refused.as(String). Default"". The name the copy takes. Empty is refused.
Outputs
geometry: the receiving geometry with the column underasonclass.
Example
local grid = g.mesh.grid({ size = { x = 2, z = 2 }, cells = { x = 2, z = 2 } })
local copied = g.attribute.copy({ geometry = grid, class = "point", name = "P", as = "rest" })
rest holds the nine positions as a Vec3 column beside P.