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

Error creating a thread?/ #71

Closed
mconsidine opened this issue Jun 22, 2022 · 1 comment
Closed

Error creating a thread?/ #71

mconsidine opened this issue Jun 22, 2022 · 1 comment

Comments

@mconsidine
Copy link

I have figured out how to get the data for a thread profile and am trying to get it to work with a known-good example. But the following code fails, for reasons I cannot understand. Can you suggest what I am doing wrong?
`use <threadlib/threadlib.scad>

echo ("threadlib version: ", __THREADLIB_VERSION());

MYTHREADTABLE=[["test1-ext",[0.0750, 0.0700,0.1500,[[0,-0.0343],[0, 0.0343],[0.0513, 0.0047],[0.0513,-0.0047]]]],
["test1-int",[0.0750,-0.1358,0.2655,[[0, 0.0371],[0,-0.0371],[0.0408,-0.0136],[0.0408, 0.0136]]]],
];
type = "test1";
turns = 5;
Douter = thread_specs(str(type, "-int"), table=MYTHREADTABLE)[2] * 1.2;

echo(thread_specs(str(type, "-ext")));`

The error message in the console is:
Parsing design (AST generation)...
[...]
ECHO: "threadlib version: ", 0.3
[ERROR: Assertion '!is_undef(specs)' failed: "Designator: 'test1-ext' not found" in file threadlib.scad, line 25]
[TRACE: called by 'thread_specs' in file , line 12]
[TRACE: called by 'echo' in file , line 12]
Compiling design (CSG Products generation)...

Thanks in advance for any help.
mconsidine

@mconsidine
Copy link
Author

This problem is fixed. I neglected to add the new table as a parameter to the last "echo" statement. My bad...
mconsidine

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

No branches or pull requests

1 participant