discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

No longer able to use STLs

G
guaranteed_interwoven
Fri, Apr 17, 2020 4:33 AM

I used to be able to import STLs and do unions with them, etc. (roughly 1
year ago on Debian 9)

I'm trying to import an STL and simply do a union with a cube.

The preview shows up fine, but when I render I don't see the STL.

I tried removing the union, no luck.

I tried moving the cube so it doesn't intersect with the STL, no luck.

I tried removing the union and moving the cube, no luck.

I tried three different but similar STLs, no luck.

Same issue every time.

I am using the version of OpenSCAD that ships with Debian 10 (2019.01) and I
also tried the app image version.

I tried all of the above debugging steps with both versions.

I tried swapping the union to a difference and I get:

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e_below != SHalfedge_handle() File:
/usr/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 427

and

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251

for older and newer versions respectively.

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

My STLs are all manifolds. There are no coincident faces. (Although this
really should not be an issue, as a 3d modeler I'm trying to match lines to
existing lines as best I can! I can offset by 0.1 if I really have to, but
that seems asinine)

I believe 2015.03 was the last version that worked for me, but unfortunately
there are no appimages for older releases.

How do I solve this issue? I have sunk so much time into learning OpenSCAD,
it's now useless for me. :(

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

I used to be able to import STLs and do unions with them, etc. (roughly 1 year ago on Debian 9) I'm trying to import an STL and simply do a union with a cube. The preview shows up fine, but when I render I don't see the STL. I tried removing the union, no luck. I tried moving the cube so it doesn't intersect with the STL, no luck. I tried removing the union and moving the cube, no luck. I tried three different but similar STLs, no luck. Same issue every time. I am using the version of OpenSCAD that ships with Debian 10 (2019.01) and I also tried the app image version. I tried all of the above debugging steps with both versions. I tried swapping the union to a difference and I get: ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e_below != SHalfedge_handle() File: /usr/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 427 and ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: pe_prev->is_border() || !internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate() File: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251 for older and newer versions respectively. Also seeing: Error !!!!!!!!!!!!!!!!!!!!!!! In the terminal. What sort of error message is that? My STLs are all manifolds. There are no coincident faces. (Although this really should not be an issue, as a 3d modeler I'm trying to match lines to existing lines as best I can! I can offset by 0.1 if I really have to, but that seems asinine) I believe 2015.03 was the last version that worked for me, but unfortunately there are no appimages for older releases. How do I solve this issue? I have sunk so much time into learning OpenSCAD, it's now useless for me. :( -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Fri, Apr 17, 2020 4:52 AM

guaranteed_interwoven wrote

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e_below != SHalfedge_handle() File:
/usr/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 427

and

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: pe_prev->is_border() ||
!internal::Plane_constructor
<Plane>
::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()
File: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251

for older and newer versions respectively.

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

My STLs are all manifolds. There are no coincident faces.

Those are CGAL errors, the tool used to render the geometry.
You get the error only when CGAL is called, so a import alone does not call
CGAL, but a union with a cube will.

Those error say CGAL is not happy with your STL, ie it is not valid.
e.g. assertion violation! Expr: e_below != SHalfedge_handle() is CGAL
checking the edge below is the same as the half edge.

Check for self-intersections.
If you share the STL I'll have a look at it.

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!
In the terminal. What sort of error message is that?

Could you post a screen capture, I've never seem anything like that.


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.

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

guaranteed_interwoven wrote > ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion > violation! Expr: e_below != SHalfedge_handle() File: > /usr/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 427 > > and > > ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion > violation! Expr: pe_prev->is_border() || > !internal::Plane_constructor > <Plane> > ::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate() > File: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h Line: 251 > > for older and newer versions respectively. > > Also seeing: > Error !!!!!!!!!!!!!!!!!!!!!!! > > In the terminal. What sort of error message is that? > > My STLs are all manifolds. There are no coincident faces. Those are CGAL errors, the tool used to render the geometry. You get the error only when CGAL is called, so a import alone does not call CGAL, but a union with a cube will. Those error say CGAL is not happy with your STL, ie it is not valid. e.g. assertion violation! Expr: e_below != SHalfedge_handle() is CGAL checking the edge below is the same as the half edge. Check for self-intersections. If you share the STL I'll have a look at it. > Also seeing: > Error !!!!!!!!!!!!!!!!!!!!!!! > In the terminal. What sort of error message is that? Could you post a screen capture, I've never seem anything like that. ----- 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. -- Sent from: http://forum.openscad.org/
A
arnholm@arnholm.org
Fri, Apr 17, 2020 10:19 AM

On 2020-04-17 06:33, guaranteed_interwoven wrote:

I used to be able to import STLs and do unions with them, etc. (roughly
1
year ago on Debian 9)

STL files are inherently troublesome and are not well suited for import
in other systems.

Try one of the available mesh repair tools such as e.g. MeshLab.

If you want more help you could make the offending STL available and I
can have a look at it using polyfix (part of AngelCAD).

Regards
Carsten Arnholm

On 2020-04-17 06:33, guaranteed_interwoven wrote: > I used to be able to import STLs and do unions with them, etc. (roughly > 1 > year ago on Debian 9) STL files are inherently troublesome and are not well suited for import in other systems. Try one of the available mesh repair tools such as e.g. MeshLab. If you want more help you could make the offending STL available and I can have a look at it using polyfix (part of AngelCAD). Regards Carsten Arnholm
TP
Torsten Paul
Fri, Apr 17, 2020 1:37 PM

On 17.04.20 06:33, guaranteed_interwoven wrote:

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

On 17.04.20 06:33, guaranteed_interwoven wrote: > Also seeing: > Error !!!!!!!!!!!!!!!!!!!!!!! > > In the terminal. What sort of error message is that? That you have to ask the CGAL people: https://github.com/CGAL/cgal/blob/master/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h#L75-L106 ciao, Torsten.
A
arnholm@arnholm.org
Fri, Apr 17, 2020 3:21 PM

On 2020-04-17 15:37, Torsten Paul wrote:

On 17.04.20 06:33, guaranteed_interwoven wrote:

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

Or you could read that code. It says the face normal is a null vector
after computing it with Newell's Method. It means there is a triangle in
the STL that is collapsed. Bad message, but that it what it means. That
can probably be fixed using one of the repair tools.

Carsten Arnholm

On 2020-04-17 15:37, Torsten Paul wrote: > On 17.04.20 06:33, guaranteed_interwoven wrote: >> Also seeing: >> Error !!!!!!!!!!!!!!!!!!!!!!! >> >> In the terminal. What sort of error message is that? > > That you have to ask the CGAL people: > > https://github.com/CGAL/cgal/blob/master/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h#L75-L106 Or you could read that code. It says the face normal is a null vector after computing it with Newell's Method. It means there is a triangle in the STL that is collapsed. Bad message, but that it what it means. That can probably be fixed using one of the repair tools. Carsten Arnholm
RW
Rogier Wolff
Fri, Apr 17, 2020 4:18 PM

On Fri, Apr 17, 2020 at 03:37:25PM +0200, Torsten Paul wrote:

On 17.04.20 06:33, guaranteed_interwoven wrote:

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

I've created a pull request.

https://github.com/CGAL/cgal/pull/4663

Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

On Fri, Apr 17, 2020 at 03:37:25PM +0200, Torsten Paul wrote: > On 17.04.20 06:33, guaranteed_interwoven wrote: > > Also seeing: > > Error !!!!!!!!!!!!!!!!!!!!!!! > > > > In the terminal. What sort of error message is that? > > That you have to ask the CGAL people: > > https://github.com/CGAL/cgal/blob/master/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h#L75-L106 I've created a pull request. https://github.com/CGAL/cgal/pull/4663 Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.
G
guaranteed_interwoven
Fri, Apr 17, 2020 9:28 PM

Thank you for the help! This is driving me nuts. I used to be able to do
this sort of thing with OpenSCAD all day long and never run into an issue.

floor.stl http://forum.openscad.org/file/t2594/floor.stl

union()
{
translate([0, 0, 6])
scale([0.9842519685, 0.9842519685, 1])
import("floor.stl");
cube([50, 50, 6]);
}

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

Thank you for the help! This is driving me nuts. I *used* to be able to do this sort of thing with OpenSCAD all day long and never run into an issue. floor.stl <http://forum.openscad.org/file/t2594/floor.stl> union() { translate([0, 0, 6]) scale([0.9842519685, 0.9842519685, 1]) import("floor.stl"); cube([50, 50, 6]); } -- Sent from: http://forum.openscad.org/
M
MichaelAtOz
Fri, Apr 17, 2020 10:42 PM

Self intersections, via NetFabb:
http://forum.openscad.org/file/t359/floor-si-Capture.jpg
Note also the thinner triangles to the left.
Unfortunately my Meshlab is crashing when I try anything with it...

Carsten?


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.

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

Self intersections, via NetFabb: <http://forum.openscad.org/file/t359/floor-si-Capture.jpg> Note also the thinner triangles to the left. Unfortunately my Meshlab is crashing when I try anything with it... Carsten? ----- 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. -- Sent from: http://forum.openscad.org/
NH
nop head
Fri, Apr 17, 2020 11:06 PM

I used to be able to do this sort of thing with OpenSCAD all day long

and never run into an issue.

I think you must have just been lucky. OpenSCAD has never accepted broken
STLs and doesn't accept some valid ones and even some it has
produced itself.

Perhaps import should always try passing the mesh to CGAL, catch the
exception and report it is a broken STL. That would stop the endless
reports of "I can import my STL and it looks fine but CGS ops fail."

On Fri, 17 Apr 2020 at 23:43, MichaelAtOz oz.at.michael@gmail.com wrote:

Self intersections, via NetFabb:
http://forum.openscad.org/file/t359/floor-si-Capture.jpg
Note also the thinner triangles to the left.
Unfortunately my Meshlab is crashing when I try anything with it...

Carsten?


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.

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

> I *used* to be able to do this sort of thing with OpenSCAD all day long and never run into an issue. I think you must have just been lucky. OpenSCAD has never accepted broken STLs and doesn't accept some valid ones and even some it has produced itself. Perhaps import should always try passing the mesh to CGAL, catch the exception and report it is a broken STL. That would stop the endless reports of "I can import my STL and it looks fine but CGS ops fail." On Fri, 17 Apr 2020 at 23:43, MichaelAtOz <oz.at.michael@gmail.com> wrote: > Self intersections, via NetFabb: > <http://forum.openscad.org/file/t359/floor-si-Capture.jpg> > Note also the thinner triangles to the left. > Unfortunately my Meshlab is crashing when I try anything with it... > > Carsten? > > > > ----- > 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. > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RW
Rogier Wolff
Sat, Apr 18, 2020 8:12 AM

On Fri, Apr 17, 2020 at 05:21:43PM +0200, arnholm@arnholm.org wrote:

On 2020-04-17 15:37, Torsten Paul wrote:

On 17.04.20 06:33, guaranteed_interwoven wrote:

Also seeing:
Error !!!!!!!!!!!!!!!!!!!!!!!

In the terminal. What sort of error message is that?

Or you could read that code. It says the face normal is a null
vector after computing it with Newell's Method. It means there is a
triangle in the STL that is collapsed. Bad message, but that it what
it means. That can probably be fixed using one of the repair tools.

So it is a zero area triangle. Hmm.

I went ahead and improved the error message. I created a pull request,
and I was told it was accepted. (I don't see it under the link above).

But I thought STLs had normal vectors inside them and that the vector
compared there was from the file. You're saying it is computed and
indicates a zero-surface-area triangle?

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

On Fri, Apr 17, 2020 at 05:21:43PM +0200, arnholm@arnholm.org wrote: > On 2020-04-17 15:37, Torsten Paul wrote: > >On 17.04.20 06:33, guaranteed_interwoven wrote: > >>Also seeing: > >>Error !!!!!!!!!!!!!!!!!!!!!!! > >> > >>In the terminal. What sort of error message is that? > > > >That you have to ask the CGAL people: > > > >https://github.com/CGAL/cgal/blob/master/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h#L75-L106 > > Or you could read that code. It says the face normal is a null > vector after computing it with Newell's Method. It means there is a > triangle in the STL that is collapsed. Bad message, but that it what > it means. That can probably be fixed using one of the repair tools. So it is a zero area triangle. Hmm. I went ahead and improved the error message. I created a pull request, and I was told it was accepted. (I don't see it under the link above). But I thought STLs had normal vectors inside them and that the vector compared there was from the file. You're saying it is computed and indicates a zero-surface-area triangle? Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.