discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

bug with difference?

J
jon
Sat, Dec 3, 2016 8:25 PM

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

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
MK
Marius Kintel
Sat, Dec 3, 2016 8:43 PM

On Dec 3, 2016, at 15:25, jon jon@jonbondy.com 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

On Dec 3, 2016, at 15:25, jon <jon@jonbondy.com> 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
FV
Frank van der Hulst
Sat, Dec 3, 2016 9:05 PM

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 marius@kintel.net wrote:

On Dec 3, 2016, at 15:25, jon jon@jonbondy.com 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <marius@kintel.net> wrote: > On Dec 3, 2016, at 15:25, jon <jon@jonbondy.com> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
J
jon
Sat, Dec 3, 2016 9:54 PM

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 <marius@kintel.net
mailto:marius@kintel.net> wrote:

 On Dec 3, 2016, at 15:25, jon <jon@jonbondy.com
 <mailto:jon@jonbondy.com>> 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
 <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
 Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>

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

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

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 <marius@kintel.net > <mailto:marius@kintel.net>> wrote: > > On Dec 3, 2016, at 15:25, jon <jon@jonbondy.com > <mailto:jon@jonbondy.com>> 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 > <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 > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > No virus found in this message. > Checked by AVG - www.avg.com <http://www.avg.com> > Version: 2016.0.7924 / Virus Database: 4664/13527 - Release Date: 12/02/16 >
CA
Carsten Arnholm
Sat, Dec 3, 2016 11:09 PM

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

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
J
jon
Sun, Dec 4, 2016 3:41 AM

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 jon@jonbondy.com 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

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 <jon@jonbondy.com> 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 > >
J
jon
Sun, Dec 4, 2016 1:24 PM

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
Discuss@lists.openscad.org
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

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 > Discuss@lists.openscad.org > 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 > >
CA
Carsten Arnholm
Sun, Dec 4, 2016 6:56 PM

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

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
M
MichaelAtOz
Sun, Dec 4, 2016 9:01 PM

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.

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.
J
jon
Mon, Dec 5, 2016 12:18 AM

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
Discuss@lists.openscad.org
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

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 > Discuss@lists.openscad.org > 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