discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Trying to emboss imported STL object using difference()

CA
Carsten Arnholm
Wed, Dec 30, 2020 8:47 PM

On 30.12.2020 20:01, donc wrote:

There must have been something wrong in the STL but I did a 3d print check
in Blender and it didn't find any non-manifold geometry. I went back and I
did get a console error but it had scrolled off the window. It was

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e_below != SHalfedge_handle() File:
/Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_3/SNC_FM_decorator.h
Line: 427

I will go ahead and post the STL if you want to take a look.
logo.stl http://forum.openscad.org/file/t3066/logo.stl

Here's your STL repaired using polyfix, it works with your OpenSCAD code
now.

polyhedron 0 ==== volume=4446.65, dtol=0.01, atol=1e-06, maxiter=10
iteration 0: vertices=5256 faces=1752
warning: 18 zero area faces.
warning: nonmanifold edges: uc(1)=5256
merged 4360 vertices
removed 18 collapsed or zero area faces
split 17 faces
total changes=4395
no warnings

iteration 1: vertices=896 faces=1752
total changes=0
no warnings

Summary:
polyhedron 0: vertices=896 faces=1752 : no warnings

Carsten Arnholm

On 30.12.2020 20:01, donc wrote: > There must have been something wrong in the STL but I did a 3d print check > in Blender and it didn't find any non-manifold geometry. I went back and I > did get a console error but it had scrolled off the window. It was > > ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion > violation! Expr: e_below != SHalfedge_handle() File: > /Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_3/SNC_FM_decorator.h > Line: 427 > > I will go ahead and post the STL if you want to take a look. > logo.stl <http://forum.openscad.org/file/t3066/logo.stl> > Here's your STL repaired using polyfix, it works with your OpenSCAD code now. polyhedron 0 ==== volume=4446.65, dtol=0.01, atol=1e-06, maxiter=10 iteration 0: vertices=5256 faces=1752 warning: 18 zero area faces. warning: nonmanifold edges: uc(1)=5256 merged 4360 vertices removed 18 collapsed or zero area faces split 17 faces total changes=4395 no warnings iteration 1: vertices=896 faces=1752 total changes=0 no warnings Summary: polyhedron 0: vertices=896 faces=1752 : no warnings Carsten Arnholm
M
MichaelAtOz
Wed, Dec 30, 2020 10:54 PM

Carsten's fixed STL does work even though it has self-intersections:

But when looking at CGAL ERRORs,

The real lid is a polygon base which I extruded and added screw holes to.

All in OpenSCAD.

You could also have a bad polygon, they can also lead to CGAL ERRORs.

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mis-ordered_faces

But as you are extruding it prob. not, always worth a look with F12.

Your STL had self-intersections:

(top)

(bottom)

-----Original Message-----

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of donc

Sent: Thu, 31 Dec 2020 06:01

Subject: Re: [OpenSCAD] Trying to emboss imported STL object using difference()

Wow! You had a very productive sleep.

This was a great idea. Soon as I started reading I thought it would work and

it did!

I was just trying to emboss the logo STL onto a standard cube for testing.

The real lid is a polygon base which I extruded and added screw holes to.

All in OpenSCAD.

There must have been something wrong in the STL but I did a 3d print check

in Blender and it didn't find any non-manifold geometry. I went back and I

did get a console error but it had scrolled off the window. It was

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion

violation! Expr: e_below != SHalfedge_handle() File:

/Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_3/SNC_FM_decorator.h

Line: 427

I will go ahead and post the STL if you want to take a look.

Anyway, I will add this projection trick to my mental OpenSCAD tool box.

BTW, I must say. I don't post often but I read a lot of computer forums and

you guys are the most helpful I have run across.

Thanks to everyone that answered.

Don

--


OpenSCAD mailing list

--
This email has been checked for viruses by AVG.
https://www.avg.com

Carsten's fixed STL does work even though it has self-intersections: But when looking at CGAL ERRORs, > The real lid is a polygon base which I extruded and added screw holes to. > All in OpenSCAD. You could also have a bad polygon, they can also lead to CGAL ERRORs. See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#Mis-ordered_faces But as you are extruding it prob. not, always worth a look with F12. Your STL had self-intersections: (top) (bottom) > -----Original Message----- > From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of donc > Sent: Thu, 31 Dec 2020 06:01 > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] Trying to emboss imported STL object using difference() > > Wow! You had a very productive sleep. > This was a great idea. Soon as I started reading I thought it would work and > it did! > > I was just trying to emboss the logo STL onto a standard cube for testing. > The real lid is a polygon base which I extruded and added screw holes to. > All in OpenSCAD. > > There must have been something wrong in the STL but I did a 3d print check > in Blender and it didn't find any non-manifold geometry. I went back and I > did get a console error but it had scrolled off the window. It was > > ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion > violation! Expr: e_below != SHalfedge_handle() File: > /Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_3/SNC_FM_decorator.h > Line: 427 > > I will go ahead and post the STL if you want to take a look. > logo.stl <http://forum.openscad.org/file/t3066/logo.stl> > > Anyway, I will add this projection trick to my mental OpenSCAD tool box. > > BTW, I must say. I don't post often but I read a lot of computer forums and > you guys are the most helpful I have run across. > > Thanks to everyone that answered. > > Don > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- This email has been checked for viruses by AVG. https://www.avg.com
D
donc
Thu, Dec 31, 2020 3:57 AM

I am not surprised that the logo STL had some issues. It was a PITA to create
and I had never done anything like that before.

I have never used polyfix. I will keep that in mind if I ever get another
suspect mesh.

I really like the projection, extrude method. That works like a champ since
this object has a uniform projection all along its height.

I went ahead and made that change in my program.

Thanks again.

Don

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

I am not surprised that the logo STL had some issues. It was a PITA to create and I had never done anything like that before. I have never used polyfix. I will keep that in mind if I ever get another suspect mesh. I really like the projection, extrude method. That works like a champ since this object has a uniform projection all along its height. I went ahead and made that change in my program. Thanks again. Don -- Sent from: http://forum.openscad.org/
L
lar3ry
Thu, Dec 31, 2020 6:51 AM

You might want to look at Inkscape for tracing logos to create 2D figures, as
they are directly importable into OpenSCAD.

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

You might want to look at Inkscape for tracing logos to create 2D figures, as they are directly importable into OpenSCAD. -- Sent from: http://forum.openscad.org/
CA
Carsten Arnholm
Thu, Dec 31, 2020 11:35 AM

On 30.12.2020 23:54, MichaelAtOz wrote:

Carsten's fixed STL does work even though it has self-intersections:

That's interesting. How does a triangle self-intersect?

Which software did you use to find/visualise self-intersections?

Carsten Arnholm

On 30.12.2020 23:54, MichaelAtOz wrote: > Carsten's fixed STL does work even though it has self-intersections: That's interesting. How does a triangle self-intersect? Which software did you use to find/visualise self-intersections? Carsten Arnholm
A
arnholm@arnholm.org
Thu, Dec 31, 2020 11:47 AM

On 2020-12-31 12:35, Carsten Arnholm wrote:

On 30.12.2020 23:54, MichaelAtOz wrote:

Carsten's fixed STL does work even though it has self-intersections:

That's interesting. How does a triangle self-intersect?

Ok, I realise now it probably means partially overlapping triangles. If
so the mesh is no good.

Carsten Arnholm

On 2020-12-31 12:35, Carsten Arnholm wrote: > On 30.12.2020 23:54, MichaelAtOz wrote: >> Carsten's fixed STL does work even though it has self-intersections: > > That's interesting. How does a triangle self-intersect? Ok, I realise now it probably means partially overlapping triangles. If so the mesh is no good. Carsten Arnholm
M
MichaelAtOz
Fri, Jan 1, 2021 5:04 AM

Carsten, I used NetFabb, this one doesn't show on the MeshLab select/self-intersections.

This is the back face of your repaired STL.

Note in the red flagged section, the vertical line in the middle of the pink looks wobbly.

Similarly in the blue flagged section, but needs zoom to see.

Here I deleted the triangles on each side, there is a yellow line remaining.

Given your repair deletes zero area triangles, I imagine it is a needle like sliver,

where small number floats make it potentially break the surface around it.

I did similar in MeshLab, it also shows an extraneous line.

The tools I have and/or my driving skills can't drill deeper.

-----Original Message-----

From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of arnholm@arnholm.org

Sent: Thu, 31 Dec 2020 22:48

To: OpenSCAD general discussion

Subject: Re: [OpenSCAD] Trying to emboss imported STL object using difference()

On 2020-12-31 12:35, Carsten Arnholm wrote:

On 30.12.2020 23:54, MichaelAtOz wrote:

Carsten's fixed STL does work even though it has self-intersections:

That's interesting. How does a triangle self-intersect?

Ok, I realise now it probably means partially overlapping triangles. If

so the mesh is no good.

Carsten Arnholm


OpenSCAD mailing list

--
This email has been checked for viruses by AVG.
https://www.avg.com

Carsten, I used NetFabb, this one doesn't show on the MeshLab select/self-intersections. This is the back face of your repaired STL. Note in the red flagged section, the vertical line in the middle of the pink looks wobbly. Similarly in the blue flagged section, but needs zoom to see. Here I deleted the triangles on each side, there is a yellow line remaining. Given your repair deletes zero area triangles, I imagine it is a needle like sliver, where small number floats make it potentially break the surface around it. I did similar in MeshLab, it also shows an extraneous line. The tools I have and/or my driving skills can't drill deeper. > -----Original Message----- > From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of arnholm@arnholm.org > Sent: Thu, 31 Dec 2020 22:48 > To: OpenSCAD general discussion > Subject: Re: [OpenSCAD] Trying to emboss imported STL object using difference() > > On 2020-12-31 12:35, Carsten Arnholm wrote: > > On 30.12.2020 23:54, MichaelAtOz wrote: > >> Carsten's fixed STL does work even though it has self-intersections: > > > > That's interesting. How does a triangle self-intersect? > > Ok, I realise now it probably means partially overlapping triangles. If > so the mesh is no good. > > Carsten Arnholm > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- This email has been checked for viruses by AVG. https://www.avg.com