FEM: examples, some code improvements
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user