Welcome! Log In Create A New Profile

Advanced

Performance issue

Posted by UkIan 
Performance issue
November 04, 2014 02:39PM
I've designed a model which is actually not that complicated, but it takes 20 minutes to render with F6. If you have a slow rendering model, are there things you do to speed it up? I have no minkowski's going on, but quite a few difference statements and plenty of modules and one for loop which iterates 6 times. It always stops at the same point, in this case 962 of 1000, and that is where it just sits there for ages doing nothing sad smiley
Re: Performance issue
November 05, 2014 02:39AM
Well,

the most impacting single issue is the setting of $fa and $fn.
Make them not to small for first render operations. Only when satisfied, render once more with low values before exporting the .STL

Further more, try not to design shapes with your own logic (as in hulling of differring) , if standard functions or parameters of those can do the job for you.
Well,

(For instance: I once designed a Taurus by looping a sphere around a centre. That did not render within hours, untill someone pointed me to the 'Rotate Extrude of a circle, which did the same job in a minute :-)

Edited 1 time(s). Last edit at 11/05/2014 02:46AM by Replace.


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Performance issue
November 05, 2014 02:55AM
Hmm, I do use $fn a lot, but I've been moving to lower values generally, and I don't use anything overly clever. I'll have a dig through and see if there are any absurdly hi fn or fa values in there that I missed :/
Re: Performance issue
November 05, 2014 04:36AM
Why don't you attach your source file so we can look at it?


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Performance issue
November 05, 2014 04:39AM
I'll pop it on when I get home this evening if that's OK smiling smiley
Re: Performance issue
November 05, 2014 05:04AM
thumbs up


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Performance issue
November 05, 2014 07:07AM
$fn overrides $fa and $fs; if you've set $fn then the other two are ignored.

I usually set $fa to 5 (72 sides to a circle) and $fs to 1.0 (1mm minimum segment size) as this gives a nice balance for most objects that I print.

I can then set $fn at the top of my code to a nice low number for quick previews, or override it in individual calls to give me automatically generated convex polygons.

I always use polyholes for engineering dimensional accuracy, as M3 holes tend to come out as small pentagons using these settings.
Re: Performance issue
November 05, 2014 03:00PM
Here you go. There is one module being run at the very bottom called TriCarriageTop(); This utilises most of the code above it.
MyBearing2.scad

If you press F5 you should see the model below. If you press F6, you'll get a result sometime in the next epoch :/

Re: Performance issue
November 05, 2014 05:38PM
FOUND THE F****ER.

My stupid fault.

I had a for loop which created holes at regular intervals. I'd accidentally set it to make them from -1000 to +100 every 10 spaces. Actually only need -20 to +50. Made that change. Instant processing.

The fix.
module RowOfHoles()
{
	for(i=[-20:10:50])
	{
		translate([0,0,i])rotate([90,0,0])cylinder(d=3.8, h=100,center=true);
		translate([0,-16,i])rotate([90,0,0])cylinder(d=7.1, h=15,$fn=6,center=true);
	}
}
Re: Performance issue
November 06, 2014 02:24AM
See... All you have to do is try to explain the problem to someone else and then you find the solution yourself! smileys with beer


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Performance issue
November 06, 2014 03:37AM
You need a duck! grinning smiley

I saw that loop when I looked at it last night - I couldn't see in your photo where you needed 110 holes in a line but got distracted whilst trying to break it down.

I would also argue that you're never going to see the benefit of a 120 segment curve on a reprap for the size of object you're making. Even 30 segments is overkill for a 4mm machine hole.
For screw holes it would be far quicker to render (and print - the file will be far smaller!) if you use a polyhole - adjusted for the correct dimension across the flat sides.
For self-tapping holes I use a 3-sided polyhole, adjusted for root diameter so that it grips very tightly on three sides but not so tight that it's tedious to actually assemble.
Re: Performance issue
November 06, 2014 03:45AM
Hah yes, it's always the way isn't it. But if that's how we get to a solution, then that's the way we go smiling smiley

I'm coming around to the idea of polyholes. The newest version of that file has all the fn statements removed, except for the ones when it makes nut cutouts to hold a nut. I'm going to make up a little test piece of various sized poly holes to see which size works best for me and I'll go from there smiling smiley
Re: Performance issue
November 09, 2014 01:40AM
Guys... what is a polyhole ?


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Performance issue
November 09, 2014 05:15PM
Sorry, only registered users may post in this forum.

Click here to login