FEM: examples, some code improvements

This commit is contained in:
Bernd Hahnebach
2020-07-09 21:33:44 +02:00
parent 901c24fec3
commit efc3abdbf7
3 changed files with 9 additions and 11 deletions

View File

@@ -110,21 +110,21 @@ def setup(doc=None, solvertype="ccxtools"):
# compound out of bool frag and lower tube
geom_obj = doc.addObject("Part::Compound", "AllGeomCompound")
geom_obj.Links = [boolfrag, lower_tube]
# line for load direction
sh_load_line = Part.makeLine(v_force_pt, FreeCAD.Vector(0, 150, 475))
load_line = doc.addObject("Part::Feature", "Load_direction_line")
load_line.Shape = sh_load_line
if FreeCAD.GuiUp:
load_line.ViewObject.LineWidth = 5.0
load_line.ViewObject.LineColor = (1.0, 0.0, 0.0)
doc.recompute()
if FreeCAD.GuiUp:
geom_obj.ViewObject.Document.activeView().viewAxonometric()
geom_obj.ViewObject.Document.activeView().fitAll()
# line for load direction
sh_load_line = Part.makeLine(v_force_pt, FreeCAD.Vector(0, 150, 475))
load_line = doc.addObject("Part::Feature", "Load_direction_line")
load_line.Shape = sh_load_line
doc.recompute()
if FreeCAD.GuiUp:
load_line.ViewObject.LineWidth = 5.0
load_line.ViewObject.LineColor = (1.0, 0.0, 0.0)
# analysis
analysis = ObjectsFem.makeAnalysis(doc, "Analysis")

View File

@@ -200,7 +200,6 @@ def setup(doc=None, solvertype="ccxtools"):
geom_obj.Mode = 'CompSolid'
# geom_obj.Proxy.execute(geom_obj)
geom_obj.purgeTouched()
if FreeCAD.GuiUp:
solid_one.ViewObject.hide()
solid_two.ViewObject.hide()

View File

@@ -89,7 +89,6 @@ def setup(doc=None, solvertype="ccxtools"):
cone_cut_obj.ViewObject.hide()
line_fix_obj.ViewObject.hide()
line_force_obj.ViewObject.hide()
doc.recompute()
if FreeCAD.GuiUp: