To long to compile... How can we abort a compilation?

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

To long to compile... How can we abort a compilation?

jpmendes
Hi,
Geetings from Portugal. This is my first post to this forum.

Can anyone explain how the simple code that follows takes so long to compile (about half-an-hour).  
In addition the OpenSCAD editor stays locked, and the only way to abort the compilation I found is to
kill the Windows process.

The code:

minkowski(){
      difference(){
         translate([0,0,20])cylinder(r=DCarrier/2+RSphere,h=1,center=true);
        translate([0,0,20])cylinder(r=DCarrier/2,h=1+delta,center=true);
      }
      sphere(r=RSphere);
   }


It would be nice to have the possibility to terminate the compilation at will, if we feel that something went wrong.  

Kind regards.
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

stonysmith
There's a red circle with an X at the far bottom right of the screen.. try clicking it.
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

jpmendes
I can't see any red circle with an X in the Windows openSCAD port . Maybe in the Linux port ...
I'm using openSCAD 2015_03-1.
Thanks anyway.
Regards.
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

Peter Falke
On win 7 the cancel is in the very lower right hand corner.
But your code is not responsive for me as well.

To get some results, you should decrease the number of facets by a lot (use $fn for that)
Later for the final render/compile you can increase it again.

This code renders in 1min6sec
and compiles in 1min8sec (on a 1GHz netbook)

fn_sphere=8;
fn_cylinder=16;
RSphere=2;
DCarrier=10;
delta=2;
minkowski(){
      difference(){
         translate([0,0,20])cylinder(r=DCarrier/2+RSphere,h=1,center=true,$fn=fn_cylinder);
        translate([0,0,20])cylinder(r=DCarrier/2,h=1+delta,center=true,$fn=fn_cylinder);
      }
      sphere(r=RSphere,$fn=fn_sphere);
   }

2015-08-05 1:27 GMT+02:00 jpmendes <[hidden email]>:
I can't see any red circle with an X in the Windows openSCAD port . Maybe in
the Linux port ...
I'm using openSCAD 2015_03-1.
Thanks anyway.
Regards.



--
View this message in context: http://forum.openscad.org/To-long-to-compile-How-can-we-abort-a-compilation-tp13432p13445.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

MichaelAtOz
Administrator
In reply to this post by jpmendes
a. Like this (for F6 Render). That's Windows 7/64.


b.

With the variables I used, 25/3/0.01, Compile (F5) took 38s, the GUI did lock-up, that needs looking into. Usually it doesn't take long, and doesn't lock-up. Given minkowski is intense, perhaps it needs a event process or two in the loops??

Render (F6) was instant.

What size was causing your looong compile?
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.
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

louijp
In reply to this post by jpmendes
Hi jpmendes,

Your way to do it is complicated and VERY slow.

Try the code below for similar result much faster:


fn_sphere=360;
fn_cylinder=360;
RSphere=2;
DCarrier=10;
delta=2;

translate([0,0,20])
rotate_extrude($fn=fn_cylinder)
        translate([DCarrier/2,0,0]) rotate([0,0,90])
                minkowski(){
                        square(delta,center=true);
                        circle(r=RSphere,$fn=fn_sphere); }

Good luck with OpenSCAD, it is my favorite 3D CAD tool

Jean-Paul
AC9GH


> On Aug 3, 2015, at 6:58 PM, jpmendes <[hidden email]> wrote:
>
> Hi,
> Geetings from Portugal. This is my first post to this forum.
>
> Can anyone explain how the simple code that follows takes so long to compile
> (about half-an-hour).  
> In addition the OpenSCAD editor stays locked, and the only way to abort the
> compilation I found is to
> kill the Windows process.
>
> The code:
>
> /minkowski(){
>      difference(){
>         translate([0,0,20])cylinder(r=DCarrier/2+RSphere,h=1,center=true);
>        translate([0,0,20])cylinder(r=DCarrier/2,h=1+delta,center=true);
>      }
>      sphere(r=RSphere);
>   }/
>
> It would be nice to have the possibility to terminate the compilation at
> will, if we feel that something went wrong.  
>
> Kind regards.
>
>
>
> --
> View this message in context: http://forum.openscad.org/To-long-to-compile-How-can-we-abort-a-compilation-tp13432.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: To long to compile... How can we abort a compilation?

jpmendes
In reply to this post by MichaelAtOz
Thanks for your help. I want to thank also all the guys who posted useful suggestions. Yes the code I wrote was not very efficient, I was then starting with openSCAD. Now I'm a little more confident.
However when I wrote that I couldn't see the red button I meant the "F5" CSG tree compilation not the "F6" rendering. At CGAL rendering time the editor is not blocked.  So I still find useful to have a possibility to stop the GSG tree compilation at will. One example is, to try several types of code and to chose the one more efficient without having to wait lots of time. Also the editor should be independent of the compilation processes to maintain the responsiveness. I would like to have the possibility to be compiling one module and to be working on the code of another module simultaneously. The compilation could be done over an automatically generated backup copy of the actual file.
Yes I know I have to buy another PC, my dual core AMD 64 Athlon is now 10 years old. :)
Thanks allot.
Kind regards.

jpmendes

MichaelAtOz wrote
a. Like this (for F6 Render). That's Windows 7/64.


b.

With the variables I used, 25/3/0.01, Compile (F5) took 38s, the GUI did lock-up, that needs looking into. Usually it doesn't take long, and doesn't lock-up. Given minkowski is intense, perhaps it needs a event process or two in the loops??

Render (F6) was instant.

What size was causing your looong compile?
MichaelAtOz wrote
a. Like this (for F6 Render). That's Windows 7/64.


b.

With the variables I used, 25/3/0.01, Compile (F5) took 38s, the GUI did lock-up, that needs looking into. Usually it doesn't take long, and doesn't lock-up. Given minkowski is intense, perhaps it needs a event process or two in the loops??

Render (F6) was instant.

What size was causing your looong compile?