[OpenSCAD] slow render, need help

Michael Brown mebrown at michaels-house.net
Mon Oct 24 07:36:15 CEST 2011


I am trying out openscad to make a few things, and I've run up against a
brick wall in that my designs are previewing, but wont render or stl export
in a 'reasonable' time. I'm using latest openscad git updated yesterday on a
Fedora 15 Linux system running quad-core AMD Phenom @3.2Ghz.

I thought I'd make a mashup of MakeALot's Spiro Coaster and Bracelet V, (
http://www.thingiverse.com/thing:7361 and
http://www.thingiverse.com/thing:8928). I'm trying to make a container using
the bracelet design as the sides and spiro coaster design for the lid. I
merged the scad programs, and basically rewrote a lot of it, so it's more
'inspired' by at this point, but it all previews nicely and looks good. My
problem at this point is that it is taking *forever* to compile, and using
almost 2GB of ram. I'm trying to figure out why it is taking so long.

 I've uploaded my code to github (
https://github.com/superchalupa/container-round-decorative). Attached is the
main module I've developed.

For comparison, I've re-compiled MakeALot's bracelet and it compiles in
about 41 minutes for me. When I redid the same basic bracelet design with my
code, it literally took 23 hours. The object is fairly simple, so I am at a
loss as to why it takes so long. It is a torus with about 100 oval holes. At
first I was specifying $fn variables, but under the assumption that I was
over-specifying things, I've removed almost all of those. The second thing I
did was that I was using unit circles and scaling, which ends up using only
5 fragments, so I started using larger circles and different scaling factors
to let openscad choose a more appropriate number of fragments. This has not
seemed to help.

Calling my main module with this:

// for my 3 year old (small)
radius=23;
bracelet_width=35;
wall_thick=3;
hole_len=8;
distance_between_holes=1;
hole_rotation_angle = 80;
num_divisions_around = 16;
edge_buffer=2;

holy_squished_hollow_torus(bracelet_width,
                           radius,
                           wall_thick,
                           edge_buffer,
                           hole_len,
                           distance_between_holes,
                           hole_rotation_angle,
                           num_divisions_around);


Results in this:

time make bracelet.stl
openscad -o bracelet.stl bracelet.scad -Dlayout=\"$(basename bracelet.stl
.stl)\"
Compiling library
`/home/michael_e_brown/thingomatic/things/my-designs/box/container_module.scad'.
Compiling library
`/home/michael_e_brown/thingomatic/things/my-designs/box/pins.scad'.
ECHO: "y_step: ", 8.863269777109872
ECHO: "num big ovals: ", 3
ECHO: "degrees_per_y", 0.4392519091611444
ECHO: "leftover", 11
CGAL Cache insert: group(); (0 verts)
Number of polygons before reduction: 1
    ... cut ...

CGAL Cache insert: group(){group(){multmatrix([[1,0,0,0],[0 (3340 verts)
CGAL Cache insert: difference(){group(){difference(){group( (26991 verts)
CGAL Cache insert: group(){group();group();group();group(); (26991 verts)
CGAL Cache insert: group(){group(){group();group();group(); (26991 verts)

real 1415m34.047s
user 1404m59.223s
sys 0m10.050s

--
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20111024/4904a8ec/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: container_module.scad
Type: application/octet-stream
Size: 8873 bytes
Desc: not available
Url : http://rocklinux.net/pipermail/openscad/attachments/20111024/4904a8ec/container_module-0001.obj


More information about the OpenSCAD mailing list