non-manifold?

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

non-manifold?

Kenneth Sloan
Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?


--
Kenneth Sloan
[hidden email]



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

porous.scad (766 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

kintel
Administrator
On 2013-05-23, at 19:57 , Kenneth Sloan wrote:

> Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?

Hm, it looks like you have a freak intersection exactly on four point on your cylinder, causing it to create four linear objects with no volume.
Making your cylinder a tiny bit smaller seems to fix it.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

Kenneth Sloan
Ah…I thought it might have been the many coincidental points of intersection.  I fixed it
by offsetting the three sets of cross beams by +/0/- epsilon (the beams are 1mm, epsilon is 0.01mm).

That produced some slivers at the boundary of the cylinder, so I ALSO reduced the size of the cylinder by epsilon.

It's all good now - all of these features are just at the limit of what my PLA printer will print so that the resulting object is robust (i.e., doesn't fall apart).

But…now I wonder - it seems that OpenSCAD has a design decision to NOT export STL if the result is not manifold.  I think this is a mistake (especially since there are no tools to help you fix the non-manifold vertices, or even LOCATE them).  In my opinion, a better choice would be to output the STL with a warning (STL is perfectly capable of representing all sorts of evil surfaces!).  Then, I could use MeshLab or netfabb to repair the mesh.  As it is, I can't get my hands on the mesh to try to repair it.

or…can I?  Is there something I'm missing?

--
Kenneth Sloan
[hidden email]


On May 23, 2013, at 21:20 , Marius Kintel <[hidden email]> wrote:

> On 2013-05-23, at 19:57 , Kenneth Sloan wrote:
>
>> Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?
>
> Hm, it looks like you have a freak intersection exactly on four point on your cylinder, causing it to create four linear objects with no volume.
> Making your cylinder a tiny bit smaller seems to fix it.
>
> -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

donbright
It is theoretically possible to go directly to STL but it requires some modifications to OpenSCAD. Here is why.

OpenSCAD uses the cgal.org geometry engine. OpenSCAD uses 2 of CGAL's representation of 3d shapes

1. Nef Polyhedron
2. "Ordinary" Polyhedron

Nef poly are used to do boolean ops, while 'ordinary' poly are used to do file output. CGAL requires that conversion from Nef poly to 'ordinary' poly be done only on 2 manifold shapes.

To skip this conversion, the programmer could dig into the Nef poly data structure and pull out triangles. Its quite a bit of work.

-DB


On Thu, May 23, 2013 at 10:01 PM, Kenneth Sloan <[hidden email]> wrote:
Ah…I thought it might have been the many coincidental points of intersection.  I fixed it
by offsetting the three sets of cross beams by +/0/- epsilon (the beams are 1mm, epsilon is 0.01mm).

That produced some slivers at the boundary of the cylinder, so I ALSO reduced the size of the cylinder by epsilon.

It's all good now - all of these features are just at the limit of what my PLA printer will print so that the resulting object is robust (i.e., doesn't fall apart).

But…now I wonder - it seems that OpenSCAD has a design decision to NOT export STL if the result is not manifold.  I think this is a mistake (especially since there are no tools to help you fix the non-manifold vertices, or even LOCATE them).  In my opinion, a better choice would be to output the STL with a warning (STL is perfectly capable of representing all sorts of evil surfaces!).  Then, I could use MeshLab or netfabb to repair the mesh.  As it is, I can't get my hands on the mesh to try to repair it.

or…can I?  Is there something I'm missing?

--
Kenneth Sloan
[hidden email]


On May 23, 2013, at 21:20 , Marius Kintel <[hidden email]> wrote:

> On 2013-05-23, at 19:57 , Kenneth Sloan wrote:
>
>> Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?
>
> Hm, it looks like you have a freak intersection exactly on four point on your cylinder, causing it to create four linear objects with no volume.
> Making your cylinder a tiny bit smaller seems to fix it.
>
> -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

donbright
Oh, and if people want this feature they could perhaps support the effort to implement it by raising a bounty. Bounties are linked off the github issue tracker to BountySource. Here is the github issue for direct export of non-manifold STL . and the BS link. thanks.
-DB



On Thu, May 23, 2013 at 10:22 PM, Don Bright <[hidden email]> wrote:
It is theoretically possible to go directly to STL but it requires some modifications to OpenSCAD. Here is why.

OpenSCAD uses the cgal.org geometry engine. OpenSCAD uses 2 of CGAL's representation of 3d shapes

1. Nef Polyhedron
2. "Ordinary" Polyhedron

Nef poly are used to do boolean ops, while 'ordinary' poly are used to do file output. CGAL requires that conversion from Nef poly to 'ordinary' poly be done only on 2 manifold shapes.

To skip this conversion, the programmer could dig into the Nef poly data structure and pull out triangles. Its quite a bit of work.

-DB


On Thu, May 23, 2013 at 10:01 PM, Kenneth Sloan <[hidden email]> wrote:
Ah…I thought it might have been the many coincidental points of intersection.  I fixed it
by offsetting the three sets of cross beams by +/0/- epsilon (the beams are 1mm, epsilon is 0.01mm).

That produced some slivers at the boundary of the cylinder, so I ALSO reduced the size of the cylinder by epsilon.

It's all good now - all of these features are just at the limit of what my PLA printer will print so that the resulting object is robust (i.e., doesn't fall apart).

But…now I wonder - it seems that OpenSCAD has a design decision to NOT export STL if the result is not manifold.  I think this is a mistake (especially since there are no tools to help you fix the non-manifold vertices, or even LOCATE them).  In my opinion, a better choice would be to output the STL with a warning (STL is perfectly capable of representing all sorts of evil surfaces!).  Then, I could use MeshLab or netfabb to repair the mesh.  As it is, I can't get my hands on the mesh to try to repair it.

or…can I?  Is there something I'm missing?

--
Kenneth Sloan
[hidden email]


On May 23, 2013, at 21:20 , Marius Kintel <[hidden email]> wrote:

> On 2013-05-23, at 19:57 , Kenneth Sloan wrote:
>
>> Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?
>
> Hm, it looks like you have a freak intersection exactly on four point on your cylinder, causing it to create four linear objects with no volume.
> Making your cylinder a tiny bit smaller seems to fix it.
>
> -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

Triffid Hunter
In reply to this post by Kenneth Sloan
On 24 May 2013 09:57, Kenneth Sloan <[hidden email]> wrote:
Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?

suggest using difference instead of intersection, it'll render a lot faster!

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: non-manifold?

kintel
Administrator
In reply to this post by Kenneth Sloan
On 2013-05-23, at 19:57 , Kenneth Sloan wrote:

> Why is this not a manifold surface?  Is this a bug in OpenSCAD?  How can I work around it?

PS! View->Show Edges might help see what happened.

 -Marius
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566