FEM: fix, some python objects could not be added by python
This commit is contained in:
parent
0ea42e88ce
commit
469f22da43
|
@ -26,13 +26,12 @@ __url__ = "http://www.freecadweb.org"
|
|||
|
||||
|
||||
import FreeCAD
|
||||
import FemGui
|
||||
import _FemBeamSection
|
||||
|
||||
|
||||
def makeFemBeamSection(width=20.0, height=20.0, name="BeamSection"):
|
||||
'''makeFemBeamSection([width], [height], [name]): creates an beamsection object to define a cross section'''
|
||||
obj = FemGui.getActiveAnalysis().Document.addObject("Fem::FeaturePython", name)
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
_FemBeamSection._FemBeamSection(obj)
|
||||
obj.Width = width
|
||||
obj.Height = height
|
||||
|
|
|
@ -26,13 +26,12 @@ __url__ = "http://www.freecadweb.org"
|
|||
|
||||
|
||||
import FreeCAD
|
||||
import FemGui
|
||||
import _FemConstraintSelfWeight
|
||||
|
||||
|
||||
def makeFemConstraintSelfWeight(name="FemConstraintSelfWeight"):
|
||||
'''makeFemFemConstraintSelfWeight([name]): creates an self weight object to define a gravity load'''
|
||||
obj = FemGui.getActiveAnalysis().Document.addObject("Fem::FeaturePython", name)
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
_FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemConstraintSelfWeight
|
||||
|
|
|
@ -26,13 +26,12 @@ __url__ = "http://www.freecadweb.org"
|
|||
|
||||
|
||||
import FreeCAD
|
||||
import FemGui
|
||||
import _FemShellThickness
|
||||
|
||||
|
||||
def makeFemShellThickness(thickness=20.0, name="ShellThickness"):
|
||||
'''makeFemShellThickness([thickness], [name]): creates an shellthickness object to define a plate thickness'''
|
||||
obj = FemGui.getActiveAnalysis().Document.addObject("Fem::FeaturePython", name)
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
_FemShellThickness._FemShellThickness(obj)
|
||||
obj.Thickness = thickness
|
||||
if FreeCAD.GuiUp:
|
||||
|
|
Loading…
Reference in New Issue
Block a user