FEM: element rotation 1D, rename class and module
This commit is contained in:
@@ -247,7 +247,7 @@ SET(FemObjectsScripts_SRCS
|
||||
femobjects/element_fluid1D.py
|
||||
femobjects/element_geometry1D.py
|
||||
femobjects/element_geometry2D.py
|
||||
femobjects/_FemElementRotation1D.py
|
||||
femobjects/element_rotation1D.py
|
||||
femobjects/_FemMaterial.py
|
||||
femobjects/_FemMaterialMechanicalNonlinear.py
|
||||
femobjects/_FemMaterialReinforced.py
|
||||
@@ -330,11 +330,11 @@ SET(FemGuiViewObjects_SRCS
|
||||
femviewprovider/view_element_fluid1D.py
|
||||
femviewprovider/view_element_geometry1D.py
|
||||
femviewprovider/view_element_geometry2D.py
|
||||
femviewprovider/view_element_rotation1D.py
|
||||
)
|
||||
|
||||
SET(FemGuiScripts_SRCS
|
||||
femguiobjects/__init__.py
|
||||
femguiobjects/_ViewProviderFemElementRotation1D.py
|
||||
femguiobjects/_ViewProviderFemMaterial.py
|
||||
femguiobjects/_ViewProviderFemMaterialMechanicalNonlinear.py
|
||||
femguiobjects/_ViewProviderFemMaterialReinforced.py
|
||||
|
||||
@@ -352,11 +352,11 @@ def makeElementRotation1D(
|
||||
"""makeElementRotation1D(document, [name]):
|
||||
creates an 1D geometry rotation element object to rotate a 1D cross section"""
|
||||
obj = doc.addObject("Fem::FeaturePython", name)
|
||||
from femobjects import _FemElementRotation1D
|
||||
_FemElementRotation1D._FemElementRotation1D(obj)
|
||||
from femobjects import element_rotation1D
|
||||
element_rotation1D.ElementRotation1D(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
from femguiobjects import _ViewProviderFemElementRotation1D
|
||||
_ViewProviderFemElementRotation1D._ViewProviderFemElementRotation1D(obj.ViewObject)
|
||||
from femviewprovider import view_element_rotation1D
|
||||
view_element_rotation1D.VPElementRotation1D(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
@@ -25,22 +25,22 @@ __title__ = "FreeCAD FEM element rotation 1D document object"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "https://www.freecadweb.org"
|
||||
|
||||
## @package FemElementRotation1D
|
||||
## @package element_rotation1D
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM element rotation 1D object
|
||||
# \brief element rotation 1D object
|
||||
|
||||
from . import FemConstraint
|
||||
|
||||
|
||||
class _FemElementRotation1D(FemConstraint.Proxy):
|
||||
class ElementRotation1D(FemConstraint.Proxy):
|
||||
"""
|
||||
The FemElementRotation1D object
|
||||
The ElementRotation1D object
|
||||
"""
|
||||
|
||||
Type = "Fem::ElementRotation1D"
|
||||
|
||||
def __init__(self, obj):
|
||||
super(_FemElementRotation1D, self).__init__(obj)
|
||||
super(ElementRotation1D, self).__init__(obj)
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertyAngle",
|
||||
@@ -57,6 +57,8 @@ class FemMigrateApp(object):
|
||||
return self
|
||||
if fullname == "femobjects._FemElementGeometry2D":
|
||||
return self
|
||||
if fullname == "femobjects._FemElementRotation1D":
|
||||
return self
|
||||
|
||||
if fullname == "PyObjects":
|
||||
return self
|
||||
@@ -181,6 +183,9 @@ class FemMigrateApp(object):
|
||||
if module.__name__ == "femobjects._FemElementGeometry2D":
|
||||
import femobjects.element_geometry2D
|
||||
module._FemElementGeometry2D = femobjects.element_geometry2D.ElementGeometry2D
|
||||
if module.__name__ == "femobjects._FemElementRotation1D":
|
||||
import femobjects.element_rotation1D
|
||||
module._FemElementRotation1D = femobjects.element_rotation1D.ElementRotation1D
|
||||
|
||||
if module.__name__ == "PyObjects":
|
||||
module.__path__ = "PyObjects"
|
||||
@@ -209,8 +214,8 @@ class FemMigrateApp(object):
|
||||
import femobjects.element_geometry2D
|
||||
module._FemElementGeometry2D = femobjects.element_geometry2D.ElementGeometry2D
|
||||
if module.__name__ == "PyObjects._FemElementRotation1D":
|
||||
import femobjects._FemElementRotation1D
|
||||
module._FemElementRotation1D = femobjects._FemElementRotation1D._FemElementRotation1D
|
||||
import femobjects.element_rotation1D
|
||||
module._FemElementRotation1D = femobjects.element_rotation1D.ElementRotation1D
|
||||
if module.__name__ == "PyObjects._FemMaterial":
|
||||
import femobjects._FemMaterial
|
||||
module._FemMaterial = femobjects._FemMaterial._FemMaterial
|
||||
@@ -336,6 +341,7 @@ module="femobjects._FemConstraintTie"
|
||||
module="femobjects._FemElementFluid1D"
|
||||
module="femobjects._FemElementGeometry1D"
|
||||
module="femobjects._FemElementGeometry2D"
|
||||
module="femobjects._FemElementRotation1D"
|
||||
|
||||
third big moving
|
||||
from PyObjects to femobjects, following the parent commit
|
||||
|
||||
@@ -55,6 +55,8 @@ class FemMigrateGui(object):
|
||||
return self
|
||||
if fullname == "femguiobjects._ViewProviderFemElementGeometry2D":
|
||||
return self
|
||||
if fullname == "femguiobjects._ViewProviderFemElementRotation1D":
|
||||
return self
|
||||
|
||||
if fullname == "PyGui":
|
||||
return self
|
||||
@@ -169,6 +171,9 @@ class FemMigrateGui(object):
|
||||
if module.__name__ == "femguiobjects._ViewProviderFemElementGeometry2D":
|
||||
import femviewprovider.view_element_geometry2D
|
||||
module._ViewProviderFemElementGeometry2D = femviewprovider.view_element_geometry2D.VPElementGeometry2D
|
||||
if module.__name__ == "femguiobjects._ViewProviderFemElementRotation1D":
|
||||
import femviewprovider.view_element_rotation1D
|
||||
module._ViewProviderFemElementRotation1D = femviewprovider.view_element_rotation1D.VPElementRotation1D
|
||||
|
||||
if module.__name__ == "PyGui":
|
||||
module.__path__ = "PyGui"
|
||||
@@ -197,8 +202,8 @@ class FemMigrateGui(object):
|
||||
import femviewprovider.view_element_geometry2D
|
||||
module._ViewProviderFemElementGeometry2D = femviewprovider.view_element_geometry2D.VPElementGeometry2D
|
||||
if module.__name__ == "PyGui._ViewProviderFemElementRotation1D":
|
||||
import femguiobjects._ViewProviderFemElementRotation1D
|
||||
module._ViewProviderFemElementRotation1D = femguiobjects._ViewProviderFemElementRotation1D._ViewProviderFemElementRotation1D
|
||||
import femviewprovider.view_element_rotation1D
|
||||
module._ViewProviderFemElementRotation1D = femviewprovider.view_element_rotation1D.VPElementRotation1D
|
||||
if module.__name__ == "PyGui._ViewProviderFemMaterial":
|
||||
import femguiobjects._ViewProviderFemMaterial
|
||||
module._ViewProviderFemMaterial = femguiobjects._ViewProviderFemMaterial._ViewProviderFemMaterial
|
||||
@@ -300,6 +305,7 @@ module="femguiobjects._ViewProviderFemConstraintTie"
|
||||
module="femguiobjects._ViewProviderFemElementFluid1D"
|
||||
module="femguiobjects._ViewProviderFemElementGeometry1D"
|
||||
module="femguiobjects._ViewProviderFemElementGeometry2D"
|
||||
module="femguiobjects._ViewProviderFemElementRotation1D"
|
||||
|
||||
third big moving
|
||||
from PyGui to femguiobjects, following the parent commit
|
||||
|
||||
@@ -25,9 +25,9 @@ __title__ = "FreeCAD FEM element rotation 1D ViewProvider for the document objec
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## @package ViewProviderFemElementRotation1D
|
||||
## @package view_element_rotation1D
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM _ViewProviderFemElementRotation1D
|
||||
# \brief view provider for element rotation 1D object
|
||||
|
||||
from PySide import QtCore
|
||||
|
||||
@@ -35,12 +35,12 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from . import ViewProviderFemConstraint
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
|
||||
|
||||
class _ViewProviderFemElementRotation1D(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPElementRotation1D(ViewProviderFemConstraint.ViewProxy):
|
||||
"""
|
||||
A View Provider for the FemElementRotation1D object
|
||||
A View Provider for the ElementRotation1D object
|
||||
"""
|
||||
|
||||
"""
|
||||
@@ -57,7 +57,7 @@ class _ViewProviderFemElementRotation1D(ViewProviderFemConstraint.ViewProxy):
|
||||
|
||||
class _TaskPanel:
|
||||
"""
|
||||
The TaskPanel for editing References property of FemElementRotation1D objects
|
||||
The TaskPanel for editing References property of ElementRotation1D objects
|
||||
"""
|
||||
|
||||
def __init__(self, obj):
|
||||
Reference in New Issue
Block a user