Fem: Do not try to set EndStep property for legacy Netgen

This commit is contained in:
marioalexis
2024-10-25 00:27:16 -03:00
committed by Chris Hennes
parent ed45e20768
commit 3be681ef62

View File

@@ -831,13 +831,15 @@ class _MeshNetgenFromShape(CommandManager):
FreeCADGui.doCommand(
"ObjectsFem.makeMeshNetgen(FreeCAD.ActiveDocument, '" + mesh_obj_name + "')"
)
FreeCADGui.doCommand("FreeCAD.ActiveDocument.ActiveObject.EndStep = 'OptimizeVolume'")
FreeCADGui.doCommand(
"FreeCAD.ActiveDocument.ActiveObject.Shape = FreeCAD.ActiveDocument.{}".format(
self.selobj.Name
)
)
FreeCADGui.doCommand("FreeCAD.ActiveDocument.ActiveObject.Fineness = 'Moderate'")
FreeCADGui.doCommand("FreeCAD.ActiveDocument.ActiveObject.EndStep = 'OptimizeVolume'")
# Netgen mesh object could be added without an active analysis
# but if there is an active analysis move it in there
import FemGui