[OpenSCAD] Why is this so heavy to OpenScad?

adrianv avm4 at cornell.edu
Sun Nov 10 17:32:59 EST 2019

I played around a bit with this and I have to say, the output from MCAD's
roundedBox is horrible.  People have complained when I criticize MCAD, but
I'm sorry, this is just ridiculous:


This "rounded" box has a bunch of extra polygons because of whatever
craziness is going on with the "rounding".  A new user should not encounter
a result like this in the "standard" library.  If you want to make it work
anyway then you can do it by putting "render()" in front of your difference
command.  But if you use the rounded box posted above it runs in 4s on my
machine, without any trouble (except that the result is wrong because it
always rounds all the edges).  Note also that you don't need two
differences, since the inner one subtracts one thing and then the outer one
just subtracts more.  

If you want a library that actually works and is supported, I suggest trying
BOSL or BOSL2.  


The following code based on BOSL2 runs in 0s for me and actually produces
the same thing as the original code:




cubW = 100;
cubL = 100;
cubH = 80;
wall = 2.5;

module cage()
  curv = 26;
  dl = -1.0;
  dx = cubW/3+2;
  dy = cubL/3+2;
  dz = cubH/3+2;
    cuboid( [cubH, cubL, cubW], rounding=curv, edges=edges("Z"));  // Edges
in the Z direction are rounded
    cuboid( [cubH-2.0*wall,cubL-2.0*wall, cubW-2.0*wall], rounding=curv-2,

Sent from: http://forum.openscad.org/

More information about the Discuss mailing list