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

Infinite loop in 2D subsystem ? #44

Closed
rambo opened this issue Dec 18, 2011 · 7 comments
Closed

Infinite loop in 2D subsystem ? #44

rambo opened this issue Dec 18, 2011 · 7 comments

Comments

@rambo
Copy link

rambo commented Dec 18, 2011

I ran into weird bug when designing a lasercut enclosure, all the sides of the box are made with the 2D subsystem and for visualization extruded to 3D, this works fine. But when I try to compile just one of the 2D designs alone (for exporting to DXF) it will cause a seemingly infinite loop (I ran out of swapspace at ~20G of memory used by OpenSCAD...), and it's not even the most complex part that triggers this.

This is on Mac, using 2011.12.13 version but I'm fairly sure I ran into same issue with the stable version as well (I switched to devel for a reason).

Code at https://gist.github.com/1492786

@kintel
Copy link
Member

kintel commented Dec 18, 2011

Thanks for the report.
This is a problem in the OpenCSG Preview (F5) - I'll look into it.
In the meantime you can use Compile and Render (F6) instead, it should work.

@donbright
Copy link
Sponsor Member

Can you do the F6 compile instead of F5 compile? On my machine F6 goes
OK, but F5 appears to be suffering from 'normalization explosion'.

-DB

On Sun, Dec 18, 2011 at 3:06 AM, Eero af Heurlin
reply@reply.github.com
wrote:

I ran into weird bug when designing a lasercut enclosure, all the sides of the box are made with the 2D subsystem and for visualization extruded to 3D, this works fine. But when I try to compile just one of the 2D designs alone (for exporting to DXF) it will cause a seemingly infinite loop (I ran out of swapspace at ~20G of memory used by OpenSCAD...), and it's not even the most complex part that triggers this.

This is on Mac, using 2011.12.13 version but I'm fairly sure I ran into same issue with the stable version as well (I switched to devel for a reason).

Code at https://gist.github.com/1492786


Reply to this email directly or view it on GitHub:
#44

@kintel
Copy link
Member

kintel commented Dec 18, 2011

Another way to work around this is to use the render() statement in strategic locations to evaluate that into a single polyhedron (thus simplifying resulting normalized CSG tree).

@rambo
Copy link
Author

rambo commented Dec 18, 2011

F6 compile works but since there is no way to reload without doing the "normal" compile this get's a bit complicated.

Anyway, worked around the problem by doing a 2D projection from 3D extrusion (as can be seen from the .scad file), fits my usual workflow (external editor, automatic reload & compile) better :)

@rambo
Copy link
Author

rambo commented Dec 18, 2011

The render() call also works fine, thanks for that tip.

@kintel kintel closed this as completed in 3e419ce Dec 21, 2011
@kintel
Copy link
Member

kintel commented Dec 21, 2011

Just one comment: The rendering is still pretty slow. That's an optimization for later.

@rambo
Copy link
Author

rambo commented Dec 21, 2011

render was still faster (and definitely cleaner) than making extrusion and projection.

t-paul pushed a commit that referenced this issue Feb 18, 2018
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

No branches or pull requests

3 participants