Closed maxlem closed 2 years ago
I think what you're looking for is to use an explicit argument to my_tf()
. OpenSCAD allows some implicit argument passing with children()
, but that's harder to work out in Python. So I would do:
def my_tf(obj):
post100_size_x = 1
brace500_housing_depth = 2
brace500_tenon_depth = 3
brace500_width = 4
brace500_housing_offset = 5
to_brace503 = 6
x = post100_size_x - brace500_housing_depth - brace500_tenon_depth
y = brace500_width + brace500_housing_offset
z = to_brace503
return translate([x, y, z])(
rotate([90,0,0])(
obj
)
)
You should then be able to call this with, e.g. my_tf( cube() )
I should have found it myself, sorry, and thanks
No worries! Happy modeling!
Hello!
in openscad I could do
I tried many things in python, notably
but it doesn't genereate the right code. Aside from computing a 4x4 matrix and sharing it, is there a syntax to achieve what I'm trying to achieve?