hull() of complex stl fails quietly.

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

hull() of complex stl fails quietly.

Ivo
translate([0,20,0]) import("PINSHRD_PTH_2X05B.stl");

hull()
  import("PINSHRD_PTH_2X05B.stl");

shows only one geometry...bugs.zip
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

kintel
Administrator
On 2013-06-17, at 14:35 , Ivo wrote:

> translate([0,20,0]) import("PINSHRD_PTH_2X05B.stl");
>
> hull()
>  import("PINSHRD_PTH_2X05B.stl");
>
> shows only one geometry… bugs.zip

It doesn't fail silently, it outputs an assertion error since there is something wrong with the STL.
In your posted file, you have a typo on the filename which causes it to instead show a file not found warning.

My guess is that your STL file isn't a valid solid, but consists of a bunch of intersecting objects.
Support for importing such files could be an extension of https://github.com/openscad/openscad/issues/350

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Ivo
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

Ivo
hull()
  import("_PINSHRD_PTH_2X05B.stl");

does not show me a file not found error in 2013.06.14

hull()
  import("PINSHRD_PTH_2X05B.stl");

does not show me an assert.

I'll check if the pins and the case are separate objects and see if i can figure out meshmaker to make one object.

Overall i'm pretty pleased with generating cases for electronics kits as described a few posts back.
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

kintel
Administrator
On 2013-06-17, at 16:51 , Ivo wrote:

> hull()
>  import("_PINSHRD_PTH_2X05B.stl");
>
> does not show me a file not found error in 2013.06.14

That's curious. It does show this for me:  WARNING: Can't open import file '"_PINSHRD_PTH_2X05B.stl"'.

>
> hull()
>  import("PINSHRD_PTH_2X05B.stl");
>
> does not show me an assert.
>
It shows this for me:
 CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: ../libraries/install/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 199


Are you sure you're not looking at cached message, which typically don't repeat themselves?
If so, Design->Flush Caches should bring them back.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

nophead
That seems like a bug to me. Would it be better to not cache modules with errors?


On 17 June 2013 22:05, Marius Kintel <[hidden email]> wrote:
On 2013-06-17, at 16:51 , Ivo wrote:

> hull()
>  import("_PINSHRD_PTH_2X05B.stl");
>
> does not show me a file not found error in 2013.06.14

That's curious. It does show this for me:  WARNING: Can't open import file '"_PINSHRD_PTH_2X05B.stl"'.

>
> hull()
>  import("PINSHRD_PTH_2X05B.stl");
>
> does not show me an assert.
>
It shows this for me:
 CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: ../libraries/install/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 199


Are you sure you're not looking at cached message, which typically don't repeat themselves?
If so, Design->Flush Caches should bring them back.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

kintel
Administrator

On 2013-06-17, at 17:13 , nop head wrote:

> That seems like a bug to me. Would it be better to not cache modules with errors?
>
We used to cache messages, but it broke during a large refactoring job and someone needs to reimplement it :/

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

nophead
Seems like it would be easier to just not cache a broken module so you get the error every time until you fix it.


On 17 June 2013 22:18, Marius Kintel <[hidden email]> wrote:

On 2013-06-17, at 17:13 , nop head wrote:

> That seems like a bug to me. Would it be better to not cache modules with errors?
>
We used to cache messages, but it broke during a large refactoring job and someone needs to reimplement it :/

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

kintel
Administrator
On 2013-06-17, at 17:25 , nop head wrote:

> Seems like it would be easier to just not cache a broken module so you get the error every time until you fix it.
>
..unless it breaks after 45 minutes of processing ..

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

nophead
But what use is the cached version if it is broken? You have to fix it and then wait 45 minutes to get a correct result.


On 17 June 2013 22:26, Marius Kintel <[hidden email]> wrote:
On 2013-06-17, at 17:25 , nop head wrote:

> Seems like it would be easier to just not cache a broken module so you get the error every time until you fix it.
>
..unless it breaks after 45 minutes of processing ..

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

kintel
Administrator
On 2013-06-17, at 17:41 , nop head wrote:

> But what use is the cached version if it is broken? You have to fix it and then wait 45 minutes to get a correct result.
>
The question is what constitutes "broken". The cache simply says that this particular expression results in an empty node, and if you don't change anything, it will still be empty. The fix is, as you initially suggested, to redisplay a message showing cause of this.

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Ivo
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

Ivo
In reply to this post by Ivo
Okay, scrap that. With nothing cached OpenSCAD reports :

CGAL error in CGAL_Build_Polyset: CGAL_ERROR: assertion violation!
...

And it warns about the typo in the input file if there is one.
Ivo
Reply | Threaded
Open this post in threaded view
|

Re: hull() of complex stl fails quietly.

Ivo
In reply to this post by kintel
kintel wrote
 The fix is, as you initially suggested, to redisplay a message showing cause of this.
So you would have a message : "Warning : cached set contains warnings. Flush the cache and re-compile to see where."

Storing and re-displaying the original warnings would be nice as well.