FEM: python base constraint VP, rename class and module
This commit is contained in:
@@ -321,6 +321,7 @@ INSTALL(FILES ${FemObjectsScripts_SRCS} DESTINATION Mod/Fem/femobjects)
|
||||
# Python Gui packages and modules
|
||||
SET(FemGuiViewObjects_SRCS
|
||||
femviewprovider/__init__.py
|
||||
femviewprovider/view_base_femconstraint.py
|
||||
femviewprovider/view_base_femobject.py
|
||||
femviewprovider/view_constraint_bodyheatsource.py
|
||||
femviewprovider/view_constraint_electrostaticpotential.py
|
||||
@@ -346,7 +347,6 @@ SET(FemGuiViewObjects_SRCS
|
||||
|
||||
SET(FemGuiScripts_SRCS
|
||||
femguiobjects/__init__.py
|
||||
femguiobjects/ViewProviderFemConstraint.py
|
||||
)
|
||||
|
||||
SET(FemGuiUtils_SRCS
|
||||
|
||||
@@ -26,16 +26,16 @@ __title__ = "FreeCAD FEM base constraint ViewProvider"
|
||||
__author__ = "Markus Hovorka, Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## @package _ConstraintViewProvider
|
||||
## @package view_base_femconstraint
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD _Base Constraint ViewProvider for FEM workbench
|
||||
# \brief view provider for Python base constraint object
|
||||
|
||||
from pivy import coin
|
||||
|
||||
from femviewprovider import view_base_femobject
|
||||
|
||||
|
||||
class ViewProxy(view_base_femobject.VPBaseFemObject):
|
||||
class VPBaseFemConstraint(view_base_femobject.VPBaseFemObject):
|
||||
"""Proxy View Provider for Pythons base constraint."""
|
||||
|
||||
def attach(self, vobj):
|
||||
@@ -30,10 +30,10 @@ __url__ = "http://www.freecadweb.org"
|
||||
# \ingroup FEM
|
||||
# \brief view provider for the constraint body heat source object
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPConstraintBodyHeatSource(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintBodyHeatSource(view_base_femconstraint.VPBaseFemConstraint):
|
||||
|
||||
def getIcon(self):
|
||||
return ":/icons/FEM_ConstraintHeatflux.svg" # the heatflux icon is used
|
||||
|
||||
@@ -34,15 +34,15 @@ import FreeCADGui
|
||||
from FreeCAD import Units
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
from femtools import femutils
|
||||
from femtools import membertools
|
||||
|
||||
|
||||
class VPConstraintElectroStaticPotential(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintElectroStaticPotential(view_base_femconstraint.VPBaseFemConstraint):
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -34,15 +34,15 @@ import FreeCADGui
|
||||
from FreeCAD import Units
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
from femtools import femutils
|
||||
from femtools import membertools
|
||||
|
||||
|
||||
class VPConstraintFlowVelocity(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintFlowVelocity(view_base_femconstraint.VPBaseFemConstraint):
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -34,15 +34,15 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
from FreeCAD import Units
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
from femtools import femutils
|
||||
from femtools import membertools
|
||||
|
||||
|
||||
class VPConstraintInitialFlowVelocity(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintInitialFlowVelocity(view_base_femconstraint.VPBaseFemConstraint):
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -29,10 +29,10 @@ __url__ = "http://www.freecadweb.org"
|
||||
# \ingroup FEM
|
||||
# \brief view provider for constraint self weight object
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPConstraintSelfWeight(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintSelfWeight(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the FemConstraintSelfWeight object
|
||||
"""
|
||||
|
||||
@@ -36,16 +36,16 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPConstraintTie(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintTie(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ConstraintTie object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -38,17 +38,17 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
from femobjects import element_fluid1D
|
||||
|
||||
|
||||
class VPElementFluid1D(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPElementFluid1D(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ElementFluid1D object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,17 +35,17 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
from femobjects import element_geometry1D
|
||||
|
||||
|
||||
class VPElementGeometry1D(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPElementGeometry1D(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ElementGeometry1D object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,16 +35,16 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPElementGeometry2D(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPElementGeometry2D(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ElementGeometry2D object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,10 +35,10 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPElementRotation1D(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPElementRotation1D(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ElementRotation1D object
|
||||
"""
|
||||
@@ -46,7 +46,7 @@ class VPElementRotation1D(ViewProviderFemConstraint.ViewProxy):
|
||||
"""
|
||||
# do not activate the task panel, since rotation with reference shapes is not yet supported
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -40,14 +40,14 @@ import FreeCADGui
|
||||
from FreeCAD import Units
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
unicode = str
|
||||
|
||||
|
||||
class VPMaterialCommon(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMaterialCommon(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the MaterialCommon object
|
||||
"""
|
||||
@@ -65,7 +65,7 @@ class VPMaterialCommon(ViewProviderFemConstraint.ViewProxy):
|
||||
return ""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -29,10 +29,10 @@ __url__ = "http://www.freecadweb.org"
|
||||
# \ingroup FEM
|
||||
# \brief view provider for material mechanical nonlinear object
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPMaterialMechanicalNonlinear(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMaterialMechanicalNonlinear(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the MaterialMechanicalNonlinear object
|
||||
"""
|
||||
|
||||
@@ -36,20 +36,20 @@ from PySide import QtGui
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
unicode = str
|
||||
|
||||
|
||||
class VPMaterialReinforced(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMaterialReinforced(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the MaterialReinforced object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,16 +35,16 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPMeshBoundaryLayer(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMeshBoundaryLayer(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the MeshBoundaryLayer object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -96,7 +96,7 @@ class VPMeshGmsh:
|
||||
|
||||
"""
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,16 +35,16 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPMeshGroup(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMeshGroup(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the MeshGroup object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -35,16 +35,16 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
|
||||
class VPMeshRegion(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPMeshRegion(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the FemMeshRegion object
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -41,17 +41,17 @@ from PySide.QtGui import QApplication
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
import femresult.resulttools as resulttools
|
||||
|
||||
|
||||
class VPResultMechanical(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPResultMechanical(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the ResultObject Python derived FemResult class
|
||||
"""
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
@@ -41,14 +41,14 @@ import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
import FemGui
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from . import view_base_femconstraint
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
def unicode(text, *args):
|
||||
return str(text)
|
||||
|
||||
|
||||
class VPSolverCcxTools(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPSolverCcxTools(view_base_femconstraint.VPBaseFemConstraint):
|
||||
"""
|
||||
A View Provider for the SolverCalculix object
|
||||
"""
|
||||
@@ -57,7 +57,7 @@ class VPSolverCcxTools(ViewProviderFemConstraint.ViewProxy):
|
||||
return ":/icons/FEM_SolverStandard.svg"
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self,
|
||||
vobj,
|
||||
mode,
|
||||
|
||||
Reference in New Issue
Block a user