Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
This commit is contained in:
commit
88f1c2c180
|
@ -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"
|
||||
|
|
|
@ -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})
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,93 +6,188 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>193</width>
|
||||
<height>354</height>
|
||||
<width>186</width>
|
||||
<height>416</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Mechanical analysis</string>
|
||||
<string>Show result</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_UseColor">
|
||||
<property name="text">
|
||||
<string>Use color</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Max">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Avg:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Max_2">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Factor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QGroupBox" name="groupBox_Color">
|
||||
<property name="title">
|
||||
<string>Colors</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_Stress">
|
||||
<property name="text">
|
||||
<string>Stress</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_Displacement">
|
||||
<property name="text">
|
||||
<string>Displacement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_NoColor">
|
||||
<property name="text">
|
||||
<string>No color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_MinValueColor"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_MaxValueColor">
|
||||
<property name="maximum">
|
||||
<double>99999990.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Statistic</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Max">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Min:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Max_3">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Avg:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Max_2">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Displacement</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_ShowDisplacement">
|
||||
<property name="text">
|
||||
<string>Show</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Factor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_DisplacementFactor">
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Slider max:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_SliderFactor">
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
|
@ -102,7 +197,7 @@
|
|||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>168</height>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -110,7 +205,16 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollBar" name="verticalScrollBar">
|
||||
<widget class="QScrollBar" name="verticalScrollBar_Factor">
|
||||
<property name="maximum">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="sliderPosition">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
|
|
Loading…
Reference in New Issue
Block a user