Yet another non-manifold part

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

Yet another non-manifold part

James Synge
Attached is an STL file produced from this file (on github). There are lots of intersections and differences used to produce this model, and even a projection. An earlier version of the design printed fine (using cura & octoprint), but when I was exporting yesterday I saw the dreaded "not 2-manifold" warning. I attempted to reduce the number of faces that were shared by cutting (difference) holes slightly smaller than I had previously, knowing that the inserted tube would then overlap with the solid. This may have made things worse, I'm not sure.

Viewing the rendered model in OpenSCAD doesn't make it obvious that there is a problem, but the attached STL file is quite corrupted according to octoprint and www.viewstl.com (including portions that seem like mirrors of other portions of the model, which should never take that form during the CSG process!).

For background, I'm modelling something that looks vaguely like a deep sea diving helmet, then cutting that in half so that I can have parts that can be screwed together. The STL and .scad files are for one half, though both halves suffer the problem. You can see an animation of an earlier version of the model here, without the corruption in the middle (i.e. the mirror of the top of the helmet):
animated-helmet-halves.gif
Advice on how to diagnose the source of the problem (i.e. the implied or explicit CSG operation), and especially for then correcting the problem, would be most welcome.

James

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

half_helmet_nut_side.20190127.stl (11M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Yet another non-manifold part

Parkinbot
This is what Kisslicer reports. Looks like you have some numerical problems
at the colored portions.  

<http://forum.openscad.org/file/t887/helmet.png>



--
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: Yet another non-manifold part

James Synge
I definitely agree that there are problems! ;-) I had seen that by using octoprint and meshlab. But, since I didn't generate the vertices, edges and triangles myself, I'm struggling with how to avoid having OpenSCAD (or CGAL) generate the non-manifold object.

On Mon, Jan 28, 2019 at 8:17 PM Parkinbot <[hidden email]> wrote:
This is what Kisslicer reports. Looks like you have some numerical problems
at the colored portions. 

<http://forum.openscad.org/file/t887/helmet.png>



--
Sent from: http://forum.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: Yet another non-manifold part

James Synge
Oh, and I took a look at CGAL to see if there were some hints about non-manifold results, and noticed they have a "mesh repair" project underway: https://github.com/CGAL/cgal/projects/2#card-12258256
Not sure if any of these have landed in the version of CGAL used by OpenSCAD.

On Tue, Jan 29, 2019 at 2:47 PM James Synge <[hidden email]> wrote:
I definitely agree that there are problems! ;-) I had seen that by using octoprint and meshlab. But, since I didn't generate the vertices, edges and triangles myself, I'm struggling with how to avoid having OpenSCAD (or CGAL) generate the non-manifold object.

On Mon, Jan 28, 2019 at 8:17 PM Parkinbot <[hidden email]> wrote:
This is what Kisslicer reports. Looks like you have some numerical problems
at the colored portions. 

<http://forum.openscad.org/file/t887/helmet.png>



--
Sent from: http://forum.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: Yet another non-manifold part

nophead
The main way of getting non-manifold objects is generating vertices that are almost aligned but not quite due to floating point rounding errors. Then OpenSCAD snaps them to a grid and that can corrupt topology. If you have something meeting very close offset it by a small amount so the vertices are distinct. I use 1/128.

Always clear the cache before generating an STL as OpenSCAD can cache a lower resolution mesh that is is broken. F6 from a clear cache can often give cleaner results.

On Tue, 29 Jan 2019 at 19:51, James Synge <[hidden email]> wrote:
Oh, and I took a look at CGAL to see if there were some hints about non-manifold results, and noticed they have a "mesh repair" project underway: https://github.com/CGAL/cgal/projects/2#card-12258256
Not sure if any of these have landed in the version of CGAL used by OpenSCAD.

On Tue, Jan 29, 2019 at 2:47 PM James Synge <[hidden email]> wrote:
I definitely agree that there are problems! ;-) I had seen that by using octoprint and meshlab. But, since I didn't generate the vertices, edges and triangles myself, I'm struggling with how to avoid having OpenSCAD (or CGAL) generate the non-manifold object.

On Mon, Jan 28, 2019 at 8:17 PM Parkinbot <[hidden email]> wrote:
This is what Kisslicer reports. Looks like you have some numerical problems
at the colored portions. 

<http://forum.openscad.org/file/t887/helmet.png>



--
Sent from: http://forum.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

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

Re: Yet another non-manifold part

rew
On Tue, Jan 29, 2019 at 07:59:11PM +0000, nop head wrote:
> Always clear the cache before generating an STL as OpenSCAD can cache a
> lower resolution mesh that is is broken. F6 from a clear cache can often
> give cleaner results.

How do I clear the cache?

        Roger.

--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

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

Re: Yet another non-manifold part

nophead
With the Design / Flush Caches menu option.

On Tue, 29 Jan 2019 at 20:13, Rogier Wolff <[hidden email]> wrote:
On Tue, Jan 29, 2019 at 07:59:11PM +0000, nop head wrote:
> Always clear the cache before generating an STL as OpenSCAD can cache a
> lower resolution mesh that is is broken. F6 from a clear cache can often
> give cleaner results.

How do I clear the cache?

        Roger.

--
** [hidden email] ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
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: Yet another non-manifold part

James Synge
In reply to this post by nophead
Thanks so much for the hint about flushing caches. This "seemed" to fix the problem, except I then realized that I had generated the STL files from the command line. Reconsidering that caused me to see the problem: my command line was using the released version of openscad, but I'm using the nightly build for the GUI. Oops! It certainly explains why I was getting warnings about assert being an unknown module.

Thanks again,
James

On Tue, Jan 29, 2019, 3:00 PM nop head <[hidden email] wrote:
The main way of getting non-manifold objects is generating vertices that are almost aligned but not quite due to floating point rounding errors. Then OpenSCAD snaps them to a grid and that can corrupt topology. If you have something meeting very close offset it by a small amount so the vertices are distinct. I use 1/128.

Always clear the cache before generating an STL as OpenSCAD can cache a lower resolution mesh that is is broken. F6 from a clear cache can often give cleaner results.

On Tue, 29 Jan 2019 at 19:51, James Synge <[hidden email]> wrote:
Oh, and I took a look at CGAL to see if there were some hints about non-manifold results, and noticed they have a "mesh repair" project underway: https://github.com/CGAL/cgal/projects/2#card-12258256
Not sure if any of these have landed in the version of CGAL used by OpenSCAD.

On Tue, Jan 29, 2019 at 2:47 PM James Synge <[hidden email]> wrote:
I definitely agree that there are problems! ;-) I had seen that by using octoprint and meshlab. But, since I didn't generate the vertices, edges and triangles myself, I'm struggling with how to avoid having OpenSCAD (or CGAL) generate the non-manifold object.

On Mon, Jan 28, 2019 at 8:17 PM Parkinbot <[hidden email]> wrote:
This is what Kisslicer reports. Looks like you have some numerical problems
at the colored portions. 

<http://forum.openscad.org/file/t887/helmet.png>



--
Sent from: http://forum.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
_______________________________________________
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