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

Union of closed shapes fails #5053

Open
w1ebr opened this issue Mar 18, 2024 · 13 comments
Open

Union of closed shapes fails #5053

w1ebr opened this issue Mar 18, 2024 · 13 comments
Labels
Dep: CGAL Fixed by manifold Broken in CGAL, but working in manifold

Comments

@w1ebr
Copy link

w1ebr commented Mar 18, 2024

Describe the bug
When the program tries to merge two closed shapes it says "ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron."

To Reproduce
Run the program (F6)

Environment and Version info (please complete the following information):

  • OS: macOS Sonoma
  • System: M3 Pro
  • OpenSCAD Version 2023.3.17 from OpenSCAD website
    Crocus.zip
@thehans
Copy link
Member

thehans commented Mar 18, 2024

SVG line drawings like this often contain self intersections, which result in non-manifold geometry after extrusion.
You can correct for this by wrapping the import with a miniscule offset.

... offset(delta=0.01) import("drawing2.svg");

@kintel
Copy link
Member

kintel commented Mar 18, 2024

Also, try to enable Preferences->Features->manifold - this new geometry backend is quite a bit more robust.

@kintel kintel added the Fixed by manifold Broken in CGAL, but working in manifold label Mar 18, 2024
@w1ebr
Copy link
Author

w1ebr commented Mar 19, 2024

Manifold said the results were not manifold :-)
Offsetting it by a small amount works.
The issue (I think) is that the SVG is the result of a trace operation in Inkscape and there are self-intersecting Bézier curves in the vector image.

@kintel
Copy link
Member

kintel commented Mar 19, 2024

With manifold enabled, your design renders perfectly on OpenSCAD-2024.03.17 on an M1 Mac, without any offset needed.

@w1ebr
Copy link
Author

w1ebr commented Mar 19, 2024

Were you able to get the Union() to work also? I am running the same version and it will create the pattern (stained glass frame) fine, but doesn't want to perform a union with the filled version of th same shape.

@w1ebr
Copy link
Author

w1ebr commented Mar 19, 2024

Thanks for all of the help

@kintel
Copy link
Member

kintel commented Mar 22, 2024

The union worked fine after enabling manifold. Are you still having a problem with that?

@w1ebr
Copy link
Author

w1ebr commented Mar 22, 2024

No more problem, thank you!

@reedy
Copy link

reedy commented Apr 8, 2024

Thanks!

I was having a similar problem with OpenSCAD-2024.04.05 using https://github.com/scottbez1/splitflap/blob/master/3d/tools/flap_container.scad (it's got another issue which I've fixed in scottbez1/splitflap#235)

Also, try to enable Preferences->Features->manifold - this new geometry backend is quite a bit more robust.

For anyone else falling into the same issue and stumbled upon this task, this indeed fixed the problem. But I did have to restart OpenSCAD for this to take effect.

I don't know if this is intended, but wasn't completely obvious after changing the preference (no prompt etc), but it didn't make any apparent changes to the rendering. Quick app restart, and it works!

@kintel
Copy link
Member

kintel commented Apr 8, 2024

You have to restart, or do Design->Flush caches. We don't spend too much effort on UI or docs for experimental features, until they make it out of the experimental stage..

@kintel kintel removed the Type: Bug label Apr 8, 2024
@reedy
Copy link

reedy commented Apr 8, 2024

You have to restart, or do Design->Flush caches. We don't spend too much effort on UI or docs for experimental features, until they make it out of the experimental stage..

That's fair!

I do note that one explicitly says it needs a restart:

Screenshot 2024-04-08 at 14 32 01

Is it worth adding a line of text before the list to say that a restart/cache flush may be required when enabling/disabling some of these options?

@nophead
Copy link
Member

nophead commented Apr 8, 2024

Better still would be to flush the cache if options that require it are changed. I don't like programs that tell me to do something it could do itself.

@t-paul
Copy link
Member

t-paul commented Apr 8, 2024

I agree for "normal" settings. We are talking here about special development settings that are not available in the release version. Polishing those does not make too much sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dep: CGAL Fixed by manifold Broken in CGAL, but working in manifold
Projects
None yet
Development

No branches or pull requests

6 participants