-
Notifications
You must be signed in to change notification settings - Fork 34
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
Multiple thread starts #28
Comments
Just a thought about this. I havent looked at your code directly yet, but I presume you have a public API that is essentially parsing user input and then sending that to a private worker function to do the work on the thread params. If true, then it seems like it would be pretty easy to extend your internal table to include the # starts column, and then when you go to pass that information back to the private function you first check if the number of starts is provided for that thread profile, else you default to 1. and possible kick off a warning. pseudo code concept: table = [ A, B, C, D ]; |
I'd have to look into that. What makes life a bit nasty is that OpenSCAD apparently allows only a single statement inside a function. As far as I understand, you cannot lookup first, then decide. The current code is this: function thread_specs(designator, table=THREAD_TABLE) =
|
I have not looked at the code, so I'm not sure this would work for functions ( Recall them not being very friendly . I have seen either extenttion blocks at the end as well as version information. The version information is more future proof. It's too late to do that since you already have a structure, but - if you add the version as the last parameter, and you make it obvious ( v1 ), entry without it is assumed v1/v0. There are two slippery slopes:
Thinking about that last one - maybe the "version block" can contain some type of "structure" that describes the blocks ( thread+multi ) - but again, this is an increase in complexity. |
threadlib currently does not support multiple thread starts but it would be nice to add the capability. This would enable the addition of PCF-33P-1 thread (#26, #27). Most probably there are other thread types with multiple starts although it does not seem to be common.
ToDos
The text was updated successfully, but these errors were encountered: