discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

damaged STL file?

RP
Ronaldo Persiano
Mon, Feb 26, 2018 12:07 AM

Revising the model with Simplify3d, I can see the holes in it only after
slicing. It seems that the distance between the front and back surfaces in
those areas is much smaller than the filament thread diameter and the
slicer ignore them. Also, there is no observable holes when the model is
loaded in Sketchup (I load it with a fair scale up). So, it seems that
there is no genus in the model but a very very thin wall in some areas.

2018-02-25 19:16 GMT-03:00 Ronaldo Persiano rcmpersiano@gmail.com:

I don't think Netfab or any other software will be able to repair the
"holes" in your stl because the file represents a watertight model (with
some degenerated triangles). In fact, the holes are model genus like in a
torus or in a perforated cube. To repair it manually is a very hard task
due to the high number of triangles. So, either you regenerate the model
increasing its thickness (in such a way the negative mask doesn't touch the
positive one), or give up using spiral vase.

Revising the model with Simplify3d, I can see the holes in it only after slicing. It seems that the distance between the front and back surfaces in those areas is much smaller than the filament thread diameter and the slicer ignore them. Also, there is no observable holes when the model is loaded in Sketchup (I load it with a fair scale up). So, it seems that there is no genus in the model but a very very thin wall in some areas. 2018-02-25 19:16 GMT-03:00 Ronaldo Persiano <rcmpersiano@gmail.com>: > I don't think Netfab or any other software will be able to repair the > "holes" in your stl because the file represents a watertight model (with > some degenerated triangles). In fact, the holes are model genus like in a > torus or in a perforated cube. To repair it manually is a very hard task > due to the high number of triangles. So, either you regenerate the model > increasing its thickness (in such a way the negative mask doesn't touch the > positive one), or give up using spiral vase. >
M
MichaelAtOz
Mon, Feb 26, 2018 12:56 AM

jon_bondy wrote

Interesting.  When I look at the STL using NetFabb as a viewer, I don't
see holes (which is why I was mystified). 

As Nophead said (his post was delayed, needing approval due to its size
BTW), NetFabb shows it has degenerate triangles. Unlike other issues, it
does not flag these with the big RED Cross.
You need to click on the Red Cross icon, make sure the check box is
selected, also press Update.

You see them as red lines:
http://forum.openscad.org/file/t359/jon_face_sample.jpg

These can generally be fixed (I've had ones it could not), via
Repair/Remove-Degenerated-Faces, I also do an auto repair after JIC.
Nopehead's post/email has the fixed STL attached.

BTW Jon, did you flatten the face to reduce overhangs?? Sorta looks that
way...


Admin - PM me if you need anything, or if I've done something stupid...

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/

jon_bondy wrote > Interesting.  When I look at the STL using NetFabb as a viewer, I don't > see holes (which is why I was mystified).  As Nophead said (his post was delayed, needing approval due to its size BTW), NetFabb shows it has degenerate triangles. Unlike other issues, it does not flag these with the big RED Cross. You need to click on the Red Cross icon, make sure the check box is selected, also press Update. You see them as red lines: <http://forum.openscad.org/file/t359/jon_face_sample.jpg> These can generally be fixed (I've had ones it could not), via Repair/Remove-Degenerated-Faces, I also do an auto repair after JIC. Nopehead's post/email has the fixed STL attached. BTW Jon, did you flatten the face to reduce overhangs?? Sorta looks that way... ----- Admin - PM me if you need anything, or if I've done something stupid... 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/
J
jon
Mon, Feb 26, 2018 2:32 AM

Carsten:

That certainly did fix the problem!  Your tool gets better and better!

Thanks!

Jon

On 2/25/2018 3:26 PM, Carsten Arnholm wrote:

On 25. feb. 2018 17:09, jon wrote:

This file will not slice properly. NetFabb says that it has no
defects, but even after repairing it, it will not slice properly. Can
any of you find a problem with it, and if so, with what tools?

http://www.jonbondy.com/sample.stl

Thanks!
Jon

Hi Jon,

Maybe this helps. I did a quick test and my utility found and fixed
some issues:

download link (2 day expiry)
https://www.expirebox.com/download/0bcbf69f4f408349b2b48b8605957954.html

More details in the log below

abm_polyfix -zip sample.stl

Parameters:
  input_file = sample.stl
         zip =

polyhedron 0 ================= volume=73528.4, dtol=0.01, atol=1e-06,
maxiter=10
iteration 0: vertices=249000 faces=83000
             warning: 7 zero area faces.
             warning: nonmanifold edges: uc(1)=249000
             merged 207669 vertices
             removed 343 collapsed or zero area faces
             split 1 face
             total changes=208013
             no warnings

iteration 1: vertices=41331 faces=82658
             merged 4 vertices
             removed 8 collapsed or zero area faces
             total changes=12
             no warnings

iteration 2: vertices=41327 faces=82650
             merged 2 vertices
             removed 4 collapsed or zero area faces
             total changes=6
             no warnings

iteration 3: vertices=41325 faces=82646
             total changes=0
             no warnings

Summary:
             polyhedron 0: vertices=41325 faces=82646 : no warnings

Writing: sample_polyfix.zip

... abm_polyfix finished, time used: 0d 00h 00m 05s

Regards
Carsten Arnholm


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

--
Sent from my desktop computer.
I do not receive emails while away from my desk,
nor do I receive texts on my main phone number
(which is a land line).
If you know that I am on the road, please text me.
If you know that I am home, please email me.

Carsten: That certainly did fix the problem!  Your tool gets better and better! Thanks! Jon On 2/25/2018 3:26 PM, Carsten Arnholm wrote: > On 25. feb. 2018 17:09, jon wrote: >> This file will not slice properly. NetFabb says that it has no >> defects, but even after repairing it, it will not slice properly. Can >> any of you find a problem with it, and if so, with what tools? >> >> http://www.jonbondy.com/sample.stl >> >> Thanks! >> Jon > > Hi Jon, > > Maybe this helps. I did a quick test and my utility found and fixed > some issues: > > download link (2 day expiry) > https://www.expirebox.com/download/0bcbf69f4f408349b2b48b8605957954.html > > More details in the log below > > abm_polyfix -zip sample.stl > > Parameters: >   input_file = sample.stl >          zip = > > polyhedron 0 ================= volume=73528.4, dtol=0.01, atol=1e-06, > maxiter=10 > iteration 0: vertices=249000 faces=83000 >              warning: 7 zero area faces. >              warning: nonmanifold edges: uc(1)=249000 >              merged 207669 vertices >              removed 343 collapsed or zero area faces >              split 1 face >              total changes=208013 >              no warnings > > iteration 1: vertices=41331 faces=82658 >              merged 4 vertices >              removed 8 collapsed or zero area faces >              total changes=12 >              no warnings > > iteration 2: vertices=41327 faces=82650 >              merged 2 vertices >              removed 4 collapsed or zero area faces >              total changes=6 >              no warnings > > iteration 3: vertices=41325 faces=82646 >              total changes=0 >              no warnings > > Summary: >              polyhedron 0: vertices=41325 faces=82646 : no warnings > > Writing: sample_polyfix.zip > > ... abm_polyfix finished, time used: 0d 00h 00m 05s > > > Regards > Carsten Arnholm > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Sent from my desktop computer. I do not receive emails while away from my desk, nor do I receive texts on my main phone number (which is a land line). If you know that I am on the road, please text me. If you know that I am home, please email me.
G
Gadgetmind
Mon, Feb 26, 2018 9:31 AM

On 25/02/18 20:26, Carsten Arnholm wrote:

Maybe this helps. I did a quick test and my utility found and fixed
some issues:

I guess I'm been asleep, which utility?

On 25/02/18 20:26, Carsten Arnholm wrote: > > Maybe this helps. I did a quick test and my utility found and fixed > some issues: I guess I'm been asleep, which utility?
A
arnholm@arnholm.org
Mon, Feb 26, 2018 10:36 AM

On 2018-02-26 10:31, Gadgetmind wrote:

On 25/02/18 20:26, Carsten Arnholm wrote:

Maybe this helps. I did a quick test and my utility found and fixed
some issues:

I guess I'm been asleep, which utility?

It is a C++ utility I wrote (working name "abm_polyfix") for analyzing
and repairing polyhedra, reading from STL or AMF. It eliminates/merges
close vertices, eliminates zero area faces of various kinds, plus fixes
some non-manifold issues by splitting faces, etc.

Carsten Arnholm

On 2018-02-26 10:31, Gadgetmind wrote: > On 25/02/18 20:26, Carsten Arnholm wrote: > >> Maybe this helps. I did a quick test and my utility found and fixed >> some issues: > > I guess I'm been asleep, which utility? It is a C++ utility I wrote (working name "abm_polyfix") for analyzing and repairing polyhedra, reading from STL or AMF. It eliminates/merges close vertices, eliminates zero area faces of various kinds, plus fixes some non-manifold issues by splitting faces, etc. Carsten Arnholm
G
Gadgetmind
Mon, Feb 26, 2018 10:51 AM

On 26/02/18 10:36, arnholm@arnholm.org wrote:

It is a C++ utility I wrote (working name "abm_polyfix") for analyzing
and repairing polyhedra, reading from STL or AMF. It eliminates/merges
close vertices, eliminates zero area faces of various kinds, plus
fixes some non-manifold issues by splitting faces, etc.

Cool. Is it available for others to try? Linux friendly?

On 26/02/18 10:36, arnholm@arnholm.org wrote: > It is a C++ utility I wrote (working name "abm_polyfix") for analyzing > and repairing polyhedra, reading from STL or AMF. It eliminates/merges > close vertices, eliminates zero area faces of various kinds, plus > fixes some non-manifold issues by splitting faces, etc. Cool. Is it available for others to try? Linux friendly?
A
arnholm@arnholm.org
Mon, Feb 26, 2018 3:41 PM

On 2018-02-26 11:51, Gadgetmind wrote:

On 26/02/18 10:36, arnholm@arnholm.org wrote:

It is a C++ utility I wrote (working name "abm_polyfix") for
analyzing and repairing polyhedra, reading from STL or AMF. It
eliminates/merges close vertices, eliminates zero area faces of
various kinds, plus fixes some non-manifold issues by splitting
faces, etc.

Cool. Is it available for others to try? Linux friendly?

The idea is to eventually provide a web service with this + more. This
is ongoing, if delayed. "abm_polyfix" runs on Windows and Linux like
everything I do.

In general I think the thread illustrates the somewhat fuzzy nature of
repairing problematic polyhedra in general and STL files in particular
(STLs do not provide any topology, it must be guessed). Several repair
tools exist but they appear to make different assumptions leading to
different results.

Carsten Arnholm

On 2018-02-26 11:51, Gadgetmind wrote: > On 26/02/18 10:36, arnholm@arnholm.org wrote: > >> It is a C++ utility I wrote (working name "abm_polyfix") for >> analyzing and repairing polyhedra, reading from STL or AMF. It >> eliminates/merges close vertices, eliminates zero area faces of >> various kinds, plus fixes some non-manifold issues by splitting >> faces, etc. > > Cool. Is it available for others to try? Linux friendly? The idea is to eventually provide a web service with this + more. This is ongoing, if delayed. "abm_polyfix" runs on Windows and Linux like everything I do. In general I think the thread illustrates the somewhat fuzzy nature of repairing problematic polyhedra in general and STL files in particular (STLs do not provide any topology, it must be guessed). Several repair tools exist but they appear to make different assumptions leading to different results. Carsten Arnholm
JB
Jordan Brown
Mon, Feb 26, 2018 5:35 PM

On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote:

In general I think the thread illustrates the somewhat fuzzy nature of
repairing problematic polyhedra in general and STL files in particular
(STLs do not provide any topology, it must be guessed). Several repair
tools exist but they appear to make different assumptions leading to
different results.

Are there other file formats that would be better?  Getting designers
like OpenSCAD and slicers to both implement something new would be
tough, but if there are clear benefits maybe it could be done.

On 2/26/2018 7:41 AM, arnholm@arnholm.org wrote: > In general I think the thread illustrates the somewhat fuzzy nature of > repairing problematic polyhedra in general and STL files in particular > (STLs do not provide any topology, it must be guessed). Several repair > tools exist but they appear to make different assumptions leading to > different results. Are there other file formats that would be better?  Getting designers like OpenSCAD and slicers to *both* implement something new would be tough, but if there are clear benefits maybe it could be done.
CA
Carsten Arnholm
Mon, Feb 26, 2018 7:44 PM

On 26. feb. 2018 18:35, Jordan Brown wrote:

Are there other file formats that would be better?  Getting designers
like OpenSCAD and slicers to both implement something new would be
tough, but if there are clear benefits maybe it could be done.

Yes, there are better formats (see below), but STL seems so entrenched
that it is very hard to get wide enough support for anything else. Some
requirements to a non-STL format I guess would be

  1. Suited for polyhedron exchange between CAD applications, not just CAD
    to slicers.

  2. Unambiguous format, with explicit topology

  3. Efficient binary storage, plus equivalent ascii text version with
    same info. Binary/Ascii should be transparent to users.

  4. It must be very simple.

etc.

OpenSCAD already support other 3D formats in addition to STL

OFF - http://paulbourke.net/dataformats/off/
AMF - https://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format

Both of the above satisfy 1) and 2). AMF in its simplest form is quite
nice, but not terribly efficient, plus in my opinion it forgets 4) so it
will never become universal. OFF is a nice contender, but it does not
seem to be simple enough to be popular.

STL is both wasteful and ambiguous, it is just a sea of free floating
triangles. The binary format does not contain the same info as the text
format, etc. Its popularity is due to history only.

It seems to me super simplicity is a key. So any alternative format
should be even simpler than STL. Given that existing alternatives are
not very popular, we might as well propose something new to compete,
making simplicity the key feature while fixing some of the STL issues.
In my mind it could be something like

  • simple file header to identify ASCII/Binary
  • vertex coordinates stored only once
  • triangle faces only
  • faces defined by references to vertices, implicit normals

In other words, just the bare minimum, equivalent to the info that goes
into OpenSCAD polyhedron command. The text format would be more compact
than STL and simpler to read. The binary format would also be more
compact than STL since coordinates would be mentioned only once, and
therefore also not have any issues with interpretation.

You could say it is far too simple. But if you want it to be widely
adopted it must be extremely simple and fast. We could call it STL2 and
say it is how STL should have been defined in 1985 or so :-)

I don't have any illusions it would be successful, but if it was adopted
I think it would be helpful in avoiding some of the "damaged STL" issues
(not all) and enable easier sharing of models between various applications.

Just my thoughts, nothing else.

Carsten Arnholm

On 26. feb. 2018 18:35, Jordan Brown wrote: > Are there other file formats that would be better?  Getting designers > like OpenSCAD and slicers to *both* implement something new would be > tough, but if there are clear benefits maybe it could be done. Yes, there are better formats (see below), but STL seems so entrenched that it is very hard to get wide enough support for anything else. Some requirements to a non-STL format I guess would be 1) Suited for polyhedron exchange between CAD applications, not just CAD to slicers. 2) Unambiguous format, with explicit topology 3) Efficient binary storage, plus equivalent ascii text version with same info. Binary/Ascii should be transparent to users. 4) It must be *very* simple. etc. OpenSCAD already support other 3D formats in addition to STL OFF - http://paulbourke.net/dataformats/off/ AMF - https://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format Both of the above satisfy 1) and 2). AMF in its simplest form is quite nice, but not terribly efficient, plus in my opinion it forgets 4) so it will never become universal. OFF is a nice contender, but it does not seem to be simple enough to be popular. STL is both wasteful and ambiguous, it is just a sea of free floating triangles. The binary format does not contain the same info as the text format, etc. Its popularity is due to history only. It seems to me super simplicity is a key. So any alternative format should be even simpler than STL. Given that existing alternatives are not very popular, we might as well propose something new to compete, making simplicity the key feature while fixing some of the STL issues. In my mind it could be something like * simple file header to identify ASCII/Binary * vertex coordinates stored only once * triangle faces only * faces defined by references to vertices, implicit normals In other words, just the bare minimum, equivalent to the info that goes into OpenSCAD polyhedron command. The text format would be more compact than STL and simpler to read. The binary format would also be more compact than STL since coordinates would be mentioned only once, and therefore also not have any issues with interpretation. You could say it is far too simple. But if you want it to be widely adopted it must be extremely simple and fast. We could call it STL2 and say it is how STL should have been defined in 1985 or so :-) I don't have any illusions it would be successful, but if it was adopted I think it would be helpful in avoiding some of the "damaged STL" issues (not all) and enable easier sharing of models between various applications. Just my thoughts, nothing else. Carsten Arnholm
NH
nop head
Mon, Feb 26, 2018 8:00 PM

STL is unambiguous if it is written correctly and only used to represent a
manifold model with no self intersections. That is sufficient for 3D
printing as all 3D printed objects are manifold.

While other representations can also represent non-manifold objects it
pushes the problem downstream. How do you print a non-manifold object?

On 26 February 2018 at 19:44, Carsten Arnholm arnholm@arnholm.org wrote:

On 26. feb. 2018 18:35, Jordan Brown wrote:

Are there other file formats that would be better?  Getting designers
like OpenSCAD and slicers to both implement something new would be tough,
but if there are clear benefits maybe it could be done.

Yes, there are better formats (see below), but STL seems so entrenched
that it is very hard to get wide enough support for anything else. Some
requirements to a non-STL format I guess would be

  1. Suited for polyhedron exchange between CAD applications, not just CAD
    to slicers.

  2. Unambiguous format, with explicit topology

  3. Efficient binary storage, plus equivalent ascii text version with same
    info. Binary/Ascii should be transparent to users.

  4. It must be very simple.

etc.

OpenSCAD already support other 3D formats in addition to STL

OFF - http://paulbourke.net/dataformats/off/
AMF - https://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format

Both of the above satisfy 1) and 2). AMF in its simplest form is quite
nice, but not terribly efficient, plus in my opinion it forgets 4) so it
will never become universal. OFF is a nice contender, but it does not seem
to be simple enough to be popular.

STL is both wasteful and ambiguous, it is just a sea of free floating
triangles. The binary format does not contain the same info as the text
format, etc. Its popularity is due to history only.

It seems to me super simplicity is a key. So any alternative format should
be even simpler than STL. Given that existing alternatives are not very
popular, we might as well propose something new to compete, making
simplicity the key feature while fixing some of the STL issues. In my mind
it could be something like

  • simple file header to identify ASCII/Binary
  • vertex coordinates stored only once
  • triangle faces only
  • faces defined by references to vertices, implicit normals

In other words, just the bare minimum, equivalent to the info that goes
into OpenSCAD polyhedron command. The text format would be more compact
than STL and simpler to read. The binary format would also be more compact
than STL since coordinates would be mentioned only once, and therefore also
not have any issues with interpretation.

You could say it is far too simple. But if you want it to be widely
adopted it must be extremely simple and fast. We could call it STL2 and say
it is how STL should have been defined in 1985 or so :-)

I don't have any illusions it would be successful, but if it was adopted I
think it would be helpful in avoiding some of the "damaged STL" issues (not
all) and enable easier sharing of models between various applications.

Just my thoughts, nothing else.

Carsten Arnholm


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

STL is unambiguous if it is written correctly and only used to represent a manifold model with no self intersections. That is sufficient for 3D printing as all 3D printed objects are manifold. While other representations can also represent non-manifold objects it pushes the problem downstream. How do you print a non-manifold object? On 26 February 2018 at 19:44, Carsten Arnholm <arnholm@arnholm.org> wrote: > On 26. feb. 2018 18:35, Jordan Brown wrote: > >> Are there other file formats that would be better? Getting designers >> like OpenSCAD and slicers to *both* implement something new would be tough, >> but if there are clear benefits maybe it could be done. >> > > Yes, there are better formats (see below), but STL seems so entrenched > that it is very hard to get wide enough support for anything else. Some > requirements to a non-STL format I guess would be > > 1) Suited for polyhedron exchange between CAD applications, not just CAD > to slicers. > > 2) Unambiguous format, with explicit topology > > 3) Efficient binary storage, plus equivalent ascii text version with same > info. Binary/Ascii should be transparent to users. > > 4) It must be *very* simple. > > etc. > > OpenSCAD already support other 3D formats in addition to STL > > OFF - http://paulbourke.net/dataformats/off/ > AMF - https://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format > > Both of the above satisfy 1) and 2). AMF in its simplest form is quite > nice, but not terribly efficient, plus in my opinion it forgets 4) so it > will never become universal. OFF is a nice contender, but it does not seem > to be simple enough to be popular. > > STL is both wasteful and ambiguous, it is just a sea of free floating > triangles. The binary format does not contain the same info as the text > format, etc. Its popularity is due to history only. > > It seems to me super simplicity is a key. So any alternative format should > be even simpler than STL. Given that existing alternatives are not very > popular, we might as well propose something new to compete, making > simplicity the key feature while fixing some of the STL issues. In my mind > it could be something like > > * simple file header to identify ASCII/Binary > * vertex coordinates stored only once > * triangle faces only > * faces defined by references to vertices, implicit normals > > In other words, just the bare minimum, equivalent to the info that goes > into OpenSCAD polyhedron command. The text format would be more compact > than STL and simpler to read. The binary format would also be more compact > than STL since coordinates would be mentioned only once, and therefore also > not have any issues with interpretation. > > You could say it is far too simple. But if you want it to be widely > adopted it must be extremely simple and fast. We could call it STL2 and say > it is how STL should have been defined in 1985 or so :-) > > I don't have any illusions it would be successful, but if it was adopted I > think it would be helpful in avoiding some of the "damaged STL" issues (not > all) and enable easier sharing of models between various applications. > > Just my thoughts, nothing else. > > > Carsten Arnholm > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >