This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
geometry-script/examples/repeat.py
2022-11-12 18:35:01 -05:00

11 lines
No EOL
311 B
Python

from geometry_script import *
@tree
def repeat(size: Vector):
cubes = []
for x in range(5):
for y in range(5):
for z in range(5):
c = cube(size=(0.1, 0.1, 0.1))
cubes.append(c.transform(translation=(x, y, z)))
return join_geometry(geometry=cubes)