discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Strategies to accelerate rendering?

A
amundsen
Sat, Jun 13, 2020 10:04 AM

Hello,

Is there some tutorial to optimize code? The rendering stalls at 999/1000
for a long time as soon as my models are not strictly basic.

Thank you.

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

Hello, Is there some tutorial to optimize code? The rendering stalls at 999/1000 for a long time as soon as my models are not strictly basic. Thank you. -- Sent from: http://forum.openscad.org/
NH
nop head
Sat, Jun 13, 2020 10:08 AM

Hard to say without seeing your model but I guess there are a lot of
objects that need to be unioned at the end.

Sometimes it can be done in 2D. For example if you make a grill in a panel
by subtracting hundreds of cylinders it will be very slow but if you
subtract circles from a square and then linear_extrude it to make a 3D
panel it will be instantaneous.

On Sat, 13 Jun 2020 at 11:05, amundsen roald.baudoux@brutele.be wrote:

Hello,

Is there some tutorial to optimize code? The rendering stalls at 999/1000
for a long time as soon as my models are not strictly basic.

Thank you.

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Hard to say without seeing your model but I guess there are a lot of objects that need to be unioned at the end. Sometimes it can be done in 2D. For example if you make a grill in a panel by subtracting hundreds of cylinders it will be very slow but if you subtract circles from a square and then linear_extrude it to make a 3D panel it will be instantaneous. On Sat, 13 Jun 2020 at 11:05, amundsen <roald.baudoux@brutele.be> wrote: > Hello, > > Is there some tutorial to optimize code? The rendering stalls at 999/1000 > for a long time as soon as my models are not strictly basic. > > Thank you. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
M
MichaelAtOz
Sat, Jun 13, 2020 10:23 AM

I suspect you may be using high $fn values? Try 32 first, then selectively
increase in specific sections as needed, and/or use low values for
development and higher ones for final production.


Admin - email* me if you need anything,  or if I've done something stupid...

  • click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

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

I suspect you may be using high $fn values? Try 32 first, then selectively increase in specific sections as needed, and/or use low values for development and higher ones for final production. ----- Admin - email* me if you need anything, or if I've done something stupid... * click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
T
Troberg
Sun, Jun 14, 2020 11:00 AM

In addition to the other advice given, I've found that adding a render()
after creating a complex object that'll be re-used a lot will sometimes help
a lot. For example, if you do logical operations with text objects, a
render() can make a huge difference, as it simplifies the object by removing
stuff that is no longer needed.

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

In addition to the other advice given, I've found that adding a render() after creating a complex object that'll be re-used a lot will sometimes help a lot. For example, if you do logical operations with text objects, a render() can make a huge difference, as it simplifies the object by removing stuff that is no longer needed. -- Sent from: http://forum.openscad.org/
A
amundsen
Mon, Jun 15, 2020 11:09 AM

The difference operation seems to require a lot of computations sometimes so
I've created both parts involved as two different .stl files and made the
difference in a separate program.

However here is a typical code which takes ages to be rendered. If you see
any possible improvement let me know. The shape to be rendered is displayed
below.

global_thickness = 20;
nombre_vagues = 6;
degres = 360;
base_thickness = 2;
wall_thickness = 4;
precision = 360;
union() {
for ( i = [0:1/3:degres * 9]) {
a = [sin(i/3) * (enclosure_radius-global_thickness), cos(i/3) *
(enclosure_radius-global_thickness)];
d = [sin((i+1)/3) * (enclosure_radius-global_thickness), cos((i+1)/3) *
(enclosure_radius-global_thickness)];
f = [sin(i/3) * enclosure_radius, cos(i/3) * enclosure_radius];
g = [sin((i+1)/3) * enclosure_radius, cos((i+1)/3) * enclosure_radius];
reference = [0,0];
translate([0,0,base_thickness]) {
translate([0,0,0]) {
linear_extrude(height = (sin(i/3 * nombre_vagues) * 10)+10, center =
false, convexity = 10, twist = 0, slices = 20, scale = 1.0, $fn = 16) {
polygon(points = [a,f,g,d], convexity = 100);
}
}
}

}
difference() {
	union() {
		cylinder(h = base_thickness, r = enclosure_radius + wall_thickness, $fn =

precision);
cylinder(h = 64, r = enclosure_radius -20, $fn = precision);
translate([0,0,1]) {
cube([wall_thickness * 2 + 4, enclosure_radius * 2 + 2 * wall_thickness

  • 40, 2], center = true);
    }
    translate([5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    }
    cylinder(h = 64, r = enclosure_radius - 24, $fn = precision);
    }
    }

http://forum.openscad.org/file/t2715/caption.jpg

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

The difference operation seems to require a lot of computations sometimes so I've created both parts involved as two different .stl files and made the difference in a separate program. However here is a typical code which takes ages to be rendered. If you see any possible improvement let me know. The shape to be rendered is displayed below. global_thickness = 20; nombre_vagues = 6; degres = 360; base_thickness = 2; wall_thickness = 4; precision = 360; union() { for ( i = [0:1/3:degres * 9]) { a = [sin(i/3) * (enclosure_radius-global_thickness), cos(i/3) * (enclosure_radius-global_thickness)]; d = [sin((i+1)/3) * (enclosure_radius-global_thickness), cos((i+1)/3) * (enclosure_radius-global_thickness)]; f = [sin(i/3) * enclosure_radius, cos(i/3) * enclosure_radius]; g = [sin((i+1)/3) * enclosure_radius, cos((i+1)/3) * enclosure_radius]; reference = [0,0]; translate([0,0,base_thickness]) { translate([0,0,0]) { linear_extrude(height = (sin(i/3 * nombre_vagues) * 10)+10, center = false, convexity = 10, twist = 0, slices = 20, scale = 1.0, $fn = 16) { polygon(points = [a,f,g,d], convexity = 100); } } } } difference() { union() { cylinder(h = base_thickness, r = enclosure_radius + wall_thickness, $fn = precision); cylinder(h = 64, r = enclosure_radius -20, $fn = precision); translate([0,0,1]) { cube([wall_thickness * 2 + 4, enclosure_radius * 2 + 2 * wall_thickness + 40, 2], center = true); } translate([5, enclosure_radius+14, 3]) { cube([2,20,2], center = true); } translate([-5, enclosure_radius+14, 3]) { cube([2,20,2], center = true); } translate([5, -enclosure_radius-14, 3]) { cube([2,20,2], center = true); } translate([-5, -enclosure_radius-14, 3]) { cube([2,20,2], center = true); } } cylinder(h = 64, r = enclosure_radius - 24, $fn = precision); } } <http://forum.openscad.org/file/t2715/caption.jpg> -- Sent from: http://forum.openscad.org/
NH
nop head
Mon, Jun 15, 2020 11:36 AM

Use 2D as much as possible to avoid 3D difference(). E.g. don't subtract
cylinders, linear extrude a difference of two circles.

Similarly for the two channels, linear extrude the difference of two
squares.

Don't set $fn if you are 3D printing. Set $fa and $fs. I use $fa = 6 and
$fs = 0.25. Sometimes I lower $fa to 1 to when milling.

On Mon, 15 Jun 2020 at 12:10, amundsen roald.baudoux@brutele.be wrote:

The difference operation seems to require a lot of computations sometimes
so
I've created both parts involved as two different .stl files and made the
difference in a separate program.

However here is a typical code which takes ages to be rendered. If you see
any possible improvement let me know. The shape to be rendered is displayed
below.

global_thickness = 20;
nombre_vagues = 6;
degres = 360;
base_thickness = 2;
wall_thickness = 4;
precision = 360;
union() {
for ( i = [0:1/3:degres * 9]) {
a = [sin(i/3) * (enclosure_radius-global_thickness),
cos(i/3) *
(enclosure_radius-global_thickness)];
d = [sin((i+1)/3) * (enclosure_radius-global_thickness),
cos((i+1)/3) *
(enclosure_radius-global_thickness)];
f = [sin(i/3) * enclosure_radius, cos(i/3) *
enclosure_radius];
g = [sin((i+1)/3) * enclosure_radius, cos((i+1)/3) *
enclosure_radius];
reference = [0,0];
translate([0,0,base_thickness]) {
translate([0,0,0]) {
linear_extrude(height = (sin(i/3 *
nombre_vagues) * 10)+10, center =
false, convexity = 10, twist = 0, slices = 20, scale = 1.0, $fn = 16) {
polygon(points = [a,f,g,d],
convexity = 100);
}
}

             }

     }
     difference() {
             union() {
                     cylinder(h = base_thickness, r = enclosure_radius
  • wall_thickness, $fn =
    precision);
    cylinder(h = 64, r = enclosure_radius -20, $fn =
    precision);
    translate([0,0,1]) {
    cube([wall_thickness * 2 + 4,
    enclosure_radius * 2 + 2 * wall_thickness
  • 40, 2], center = true);
    }
    translate([5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    }
    cylinder(h = 64, r = enclosure_radius - 24, $fn =
    precision);
    }
    }

http://forum.openscad.org/file/t2715/caption.jpg

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Use 2D as much as possible to avoid 3D difference(). E.g. don't subtract cylinders, linear extrude a difference of two circles. Similarly for the two channels, linear extrude the difference of two squares. Don't set $fn if you are 3D printing. Set $fa and $fs. I use $fa = 6 and $fs = 0.25. Sometimes I lower $fa to 1 to when milling. On Mon, 15 Jun 2020 at 12:10, amundsen <roald.baudoux@brutele.be> wrote: > The difference operation seems to require a lot of computations sometimes > so > I've created both parts involved as two different .stl files and made the > difference in a separate program. > > However here is a typical code which takes ages to be rendered. If you see > any possible improvement let me know. The shape to be rendered is displayed > below. > > > global_thickness = 20; > nombre_vagues = 6; > degres = 360; > base_thickness = 2; > wall_thickness = 4; > precision = 360; > union() { > for ( i = [0:1/3:degres * 9]) { > a = [sin(i/3) * (enclosure_radius-global_thickness), > cos(i/3) * > (enclosure_radius-global_thickness)]; > d = [sin((i+1)/3) * (enclosure_radius-global_thickness), > cos((i+1)/3) * > (enclosure_radius-global_thickness)]; > f = [sin(i/3) * enclosure_radius, cos(i/3) * > enclosure_radius]; > g = [sin((i+1)/3) * enclosure_radius, cos((i+1)/3) * > enclosure_radius]; > reference = [0,0]; > translate([0,0,base_thickness]) { > translate([0,0,0]) { > linear_extrude(height = (sin(i/3 * > nombre_vagues) * 10)+10, center = > false, convexity = 10, twist = 0, slices = 20, scale = 1.0, $fn = 16) { > polygon(points = [a,f,g,d], > convexity = 100); > } > } > > } > > } > difference() { > union() { > cylinder(h = base_thickness, r = enclosure_radius > + wall_thickness, $fn = > precision); > cylinder(h = 64, r = enclosure_radius -20, $fn = > precision); > translate([0,0,1]) { > cube([wall_thickness * 2 + 4, > enclosure_radius * 2 + 2 * wall_thickness > + 40, 2], center = true); > } > translate([5, enclosure_radius+14, 3]) { > cube([2,20,2], center = true); > } > translate([-5, enclosure_radius+14, 3]) { > cube([2,20,2], center = true); > } > translate([5, -enclosure_radius-14, 3]) { > cube([2,20,2], center = true); > } > translate([-5, -enclosure_radius-14, 3]) { > cube([2,20,2], center = true); > } > } > cylinder(h = 64, r = enclosure_radius - 24, $fn = > precision); > } > } > > <http://forum.openscad.org/file/t2715/caption.jpg> > > > > > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
A
amundsen
Mon, Jun 15, 2020 12:32 PM

I'll give a try to set $fa and $fs instead of $fn. Thank you.

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

I'll give a try to set $fa and $fs instead of $fn. Thank you. -- Sent from: http://forum.openscad.org/
JB
Jordan Brown
Mon, Jun 15, 2020 8:37 PM

Setting $fn to 360 is an obvious culprit, but it's not the real problem.

There's another segment that seems to be doing too much work. (And is
also harder to understand than it needs to be.)

On 6/15/2020 4:09 AM, amundsen wrote:

degres = 360;
[...]
for ( i = [0:1/3:degres * 9]) {
a = [sin(i/3) * (enclosure_radius-global_thickness), cos(i/3) *
(enclosure_radius-global_thickness)];
d = [sin((i+1)/3) * (enclosure_radius-global_thickness), cos((i+1)/3) *
(enclosure_radius-global_thickness)];

This steps around the circle three times.  The second and third times
are identical to the first and can be eliminated.

It would then be stepping from 0 to 3*360 by 1/3.  The multiply-by-3 is
cancelled by the divide-by-3s in the body, making the whole thing
unnecessarily complex.  The effect is to step around the circle by 1/9
degree increments; it could do that directly, eliminating all of the
divides.

Net, this is building 9720 linear-extruded blocks 2/3 of which are
redundant.

After eliminating the redundant blocks, you'll still have 3240 of them. 
That's a lot.

I'd have to figure out how big the stair steps involved really are to
know if you need that much resolution.  But assuming for the moment that
you do, you still probably don't need it all the time.  You could do
much of your work at much lower resolution, and only render at full
resolution when you're ready to print.

Something like:

step = 1/9;
[...]
for ( i = [0:step:degres]) {
a = [sin(i) * (enclosure_radius-global_thickness), cos(i) * (enclosure_radius-global_thickness)];
d = [sin(i+step) * (enclosure_radius-global_thickness), cos(i+step) * (enclosure_radius-global_thickness)];
f = [sin(i) * enclosure_radius, cos(i) * enclosure_radius];
g = [sin(i+step) * enclosure_radius, cos(i+step) * enclosure_radius];
reference = [0,0];
translate([0,0,base_thickness]) {
translate([0,0,0]) {
linear_extrude(height = (sin(i * nombre_vagues) * 10)+10, center = false, convexity = 10) {
polygon(points = [a,f,g,d], convexity = 100);
}
}
}
}

and then set "step" to different values depending on what you're doing.

Note:  Your blocks were 1/3 degree wide and stepped in 1/9 degree
intervals; mine are "step" wide, with "step" intervals.

A more advanced answer might be to stop using linear_extruded blocks -
which have flat tops - and instead use polyhedra.  With a polyhedron you
could have a top that slopes, which will more naturally fit the sine
wave that you're trying to generate.  You could probably get away with
many fewer steps that way.  It looks like 1-degree or 2-degree steps
might well be fine

Here's a variation that renders in ~90 seconds for me, versus >10
minutes for even a simplified version of the original.  And the fidelity
is pretty good, maybe even better than the original.  I had to guess at
a value for enclosure_radius; the original didn't provide one.  Dropping
precision to 60 takes it down to 42.  Setting step to 5 and precision to
60 makes it render in 25 seconds.  The fidelity there is probably not
good enough for production, but is probably good enough for
pre-production work.

Somebody should check my polyhedra.  My 3D geometry isn't quite good
enough for me to be sure that the "top" isn't really a quadrilateral,
that it really does need to be split into two triangles.

enclosure_radius=50;
global_thickness = 20;
nombre_vagues = 6;
degres = 360;
base_thickness = 2;
wall_thickness = 4;
precision = 360;
step = 2;
union() {
for ( i = [0:step:degres]) {
abot = [sin(i) * (enclosure_radius-global_thickness), cos(i) *
(enclosure_radius-global_thickness), 0];
dbot = [sin(i+step) * (enclosure_radius-global_thickness), cos(i+step) *
(enclosure_radius-global_thickness), 0];

    fbot = [sin(i) * enclosure_radius, cos(i) * enclosure_radius, 0];
    gbot = [sin(i+step) * enclosure_radius, cos(i+step) * enclosure_radius, 0];
    
    h1 = (sin(i * nombre_vagues) * 10)+10;
    h2 = (sin((i+step) * nombre_vagues) * 10)+10;
    
    atop = abot + [0,0,h1];
    dtop = dbot + [0,0,h2];
    ftop = fbot + [0,0,h1];
    gtop = gbot + [0,0,h2];
    
    reference = [0,0];
translate([0,0,base_thickness]) {
        polyhedron(points=[abot, dbot, fbot, gbot, atop, dtop, ftop, gtop], faces=[
            [0,1,3,2],
            [4,5,1,0],
            [0,2,6,4],
            [5,7,3,1],
            [2,3,7,6],
            [7,5,4],
            [4,6,7]
        ], convexity=10);
        }
}
difference() {
    union() {
        cylinder(h = base_thickness, r = enclosure_radius + wall_thickness, $fn =

precision);
cylinder(h = 64, r = enclosure_radius -20, $fn = precision);
translate([0,0,1]) {
cube([wall_thickness * 2 + 4, enclosure_radius * 2 + 2 * wall_thickness

  • 40, 2], center = true);
    }
    translate([5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, enclosure_radius+14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    translate([-5, -enclosure_radius-14, 3]) {
    cube([2,20,2], center = true);
    }
    }
    cylinder(h = 64, r = enclosure_radius - 24, $fn = precision);
    }
    }

A still more advanced answer would construct the entire outer ring as a
single polyhedron, but that exceeds what I want to do today.  (But it
would probably be faster still.)

Setting $fn to 360 is an obvious culprit, but it's not the real problem. There's another segment that seems to be doing too much work. (And is also harder to understand than it needs to be.) On 6/15/2020 4:09 AM, amundsen wrote: > degres = 360; > [...] > for ( i = [0:1/3:degres * 9]) { > a = [sin(i/3) * (enclosure_radius-global_thickness), cos(i/3) * > (enclosure_radius-global_thickness)]; > d = [sin((i+1)/3) * (enclosure_radius-global_thickness), cos((i+1)/3) * > (enclosure_radius-global_thickness)]; This steps around the circle three times.  The second and third times are identical to the first and can be eliminated. It would then be stepping from 0 to 3*360 by 1/3.  The multiply-by-3 is cancelled by the divide-by-3s in the body, making the whole thing unnecessarily complex.  The effect is to step around the circle by 1/9 degree increments; it could do that directly, eliminating all of the divides. Net, this is building 9720 linear-extruded blocks 2/3 of which are redundant. After eliminating the redundant blocks, you'll still have 3240 of them.  That's a lot. I'd have to figure out how big the stair steps involved really are to know if you need that much resolution.  But assuming for the moment that you do, you still probably don't need it *all the time*.  You could do much of your work at much lower resolution, and only render at full resolution when you're ready to print. Something like: step = 1/9; [...] for ( i = [0:step:degres]) { a = [sin(i) * (enclosure_radius-global_thickness), cos(i) * (enclosure_radius-global_thickness)]; d = [sin(i+step) * (enclosure_radius-global_thickness), cos(i+step) * (enclosure_radius-global_thickness)]; f = [sin(i) * enclosure_radius, cos(i) * enclosure_radius]; g = [sin(i+step) * enclosure_radius, cos(i+step) * enclosure_radius]; reference = [0,0]; translate([0,0,base_thickness]) { translate([0,0,0]) { linear_extrude(height = (sin(i * nombre_vagues) * 10)+10, center = false, convexity = 10) { polygon(points = [a,f,g,d], convexity = 100); } } } } and then set "step" to different values depending on what you're doing. Note:  Your blocks were 1/3 degree wide and stepped in 1/9 degree intervals; mine are "step" wide, with "step" intervals. A more advanced answer might be to stop using linear_extruded blocks - which have flat tops - and instead use polyhedra.  With a polyhedron you could have a top that slopes, which will more naturally fit the sine wave that you're trying to generate.  You could probably get away with *many* fewer steps that way.  It looks like 1-degree or 2-degree steps might well be fine Here's a variation that renders in ~90 seconds for me, versus >10 minutes for even a simplified version of the original.  And the fidelity is pretty good, maybe even better than the original.  I had to guess at a value for enclosure_radius; the original didn't provide one.  Dropping precision to 60 takes it down to 42.  Setting step to 5 and precision to 60 makes it render in 25 seconds.  The fidelity there is probably not good enough for production, but is probably good enough for pre-production work. Somebody should check my polyhedra.  My 3D geometry isn't quite good enough for me to be sure that the "top" isn't really a quadrilateral, that it really does need to be split into two triangles. enclosure_radius=50; global_thickness = 20; nombre_vagues = 6; degres = 360; base_thickness = 2; wall_thickness = 4; precision = 360; step = 2; union() { for ( i = [0:step:degres]) { abot = [sin(i) * (enclosure_radius-global_thickness), cos(i) * (enclosure_radius-global_thickness), 0]; dbot = [sin(i+step) * (enclosure_radius-global_thickness), cos(i+step) * (enclosure_radius-global_thickness), 0]; fbot = [sin(i) * enclosure_radius, cos(i) * enclosure_radius, 0]; gbot = [sin(i+step) * enclosure_radius, cos(i+step) * enclosure_radius, 0]; h1 = (sin(i * nombre_vagues) * 10)+10; h2 = (sin((i+step) * nombre_vagues) * 10)+10; atop = abot + [0,0,h1]; dtop = dbot + [0,0,h2]; ftop = fbot + [0,0,h1]; gtop = gbot + [0,0,h2]; reference = [0,0]; translate([0,0,base_thickness]) { polyhedron(points=[abot, dbot, fbot, gbot, atop, dtop, ftop, gtop], faces=[ [0,1,3,2], [4,5,1,0], [0,2,6,4], [5,7,3,1], [2,3,7,6], [7,5,4], [4,6,7] ], convexity=10); } } difference() { union() { cylinder(h = base_thickness, r = enclosure_radius + wall_thickness, $fn = precision); cylinder(h = 64, r = enclosure_radius -20, $fn = precision); translate([0,0,1]) { cube([wall_thickness * 2 + 4, enclosure_radius * 2 + 2 * wall_thickness + 40, 2], center = true); } translate([5, enclosure_radius+14, 3]) { cube([2,20,2], center = true); } translate([-5, enclosure_radius+14, 3]) { cube([2,20,2], center = true); } translate([5, -enclosure_radius-14, 3]) { cube([2,20,2], center = true); } translate([-5, -enclosure_radius-14, 3]) { cube([2,20,2], center = true); } } cylinder(h = 64, r = enclosure_radius - 24, $fn = precision); } } A still more advanced answer would construct the entire outer ring as a single polyhedron, but that exceeds what I want to do today.  (But it would probably be faster still.)
A
amundsen
Tue, Jun 16, 2020 6:53 AM

Thanks a lot @JordanBrown!

The first version without polyhedron is still quite slow but it might be in
part because I have an integrated GPU only.

The second version is indeed much faster. I need to analyze the code!

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

Thanks a lot @JordanBrown! The first version without polyhedron is still quite slow but it might be in part because I have an integrated GPU only. The second version is indeed much faster. I need to analyze the code! -- Sent from: http://forum.openscad.org/
K
Kevig
Tue, Jun 16, 2020 1:56 PM

hello,

I am not sure if this has anything to do with the topic but i see you all
look at the programming code for optimizing.
I wonder if there is something in openscad/cgal eating up rendering time.
Rendering the code for my project takes a staggering 5mins 50 secs but the
CPU load stay's at 9% and the GPU load stay's at 5%.
so the computer is almost doing nothing!
(AMD Ryzen 7 3700X 8core 3.59 and GTX 1650S)
it is as if the computer power is not important at all and there is some
other reason why the calculations are so slow.
I did expect a higer GPU/CPU load when the calculations increase

rgrds
Henk

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

hello, I am not sure if this has anything to do with the topic but i see you all look at the programming code for optimizing. I wonder if there is something in openscad/cgal eating up rendering time. Rendering the code for my project takes a staggering 5mins 50 secs but the CPU load stay's at 9% and the GPU load stay's at 5%. so the computer is almost doing nothing! (AMD Ryzen 7 3700X 8core 3.59 and GTX 1650S) it is as if the computer power is not important at all and there is some other reason why the calculations are so slow. I did expect a higer GPU/CPU load when the calculations increase rgrds Henk -- Sent from: http://forum.openscad.org/