8000 change extrude behavior by pca006132 · Pull Request #642 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

change extrude behavior #642

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 1 commit into from
Dec 12, 2023
Merged

change extrude behavior #642

merged 1 commit into from
Dec 12, 2023

Conversation

pca006132
Copy link
Collaborator

#632

This change the extrude behavior to match openscad linear extrude.

Copy link
codecov bot commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e15f4cf) 91.58% compared to head (ae19ac0) 91.58%.

❗ Current head ae19ac0 differs from pull request most recent head 016fe49. Consider uploading reports for the commit 016fe49 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #642   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files          36       36           
  Lines        4693     4693           
=======================================
  Hits         4298     4298           
  Misses        395      395           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pca006132
Copy link
Collaborator Author

Not yet addressing the shortest diagonal part. I think we should probably also use this shortest diagonal thing for rotate extrude.

Copy link
Owner
@elalish elalish left a comment

Choose a reason for hiding this comment

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

Do you have an image showing the before/after difference?

@pca006132
Copy link
Collaborator Author

I had, but it is not here with me now. Will reply here tonight.

@pca006132
Copy link
Collaborator Author
const a = 110;
const a2 = 150;
const h = 30;
const R = 20;
const r = 2;
const result = Manifold.extrude(
  CrossSection.circle(r).translate([R*Math.sin(a2), R*Math.cos(a2)]), h, 100, a, [0, 1])
  .add(Manifold.cube([1, 1, h]));

Before:
image

After:
image

@pca006132
Copy link
Collaborator Author

@elalish btw this also changes the extrude direction, not sure if we should do this as some users may rely on the extrude direction.

@pca006132
Copy link
Collaborator Author

In terms of openscad compatibility, we can just negate the sign of the twist angle.

@pca006132
Copy link
Collaborator Author

OK I reverted the direction change, it is not worth breaking existing code.

Copy link
Owner
@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks, yeah CCW seems more logical to me anyway.

@pca006132 pca006132 merged commit 0e0d1c4 into elalish:master Dec 12, 2023
@elalish elalish mentioned this pull request Jan 7, 2024
cartesian-theatrics pushed a commit to cartesian-theatrics/manifold that referenced this pull request Mar 11, 2024
@pca006132 pca006132 deleted the primitives branch November 16, 2024 16:32
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
0