-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix doubled arguments generated in bosl2_generator.py #24
Comments
The issue is, that this seems to be "legal" in OpenSCAD but not in Python. The OpenSCAD code really contains these double parameters. If that's the solution, we could take care of it in
I did not had a closer look at it: why are there double parameters in openscad at all? I assume for convenience, but I did not had a closer look at it, what's the semantic behind it? |
Btw: this is not |
I think it's non-sensical to have double parameters in OpenSCAD, I just don't think there's any validation. I tested this code:
It produced a rectangular prism with sides 1, 2, and 1. So while the later duplicate arguments can be specified, they cannot actually be read inside the function. (As I'd kind of expect...) Since we want solid2 to be robust to whatever upstream BOSL2 feeds it, I think the right thing to do is to change the code generation to match the manual fixes you've had to do. | Btw: this is not bosl2_generator.py but openscad_extensions_generator.py Understood, I was just focusing the issue report on the entry point rather than the root cause. Thanks, though. |
Nonsense.....sorry |
I added a line to the genrator(s) to remove duplicates from the parameter list. so the genrator(s) do the formerly manual tweaking now. So I think we can close this issue, right? |
Yeah, I also had a change that is functionally equivalent to your change, I can abandon mine. |
The raw output of bosl2_generator.py generates some incorrect output. For example, at the moment, this code is produced in bosl2/distributors.py:
The argument dist=None is listed twice in the
__init__
method declaration and in the call tosuper().__init__
. This is a bug.The text was updated successfully, but these errors were encountered: