diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py
index b08fda5bd..b0796adcc 100644
--- a/src/Mod/Arch/ArchStructure.py
+++ b/src/Mod/Arch/ArchStructure.py
@@ -665,26 +665,28 @@ class _Structure(ArchComponent.Component):
def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop == "Shape":
- if obj.Nodes:
- if hasattr(self,"nodes"):
- if self.nodes:
- if obj.Nodes != self.nodes:
- # nodes are set manually: don't touch them
+ if hasattr(obj,"Nodes"):
+ # update structural nodes
+ if obj.Nodes:
+ if hasattr(self,"nodes"):
+ if self.nodes:
+ if obj.Nodes != self.nodes:
+ # nodes are set manually: don't touch them
+ return
+ else:
+ # nodes haven't been calculated yet, but are set (file load)
+ # we calculate the nodes now but don't change the property
+ if hasattr(self,"BaseProfile") and hasattr(self,"ExtrusionVector"):
+ p1 = self.BaseProfile.CenterOfMass
+ p2 = p1.add(self.ExtrusionVector)
+ self.nodes = [p1,p2]
return
- else:
- # nodes haven't been calculated yet, but are set (file load)
- # we calculate the nodes now but don't change the property
- if hasattr(self,"BaseProfile") and hasattr(self,"ExtrusionVector"):
- p1 = self.BaseProfile.CenterOfMass
- p2 = p1.add(self.ExtrusionVector)
- self.nodes = [p1,p2]
- return
- if hasattr(self,"BaseProfile") and hasattr(self,"ExtrusionVector"):
- p1 = self.BaseProfile.CenterOfMass
- p2 = p1.add(self.ExtrusionVector)
- self.nodes = [p1,p2]
- #print "calculating nodes: ",self.nodes
- obj.Nodes = self.nodes
+ if hasattr(self,"BaseProfile") and hasattr(self,"ExtrusionVector"):
+ p1 = self.BaseProfile.CenterOfMass
+ p2 = p1.add(self.ExtrusionVector)
+ self.nodes = [p1,p2]
+ #print "calculating nodes: ",self.nodes
+ obj.Nodes = self.nodes
def getAxisPoints(self,obj):
"returns the gridpoints of linked axes"
diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt
index 1f24428b9..bf0c0f9a0 100755
--- a/src/Mod/Fem/App/CMakeLists.txt
+++ b/src/Mod/Fem/App/CMakeLists.txt
@@ -66,8 +66,11 @@ SET(FemScripts_SRCS
convert2TetGen.py
FemLib.py
CalculixLib.py
+ MechanicalAnalysis.ui
MechanicalAnalysis.py
+ MechanicalMaterial.ui
MechanicalMaterial.py
+ ShowDisplacement.ui
)
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
diff --git a/src/Mod/Fem/MechanicalAnalysis.py b/src/Mod/Fem/MechanicalAnalysis.py
index f835d8b4a..f4b3a9af7 100644
--- a/src/Mod/Fem/MechanicalAnalysis.py
+++ b/src/Mod/Fem/MechanicalAnalysis.py
@@ -21,7 +21,6 @@
#***************************************************************************
import FreeCAD, Fem, os,sys,string,math,shutil,glob,subprocess,tempfile
-#from ApplyingBC_IC import ApplyingBC_IC
if FreeCAD.GuiUp:
import FreeCADGui,FemGui
diff --git a/src/Mod/Fem/ShowDisplacement.ui b/src/Mod/Fem/ShowDisplacement.ui
index 8e5fa0571..c00138f93 100644
--- a/src/Mod/Fem/ShowDisplacement.ui
+++ b/src/Mod/Fem/ShowDisplacement.ui
@@ -6,93 +6,188 @@
0
0
- 193
- 354
+ 186
+ 416
- Mechanical analysis
+ Show result
-
+
-
-
+
-
-
-
-
-
-
- Use color
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
-
-
- Max:
-
-
-
- -
-
-
- true
-
-
-
-
-
- -
-
-
-
-
-
- Avg:
-
-
-
- -
-
-
- true
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
-
-
- Factor:
-
-
-
- -
-
-
-
-
-
+
+
+ Colors
+
+
+ -
+
+
+ Stress
+
+
+ true
+
+
+
+ -
+
+
+ Displacement
+
+
+
+ -
+
+
+ No color
+
+
+
+ -
+
+
-
+
+
+ Max:
+
+
+
+ -
+
+
+ -
+
+
+ Min:
+
+
+
+ -
+
+
+ 99999990.000000000000000
+
+
+
+
+
+
+
+
+ -
+
+
+ Statistic
+
+
+
+ QFormLayout::AllNonFixedFieldsGrow
+
+
-
+
+
+ Max:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Min:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Avg:
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ Displacement
+
+
+
-
+
+
+ Show
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Factor:
+
+
+
+ -
+
+
+ 1
+
+
+
+
+
+ -
+
+
-
+
+
+ Slider max:
+
+
+
+ -
+
+
+ 99999
+
+
+ 20
+
+
+
+
+
+
+
-
@@ -102,7 +197,7 @@
20
- 168
+ 18
@@ -110,7 +205,16 @@
-
-
+
+
+ 20
+
+
+ 1
+
+
+ 1
+
Qt::Vertical