FEM: pep8
This commit is contained in:
@@ -122,12 +122,12 @@ class _TaskPanel(object):
|
||||
|
||||
self._paramWidget.electricInfinityBox.setChecked(
|
||||
self._obj.ElectricInfinity)
|
||||
|
||||
|
||||
self._paramWidget.capacitanceBodyBox.setChecked(
|
||||
not self._obj.CapacitanceBodyEnabled)
|
||||
self._paramWidget.capacitanceBody_spinBox.setValue(
|
||||
self._obj.CapacitanceBody)
|
||||
|
||||
|
||||
def _applyWidgetChanges(self):
|
||||
unit = "V"
|
||||
self._obj.PotentialEnabled = \
|
||||
|
||||
@@ -37,22 +37,38 @@ class Proxy(FemConstraint.Proxy):
|
||||
def __init__(self, obj):
|
||||
super(Proxy, self).__init__(obj)
|
||||
obj.addProperty(
|
||||
"App::PropertyFloat", "Potential",
|
||||
"Parameter", "Potential"),
|
||||
"App::PropertyFloat",
|
||||
"Potential",
|
||||
"Parameter",
|
||||
"Potential"
|
||||
),
|
||||
obj.addProperty(
|
||||
"App::PropertyBool", "PotentialEnabled",
|
||||
"Parameter", "Potential Enabled"),
|
||||
"App::PropertyBool",
|
||||
"PotentialEnabled",
|
||||
"Parameter",
|
||||
"Potential Enabled"
|
||||
),
|
||||
obj.addProperty(
|
||||
"App::PropertyBool", "PotentialConstant",
|
||||
"Parameter", "Potential Constant"),
|
||||
obj.addProperty( # Howil added
|
||||
"App::PropertyBool", "ElectricInfinity",
|
||||
"Parameter", "Electric Infinity")
|
||||
"App::PropertyBool",
|
||||
"PotentialConstant",
|
||||
"Parameter",
|
||||
"Potential Constant"
|
||||
),
|
||||
obj.addProperty(
|
||||
"App::PropertyInteger", "CapacitanceBody",
|
||||
"Parameter", "Capacitance Body")
|
||||
"App::PropertyBool",
|
||||
"ElectricInfinity",
|
||||
"Parameter",
|
||||
"Electric Infinity"
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyBool", "CapacitanceBodyEnabled",
|
||||
"Parameter", "Capacitance Body Enabled")
|
||||
|
||||
|
||||
"App::PropertyInteger",
|
||||
"CapacitanceBody",
|
||||
"Parameter",
|
||||
"Capacitance Body"
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
"CapacitanceBodyEnabled",
|
||||
"Parameter",
|
||||
"Capacitance Body Enabled"
|
||||
)
|
||||
|
||||
@@ -357,7 +357,7 @@ class Writer(object):
|
||||
for name in obj.References[0][1]:
|
||||
# https://forum.freecadweb.org/viewtopic.php?f=18&t=41488&start=10#p369454 ff
|
||||
if obj.PotentialEnabled:
|
||||
if hasattr(obj, 'Potential'):
|
||||
if hasattr(obj, "Potential"):
|
||||
potential = getFromUi(obj.Potential, "V", "M*L^2/(T^3 * I)")
|
||||
self._boundary(name, "Potential", potential)
|
||||
if obj.PotentialConstant:
|
||||
@@ -365,8 +365,8 @@ class Writer(object):
|
||||
if obj.ElectricInfinity:
|
||||
self._boundary(name, "Electric Infinity BC", True)
|
||||
if obj.CapacitanceBodyEnabled:
|
||||
if hasattr(obj, 'CapacitanceBody'):
|
||||
self._boundary(name, "Capacitance Body", obj.CapacitanceBody)
|
||||
if hasattr(obj, "CapacitanceBody"):
|
||||
self._boundary(name, "Capacitance Body", obj.CapacitanceBody)
|
||||
self._handled(obj)
|
||||
|
||||
def _handleFluxsolver(self):
|
||||
|
||||
Reference in New Issue
Block a user