OpenSCAD release candidate: 2020.12-RC2

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

OpenSCAD release candidate: 2020.12-RC2

tp3
So there's not much surprises for people who already
used the snapshot builds.

This activates the following 2 experimental features
for the release mode:

- function literals
- jump to code from 3d view

News post:
https://www.openscad.org/news.html#20201206

Download (Windows & Linux only for now):
https://www.openscad.org/downloads.html#rc

ciao,
  Torsten.

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

Re: OpenSCAD release candidate: 2020.12-RC2

jon_bondy
I have a vague recollection that OpenSCAD now will import OFF files, but
that does not seem to work.  Is my memory bad, or do I need to enable a
feature?  I do not get an error message: the imported OFF file is just
empty.

Thanks.

Jon

On 12/6/2020 6:39 PM, Torsten Paul wrote:

> So there's not much surprises for people who already
> used the snapshot builds.
>
> This activates the following 2 experimental features
> for the release mode:
>
> - function literals
> - jump to code from 3d view
>
> News post:
> https://www.openscad.org/news.html#20201206
>
> Download (Windows & Linux only for now):
> https://www.openscad.org/downloads.html#rc
>
> ciao,
>    Torsten.
>
> _______________________________________________
> 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
tp3
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD release candidate: 2020.12-RC2

tp3
On 07.12.20 01:12, jon wrote:
> I have a vague recollection that OpenSCAD now will
> import OFF files, but that does not seem to work.
> Is my memory bad, or do I need to enable a feature?
> I do not get an error message: the imported OFF file
> is just empty.

As far as I can tell, that's an ancient feature (it's
mentioned in the 2011.12 release notes) and it seems
to works with a couple of test files I grabbed from
http://www.holmes3d.net/graphics/offfiles/

ciao,
  Torsten.

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

Re: OpenSCAD release candidate: 2020.12-RC2

adrianv
In reply to this post by tp3
I confirmed that lazy union is supported by the RC.  

Seems like lazy union and the new undef handling ought to be mentioned as
pretty major changes on the news page.  


tp3 wrote

> So there's not much surprises for people who already
> used the snapshot builds.
>
> This activates the following 2 experimental features
> for the release mode:
>
> - function literals
> - jump to code from 3d view
>
> News post:
> https://www.openscad.org/news.html#20201206
>
> Download (Windows & Linux only for now):
> https://www.openscad.org/downloads.html#rc
>
> ciao,
>   Torsten.
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





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

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

Re: OpenSCAD release candidate: 2020.12-RC2

tp3
On 07.12.20 02:05, adrianv wrote:
> Seems like lazy union and the new undef handling ought
> to be mentioned as pretty major changes on the news page.

If lazy union can be enabled, that's a bug that needs
to be fixed before the release.

ciao,
  Torsten.

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

Re: OpenSCAD release candidate: 2020.12-RC2

adrianv
Not "can be enabled".  It just is enabled.  I didn't do anything to any
settings, and I did a union test and got a different result in the RC than
in 2019.05.


tp3 wrote

> On 07.12.20 02:05, adrianv wrote:
>> Seems like lazy union and the new undef handling ought
>> to be mentioned as pretty major changes on the news page.
>
> If lazy union can be enabled, that's a bug that needs
> to be fixed before the release.
>
> ciao,
>   Torsten.
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

jon_bondy
In reply to this post by tp3
I agree that OFF files work in some cases.  In one complex case, the STL
works, but the corresponding OFF does not.

Not sure how important this is

Jon


On 12/6/2020 7:18 PM, Torsten Paul wrote:

> On 07.12.20 01:12, jon wrote:
>> I have a vague recollection that OpenSCAD now will
>> import OFF files, but that does not seem to work.
>> Is my memory bad, or do I need to enable a feature?
>> I do not get an error message: the imported OFF file
>> is just empty.
> As far as I can tell, that's an ancient feature (it's
> mentioned in the 2011.12 release notes) and it seems
> to works with a couple of test files I grabbed from
> http://www.holmes3d.net/graphics/offfiles/
>
> ciao,
>    Torsten.
>
> _______________________________________________
> 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: OpenSCAD release candidate: 2020.12-RC2

adrianv
In reply to this post by jon_bondy
I also noticed that the news page says "generic tail recursion" is added.
What exactly does this do?  


jon_bondy wrote

> I have a vague recollection that OpenSCAD now will import OFF files, but
> that does not seem to work.  Is my memory bad, or do I need to enable a
> feature?  I do not get an error message: the imported OFF file is just
> empty.
>
> Thanks.
>
> Jon
>
> On 12/6/2020 6:39 PM, Torsten Paul wrote:
>> So there's not much surprises for people who already
>> used the snapshot builds.
>>
>> This activates the following 2 experimental features
>> for the release mode:
>>
>> - function literals
>> - jump to code from 3d view
>>
>> News post:
>> https://www.openscad.org/news.html#20201206
>>
>> Download (Windows & Linux only for now):
>> https://www.openscad.org/downloads.html#rc
>>
>> ciao,
>>    Torsten.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

thehans
Generic tail recursion was an improvement to the Tail Call Optimization (see also here) so that it applies to many more forms of function definitions than previously (for example using "let" was not an option before and now it is), which in general means faster recursion and less chance of stack overflow.

Unrelated to that change, but relevant to one of the complaints in the recent OpenSCAD Python discussion: 
On Thu, Nov 26, 2020 at 12:29 PM adrianv <[hidden email]> wrote: 
... 
Algorithms in the literature may be O(N*log(N)) but that
assumes you have actual data structures.  In OpenSCAD it may turn out to be
O(N^3) instead.  In many cases it just doesn't seem practical to implement
efficient algorithms.

I think it should also be mentioned that this release contains changes to make array concatenation complexity O(1) instead of O(n), which should be a major improvement (up to 10,000x has been seen in one extreme case) for many data-heavy algorithms/scripts.

Hans

On Sun, Dec 6, 2020 at 10:01 PM adrianv <[hidden email]> wrote:
I also noticed that the news page says "generic tail recursion" is added.
What exactly does this do? 


jon_bondy wrote
> I have a vague recollection that OpenSCAD now will import OFF files, but
> that does not seem to work.  Is my memory bad, or do I need to enable a
> feature?  I do not get an error message: the imported OFF file is just
> empty.
>
> Thanks.
>
> Jon
>
> On 12/6/2020 6:39 PM, Torsten Paul wrote:
>> So there's not much surprises for people who already
>> used the snapshot builds.
>>
>> This activates the following 2 experimental features
>> for the release mode:
>>
>> - function literals
>> - jump to code from 3d view
>>
>> News post:
>> https://www.openscad.org/news.html#20201206
>>
>> Download (Windows & Linux only for now):
>> https://www.openscad.org/downloads.html#rc
>>
>> ciao,
>>    Torsten.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>>

> Discuss@.openscad

>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
> _______________________________________________
> OpenSCAD mailing list

> Discuss@.openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.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
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD release candidate: 2020.12-RC2

softfoot
In reply to this post by tp3

Just upgraded to this and love it - the speed increase when rendering in
particular.

The multiple tabs are very useful too.

Would it be possible to have an option to force "single instance of program"
??  I often select 2 or 3 scad files and use "open with" and it would be
very useful if this resulted in a single program with the file open in
separate "tabs".

I use the Windoze 7 x64 variant.

Best regards,
Dave




--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

OpenSCAD mailing list-2
Is it possible in the world of Windows to install the RC alongside an earlier
version? I'm not usually an early adopter, but reading that there are tabs
involved has me on the edge.



--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

jon_bondy
I have the latest release and the latest snapshot both installed in
Windows without a problem: just put them in different folders under the
Program Files directory tree

Jon

On 12/7/2020 9:09 AM, fred_dot_u via Discuss wrote:

> Is it possible in the world of Windows to install the RC alongside an earlier
> version? I'm not usually an early adopter, but reading that there are tabs
> involved has me on the edge.
>
>
>
> --
> Sent from: http://forum.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
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD release candidate: 2020.12-RC2

nophead
In reply to this post by OpenSCAD mailing list-2
You can download the zip version. Unzip it anywhere you want and execute it from there.

On Mon, 7 Dec 2020 at 14:10, fred_dot_u via Discuss <[hidden email]> wrote:
Is it possible in the world of Windows to install the RC alongside an earlier
version? I'm not usually an early adopter, but reading that there are tabs
involved has me on the edge.



--
Sent from: http://forum.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
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD release candidate: 2020.12-RC2

OpenSCAD mailing list-2
thanks for the confidence boost. I'll have to give it a shot.



--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

RevarBat
In reply to this post by thehans
Yay for optimizations!  I have a couple questions, though:

- Is [each LIST1, each LIST2] optimized like concat()?
- Does the concat() optimization imply a speed improvement for complex list comprehensions with ‘if’s etc.?
- Is the concat() optimization now O(1) for both appending a single item, and for appending a long list?


-Revar


On Dec 7, 2020, at 1:58 AM, Hans L <[hidden email]> wrote:

Generic tail recursion was an improvement to the Tail Call Optimization (see also here) so that it applies to many more forms of function definitions than previously (for example using "let" was not an option before and now it is), which in general means faster recursion and less chance of stack overflow.

Unrelated to that change, but relevant to one of the complaints in the recent OpenSCAD Python discussion: 
On Thu, Nov 26, 2020 at 12:29 PM adrianv <[hidden email]> wrote: 
... 
Algorithms in the literature may be O(N*log(N)) but that
assumes you have actual data structures.  In OpenSCAD it may turn out to be
O(N^3) instead.  In many cases it just doesn't seem practical to implement
efficient algorithms.

I think it should also be mentioned that this release contains changes to make array concatenation complexity O(1) instead of O(n), which should be a major improvement (up to 10,000x has been seen in one extreme case) for many data-heavy algorithms/scripts.

Hans


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

Re: OpenSCAD release candidate: 2020.12-RC2

Troberg
In reply to this post by tp3
Just tested it with some complex projects, and so far, it seems very nice!

Assuming there are no showstoppers, when dare we hope for the real final
release?



--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

thehans
In reply to this post by RevarBat

On Mon, Dec 7, 2020 at 10:41 PM Revar Desmera <[hidden email]> wrote:
Yay for optimizations!  I have a couple questions, though:

- Is [each LIST1, each LIST2] optimized like concat()?

Yes, list-comprehension each is optimized in the same way as concat.

- Does the concat() optimization imply a speed improvement for complex list comprehensions with ‘if’s etc.?
- Is the concat() optimization now O(1) for both appending a single item, and for appending a long list?
  
If it uses concat or each, it should benefit from this optimization in all cases, regardless of how complex the overall expression is.

However, there is one caveat: the first "random access" (aka any use of subscript operator: vector[i] ) after any number of such concat/each operations, will force a "flattening" of the vector internally, which has a one-time cost of O(n) time.
Once flattened, subsequent random access reads will be O(1) as usual.

For more details about the implementation of this and how it came about, you can read the PR discussion starting with the last paragraph of the comment here: https://github.com/openscad/openscad/pull/3102#issuecomment-652579183
I've also tried to document the feature and data structure details in source code comments here: https://github.com/openscad/openscad/blob/6768ed7df36b83b277d0aec903c84c3078a5ac8a/src/value.h#L338-L360

More importantly, if you have any existing scripts which were slow from constructing large vectors, just try the new RC and see how it goes.  I think the majority of such cases will see significant improvements.

Cheers,
Hans

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

Re: OpenSCAD release candidate: 2020.12-RC2

Troberg
In reply to this post by tp3
Just noticed the informative syntax error messages. Saves me lots of time
when I do stupid mistakes!



--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

Troberg
In reply to this post by tp3
Just noticed a massive slowdown when rendering a complex model in preview. On
the previous version it's a 15-20 second render, in the RC, it's a five
minute render.

It's a too complicated design to easily nail down where the difference is,
but something isn't as it should be.



--
Sent from: http://forum.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: OpenSCAD release candidate: 2020.12-RC2

thehans
If you can't provide an example to reproduce it then there's not a lot of hope in fixing it.  

Before troubleshooting further, are you sure you didn't run out of RAM and hit swap space when the RC was run?  That could certainly cause such a slowdown.  
If you ran the previous release first(assuming it used a significant portion of your RAM) and left it open while testing the RC, I could see that possibly happening.

If that's not the cause, then I would recommend trying to single out which part(s) of the design are taking much longer on RC, by systematically using disable modifiers * and/or a root modifier ! on different places in the script.

To speed up the process, you can try reducing $fn (or increasing $fs and $fa) wherever used.
Also if there are loops of geometries involved, try reducing their loop count significantly.
If it's possible  to reduce overall complexity until the previous release takes say 1 second to preview, then if the RC is really still 15x-20x slower in this case,  at least you should only have to wait 15-20 seconds, not 5 minutes, in between trying out disable modifiers etc.

Hans



On Wed, Dec 9, 2020 at 1:48 AM Troberg <[hidden email]> wrote:
Just noticed a massive slowdown when rendering a complex model in preview. On
the previous version it's a 15-20 second render, in the RC, it's a five
minute render.

It's a too complicated design to easily nail down where the difference is,
but something isn't as it should be.



--
Sent from: http://forum.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
12