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

Bypass PolySetBuilder for rotate- and linear extrude #5046

Closed
kintel opened this issue Mar 16, 2024 · 5 comments · Fixed by #5096
Closed

Bypass PolySetBuilder for rotate- and linear extrude #5046

kintel opened this issue Mar 16, 2024 · 5 comments · Fixed by #5096

Comments

@kintel
Copy link
Member

kintel commented Mar 16, 2024

PolySetBuilder can in some cases create a non-manifold objects for linear_extrude and rotate_extrude.
Example: rotate_extrude of a 2D object with a single vertex touching the Y axis.
With our new indexed PolySet class, and using the Manifold geometry backend, it should be possible to make these objects proper manifolds and utilize them in CSG operations.

See also #3567

@kintel
Copy link
Member Author

kintel commented Mar 24, 2024

linear_extrude corner case:

linear_extrude(height = 3, scale = [0, 1]) {
  difference() {
    square(2, center = true);
    translate([-0.5,0,0]) square(center = true);
  }
}

Taken from https://github.com/openscad/openscad/blob/master/tests/data/scad/3D/features/linear_extrude-scale-zero-tests.scad

@kintel
Copy link
Member Author

kintel commented Mar 29, 2024

Another linear_extrude corner case:

intersection(){linear_extrude(50,scale=+0.2,convexity=5)circle(d=5,$fn=6);cube(250,true);}

@kintel
Copy link
Member Author

kintel commented Apr 1, 2024

From #4039:

a=110;  // twist, limited to 110 to avoid th strands touching
a2=150; // to set the start point such that the strand would 
        // end on the Z axis if a = 180
h=30;   // height
R=20;   // radius
r=2;    // strand radius

// strand 1
linear_extrude(height=h,convexity=10,twist=a,scale=[0,1])
  translate([R*sin(a2),R*cos(a2),0])circle(r);

// strand 2  
rotate(90,[0,0,1])
  linear_extrude(height=h,convexity=10,twist=a,scale=[0,1])
    translate([R*sin(a2),R*cos(a2),0])circle(r);

Simplified to:

linear_extrude(height=30, scale=[0,1]) circle(2);
cube();

@kintel
Copy link
Member Author

kintel commented Apr 13, 2024

Currently blocked by elalish/manifold#790

Edit: That was a false positive

@kintel kintel changed the title Bypass PolySetBuilder in manifold corner cases Bypass PolySetBuilder for rotate- and linear extrude Apr 13, 2024
@kintel
Copy link
Member Author

kintel commented May 2, 2024

Status as of 2024-05-01: All known linear_extrude issues fixed by #5096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant