mirror of
https://github.com/johndoe6345789/bamboogenerator.git
synced 2026-05-06 11:09:37 +00:00
18 lines
457 B
Python
18 lines
457 B
Python
from parametric_cad.core import tm
|
|
|
|
class Box:
|
|
def __init__(self, width, depth, height):
|
|
self.width = width
|
|
self.depth = depth
|
|
self.height = height
|
|
self._position = (0, 0, 0)
|
|
|
|
def at(self, x, y, z):
|
|
self._position = (x, y, z)
|
|
return self
|
|
|
|
def mesh(self):
|
|
box = tm.creation.box(extents=(self.width, self.depth, self.height))
|
|
box.apply_translation(self._position)
|
|
return box
|