FEM: constraint flow velocity, rename class and module
This commit is contained in:
@@ -240,7 +240,7 @@ SET(FemObjectsScripts_SRCS
|
||||
femobjects/__init__.py
|
||||
femobjects/constraint_bodyheatsource.py
|
||||
femobjects/constraint_electrostaticpotential.py
|
||||
femobjects/_FemConstraintFlowVelocity.py
|
||||
femobjects/constraint_flowvelocity.py
|
||||
femobjects/_FemConstraintInitialFlowVelocity.py
|
||||
femobjects/_FemConstraintSelfWeight.py
|
||||
femobjects/_FemConstraintTie.py
|
||||
@@ -323,11 +323,11 @@ SET(FemGuiViewObjects_SRCS
|
||||
femviewprovider/__init__.py
|
||||
femviewprovider/view_constraint_bodyheatsource.py
|
||||
femviewprovider/view_constraint_electrostaticpotential.py
|
||||
femviewprovider/view_constraint_flowvelocity.py
|
||||
)
|
||||
|
||||
SET(FemGuiScripts_SRCS
|
||||
femguiobjects/__init__.py
|
||||
femguiobjects/_ViewProviderFemConstraintFlowVelocity.py
|
||||
femguiobjects/_ViewProviderFemConstraintInitialFlowVelocity.py
|
||||
femguiobjects/_ViewProviderFemConstraintSelfWeight.py
|
||||
femguiobjects/_ViewProviderFemConstraintTie.py
|
||||
|
||||
@@ -128,11 +128,11 @@ def makeConstraintFlowVelocity(
|
||||
"""makeConstraintFlowVelocity(document, [name]):
|
||||
makes a Fem ConstraintFlowVelocity object"""
|
||||
obj = doc.addObject("Fem::ConstraintPython", name)
|
||||
from femobjects import _FemConstraintFlowVelocity
|
||||
_FemConstraintFlowVelocity.Proxy(obj)
|
||||
from femobjects import constraint_flowvelocity
|
||||
constraint_flowvelocity.ConstraintFlowVelocity(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
from femguiobjects import _ViewProviderFemConstraintFlowVelocity
|
||||
_ViewProviderFemConstraintFlowVelocity.ViewProxy(obj.ViewObject)
|
||||
from femviewprovider import view_constraint_flowvelocity
|
||||
view_constraint_flowvelocity.VPConstraintFlowVelocity(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
|
||||
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
|
||||
# * *
|
||||
# * This file is part of the FreeCAD CAx development system. *
|
||||
# * *
|
||||
@@ -25,19 +26,19 @@ __title__ = "FreeCAD FEM constraint flow velocity document object"
|
||||
__author__ = "Markus Hovorka, Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## @package FemConstraintFlowVelocity
|
||||
## @package constraint_flowvelocity
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM constraint flow velocity object
|
||||
# \brief constraint flow velocity object
|
||||
|
||||
from . import FemConstraint
|
||||
|
||||
|
||||
class Proxy(FemConstraint.Proxy):
|
||||
class ConstraintFlowVelocity(FemConstraint.Proxy):
|
||||
|
||||
Type = "Fem::ConstraintFlowVelocity"
|
||||
|
||||
def __init__(self, obj):
|
||||
super(Proxy, self).__init__(obj)
|
||||
super(ConstraintFlowVelocity, self).__init__(obj)
|
||||
obj.addProperty(
|
||||
"App::PropertyFloat",
|
||||
"VelocityX",
|
||||
@@ -43,6 +43,8 @@ class FemMigrateApp(object):
|
||||
return self
|
||||
if fullname == "femobjects._FemConstraintElectrostaticPotential":
|
||||
return self
|
||||
if fullname == "femobjects._FemConstraintFlowVelocity":
|
||||
return self
|
||||
|
||||
if fullname == "PyObjects":
|
||||
return self
|
||||
@@ -146,6 +148,9 @@ class FemMigrateApp(object):
|
||||
if module.__name__ == "femobjects._FemConstraintElectrostaticPotential":
|
||||
import femobjects.constraint_electrostaticpotential
|
||||
module.Proxy = femobjects.constraint_electrostaticpotential.ConstraintElectrostaticPotential
|
||||
if module.__name__ == "femobjects._FemConstraintFlowVelocity":
|
||||
import femobjects.constraint_flowvelocity
|
||||
module.Proxy = femobjects.constraint_flowvelocity.ConstraintFlowVelocity
|
||||
|
||||
if module.__name__ == "PyObjects":
|
||||
module.__path__ = "PyObjects"
|
||||
@@ -156,8 +161,8 @@ class FemMigrateApp(object):
|
||||
import femobjects.constraint_electrostaticpotential
|
||||
module.Proxy = femobjects.constraint_electrostaticpotential.ConstraintElectrostaticPotential
|
||||
if module.__name__ == "PyObjects._FemConstraintFlowVelocity":
|
||||
import femobjects._FemConstraintFlowVelocity
|
||||
module.Proxy = femobjects._FemConstraintFlowVelocity.Proxy
|
||||
import femobjects.constraint_flowvelocity
|
||||
module.Proxy = femobjects.constraint_flowvelocity.ConstraintFlowVelocity
|
||||
if module.__name__ == "PyObjects._FemConstraintInitialFlowVelocity":
|
||||
import femobjects._FemConstraintInitialFlowVelocity
|
||||
module.Proxy = femobjects._FemConstraintInitialFlowVelocity.Proxy
|
||||
@@ -294,6 +299,7 @@ renaming class and module names in femobjects
|
||||
TODO add link to commit before the first commit
|
||||
module="femobjects._FemConstraintBodyHeatSource"
|
||||
module="femobjects._FemConstraintElectrostaticPotential"
|
||||
module="femobjects._FemConstraintFlowVelocity"
|
||||
|
||||
third big moving
|
||||
from PyObjects to femobjects, following the parent commit
|
||||
|
||||
@@ -41,6 +41,8 @@ class FemMigrateGui(object):
|
||||
return self
|
||||
if fullname == "femguiobjects._ViewProviderFemConstraintElectrostaticPotential":
|
||||
return self
|
||||
if fullname == "femguiobjects._ViewProviderFemConstraintFlowVelocity":
|
||||
return self
|
||||
|
||||
if fullname == "PyGui":
|
||||
return self
|
||||
@@ -134,6 +136,9 @@ class FemMigrateGui(object):
|
||||
if module.__name__ == "femguiobjects._ViewProviderFemConstraintElectrostaticPotential":
|
||||
import femviewprovider.view_constraint_electrostaticpotential
|
||||
module.ViewProxy = femviewprovider.view_constraint_electrostaticpotential.VPConstraintElectroStaticPotential
|
||||
if module.__name__ == "femguiobjects._ViewProviderFemConstraintFlowVelocity":
|
||||
import femviewprovider.view_constraint_flowvelocity
|
||||
module.ViewProxy = femviewprovider.view_constraint_flowvelocity.VPConstraintFlowVelocity
|
||||
|
||||
if module.__name__ == "PyGui":
|
||||
module.__path__ = "PyGui"
|
||||
@@ -144,8 +149,8 @@ class FemMigrateGui(object):
|
||||
import femviewprovider.view_constraint_electrostaticpotential
|
||||
module.ViewProxy = femviewprovider.view_constraint_electrostaticpotential.VPConstraintElectroStaticPotential
|
||||
if module.__name__ == "PyGui._ViewProviderFemConstraintFlowVelocity":
|
||||
import femguiobjects._ViewProviderFemConstraintFlowVelocity
|
||||
module.ViewProxy = femguiobjects._ViewProviderFemConstraintFlowVelocity.ViewProxy
|
||||
import femviewprovider.view_constraint_flowvelocity
|
||||
module.ViewProxy = femviewprovider.view_constraint_flowvelocity.VPConstraintFlowVelocity
|
||||
if module.__name__ == "PyGui._ViewProviderFemConstraintInitialFlowVelocity":
|
||||
import femguiobjects._ViewProviderFemConstraintInitialFlowVelocity
|
||||
module.ViewProxy = femguiobjects._ViewProviderFemConstraintInitialFlowVelocity.ViewProxy
|
||||
@@ -258,6 +263,7 @@ renaming class and module names in femobjects
|
||||
TODO add link to commit before the first commit
|
||||
module="femguiobjects._ViewProviderFemConstraintBodyHeatSource"
|
||||
module="femguiobjects._ViewProviderFemConstraintElectrostaticPotential"
|
||||
module="femguiobjects._ViewProviderFemConstraintFlowVelocity"
|
||||
|
||||
third big moving
|
||||
from PyGui to femguiobjects, following the parent commit
|
||||
|
||||
@@ -25,21 +25,21 @@ __title__ = "FreeCAD FEM constraint flow velocity ViewProvider for the document
|
||||
__author__ = "Markus Hovorka, Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## @package ViewProviderFemConstraintFlowVelocity
|
||||
## @package view_constraint_flowvelocity
|
||||
# \ingroup FEM
|
||||
# \brief FreeCAD FEM view provider for constraint flow velocity object
|
||||
# \brief view provider for constraint flow velocity object
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
from FreeCAD import Units
|
||||
|
||||
from femguiutils import selection_widgets
|
||||
from . import ViewProviderFemConstraint
|
||||
from femguiobjects import ViewProviderFemConstraint
|
||||
from femtools import femutils
|
||||
from femtools import membertools
|
||||
|
||||
|
||||
class ViewProxy(ViewProviderFemConstraint.ViewProxy):
|
||||
class VPConstraintFlowVelocity(ViewProviderFemConstraint.ViewProxy):
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
ViewProviderFemConstraint.ViewProxy.setEdit(
|
||||
Reference in New Issue
Block a user