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

Simplify the Haskell interface to rotateExtrude #367

Merged
merged 6 commits into from
Dec 26, 2020
Merged

Simplify the Haskell interface to rotateExtrude #367

merged 6 commits into from
Dec 26, 2020

Conversation

isovector
Copy link
Contributor

The current public interface for rotateExtrude has a Maybe R parameter, representing whether or not we need to generate end caps for the shape, and if so, with what rounding. Unbeknownst to me, this parameter is automagically determined in the scad interface, meaning users of the Hs interface would need to decide for themselves whether to set the capping.

But this shouldn't be user-controllable at all, since getting it wrong completely breaks the mesh generation (see #307, #309, #310).

This PR moves the capping logic directly into getImplicit, where users can't screw it up. Furthermore, now that the rounding isn't given by a non-standard mechanism, we can instead use withRounding to set it.

While I was in the neighborhood, I added some optimizations to rotateExtrude so that we can skip it for the case of theta = 0 and when the object to extrude is emptySpace.

Fixes #307, fixes #308, fixes #309, fixes #310

@isovector
Copy link
Contributor Author

After this lands, I'll make a golden test and PR for #288

@julialongtin julialongtin merged commit 91ce81b into Haskell-Things:master Dec 26, 2020
@isovector isovector deleted the auto-cap branch December 29, 2020 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants