Twisted Torus

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

Re: Twisted Torus

klusacek


>    > So if you wanted your model shown
>    > using F5 from the beginning you would just click on that red x icon to
>    stop
>    > F6 rendering and then press F5. An inconvenience, I know, but that's
>    nothing
>    > when compared to having to wait 20 minutes before it allows me to pres
>    F6,
>    > having whole machine unusable all that time.
>    
>    20 minutes is obviously an insane amount of time for a 'preview'.
>    Would it help in any way if rendering with OpenCSG would be cancelable?
>    What kind of API should it provide to support that?

Yes, but I doubt you can do anything once the program starts sending all the
triangles to the video card. The computer hangs because the GPU does not
accept any requests from the X server during that time. I tried that on
windows too, there only the openscad window stops responding and draws
nothing in F5 mode. Whereas X-server hangs but after very long time it
really displays the model.

I didn't study the sources so closely but I suspect that the reason for this
behaviour might be that all the triangles are sent to the card in a single GL
call.


David


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

Re: Twisted Torus

Florian Kirsch
> Yes, but I doubt you can do anything once the program starts sending all the
> triangles to the video card. The computer hangs because the GPU does not
> accept any requests from the X server during that time. I tried that on
> windows too, there only the openscad window stops responding and draws
> nothing in F5 mode. Whereas X-server hangs but after very long time it
> really displays the model.
>
> I didn't study the sources so closely but I suspect that the reason for this
> behaviour might be that all the triangles are sent to the card in a single GL
> call.
 
OpenCSG is a multipass approach and switches forth and back to different
render buffers. Hence I think that a way to cancel could make sense.
 
Florian
 

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

F5 performance

JordanBrown
In reply to this post by rew
On 12/3/2018 8:37 AM, Rogier Wolff wrote:
When your model is quite complex (or simple, but has an intersect-with-the-XY-plane), even F5/preview will be slow.

Really?  I haven't paid attention, but I haven't noticed anything special about the XY plane.

I generally set [0,0,0] in a model to be something that makes sense for that particular model, and is often not at the bottom of the model.  If there really is something magic about the XY plane, then maybe I always want to take whatever I'm working with and translate it up so that it is all in +Z.

(Not that very many of my models take very long to render.)


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

Re: Twisted Torus

klusacek
In reply to this post by nophead


I'm sending one of my problematic models in the attachment. I've tried it on
several recent computers, all of them having difficulty to render it using
F5 (it assumes my rotate_extrude() patch so the shape will render slightly
differently in your openscad but it should be comparably difficult model).

Thanks for pointing out the render() module, I didn't know about it. Never
the less I've already patched my copy of openscad to start in F6 and be
mode-sticky.

Regards,

-- DK


> It isn't normal for F5 to take longer than F6 to do booleans. Normally it
> is many orders of magnitude faster. Either there is something unusual about
> your model or your graphics card is very slow.
>
> Just wrap it it in render() if you always want it to use CGAL. Then F5 and
> F6 will do the same except F5 is not uninterruptible.
>
> On Mon, 3 Dec 2018 at 21:12, Florian Kirsch <[hidden email]> wrote:
>
> >
> > > I would of course like to use it that way. But my models tend to be so
> > > complex that F5 in the end lasts longer than F6 [...].
> >
> > > So if you wanted your model shown
> > > using F5 from the beginning you would just click on that red x icon to
> > stop
> > > F6 rendering and then press F5. An inconvenience, I know, but that's
> > nothing
> > > when compared to having to wait 20 minutes before it allows me to pres
> > F6,
> > > having whole machine unusable all that time.
> >
> > 20 minutes is obviously an insane amount of time for a 'preview'.
> > Would it help in any way if rendering with OpenCSG would be cancelable?
> > What kind of API should it provide to support that?
> >
> > Florian
> > _______________________________________________
> > 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


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

daves.scad (2K) Download Attachment
dklapka.scad (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Twisted Torus

klusacek
In reply to this post by Florian Kirsch

>    > I didn't study the sources so closely but I suspect that the reason for this
>    > behaviour might be that all the triangles are sent to the card in a single GL
>    > call.
>    
>    OpenCSG is a multipass approach and switches forth and back to different
>    render buffers. Hence I think that a way to cancel could make sense.

Then it should be easily interruptible.

David


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

Re: Twisted Torus

nophead
On my laptop I get this:

OpenSCAD 2018.11.29.ci630
http://www.openscad.org

Copyright (C) 2009-2018 The OpenSCAD Developers

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Loaded design 'C:/Users/ChrisP/Downloads/dklapka.scad'.

Used file cache size: 1 files

Compiling design (CSG Tree generation)...

Compiling design (CSG Products generation)...

ERROR: all points for rotate_extrude() must have the same X coordinate sign (range is -0.70 -> 60.00)

ERROR: all points for rotate_extrude() must have the same X coordinate sign (range is -0.66 -> 57.00)

ERROR: all points for rotate_extrude() must have the same X coordinate sign (range is -0.66 -> 57.00)

ERROR: all points for rotate_extrude() must have the same X coordinate sign (range is -4.00 -> 5.00)

ERROR: all points for rotate_extrude() must have the same X coordinate sign (range is -5.00 -> 4.00)

Geometries in cache: 92

Geometry cache size in bytes: 29842128

CGAL Polyhedrons in cache: 15

CGAL cache size in bytes: 32565088

Compiling design (CSG Products normalization)...

Compiling background (1 CSG Trees)...

Normalized CSG tree has 466 elements

Compile and preview finished.

Total rendering time: 0 hours, 0 minutes, 51 seconds

Parsing design (AST generation)...

Compiling design (CSG Tree generation)...

Rendering Polygon Mesh using CGAL...

Geometries in cache: 337

Geometry cache size in bytes: 47071496

CGAL Polyhedrons in cache: 129

CGAL cache size in bytes: 902469008

Total rendering time: 0 hours, 10 minutes, 45 seconds

Top level object is a 3D object:

Simple: no

Vertices: 12277

Halfedges: 61390

Edges: 30695

Halffacets: 36844

Facets: 18422

Volumes: 3

WARNING: Object may not be a valid 2-manifold and may need repair!

Rendering finished.


So F5 is 51s and F6 nearly 11 minutes. I.e. much longer than F5 as expected. However after F5 the GUI is very sluggish. The reason it is so slow is the unusually high values for $fn of 180, 360 and 720. Setting it to 32 make F5 three seconds and F6 33 seconds.

You could set $fn to a lower value for F5 using $ preview but for FDM style printing you don't need it set that high. Better to set $fs and $fa.

$fs = 0.25;
$fa = $preview ? 6 : 1;

Produces a responsive preview and a smooth render.

You also have very high values for convexity, 10, 20, 30 and 50. That has no effect on F6 but will slow down F5. The end result doesn't look like it has convexity in double figures.



On Tue, 4 Dec 2018 at 02:21, David Klusacek <[hidden email]> wrote:

>    > I didn't study the sources so closely but I suspect that the reason for this
>    > behaviour might be that all the triangles are sent to the card in a single GL
>    > call.
>     
>    OpenCSG is a multipass approach and switches forth and back to different
>    render buffers. Hence I think that a way to cancel could make sense.

Then it should be easily interruptible.

David


_______________________________________________
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: Twisted Torus

MichaelAtOz
Administrator
In reply to this post by klusacek
klusacek wrote
> By the way --- I suppose the main use of openscad is in 3D printing on
> RepRap style printers, isn't it?

You would be surprised on the wide use OpenSCAD get put to.
In addition to my Reprap style 3D printing, I use high quality printers via
eg Shapeways for functional parts and jewelry.
I make graphics for printed T-shirts.
Templates for woodwork etc.
Art.
Graphical documentation.
Design for solar thermal systems (that probably sounds more impressive than
reality)

Others do laser printing.
Very esoteric mathematical visualisations.

Everyone free to chime in with other uses.

> Why then the `Export to STL’-function is
> hidden in a submenu, even not having a keyboard shortcut? This is the last
> step and most if not all previous steps have their hot keys. So perhaps
> this
> one would deserve it too.

It does have the clickable icon tho.



-----
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!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
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!
Reply | Threaded
Open this post in threaded view
|

Re: Twisted Torus

MichaelAtOz
Administrator
MichaelAtOz wrote

> klusacek wrote
>> By the way --- I suppose the main use of openscad is in 3D printing on
>> RepRap style printers, isn't it?
>
> You would be surprised on the wide use OpenSCAD get put to.
> In addition to my Reprap style 3D printing, I use high quality printers
> via
> eg Shapeways for functional parts and jewelry.
> I make graphics for printed T-shirts.
> Templates for woodwork etc.
> Art.
> Graphical documentation.
> Design for solar thermal systems (that probably sounds more impressive
> than
> reality)
>
> Others do laser printing.
> Very esoteric mathematical visualisations.
>
> Everyone free to chime in with other uses.

And of course  Xmas Trees <https://www.thingiverse.com/thing:608303>  
One I prepared earlier
<http://forum.openscad.org/file/t359/decorated_tree.png>

Merry Christmas to those that celebrate it, from a balmy 38.4°C (101°F) Oz.



-----
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!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
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!
12