Skip to content

Make polyholes() act a little more like cylinder() #70

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

Merged
merged 3 commits into from
Mar 29, 2020

Conversation

lordofhyphens
Copy link

@nophead 's polyhole function could use a little more love and attention to make it act a little more like cylinder.

This PR adds the center and r parameters, defaulting them to existing behavior if they aren't specified.

n = max(round(2 * d),3);
module polyhole(h, d=0, r=0, center=false) {
_r = (r == 0 ? d / 2 : r);
_d = (d == 0 ? r * 2 : d);
Copy link

@hyperair hyperair Jan 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you mean to use _r in this line, otherwise it won't be used anywhere.

@hyperair hyperair merged commit 830ce58 into openscad:master Mar 29, 2020
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 this pull request may close these issues.

2 participants