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

[BUG] join_prism interaction with subdivide_path() is behaving strangely #1488

Closed
dan-p3rry opened this issue Oct 8, 2024 · 4 comments · Fixed by #1491
Closed

[BUG] join_prism interaction with subdivide_path() is behaving strangely #1488

dan-p3rry opened this issue Oct 8, 2024 · 4 comments · Fixed by #1491
Assignees

Comments

@dan-p3rry
Copy link

Describe the bug
join_prism is behaving strangely, works for some values of plate size and subdivide_path(), but not others. In code below, join_prism() works when y value of poly1 is 10 or 50. It doesn't work for 20, 30, 40. join_prism() also breaks if I change the value in subdivide_path() to 40 or 60.

Code To Reproduce Bug This code works. It breaks if you change y value of poly1 or subdivide_path divisor.

`
include <BOSL2/std.scad>
include <BOSL2/rounding.scad>

$fs = 0.2;
$fa = 3;

yrot_ring_gear_radius = 39.25;

poly1 = square([6, 50], center=true);
plate = subdivide_path(poly1, 50);

difference() {
    join_prism(plate, base="cylinder",
            base_r=yrot_ring_gear_radius - 0.01,
            length=45.0 - yrot_ring_gear_radius,
            fillet=0.01, n=99);
    xcyl(r=yrot_ring_gear_radius, h=8);
}
`

Expected behavior
I expect to be able to use any reasonable value of poly1 y dimension and path subdivision and get a fillet.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

  • OpenSCAD Version: Sept 16 download
  • Other libraries used:
@adrianVmariano
Copy link
Collaborator

Not sure what's going on there. You can work around the problem by setting debug=true which seems to work just fine, no issues. The error check looks like it's triggering even though there's nothing actually wrong.

@adrianVmariano
Copy link
Collaborator

I have hopefully/maybe fixed this without breaking something else. It appears that under some circumstances rounding errors results in a value that is supposed to be >=0 ending up less than zero, so I relaxed the test. It appears to work on your test case. The change appears in the PR.

@adrianVmariano adrianVmariano linked a pull request Oct 14, 2024 that will close this issue
@dan-p3rry
Copy link
Author

dan-p3rry commented Oct 14, 2024 via email

@adrianVmariano
Copy link
Collaborator

It's a little random these days. Revar will merge the PR at some point, perhaps tonight, or maybe in a week. I think that when that happens you get an email that your issue was closed.

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

Successfully merging a pull request may close this issue.

3 participants