Closed
Description
When function is imported, especially function that renders into array, generated code is incorrect.
Example:
import file transform.scad which contain function
function translation(translation=[], x=0, y=0, z=0) = [
[1, 0, 0, is_undef(translation[0]) ? x : translation[0])],
[0, 1, 0, is_undef(translation[1]) ? x : translation[1])],
[0, 0, 1, is_undef(translation[2]) ? x : translation[2])],
[0, 0, 0, 1]
];
use transform scad:
c = cube([20, 20, 30])
t = translation(x=10, y=20, z=30)
d = multmatrix(t)(c)
print(scad_render(d))
leads to the following output:
multmatrix(m = <__main__.translation object at 0x7fbba4f22240>) {
cube(size = [20, 20, 30]);
}
which is obviously incorrect
Metadata
Metadata
Assignees
Labels
No labels