My Asp exports as manifold, but the polyhedron breaks with Union.

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

My Asp exports as manifold, but the polyhedron breaks with Union.

SarahC
I've been reading about manifold shapes, and welds, and such, and was able to
build 35 Elite ships that export without incident.

I've got 3 - the Asp here is one of them, and I can't get it to survive
being unioned with a cube. It becomes non-manifold.

I've checked with the "Thrown together" view for incorrect windings, and
there is none.

I've also checked that there's no polygons meeting midway along a long
edge... they all meet at vertices.

So as of this point, I've run out of things to check or try - if anyone
could confirm the shapes correct I can stop trying to fix it!

Many thanks!


//-----------------------------------------
polyhedron(

points=[
[115, -10, 15], // 0
[50, -10, 97], // 1
[90, 16, 27], // 2
[-50, -10, 97], // 3
[-115, -10, 15], // 4
[-90, 16, 27], // 5
[65, -10, -103], // 6
[98, -30, 37], // 7
[-98, -30, 37], // 8
[-65, -10, -103], // 9
[0, 30, -11], // 10
[0, 20, -103], // 11
[18, -10, -103] // 12
],
faces=[
[7,0,6], // a
[8,3,1,7], // b
[7,6,9,8], // c
[6,2,10], // d
[5,9,10], // e
[11,6,10], // f
[11,10,9], // g
[2,1,3,5,10], // h
[6,11,9,12], // i
[9,5,4], // j
[8,9,4], // k
[3,8,4], // l
[4,5,3], // m
[1,2,0], // n
[0,7,1], // o
[0,2,6] // p
]
);


translate([0,10,50]) cube(30, center=true);



--
Sent from: http://forum.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: My Asp exports as manifold, but the polyhedron breaks with Union.

MichaelAtOz
Administrator

 

That is the problem, can't have a vertex in the middle of an edge.

 

> -----Original Message-----

> From: Discuss [mailto:[hidden email]] On Behalf Of SarahC

> Sent: Sun, 8 Sep 2019 13:11

> To: [hidden email]

> Subject: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

>

> I've been reading about manifold shapes, and welds, and such, and was able to

> build 35 Elite ships that export without incident.

>

> I've got 3 - the Asp here is one of them, and I can't get it to survive

> being unioned with a cube. It becomes non-manifold.

>

> I've checked with the "Thrown together" view for incorrect windings, and

> there is none.

>

> I've also checked that there's no polygons meeting midway along a long

> edge... they all meet at vertices.

>

> So as of this point, I've run out of things to check or try - if anyone

> could confirm the shapes correct I can stop trying to fix it!

>

> Many thanks!

>

>

> //-----------------------------------------

> polyhedron(

>

> points=[

> [115, -10, 15], // 0

> [50, -10, 97], // 1

> [90, 16, 27], // 2

> [-50, -10, 97], // 3

> [-115, -10, 15], // 4

> [-90, 16, 27], // 5

> [65, -10, -103], // 6

> [98, -30, 37], // 7

> [-98, -30, 37], // 8

> [-65, -10, -103], // 9

> [0, 30, -11], // 10

> [0, 20, -103], // 11

> [18, -10, -103] // 12

> ],

> faces=[

> [7,0,6], // a

> [8,3,1,7], // b

> [7,6,9,8], // c

> [6,2,10], // d

> [5,9,10], // e

> [11,6,10], // f

> [11,10,9], // g

> [2,1,3,5,10], // h

> [6,11,9,12], // i

> [9,5,4], // j

> [8,9,4], // k

> [3,8,4], // l

> [4,5,3], // m

> [1,2,0], // n

> [0,7,1], // o

> [0,2,6] // p

> ]

> );

>

>

> translate([0,10,50]) cube(30, center=true);

>

>

>

> --

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

>

> _______________________________________________

> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


Virus-free. www.avg.com

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
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: My Asp exports as manifold, but the polyhedron breaks with Union.

SarahC
How did I miss that?

Thank you so much! You are wonderful.

I hope this reply works - I'm replying to the email I received from the message board, and I hope it ends up on the OpenSCAD forum pages.

On Sun, 8 Sep 2019 at 04:24, OzAtMichael <[hidden email]> wrote:

 

That is the problem, can't have a vertex in the middle of an edge.

 

> -----Original Message-----

> From: Discuss [mailto:[hidden email]] On Behalf Of SarahC

> Sent: Sun, 8 Sep 2019 13:11

> To: [hidden email]

> Subject: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

>

> I've been reading about manifold shapes, and welds, and such, and was able to

> build 35 Elite ships that export without incident.

>

> I've got 3 - the Asp here is one of them, and I can't get it to survive

> being unioned with a cube. It becomes non-manifold.

>

> I've checked with the "Thrown together" view for incorrect windings, and

> there is none.

>

> I've also checked that there's no polygons meeting midway along a long

> edge... they all meet at vertices.

>

> So as of this point, I've run out of things to check or try - if anyone

> could confirm the shapes correct I can stop trying to fix it!

>

> Many thanks!

>

>

> //-----------------------------------------

> polyhedron(

>

> points=[

> [115, -10, 15], // 0

> [50, -10, 97], // 1

> [90, 16, 27], // 2

> [-50, -10, 97], // 3

> [-115, -10, 15], // 4

> [-90, 16, 27], // 5

> [65, -10, -103], // 6

> [98, -30, 37], // 7

> [-98, -30, 37], // 8

> [-65, -10, -103], // 9

> [0, 30, -11], // 10

> [0, 20, -103], // 11

> [18, -10, -103] // 12

> ],

> faces=[

> [7,0,6], // a

> [8,3,1,7], // b

> [7,6,9,8], // c

> [6,2,10], // d

> [5,9,10], // e

> [11,6,10], // f

> [11,10,9], // g

> [2,1,3,5,10], // h

> [6,11,9,12], // i

> [9,5,4], // j

> [8,9,4], // k

> [3,8,4], // l

> [4,5,3], // m

> [1,2,0], // n

> [0,7,1], // o

> [0,2,6] // p

> ]

> );

>

>

> translate([0,10,50]) cube(30, center=true);

>

>

>

> --

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

>

> _______________________________________________

> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


Virus-free. www.avg.com
_______________________________________________
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: My Asp exports as manifold, but the polyhedron breaks with Union.

MichaelAtOz
Administrator

Yes, that works. Email is good for inline images BTW, the forum 'changed' and just includes a link to the image.

For debugging this stuff it is also handy to set View/Show-edges, in case you didn't see that option.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Sarah Cartwright
Sent: Sun, 8 Sep 2019 13:28
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

 

How did I miss that?

 

Thank you so much! You are wonderful.

 

I hope this reply works - I'm replying to the email I received from the message board, and I hope it ends up on the OpenSCAD forum pages.

 

On Sun, 8 Sep 2019 at 04:24, OzAtMichael <[hidden email]> wrote:

 

That is the problem, can't have a vertex in the middle of an edge.

 

> -----Original Message-----

> From: Discuss [mailto:[hidden email]] On Behalf Of SarahC

> Sent: Sun, 8 Sep 2019 13:11

> To: [hidden email]

> Subject: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

>

> I've been reading about manifold shapes, and welds, and such, and was able to

> build 35 Elite ships that export without incident.

>

> I've got 3 - the Asp here is one of them, and I can't get it to survive

> being unioned with a cube. It becomes non-manifold.

>

> I've checked with the "Thrown together" view for incorrect windings, and

> there is none.

>

> I've also checked that there's no polygons meeting midway along a long

> edge... they all meet at vertices.

>

> So as of this point, I've run out of things to check or try - if anyone

> could confirm the shapes correct I can stop trying to fix it!

>

> Many thanks!

>

>

> //-----------------------------------------

> polyhedron(

>

> points=[

> [115, -10, 15], // 0

> [50, -10, 97], // 1

> [90, 16, 27], // 2

> [-50, -10, 97], // 3

> [-115, -10, 15], // 4

> [-90, 16, 27], // 5

> [65, -10, -103], // 6

> [98, -30, 37], // 7

> [-98, -30, 37], // 8

> [-65, -10, -103], // 9

> [0, 30, -11], // 10

> [0, 20, -103], // 11

> [18, -10, -103] // 12

> ],

> faces=[

> [7,0,6], // a

> [8,3,1,7], // b

> [7,6,9,8], // c

> [6,2,10], // d

> [5,9,10], // e

> [11,6,10], // f

> [11,10,9], // g

> [2,1,3,5,10], // h

> [6,11,9,12], // i

> [9,5,4], // j

> [8,9,4], // k

> [3,8,4], // l

> [4,5,3], // m

> [1,2,0], // n

> [0,7,1], // o

> [0,2,6] // p

> ]

> );

>

>

> translate([0,10,50]) cube(30, center=true);

>

>

>

> --

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

>

> _______________________________________________

> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

 

Virus-free. www.avg.com

_______________________________________________
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
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: My Asp exports as manifold, but the polyhedron breaks with Union.

SarahC
I forgot it had "Show edges" - Thanks!

On Sun, 8 Sep 2019 at 04:44, OzAtMichael <[hidden email]> wrote:

Yes, that works. Email is good for inline images BTW, the forum 'changed' and just includes a link to the image.

For debugging this stuff it is also handy to set View/Show-edges, in case you didn't see that option.

 

 

 


From: Discuss [mailto:[hidden email]] On Behalf Of Sarah Cartwright
Sent: Sun, 8 Sep 2019 13:28
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

 

How did I miss that?

 

Thank you so much! You are wonderful.

 

I hope this reply works - I'm replying to the email I received from the message board, and I hope it ends up on the OpenSCAD forum pages.

 

On Sun, 8 Sep 2019 at 04:24, OzAtMichael <[hidden email]> wrote:

 

That is the problem, can't have a vertex in the middle of an edge.

 

> -----Original Message-----

> From: Discuss [mailto:[hidden email]] On Behalf Of SarahC

> Sent: Sun, 8 Sep 2019 13:11

> To: [hidden email]

> Subject: [OpenSCAD] My Asp exports as manifold, but the polyhedron breaks with Union.

>

> I've been reading about manifold shapes, and welds, and such, and was able to

> build 35 Elite ships that export without incident.

>

> I've got 3 - the Asp here is one of them, and I can't get it to survive

> being unioned with a cube. It becomes non-manifold.

>

> I've checked with the "Thrown together" view for incorrect windings, and

> there is none.

>

> I've also checked that there's no polygons meeting midway along a long

> edge... they all meet at vertices.

>

> So as of this point, I've run out of things to check or try - if anyone

> could confirm the shapes correct I can stop trying to fix it!

>

> Many thanks!

>

>

> //-----------------------------------------

> polyhedron(

>

> points=[

> [115, -10, 15], // 0

> [50, -10, 97], // 1

> [90, 16, 27], // 2

> [-50, -10, 97], // 3

> [-115, -10, 15], // 4

> [-90, 16, 27], // 5

> [65, -10, -103], // 6

> [98, -30, 37], // 7

> [-98, -30, 37], // 8

> [-65, -10, -103], // 9

> [0, 30, -11], // 10

> [0, 20, -103], // 11

> [18, -10, -103] // 12

> ],

> faces=[

> [7,0,6], // a

> [8,3,1,7], // b

> [7,6,9,8], // c

> [6,2,10], // d

> [5,9,10], // e

> [11,6,10], // f

> [11,10,9], // g

> [2,1,3,5,10], // h

> [6,11,9,12], // i

> [9,5,4], // j

> [8,9,4], // k

> [3,8,4], // l

> [4,5,3], // m

> [1,2,0], // n

> [0,7,1], // o

> [0,2,6] // p

> ]

> );

>

>

> translate([0,10,50]) cube(30, center=true);

>

>

>

> --

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

>

> _______________________________________________

> OpenSCAD mailing list

> [hidden email]

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

 

Virus-free. www.avg.com

_______________________________________________
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

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

Re: My Asp exports as manifold, but the polyhedron breaks with Union.

cacb
In reply to this post by SarahC
On 2019-09-08 05:10, SarahC wrote:
> I've been reading about manifold shapes, and welds, and such, and was
> able to
> build 35 Elite ships that export without incident.
>
> I've got 3 - the Asp here is one of them, and I can't get it to survive
> being unioned with a cube. It becomes non-manifold.

The other replies to your question are correct, you have a vertex in the
middle of an edge, causing the polyhedron to be non-manifold. The actual
bug here is that such issues are not detected by OpenSCAD before export,
it will result in an STL that cannot be safely imported later. In other
words, if you suspect no issue and export the polyhedron (without the
union), and later import it and then try some boolean operation...

----
import("Asp.stl");
translate([0,10,50]) cube(30, center=true);
----

it will cause a warning:
WARNING: Object may not be a valid 2-manifold and may need repair!


The best fix is to make sure the polyhedron is correct in the first
place. However, if the STL came from some other source than your own
code you might be out of luck using it. One way of fixing such issues
without access to the source code is to run one of the repair utilities
that exist, for example  "polyfix" that I wrote. It is part of the
AngelCAD package https://arnholm.github.io/angelcad-docs/ . When used on
this case, the problem is fixed:

----
C:\work\STL>polyfix Asp.stl

Parameters:
   input_file = Asp.stl

iteration 0: vertices=63 faces=21
              warning: nonmanifold edges: uc(1)=63
              merged 50 vertices
              split 1 face
              total changes=51
              no warnings

iteration 1: vertices=13 faces=22
              total changes=0
              no warnings

Summary:
              polyhedron 0: vertices=13 faces=22 : no warnings

Writing: Asp_1.stl

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

In short, the vertex in the middle of the edge is detected, the edge and
relevant face(s) are split, creating a proper 2-manifold polyhedron. You
can then use the repaired STL in OpenSCAD without the warning:

----
import("Asp_1.stl");
translate([0,10,50]) cube(30, center=true);
----

Carsten Arnholm

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