bug with difference?

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

bug with difference?

jon_bondy
I have tried to take a difference() between a cube and an imported STL,
and it works 2 out of 4 times (with 4 different STLs); the other 2
times, all I get is the cube.  The STLs in question are deemed manifold
and OK by netfabb Basic.  Is this a known problem?  Anythings I can try?

Thanks!

Jon


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

Re: bug with difference?

kintel
Administrator
On Dec 3, 2016, at 15:25, jon <[hidden email]> wrote:
>
> I have tried to take a difference() between a cube and an imported STL, and it works 2 out of 4 times (with 4 different STLs); the other 2 times, all I get is the cube.  The STLs in question are deemed manifold and OK by netfabb Basic.  Is this a known problem?  Anythings I can try?
>
This sounds very much like this:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F

We’re discussing way of fixing this in OpenSCAD in a few other threads on this mailing list :)

 -Marius


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

Re: bug with difference?

frankv
Also check the STLs with FreeCAD and MeshMixer... they find errors that NetFabb doesn't.


On Sun, Dec 4, 2016 at 9:43 AM, Marius Kintel <[hidden email]> wrote:
On Dec 3, 2016, at 15:25, jon <[hidden email]> wrote:
>
> I have tried to take a difference() between a cube and an imported STL, and it works 2 out of 4 times (with 4 different STLs); the other 2 times, all I get is the cube.  The STLs in question are deemed manifold and OK by netfabb Basic.  Is this a known problem?  Anythings I can try?
>
This sounds very much like this:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F

We’re discussing way of fixing this in OpenSCAD in a few other threads on this mailing list :)

 -Marius


_______________________________________________
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: bug with difference?

jon_bondy

Thanks.  Repeated fixing with various tools has not helped.

Jon


On 12/3/2016 4:05 PM, Frank van der Hulst wrote:
Also check the STLs with FreeCAD and MeshMixer... they find errors that NetFabb doesn't.


On Sun, Dec 4, 2016 at 9:43 AM, Marius Kintel <[hidden email]> wrote:
On Dec 3, 2016, at 15:25, jon <[hidden email]> wrote:
>
> I have tried to take a difference() between a cube and an imported STL, and it works 2 out of 4 times (with 4 different STLs); the other 2 times, all I get is the cube.  The STLs in question are deemed manifold and OK by netfabb Basic.  Is this a known problem?  Anythings I can try?
>
This sounds very much like this:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F

We’re discussing way of fixing this in OpenSCAD in a few other threads on this mailing list :)

 -Marius


_______________________________________________
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


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7924 / Virus Database: 4664/13527 - Release Date: 12/02/16



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

Re: bug with difference?

cacb
On 03. des. 2016 22:54, jon wrote:
> Thanks.  Repeated fixing with various tools has not helped.
>
> Jon

Do you have a link to your STL?

Carsten Arnholm


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

Re: bug with difference?

jon_bondy
In reply to this post by kintel
Turns out that both "problem" STLs appear just fine with F6, but they
still fail to work properly with difference().

Jon


On 12/3/2016 3:43 PM, Marius Kintel wrote:

> On Dec 3, 2016, at 15:25, jon <[hidden email]> wrote:
>> I have tried to take a difference() between a cube and an imported STL, and it works 2 out of 4 times (with 4 different STLs); the other 2 times, all I get is the cube.  The STLs in question are deemed manifold and OK by netfabb Basic.  Is this a known problem?  Anythings I can try?
>>
> This sounds very much like this:
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F
>
> We’re discussing way of fixing this in OpenSCAD in a few other threads on this mailing list :)
>
>   -Marius
>
>


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

Re: bug with difference?

jon_bondy
In reply to this post by cacb
http://www.jonbondy.com/ExampleSTL.ZIP

This is a reduced STL (MeshMixer), which still fails to difference()
from a cube with F6 but does with F5.

Jon


On 12/3/2016 6:09 PM, Carsten Arnholm wrote:

> On 03. des. 2016 22:54, jon wrote:
>> Thanks.  Repeated fixing with various tools has not helped.
>>
>> Jon
>
> Do you have a link to your STL?
>
> Carsten Arnholm
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7924 / Virus Database: 4664/13527 - Release Date:
> 12/02/16
>
>


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

Re: bug with difference?

cacb
The file you uploaded is not a ZIP file, but an uncompressed binary STL
file. I was able to read it after guessing that and converting it to
ascii STL using http://www.greentoken.de/onlineconv/ (I need to add
support for reading binary STL).

Below is the log of running it through my healer algorithm. This is the
largest example so far.... and it seems to work after selecting a
slightly higher than default coordinate tolerance (-dtol option)

At bottom you will find the link to the repaired STL .... notice the
download will expire 2 days from now.

Please let us know if you are able to perform the difference operation
after using this repaired version.

 >polyfix Example_jon.stl -dtol=0.075 -stl

Parameters:
         dtol = 0.075
   input_file = Example_jon.stl
          stl =

polyhedron 0, dtol=0.075, atol=1e-006, maxiter=50

iteration 0: vertices=513834 faces=171278
              warning: 1 zero area faces.
              warning: nonmanifold edges: uc(1)=513834
              merged 428869 vertices
              removed 1258 collapsed or zero area faces
              removed 69 duplicate faces
              removed 19 nonmanifold faces
              total changes=430215
              warning: nonmanifold edges: uc(1)=12 uc(3)=14 uc(4)=2

iteration 1: vertices=84965 faces=169932
              warning: nonmanifold edges: uc(1)=12 uc(3)=14 uc(4)=2
              removed 3 unused vertices
              merged 34 vertices
              removed 66 collapsed or zero area faces
              split 3 faces
              removed 7 duplicate faces
              removed 6 nonmanifold faces
              removed 6 zero area faces
              total changes=125
              warning: nonmanifold edges: uc(1)=2 uc(3)=2

iteration 2: vertices=84928 faces=169850
              warning: nonmanifold edges: uc(1)=2 uc(3)=2
              removed 1 unused vertex
              merged 5 vertices
              removed 10 collapsed or zero area faces
              total changes=16
              no warnings

iteration 3: vertices=84922 faces=169840
              total changes=0
              no warnings

Writing: Example_jon_polyfix.stl
              polyhedron 0: vertices=84922 faces=169840 : no warnings

... polyfix finished, time used: 0d 00h 00m 45s


Link to download the resulting Example_jon_polyfix.stl (compressed with
7Zip) below:

https://www.expirebox.com/download/9770d1ed0137913c97b71e25d9ef8327.html
Note the link will expire 2 days from now.

Carsten Arnholm


On 04. des. 2016 14:24, jon wrote:

> http://www.jonbondy.com/ExampleSTL.ZIP
>
> This is a reduced STL (MeshMixer), which still fails to difference()
> from a cube with F6 but does with F5.
>
> Jon
>
>
> On 12/3/2016 6:09 PM, Carsten Arnholm wrote:
>> On 03. des. 2016 22:54, jon wrote:
>>> Thanks.  Repeated fixing with various tools has not helped.
>>>
>>> Jon
>>
>> Do you have a link to your STL?
>>
>> Carsten Arnholm


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

Re: bug with difference? (Possibly NSFW)

MichaelAtOz
Administrator
In reply to this post by jon_bondy
jon_bondy wrote
Thanks.  Repeated fixing with various tools has not helped.
No offence, but you didn't look too hard.

Netfabb basic, when in repair (red cross) use  Repair/Detect_self-intersections.


Meshlab
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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: bug with difference? (Possibly NSFW)

jon_bondy
Michael:

Puzzling.  I now have about 5 variants of this STL (some with reduced
numbers of triangles, some repaired).  When I load any of them into
NetFabb Basic, it does not show up as needing repair. If I repair it
anyway (Automatic repair), I see a few stray bad lines, but the repaired
STL still fails in my program (that is, I can subtract it from a cube
using F5, but not using F6).  I can always see the STL if I just view it
with F6 (which is somewhat different than the reported bug).

I do not see a "Repair/Detect_self-intersections" facility. Under
Actions I see a Self-intersections panel.  If I click on Detect, it
finds something, but I cannot repair with the freebie version of the
software.

Jon

On 12/4/2016 4:01 PM, MichaelAtOz wrote:

> jon_bondy wrote
>> Thanks.  Repeated fixing with various tools has not helped.
> No offence, but you didn't look too hard.
>
> Netfabb basic, when in repair (red cross) use
> Repair/Detect_self-intersections.
> <http://forum.openscad.org/file/n19467/ExampleSTL_si.jpg>
>
> Meshlab
> <http://forum.openscad.org/file/n19467/ExampleSTL_ml.jpg>
>
>
>
> -----
> 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!
> --
> View this message in context: http://forum.openscad.org/bug-with-difference-tp19439p19467.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7924 / Virus Database: 4664/13535 - Release Date: 12/04/16


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

Re: bug with difference?

jon_bondy
In reply to this post by cacb
Carsten:

Your repaired STL works fine!  Thank you very much!

What language did you use to implement this tool?  Is this technology
available without having to pass STL files through you? I have one more
that is troublesome.

Jon

On 12/4/2016 1:56 PM, Carsten Arnholm wrote:

> The file you uploaded is not a ZIP file, but an uncompressed binary
> STL file. I was able to read it after guessing that and converting it
> to ascii STL using http://www.greentoken.de/onlineconv/ (I need to add
> support for reading binary STL).
>
> Below is the log of running it through my healer algorithm. This is
> the largest example so far.... and it seems to work after selecting a
> slightly higher than default coordinate tolerance (-dtol option)
>
> At bottom you will find the link to the repaired STL .... notice the
> download will expire 2 days from now.
>
> Please let us know if you are able to perform the difference operation
> after using this repaired version.
>
> >polyfix Example_jon.stl -dtol=0.075 -stl
>
> Parameters:
>         dtol = 0.075
>   input_file = Example_jon.stl
>          stl =
>
> polyhedron 0, dtol=0.075, atol=1e-006, maxiter=50
>
> iteration 0: vertices=513834 faces=171278
>              warning: 1 zero area faces.
>              warning: nonmanifold edges: uc(1)=513834
>              merged 428869 vertices
>              removed 1258 collapsed or zero area faces
>              removed 69 duplicate faces
>              removed 19 nonmanifold faces
>              total changes=430215
>              warning: nonmanifold edges: uc(1)=12 uc(3)=14 uc(4)=2
>
> iteration 1: vertices=84965 faces=169932
>              warning: nonmanifold edges: uc(1)=12 uc(3)=14 uc(4)=2
>              removed 3 unused vertices
>              merged 34 vertices
>              removed 66 collapsed or zero area faces
>              split 3 faces
>              removed 7 duplicate faces
>              removed 6 nonmanifold faces
>              removed 6 zero area faces
>              total changes=125
>              warning: nonmanifold edges: uc(1)=2 uc(3)=2
>
> iteration 2: vertices=84928 faces=169850
>              warning: nonmanifold edges: uc(1)=2 uc(3)=2
>              removed 1 unused vertex
>              merged 5 vertices
>              removed 10 collapsed or zero area faces
>              total changes=16
>              no warnings
>
> iteration 3: vertices=84922 faces=169840
>              total changes=0
>              no warnings
>
> Writing: Example_jon_polyfix.stl
>              polyhedron 0: vertices=84922 faces=169840 : no warnings
>
> ... polyfix finished, time used: 0d 00h 00m 45s
>
>
> Link to download the resulting Example_jon_polyfix.stl (compressed
> with 7Zip) below:
>
> https://www.expirebox.com/download/9770d1ed0137913c97b71e25d9ef8327.html
> Note the link will expire 2 days from now.
>
> Carsten Arnholm
>
>
> On 04. des. 2016 14:24, jon wrote:
>> http://www.jonbondy.com/ExampleSTL.ZIP
>>
>> This is a reduced STL (MeshMixer), which still fails to difference()
>> from a cube with F6 but does with F5.
>>
>> Jon
>>
>>
>> On 12/3/2016 6:09 PM, Carsten Arnholm wrote:
>>> On 03. des. 2016 22:54, jon wrote:
>>>> Thanks.  Repeated fixing with various tools has not helped.
>>>>
>>>> Jon
>>>
>>> Do you have a link to your STL?
>>>
>>> Carsten Arnholm
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7924 / Virus Database: 4664/13535 - Release Date:
> 12/04/16
>
>


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

Re: bug with difference? (Possibly NSFW)

MichaelAtOz
Administrator
In reply to this post by jon_bondy
jon_bondy wrote
it does not show up as needing repair.
I does not automatically check for self-intersections.
If I repair it anyway (Automatic repair), I see a few stray bad lines, but the repaired
STL still fails in my program
Bad lines = broken
 (that is, I can subtract it from a cube
using F5, but not using F6).  I can always see the STL if I just view it
with F6 (which is somewhat different than the reported bug).
F5 doesn't actually generate real geometry, so you wont get such problems with F5.
F6 will process the geometry if it needs to do union() difference() etc, so wont always get the error, but of you use such operations it gets the error because it is processing a broken STL.
I do not see a "Repair/Detect_self-intersections" facility. Under
Actions I see a Self-intersections panel.  If I click on Detect, it
finds something, but I cannot repair with the freebie version of the
software.
"Repair/Detect_self-intersections" is a menu.
If Netfabb doesn't fix it, it is almost certain OpenSCAD wont like it.

Trouble is garbage in - garbage out.

In Netfabb you also see black marks, these also are likely to be problems. Such as;

This is the one under the right armpit;


Did you create the STLs? They look like scans of a plaster model taken from a mould, I presume the arm/neck area are saw marks, where the scanner had problems. It is better to try to fix the source than repair something with missing information.
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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: bug with difference? (Possibly NSFW)

jon_bondy
I grabbed the original STL from Thingiverse.  No idea if it was
scanned.  I see no "Repair/Detect_self-intersections" in netfabb Basic
5.2 (and it claims that no updates are available).  I guess I need
better error detection-and-repair tools.  Carsten's tool seems to have
done a fine job!

Jon




_______________________________________________
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: bug with difference? (Possibly NSFW)

tp3
On 12/05/2016 02:17 AM, jon wrote:
> I grabbed the original STL from Thingiverse.  No idea if it was scanned.
> I see no "Repair/Detect_self-intersections" in netfabb Basic 5.2
> (and it claims that no updates are available).  I guess I need better
> error detection-and-repair tools.  Carsten's tool seems to have done a
> fine job!
>
Newer versions are a bit more confusing to get. No idea if
it's worth it. For some reason they dropped the support for
non-Windows platforms :(.

See "Guide: How to get the new, free Autodesk Netfabb Basic!"
https://www.youtube.com/watch?v=2QRvS9xdNzw

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: bug with difference? (Possibly NSFW)

jon_bondy
Torsten:

Thanks for the tip.  I am now using the correct/current Netfabb Basic!  
Now I understand Michael's otherwise cryptic comments about
self-intersection!

Jon


On 12/4/2016 8:24 PM, Torsten Paul wrote:

> On 12/05/2016 02:17 AM, jon wrote:
>> I grabbed the original STL from Thingiverse.  No idea if it was scanned.
>> I see no "Repair/Detect_self-intersections" in netfabb Basic 5.2
>> (and it claims that no updates are available).  I guess I need better
>> error detection-and-repair tools.  Carsten's tool seems to have done a
>> fine job!
>>
> Newer versions are a bit more confusing to get. No idea if
> it's worth it. For some reason they dropped the support for
> non-Windows platforms :(.
>
> See "Guide: How to get the new, free Autodesk Netfabb Basic!"
> https://www.youtube.com/watch?v=2QRvS9xdNzw
>
> ciao,
>    Torsten.
>
>


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

Re: bug with difference?

cacb
In reply to this post by jon_bondy
On 2016-12-05 01:36, jon wrote:
> Carsten:
>
> Your repaired STL works fine!  Thank you very much!

You are welcome. Thanks for the opportunity to test with our model.

> What language did you use to implement this tool?

It is written in ISO C++

> Is this technology
> available without having to pass STL files through you? I have one
> more that is troublesome.

Right now, no. I am considering some kind of free service for this but
this is very early days and more testing is required to confirm the
methods are sufficiently stable. To help this happen you (and others on
this list) may email me off list with links to models in need of repair.
Please do *not* send the files as attachments (I will not reply if you
do so), but instead provide links to your own site or alternatively a
free temporary file storage service like e.g. https://www.expirebox.com/ 
. I will then process and reply. No guarantees for success, but I will
try to solve solvable problems.

Carsten Arnholm

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

Re: bug with difference?

kintel
Administrator
Jon,

We’re also working on an open source implementation of such repair functionality. Some of that is collected in this work-in-progress issue: https://github.com/openscad/openscad/issues/1580

Any help is welcome, right now we mostly need dev resources and low-level test cases.

 -Marius


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

Re: bug with difference?

boelle
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by cacb
Carsten could you fix this one; http://www.filedropper.com/1xboxdoornetfabbmm

tried to send link as email but got an error that domain starts with dot
Reply | Threaded
Open this post in threaded view
|

Re: bug with difference?

cacb
In reply to this post by cacb
I just happened to see the following on the forum (Jan 03)

http://forum.openscad.org/bug-with-difference-tp19439p19889.html

Since it did not appear on the mailing list, I didn't see it until now,
sorry.

Here is the reply to the query
https://www.expirebox.com/download/af79793020a059ca5fa992d496de4b9c.html

(2 faces removed)

Carsten Arnholm



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

Re: bug with difference?

boelle
This post has NOT been accepted by the mailing list yet.
thanks

2017-01-15 19:38 GMT+01:00 cacb [via OpenSCAD] <[hidden email]>:
I just happened to see the following on the forum (Jan 03)

http://forum.openscad.org/bug-with-difference-tp19439p19889.html

Since it did not appear on the mailing list, I didn't see it until now,
sorry.

Here is the reply to the query
https://www.expirebox.com/download/af79793020a059ca5fa992d496de4b9c.html

(2 faces removed)

Carsten Arnholm



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



If you reply to this email, your message will be added to the discussion below:
http://forum.openscad.org/bug-with-difference-tp19439p20101.html
To unsubscribe from bug with difference?, click here.
NAML

12