Is there a setting for export resolution?

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!
Weeve
Posts: 13
Joined: Fri Jul 31, 2015 7:09 am
Contact:

Is there a setting for export resolution?

Post by Weeve »

I've noticed some of my models looks slightly choppy, specifically around seams of mirrored objects, is there an option to set the export level of detail for the triangulation, so that I can export in higher detail models?
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Is there a setting for export resolution?

Post by quick61 »

Weeve wrote:I've noticed some of my models looks slightly choppy, specifically around seams of mirrored objects, is there an option to set the export level of detail for the triangulation, so that I can export in higher detail models?
Which format? I'll take it your asking about exporting STL/mesh files. In your Edit > Preferences... > Part design > Shape view tab you can change your tessellation setting. Default is 0.5000% and you can bring that down to 0.2500 - 0.1000 and you exports will be finer. You can also mesh your models in the Mesh Design Workbench which will give you more options and control over the mesh.
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Is there a setting for export resolution?

Post by quick61 »

Repeat post - delete. :oops:
Last edited by quick61 on Tue Dec 29, 2015 5:23 am, edited 1 time in total.
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Is there a setting for export resolution?

Post by DeepSOIC »

For myself, I've made a quick macro, that ensures triangulation is done to a precision better than positioning accuracy of my 3d printer.

Code: Select all

o = FreeCADGui.Selection.getSelection()[0]
bb = o.Shape.BoundBox
devn = 0.03/((bb.XLength+bb.YLength+bb.ZLength)/3)*100
o.ViewObject.Deviation = devn
o.ViewObject.hide()
o.ViewObject.show()
0.03 is the target accuracy in mm (my printer spec is 0.05 mm, so I set a bit more precision)

Instructions: select the object to export. Run macro. Then export stl directly (not using mesh-design).

I avoid using Mesh Design workbench, because it seems to make holes and non-stitched faces more often than this direct export. Although, even with holes in meshes, I usually have no trouble slicing.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: Is there a setting for export resolution?

Post by Mongrel_Shark »

Bumping this thread because I have been googling for days and this keeps coming up on top.

I have also been having a bunch of problems from lack of mesh settings. I have had cnc guys return files because what was a fine draft on an injection mold got turned into an overhang! I have had 3d printed parts not fit because of its. Its been driving me crazy for some time. Even my crappy homebrew printer (really crappy, amazed it works at all) was printing mesh artefacts everywhere! I have had tessellation settings as low as they will go for some time...

Playing with tessellation does not do the trick.
It may reduce deviation a little, but it won't change the quality of the mesh.

I have however found a setting that will. Its a bit hidden. You have to import an obj or stl to find it. Its in the import export settings in the Mesh Format tab and its the only setting!!!!
Selection_435.png
Selection_435.png (61.91 KiB) Viewed 20432 times

I have had a play. 10um seems a much more reasonable than the default 100um.
Setting it to 5um will require a good computer, and some waiting for export to complete.
going below this, much the same. Takes time on my high end gaming laptop. However opening the really fine meshes again in freecad can make freecad go to sleep. One click its all good, then its gone to sleep untill process is killed and restarted. Has crashed the whole system with it once too.


So sadly still have problems using STEP files to do boolians for eg. Which is something I do a bit to keep things simple and file size down.
At least I can send stuff to a 3d printer or Fab Lab without having critical dimensions change to way outside their original spec though.
Yay. Win.

Anyway here are some images of the results

Starting with 10um and working down to 1um.
Selection_439.png
Selection_439.png (91.92 KiB) Viewed 20432 times
Selection_437.png
Selection_437.png (103.61 KiB) Viewed 20432 times
Selection_436.png
Selection_436.png (94.38 KiB) Viewed 20432 times
Selection_438.png
Selection_438.png (97.03 KiB) Viewed 20432 times
mrdic
Posts: 132
Joined: Wed May 10, 2017 4:25 am

Re: Is there a setting for export resolution?

Post by mrdic »

mesh resolution.PNG
mesh resolution.PNG (52.91 KiB) Viewed 20421 times
This pic shows the difference that the standard mesher resolves with surface deviation and angular deviation. How do you conclude that a higher-resolution mesh is of the same quality as a low-res mesh?
chrisb
Veteran
Posts: 54164
Joined: Tue Mar 17, 2015 9:14 am

Re: Is there a setting for export resolution?

Post by chrisb »

Mongrel_Shark wrote: Mon Dec 04, 2017 2:20 am I have had cnc guys return files because what was a fine draft on an injection mold got turned into an overhang! I have had 3d printed parts not fit because of its. Its been driving me crazy for some time. Even my crappy homebrew printer (really crappy, amazed it works at all) was printing mesh artefacts everywhere! I have had tessellation settings as low as they will go for some time...
I can hardly see any difference in the last three pictures. There is a slight change in the shade of grey but nothing significant in the curvature or the corners. It is probably due to image resolution, so you may better show only an enlarged detail.

If you are doing CNC stuff you should not at all exchange a mesh format. Use STEP instead, your supplier most probably can read it. The STEP export has been improved in the 0.17 version.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
Mongrel_Shark
Posts: 138
Joined: Sat Oct 15, 2016 9:54 am
Location: Australia

Re: Is there a setting for export resolution?

Post by Mongrel_Shark »

Sheesh. Chill out guys. Just trying to correct and expand on a bit of less than accurate advice. Because I was getting frustrated with it being the only advice on the topic on all of the whole internet (according to google)
the OP was asking if there was an export quality setting.
They where incorrectly told there was not and directed to another setting that may help.
There is indeed an mesh export quality setting. You just have to import mesh to get it.
if your doing CNC or have a 3d printer that’s not a total piece of junk, you will want to change the default value. To something a degree or two smaller in magnitude.

Moving forward now.

mrdic obviously more mesh detail is better quality. I don't really understand your question or what you are trying to demonstrate, and I don't think you understood my post at all. If I was to print your three spheres you would see the mesh in at least 2 of them, probably all 3. My printer is about 4 out of 10 quality wise. Most printers over $1000us can run rings around mine. If you wanted to print a sphere with no visible mesh artefacts you would need to get finer than that.

Chrisb Obviously I send step files. What else would I use? This is where the mesh errors are the worst. Although some experimenting has found its not so much the STEP export (Mesh export settings will affect step though, try it and check file sizes) but some errors with boolean operations.


In this image the good mesh on right (actually hidden line view, not mesh) is a .step I opened/imported to do some boolean cuts and pocketing to.
The bad one on left has the errors I need to stop. Those huge triangles on the elliptical curve have cost me about a weeks work so far. The o-rings just can't handle that recess. Any ideas on what to look into to resolve the problem would be very appreciated. The other part that had cnc problems was also made from 2 step files that had been boolean cut...
Selection_442.png
Selection_442.png (151.42 KiB) Viewed 20362 times

Cheers
pnt103
Posts: 4
Joined: Sun Aug 18, 2019 12:15 pm

Re: Is there a setting for export resolution?

Post by pnt103 »

@Mongrel_Shark Thank you!

My slicer (Cura) can import FreeCAD .FCstd files but occasionally gets them slightly wrong, so exporting STL is the fix. However I was frustrated by STL files that printed with visible triangles - quite pretty on some curved surfaces but terrible for functional parts. Like you, I found the suggested changes to Shape View maximum deviation and maximum angular deflection in Part Design preferences have no apparent effect on exports. Why would they? After all, they're for views, not exports.

But importing an STL was the key to being able to access the Mesh Formats tab in Import-Export preferences. The setting was 0.1mm (100µm) in my copy of FreeCAD 0.18, and setting it to 10µm made a huge difference. Of course, it may result in bigger files - but they have the finer mesh I need.

It's evidently not the whole story, though. There's something strange going on inside FreeCAD because setting it back to 0.1mm still gave me finer resolution.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Is there a setting for export resolution?

Post by jmaustpc »

pnt103 wrote: Sun Aug 18, 2019 1:45 pm I found the suggested changes to Shape View maximum deviation and maximum angular deflection in Part Design preferences have no apparent effect on exports. Why would they?
because depending on your FreeCAD version and which part of FreeCAD you are using, FreeCAD simply takes the openGL visualisation which is a mesh and uses that to create an STL which is a mesh as well. So the values in the settings quoted for PartDesign WB visualisation end up defining a simple STL mesh exported with the simple "export as STL", as distinct from using the advanced features of the Mesh workbench.

The point being missing by the previous poster seems to be that he is confusing exporting to stl from another work bench with the more advanced meshing abilities of the mesh workbench.

To get to the settings of Mesh workbench, you first have to load the workbench so that the settings show up. But you have access to more advanced meshing abilities within the mesh workbench tools, rather than having to go to the settings and changing the defaults.
Post Reply