R23D wrote: ↑Sun Jul 19, 2020 9:23 am
I should really post a feature request because in my opinion it's a little bit crazy that you can't do that... You can do just about anything else.
You need to use python, than FreeCAD can do nearly all what you want.

There is the workbench OpenSCAD, which uses the program OpenSCAD to do operations with meshes. OpenSCAD does have a mirror operation, see here:
https://en.wikibooks.org/wiki/OpenSCAD_ ... ons#mirror
Unfortunatly the mirror operation is not available directly in the OpenSCAD workbench. But after some digging in the python source, there is the command "callopenscadmeshstring", which can be used for this purpose. Here is a script, that can be used as a macro to mirror a FreeCAD mesh.
Just select the mesh and call the macro. I have tested it with a simple cube, where it works as expected. It does not test, if the selected object is a mesh. The mirror operation is done with a plane defined with a normal in x-direction through the origin. The coordinates of the mirror command in the script have to be adopted for other mirror planes.
Ulrich
Code: Select all
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import OpenSCADUtils
from exportCSG import mesh2polyhedron
mylist = FreeCAD.Gui.Selection.getSelectionEx()
for o in mylist:
#print (o.ObjectName)
#print (o.Object)
poly = mesh2polyhedron(o.Object.Mesh)
mi = OpenSCADUtils.callopenscadmeshstring('%s{%s}' % ('mirror([1,0,0])',''.join(poly)))
mi.flipNormals()
newMeshObj = d.addObject('Mesh::Feature', 'MirrorMesh')
newMeshObj.Mesh = mi