Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add vectors like in OpenSCAD #401

Closed
mokshasoft opened this issue Dec 12, 2021 · 2 comments
Closed

Cannot add vectors like in OpenSCAD #401

mokshasoft opened this issue Dec 12, 2021 · 2 comments

Comments

@mokshasoft
Copy link
Contributor

The following code works in OpenSCAD but not in ImplicitCAD:

coord1 = [0, 0, 0];
coord2 = [1, 0, 0];
coord3 = coord1 + coord2;

translate(coord3)
cube(size = 1, center = true);

Compilation log:

% extopenscad -o test.stl --fopenscad-compat test.escad
Loading File.
Processing File.
No objects to render.
Error at line 3, column 1: Can't apply arguments to Number
Error at line 5, column 1: Variable coord3 not in scope
Error at line 5, column 1: arg Undefined not compatible with Symbol "v"
<<ghc: 1605056 bytes, 2 GCs, 251832/251832 avg/max bytes residency (1 samples), 18M in use, 0.001 INIT (0.007 elapsed), 0.001 MUT (0.002 elapsed), 0.001 GC (0.001 elapsed) :ghc>>
% echo $?
0

I installed the extopenscad via cabal install the last couple of days on my Macbook pro.

@julialongtin
Copy link
Member

nice catch! should be a quick fix. sorry for the delay.

@sorki
Copy link
Contributor

sorki commented May 5, 2022

Fixed in head but note that another one related to this popped-up - matrix multiplication is not supported #414.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants