FEM: examples, better choose active document for fit view

This commit is contained in:
Bernd Hahnebach
2020-03-22 08:32:40 +01:00
parent 5fc4a26a00
commit c9bca5bd15
11 changed files with 11 additions and 22 deletions

View File

@@ -58,9 +58,8 @@ def setup_base(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -62,9 +62,8 @@ def setup_cantileverbase(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -109,9 +109,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
goem_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -90,9 +90,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -80,9 +80,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -79,9 +79,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -85,9 +85,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -75,9 +75,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -84,9 +84,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -93,9 +93,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -56,9 +56,8 @@ def setup(doc=None, solvertype="ccxtools"):
doc.recompute()
if FreeCAD.GuiUp:
import FreeCADGui
geom_obj.ViewObject.Document.activeView().viewAxonometric()
FreeCADGui.SendMsgToActiveView("ViewFit")
geom_obj.ViewObject.Document.activeView().fitAll()
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")