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

Support XY-scaling on linear_extrude (resolves #268) #269

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

FlyingGaz
Copy link
Contributor

This pull request resolves #268.

The scale parameter of linear_extrude now supports (ℝ, ℝ) and ℝ -> (ℝ, ℝ) in addition to and ℝ -> ℝ. This allows x and y to be scaled independently from each other while extruding.

Example demonstrating all 4 variants:

union() {
    linear_extrude(height = 10, scale = 2)
    square(10, center = true);

    translate([30, 0, 0])
    linear_extrude(height = 10, scale(z) = 1 + z / 10)
    square(10, center = true);
    
    translate([0, 30, 0])
    linear_extrude(height = 10, scale = [2, 1.5])
    square(10, center = true);
    
    translate([30, 30, 0])
    linear_extrude(height = 10, scale(z) = [1 + z / 10, 1 + z / 20])
    square(10, center = true);
}

Feedback and suggestions welcome.

@julialongtin
Copy link
Member

Looks good. I'm not sure i like the naming, i might go over that in the future, but.. thanks!

@julialongtin julialongtin merged commit 9ac59e9 into Haskell-Things:master Jun 12, 2020
@FlyingGaz FlyingGaz deleted the issue268 branch June 12, 2020 19:38
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.

linear_extrude should support XY-scaling
2 participants