trouble compiling and rendering

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

trouble compiling and rendering

DanS
This post has NOT been accepted by the mailing list yet.
I am trying to compile and render a file (so I can export it to print out).

Unfortunately OpenSCAD either crashes or seems to hang during this process.

The file involves 2(1 + 4 + 16 + 64) spheres.  I have tried to help things by reducing the number of facets on the external spheres (from 100 to 40), and the internal spheres (from 100 to 10), and commenting out spheres that are invisible because they are internal.

If I don't the program crashes with a very odd message, if I do it seems to hang at about 481 or 485 / 1000.

Any tips?  I would actually like to increase the number of facets since I want the spheres
to be smooth but it seems hopeless for me to get that to compile

The file is below
--------------------------------------------------------------------------------------------

module fsphere2() {
//base
sphere(38,$fn=10);
//fractal d=2
translate([40,0,0]) {
  sphere(18, $fn=10);
};
translate([0,40,0]) {
  sphere(18, $fn=10);
};
translate([-40,0,0]) {
  sphere(18, $fn=10);
};
translate([0,-40,0]) {
  sphere(18, $fn=10);
};

//fractal d=3
translate([60,0,0]) {
  sphere(8, $fn=10);
};
translate([40,20,0]) {
  sphere(8, $fn=10);
};
translate([40,-20,0]) {
  sphere(8, $fn=10);
};
/*
translate([20,0,0]) {
  sphere(8, $fn=10);
};
*/

translate([0,60,0]) {
  sphere(8, $fn=10);
};
translate([20,40,0]) {
  sphere(8, $fn=10);
};
translate([-20,40,0]) {
  sphere(8, $fn=10);
};
/*
translate([0,20,0]) {
  sphere(8, $fn=10);
};
*/

translate([-60,0,0]) {
  sphere(8, $fn=10);
};
translate([-40,-20,0]) {
  sphere(8, $fn=10);
};
translate([-40,20,0]) {
  sphere(8, $fn=10);
};
/*
translate([-20,0,0]) {
  sphere(8, $fn=10);
};
*/

translate([0,-60,0]) {
  sphere(8, $fn=10);
};
translate([-20,-40,0]) {
  sphere(8, $fn=10);
};
translate([20,-40,0]) {
  sphere(8, $fn=10);
};
/*
translate([0,-20,0]) {
  sphere(8, $fn=10);
};
*/

//d4

translate([70,0,0]) {
  sphere(3, $fn=10);
};
translate([60,10,0]) {
  sphere(3, $fn=10);
};
translate([60,-10,0]) {
  sphere(3, $fn=10);
};
/*
translate([50,0,0]) {
  sphere(3, $fn=10);
};
*/

translate([0,70,0]) {
  sphere(3, $fn=10);
};
translate([10,60,0]) {
  sphere(3, $fn=10);
};
translate([-10,60,0]) {
  sphere(3, $fn=10);
};
/*
translate([0,50,0]) {
  sphere(3, $fn=10);
};
*/

translate([-70,0,0]) {
  sphere(3, $fn=10);
};
translate([-60,-10,0]) {
  sphere(3, $fn=10);
};
translate([-60,10,0]) {
  sphere(3, $fn=10);
};
/*
translate([-50,0,0]) {
  sphere(3, $fn=10);
};
*/

translate([0,-70,0]) {
  sphere(3, $fn=10);
};
translate([-10,-60,0]) {
  sphere(3, $fn=10);
};
translate([10,-60,0]) {
  sphere(3, $fn=10);
};
/*
translate([0,-50,0]) {
  sphere(3, $fn=10);
};
*/

//second group

//20,40
translate([20,40,0]) {
  sphere(3, $fn=10);
};
translate([20,50,0]) {
  sphere(3, $fn=10);
};
translate([30,40,0]) {
  sphere(3, $fn=10);
};
/*
translate([10,40,0]) {
  sphere(3, $fn=10);
};
*/

//-20,40
translate([-20,40,0]) {
  sphere(3, $fn=10);
};
translate([-20,50,0]) {
  sphere(3, $fn=10);
};
translate([-30,40,0]) {
  sphere(3, $fn=10);
};
/*
translate([-10,40,0]) {
  sphere(3, $fn=10);
};
*/

//40,20
translate([40,20,0]) {
  sphere(3, $fn=10);
};
translate([50,20,0]) {
  sphere(3, $fn=10);
};
translate([40,30,0]) {
  sphere(3, $fn=10);
};
/*
translate([40,10,0]) {
  sphere(3, $fn=10);
};
*/

//40,-20
translate([40,-20,0]) {
  sphere(3, $fn=10);
};
translate([50,-20,0]) {
  sphere(3, $fn=10);
};
translate([40,-30,0]) {
  sphere(3, $fn=10);
};
/*
translate([40,-10,0]) {
  sphere(3, $fn=10);
};
*/

//20,-40
translate([20,-40,0]) {
  sphere(3, $fn=10);
};
translate([20,-50,0]) {
  sphere(3, $fn=10);
};
translate([30,-40,0]) {
  sphere(3, $fn=10);
};
/*
translate([10,-40,0]) {
  sphere(3, $fn=10);
};
*/

//-20,-40
translate([-20,-40,0]) {
  sphere(3, $fn=10);
};
translate([-20,-50,0]) {
  sphere(3, $fn=10);
};
translate([-30,-40,0]) {
  sphere(3, $fn=10);
};
/*
translate([-10,-40,0]) {
  sphere(3, $fn=10);
};
*/

//-40,20
translate([-40,20,0]) {
  sphere(3, $fn=10);
};
translate([-50,20,0]) {
  sphere(3, $fn=10);
};
translate([-40,30,0]) {
  sphere(3, $fn=10);
};
/*
translate([-40,10,0]) {
  sphere(3, $fn=10);
};
*/

//-40,-20
translate([-40,-20,0]) {
  sphere(3, $fn=10);
};
translate([-50,-20,0]) {
  sphere(3, $fn=10);
};
translate([-40,-30,0]) {
  sphere(3, $fn=10);
};
/*
translate([-40,-10,0]) {
  sphere(3, $fn=10);
};
*/
};


////////////////////////

module fsphere() {
//base
sphere(40,$fn=40);
//fractal d=2
translate([40,0,0]) {
  sphere(20, $fn=40);
};
translate([0,40,0]) {
  sphere(20, $fn=40);
};
translate([-40,0,0]) {
  sphere(20, $fn=40);
};
translate([0,-40,0]) {
  sphere(20, $fn=40);
};

//fractal d=3
translate([60,0,0]) {
  sphere(10, $fn=40);
};
translate([40,20,0]) {
  sphere(10, $fn=40);
};
translate([40,-20,0]) {
  sphere(10, $fn=40);
};
/*
translate([20,0,0]) {
  sphere(10, $fn=40);
};
*/

translate([0,60,0]) {
  sphere(10, $fn=40);
};
translate([20,40,0]) {
  sphere(10, $fn=40);
};
translate([-20,40,0]) {
  sphere(10, $fn=40);
};
/*
translate([0,20,0]) {
  sphere(10, $fn=40);
};
*/

translate([-60,0,0]) {
  sphere(10, $fn=40);
};
translate([-40,-20,0]) {
  sphere(10, $fn=40);
};
translate([-40,20,0]) {
  sphere(10, $fn=40);
};
/*
translate([-20,0,0]) {
  sphere(10, $fn=40);
};
*/

translate([0,-60,0]) {
  sphere(10, $fn=40);
};
translate([-20,-40,0]) {
  sphere(10, $fn=40);
};
translate([20,-40,0]) {
  sphere(10, $fn=40);
};
/*
translate([0,-20,0]) {
  sphere(10, $fn=40);
};
*/

//d4

translate([70,0,0]) {
  sphere(5, $fn=40);
};
translate([60,10,0]) {
  sphere(5, $fn=40);
};
translate([60,-10,0]) {
  sphere(5, $fn=40);
};
/*
translate([50,0,0]) {
  sphere(5, $fn=40);
};
*/

translate([0,70,0]) {
  sphere(5, $fn=40);
};
translate([10,60,0]) {
  sphere(5, $fn=40);
};
translate([-10,60,0]) {
  sphere(5, $fn=40);
};
/*
translate([0,50,0]) {
  sphere(5, $fn=40);
};
*/

translate([-70,0,0]) {
  sphere(5, $fn=40);
};
translate([-60,-10,0]) {
  sphere(5, $fn=40);
};
translate([-60,10,0]) {
  sphere(5, $fn=40);
};
/*
translate([-50,0,0]) {
  sphere(5, $fn=40);
};
*/

translate([0,-70,0]) {
  sphere(5, $fn=40);
};
translate([-10,-60,0]) {
  sphere(5, $fn=40);
};
translate([10,-60,0]) {
  sphere(5, $fn=40);
};
/*
translate([0,-50,0]) {
  sphere(5, $fn=40);
};
*/

//second group

//20,40
translate([20,40,0]) {
  sphere(5, $fn=40);
};
translate([20,50,0]) {
  sphere(5, $fn=40);
};
translate([30,40,0]) {
  sphere(5, $fn=40);
};
/*
translate([10,40,0]) {
  sphere(5, $fn=40);
};
*/

//-20,40
translate([-20,40,0]) {
  sphere(5, $fn=40);
};
translate([-20,50,0]) {
  sphere(5, $fn=40);
};
translate([-30,40,0]) {
  sphere(5, $fn=40);
};
/*
translate([-10,40,0]) {
  sphere(5, $fn=40);
};
*/

//40,20
translate([40,20,0]) {
  sphere(5, $fn=40);
};
translate([50,20,0]) {
  sphere(5, $fn=40);
};
translate([40,30,0]) {
  sphere(5, $fn=40);
};
/*
translate([40,10,0]) {
  sphere(5, $fn=40);
};
*/

//40,-20
translate([40,-20,0]) {
  sphere(5, $fn=40);
};
translate([50,-20,0]) {
  sphere(5, $fn=40);
};
translate([40,-30,0]) {
  sphere(5, $fn=40);
};
/*
translate([40,-10,0]) {
  sphere(5, $fn=40);
};
*/

//20,-40
translate([20,-40,0]) {
  sphere(5, $fn=40);
};
translate([20,-50,0]) {
  sphere(5, $fn=40);
};
translate([30,-40,0]) {
  sphere(5, $fn=40);
};
/*
translate([10,-40,0]) {
  sphere(5, $fn=40);
};
*/

//-20,-40
translate([-20,-40,0]) {
  sphere(5, $fn=40);
};
translate([-20,-50,0]) {
  sphere(5, $fn=40);
};
translate([-30,-40,0]) {
  sphere(5, $fn=40);
};
/*
translate([-10,-40,0]) {
  sphere(5, $fn=40);
};
*/

//-40,20
translate([-40,20,0]) {
  sphere(5, $fn=40);
};
translate([-50,20,0]) {
  sphere(5, $fn=40);
};
translate([-40,30,0]) {
  sphere(5, $fn=40);
};
/*
translate([-40,10,0]) {
  sphere(5, $fn=40);
};
*/

//-40,-20
translate([-40,-20,0]) {
  sphere(5, $fn=40);
};
translate([-50,-20,0]) {
  sphere(5, $fn=40);
};
translate([-40,-30,0]) {
  sphere(5, $fn=40);
};
/*
translate([-40,-10,0]) {
  sphere(5, $fn=40);
};
*/
};

difference() {
  fsphere();
  fsphere2();
  translate([0,0,-20]) {
    cube([150,150,40],true);
}
}
Reply | Threaded
Open this post in threaded view
|

Re: trouble compiling and rendering

DanS
This post has NOT been accepted by the mailing list yet.
It did eventually compile and render, it just looked like it hung since it stayed at 481 or 485 for much longer than it did the other steps.

Now I am puzzled by the lack of files though.  Obviously my OpenSCAD .scad file exists but when I browse for it I don't see it (in the folder where it supposedly exists), yet OpenSCAD consistently knows about this project and can load it even if the program was shut down.

Likewise I do EXPORT of various file formats and when I browse I don't see them, I think they are there (and I select "ALL FILES") but they appear to be invisible to my operating system (Windows 7).  Any tips?
Reply | Threaded
Open this post in threaded view
|

Re: trouble compiling and rendering

DanS
This post has NOT been accepted by the mailing list yet.
Another post on this list had the same issue.  Turns out since OpenSCAD by default lives in "Program Files (x86)" on Windows that's where it saves stuff, and windows 7 does not like that.  So if I make it output elsewhere (like Documents) I sidestep that problem.

Would be nice if the progress bar was more linear.  The program really seemed to be hung since it did not update in a linear way.
Reply | Threaded
Open this post in threaded view
|

Re: trouble compiling and rendering

MichaelAtOz
Administrator
DanS wrote
Would be nice if the progress bar was more linear.  The program really seemed to be hung since it did not update in a linear way.
That tends to be the final union of all the objects, CGAL is not helpful in knowing what it is doing under the covers.

I don't know if anyone has thought to estimate the complexity before calling CGAL to give some warning of how long it may take.

p.s. Your post is still flagged as "This post has NOT been accepted by the mailing list yet", so nobody gets it unless they look.
You need to subscribe to the mailing list, and respond to the registration email.


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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!