I have to create several meshes of parts Iconstructed with FC. I found out that these mesh settings are optimal for all my parts:
issue #3838).
So the question is if what I want is possible or would be a feature request.
and therefore I want to make these settings the default. But in the mesh preferences I can only specify the maximum mesh deviation, not more. (Btw. I found the minor Mesh WB: how to specify preferred default settings
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Mesh WB: how to specify preferred default settings
It turned out it is a missing feature. Therefore I created now a feature request: issue #3841
- HarryGeier
- Veteran
- Posts: 1231
- Joined: Mon Jul 10, 2017 12:36 pm
- Location: Hof Germany
Re: Mesh WB: how to specify preferred default settings
This also bugged me long time..
i made a macro for that task..
# -*- coding: utf-8 -*-
# Create a Standard MESH on on click from the current object.
# Parameters are coded in Macro . I use them to 99.9% for 3D STL´s
# Macro Begin: makestl.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
import FreeCAD
import Mesh
import MeshPartGui, FreeCADGui
import MeshPart
#Get the current FreeCAD Document Object
__doc__=FreeCAD.activeDocument()
Gui.activateWorkbench("MeshWorkbench")
#Get the Name of the current selected Object
sel = FreeCADGui.Selection.getSelection()
Nameelement = sel[0].Name
#Print the Name
App.Console.PrintMessage(str(Nameelement)+"\n")
#instantiate a Mesh
__mesh__=__doc__.addObject("Mesh::Feature","Mesh")
#Get the Object selected
__part__=__doc__.getObject(Nameelement)
#Copy it´s Shape
__shape__=__part__.Shape.copy(False)
__shape__.Placement=__part__.getGlobalPlacement()
#Mek the Mesh with Standard Parameters
__mesh__.Mesh=MeshPart.meshFromShape(Shape=__shape__, LinearDeflection=0.1, AngularDeflection=25, Relative=False)
#rename the new Mesh and put into View
__mesh__.Label=Nameelement+" (Meshed)"
__mesh__.ViewObject.CreaseAngle=25.0
#Make the Feature invisible
Gui.getDocument(__doc__).getObject(Nameelement).Visibility=False
#Clean Up
del __doc__, __mesh__, __part__, __shape__
# Macro End: makestl.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
takes the selected elemet, creates a STANDARD mesh , makes source invisible and mesh visible
i made a macro for that task..
# -*- coding: utf-8 -*-
# Create a Standard MESH on on click from the current object.
# Parameters are coded in Macro . I use them to 99.9% for 3D STL´s
# Macro Begin: makestl.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
import FreeCAD
import Mesh
import MeshPartGui, FreeCADGui
import MeshPart
#Get the current FreeCAD Document Object
__doc__=FreeCAD.activeDocument()
Gui.activateWorkbench("MeshWorkbench")
#Get the Name of the current selected Object
sel = FreeCADGui.Selection.getSelection()
Nameelement = sel[0].Name
#Print the Name
App.Console.PrintMessage(str(Nameelement)+"\n")
#instantiate a Mesh
__mesh__=__doc__.addObject("Mesh::Feature","Mesh")
#Get the Object selected
__part__=__doc__.getObject(Nameelement)
#Copy it´s Shape
__shape__=__part__.Shape.copy(False)
__shape__.Placement=__part__.getGlobalPlacement()
#Mek the Mesh with Standard Parameters
__mesh__.Mesh=MeshPart.meshFromShape(Shape=__shape__, LinearDeflection=0.1, AngularDeflection=25, Relative=False)
#rename the new Mesh and put into View
__mesh__.Label=Nameelement+" (Meshed)"
__mesh__.ViewObject.CreaseAngle=25.0
#Make the Feature invisible
Gui.getDocument(__doc__).getObject(Nameelement).Visibility=False
#Clean Up
del __doc__, __mesh__, __part__, __shape__
# Macro End: makestl.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
takes the selected elemet, creates a STANDARD mesh , makes source invisible and mesh visible
Kaum macht man´s richtig , gehts´s
My Video Tutorials on Youtube: https://www.youtube.com/channel/UCoe3B ... p8Q/videos
My FreeCAD Stuff on Hidrive: https://my.hidrive.com/share/qr3l1yddy6#$/
My Video Tutorials on Youtube: https://www.youtube.com/channel/UCoe3B ... p8Q/videos
My FreeCAD Stuff on Hidrive: https://my.hidrive.com/share/qr3l1yddy6#$/
Re: Mesh WB: how to specify preferred default settings
Many thanks Harry! Works perfect.HarryGeier wrote: ↑Sat Feb 16, 2019 9:40 pm This also bugged me long time..
i made a macro for that task..
Re: Mesh WB: how to specify preferred default settings
Great news:HarryGeier wrote: ↑Sat Feb 16, 2019 9:40 pm This also bugged me long time..
i made a macro for that task..
Werner kindly implemented last week the feature to store the last used meshed settings (git commit 6797fa615f761be2c69f7e351e52d5a9814d864b).
Therefore I don't need a macro anymore, I just enter the values I like and they will be proposed as default for any further call of the mesh generation dialog.
So check out the latest FC 0.19 build.