Non-manifold STL

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
JohnOCFII
Posts: 32
Joined: Sun Sep 20, 2020 5:46 pm

Non-manifold STL

Postby JohnOCFII » Tue Sep 29, 2020 3:10 am

Greetings,

I'm working my way through tutorials, but wanted to try to recreate an existing simple object using PartDesign workbench. Before adding holes and chamfers, I decided to export as STL, and was surprised to see in my slicer the object was not manifold. Looking at the Mesh analysis in FreeCAD I see there were two "extra" points.

What I had intended to do was create a sketch, and pad part of it to one height, and pad another part to a taller height. As I didn't see a way to extrude part of a sketch, I then created two side by side sketches, so that I could pad one to 3mm and the other to 20mm. The part looks correct, but it is not manifold. Reading through the forum, it appears it might be related to parts of the two separate sketches overlapping.

As I'm still learning, I wonder what the proper way to do this in FreeCAD.

Thanks for any advice!

John
OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22522 (Git)
Build type: Release
Branch: master
Hash: d8e476ef428017900dfe0f9359ba448503c216f9
Python version: 3.8.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
Attachments
Revised Image.png
Revised Image.png (89.3 KiB) Viewed 496 times
RailCore Optical Sensor Mount.FCStd
(21.35 KiB) Downloaded 35 times
chrisb
Posts: 30870
Joined: Tue Mar 17, 2015 9:14 am

Re: Non-manifold STL

Postby chrisb » Tue Sep 29, 2020 6:25 am

You made the model (almost) exactly as it should be done! The almost refers to something not relevant to your issue, see below.

How did you export the object? I guess that you selected the two features inside of the body. This is wrong, because the second feature contains everything from the features before.
Please retry to export only the body itself.

Concerning the "almost" from above: it is recommended to prefer geometric constraints over dimensions. So you should have used an equality constraint instead of repeating the 5mm in RailMountSketch.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
JohnOCFII
Posts: 32
Joined: Sun Sep 20, 2020 5:46 pm

Re: Non-manifold STL

Postby JohnOCFII » Tue Sep 29, 2020 3:15 pm

Thanks for your quick reply.
chrisb wrote:
Tue Sep 29, 2020 6:25 am

How did you export the object?
I selected the Body "MountBody" and chose Export --> STL from the menu. Screen shot attached.

I tried it again this morning, same results. I'm attaching the screen grab images from the mesh analysis before and after in case it highlights anything else I may have done incorrectly.
Concerning the "almost" from above: it is recommended to prefer geometric constraints over dimensions. So you should have used an equality constraint instead of repeating the 5mm in RailMountSketch.
I will work on improving my constaints. I appreciate that pointer. I made the change in the model above.

John
Attachments
MountBody Export.png
MountBody Export.png (932.94 KiB) Viewed 403 times
Duplicated Points.png
Duplicated Points.png (881.13 KiB) Viewed 403 times
After Repair.png
After Repair.png (880.66 KiB) Viewed 403 times
TheMarkster
Posts: 2060
Joined: Thu Apr 05, 2018 1:53 am

Re: Non-manifold STL

Postby TheMarkster » Tue Sep 29, 2020 3:46 pm

When creating the mesh use Netgen (fine) instead of standard. Export the mesh object from Mesh Design workbench.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
JohnOCFII
Posts: 32
Joined: Sun Sep 20, 2020 5:46 pm

Re: Non-manifold STL

Postby JohnOCFII » Tue Sep 29, 2020 4:56 pm

TheMarkster wrote:
Tue Sep 29, 2020 3:46 pm
When creating the mesh use Netgen (fine) instead of standard. Export the mesh object from Mesh Design workbench.
That worked to create a manifold mesh (and subsequent STL export). Thanks!

(Seems a shame to require the extra step, but good to know it is available if needed).

John
wmayer
Site Admin
Posts: 16875
Joined: Thu Feb 19, 2009 10:32 am

Re: Non-manifold STL

Postby wmayer » Tue Sep 29, 2020 5:36 pm

I don't know how it comes that the OCC mesher creates a defect mesh for this quite simple part. The only thing I can imagine is the superfluous seam edges because when setting the Refine option of the last pad to true or using the Part wb to create a refined copy the mesh afterwards is correct.

Now the mesh with the defect only has two additional points and that's a "good" defect because it can be easily repaired in 99.9% of all cases without breaking the mesh further.
HBC0
Posts: 194
Joined: Wed Sep 23, 2015 5:44 pm
Location: MRN(Germany)

Re: Non-manifold STL

Postby HBC0 » Tue Sep 29, 2020 9:04 pm

Hello

Maybe it is a little bug in the PD-WB.
JohnOCFII wrote:
Tue Sep 29, 2020 3:15 pm
I selected the Body "MountBody" and chose Export --> STL from the menu.
If you select the last feature "PadRailMount" instead of the body "MountBody" a manifold model is created.

The same happens when using the MeshDesing WB,
Meshing Option " Standard "

Edit:

If you change the Refine value from False to True, a recompute of the model is required to make it work.


My FreeCad info

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22492 (Git)
Build type: Release
Branch: master
Hash: 621e1d603b2a8d1bcdcd8dc5c34bc8c35d29feb2
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)

translated with deepl.com/translator

Bruno
JohnOCFII
Posts: 32
Joined: Sun Sep 20, 2020 5:46 pm

Re: Non-manifold STL

Postby JohnOCFII » Wed Sep 30, 2020 12:05 am

I was also able to get a manifold model by changing one constraint (constraint 16 - 17mm) from a 'fix the horizontal distance between two points or line ends' constraint to a <--> 'fix a length of a line or the distance between a point and a vertex' constraint. (images are attached in reverse order -- newer version is displayed first).
Attachments
Revised Mount Sketch.png
Revised Mount Sketch.png (69.09 KiB) Viewed 257 times
Initial Mount Sketch.png
Initial Mount Sketch.png (62.87 KiB) Viewed 257 times
chrisb
Posts: 30870
Joined: Tue Mar 17, 2015 9:14 am

Re: Non-manifold STL

Postby chrisb » Wed Sep 30, 2020 5:33 am

Good find! This supports the statement, that horizontal constraints are easier for the solver.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jeno
Posts: 869
Joined: Sun Jun 29, 2014 10:41 am

Re: Non-manifold STL

Postby jeno » Wed Sep 30, 2020 5:55 am

JohnOCFII wrote:
Wed Sep 30, 2020 12:05 am
I was also able to get a manifold model by changing one constraint (constraint 16 - 17mm) from a 'fix the horizontal distance between two points or line ends' constraint to a <--> 'fix a length of a line or the distance between a point and a vertex' constraint. (images are attached in reverse order -- newer version is displayed first).
Hi,
since a few minutes I am looking at your revised sketch. And I am still don't understand why it is fully constrained. As long as the length of the fourth line isn't defined or a certain angle is defined the sketch should not be fully constrained. Or am I missing something?

Regards