FEM: examples, better choose active document for fit view
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user