Finish loading Calculix result files
This commit is contained in:
parent
c1a3b1434a
commit
226c25f9d9
|
@ -40,6 +40,7 @@ FemResultObject::FemResultObject()
|
|||
ADD_PROPERTY_TYPE(DataType,(""), "General",Prop_None,"Type identifier of the result data");
|
||||
ADD_PROPERTY_TYPE(Unit,(Base::Quantity()), "General",Prop_None,"Unit of the data");
|
||||
ADD_PROPERTY_TYPE(ElementNumbers,(0), "Data",Prop_None,"Numbers of the result elements");
|
||||
ADD_PROPERTY_TYPE(Mesh,(0), "General",Prop_None,"Link to the corosbonding mesh");
|
||||
}
|
||||
|
||||
FemResultObject::~FemResultObject()
|
||||
|
|
|
@ -48,10 +48,13 @@ public:
|
|||
App::PropertyQuantity Unit;
|
||||
/// List of element numbers in this result object
|
||||
App::PropertyIntegerList ElementNumbers;
|
||||
/// Link to the corosbonding mesh
|
||||
App::PropertyLink Mesh;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
//virtual const char* getViewProviderName(void) const {
|
||||
// return "FemGui::ViewProviderFemSet";
|
||||
//}
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
return "FemGui::ViewProviderResult";
|
||||
}
|
||||
virtual App::DocumentObjectExecReturn *execute(void) {
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
using namespace Fem;
|
||||
using namespace App;
|
||||
|
||||
PROPERTY_SOURCE(Fem::FemResultValue, App::DocumentObject)
|
||||
PROPERTY_SOURCE(Fem::FemResultValue, Fem::FemResultObject)
|
||||
|
||||
|
||||
FemResultValue::FemResultValue()
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
using namespace Fem;
|
||||
using namespace App;
|
||||
|
||||
PROPERTY_SOURCE(Fem::FemResultVector, App::DocumentObject)
|
||||
PROPERTY_SOURCE(Fem::FemResultVector, Fem::FemResultObject)
|
||||
|
||||
|
||||
FemResultVector::FemResultVector()
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
|
||||
import FreeCAD,os
|
||||
from math import pow,sqrt
|
||||
|
||||
__title__="FreeCAD Calculix library"
|
||||
__author__ = "Juergen Riegel "
|
||||
|
@ -114,8 +115,12 @@ def readResult(frd_input) :
|
|||
|
||||
def importFrd(filename):
|
||||
m = readResult(filename);
|
||||
MeshObject = None
|
||||
if(len(m) > 0):
|
||||
import Fem
|
||||
AnalysisName = os.path.splitext(os.path.basename(filename))[0]
|
||||
AnalysisObject = FreeCAD.ActiveDocument.addObject('Fem::FemAnalysis','Analysis')
|
||||
AnalysisObject.Label = AnalysisName
|
||||
if(m.has_key('Tet10Elem') and m.has_key('Nodes') ):
|
||||
mesh = Fem.FemMesh()
|
||||
nds = m['Nodes']
|
||||
|
@ -127,7 +132,34 @@ def importFrd(filename):
|
|||
e = elms[i]
|
||||
mesh.addVolume([e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9]],i)
|
||||
|
||||
Fem.show(mesh)
|
||||
MeshObject = FreeCAD.ActiveDocument.addObject('Fem::FemMeshObject','ResultMesh')
|
||||
MeshObject.FemMesh = mesh
|
||||
AnalysisObject.Member = AnalysisObject.Member + [MeshObject]
|
||||
|
||||
if(m.has_key('Displacement')):
|
||||
disp = m['Displacement']
|
||||
o = FreeCAD.ActiveDocument.addObject('Fem::FemResultVector','Displacement')
|
||||
o.Values = disp.values()
|
||||
o.ElementNumbers = disp.keys()
|
||||
if(MeshObject):
|
||||
o.Mesh = MeshObject
|
||||
AnalysisObject.Member = AnalysisObject.Member + [o]
|
||||
if(m.has_key('Stress')):
|
||||
stress = m['Stress']
|
||||
o = FreeCAD.ActiveDocument.addObject('Fem::FemResultValue','MisesStress')
|
||||
mstress = []
|
||||
for i in stress.values():
|
||||
# van mises stress (http://en.wikipedia.org/wiki/Von_Mises_yield_criterion)
|
||||
mstress.append( sqrt( pow( i[0] - i[1] ,2) + pow( i[1] - i[2] ,2) + pow( i[2] - i[0] ,2) + 6 * (pow(i[3],2)+pow(i[4],2)+pow(i[5],2) ) ) )
|
||||
|
||||
o.Values = mstress
|
||||
o.ElementNumbers = stress.keys()
|
||||
if(MeshObject):
|
||||
o.Mesh = MeshObject
|
||||
AnalysisObject.Member = AnalysisObject.Member + [o]
|
||||
if(FreeCAD.GuiUp):
|
||||
import FemGui
|
||||
FemGui.setActiveAnalysis(AnalysisObject)
|
||||
|
||||
def insert(filename,docname):
|
||||
"called when freecad wants to import a file"
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "ViewProviderFemConstraintForce.h"
|
||||
#include "ViewProviderFemConstraintGear.h"
|
||||
#include "ViewProviderFemConstraintPulley.h"
|
||||
#include "ViewProviderResult.h"
|
||||
#include "Workbench.h"
|
||||
//#include "resources/qrc_Fem.cpp"
|
||||
|
||||
|
@ -94,6 +95,7 @@ void FemGuiExport initFemGui()
|
|||
FemGui::ViewProviderFemConstraintForce ::init();
|
||||
FemGui::ViewProviderFemConstraintGear ::init();
|
||||
FemGui::ViewProviderFemConstraintPulley ::init();
|
||||
FemGui::ViewProviderResult ::init();
|
||||
|
||||
Base::Interpreter().loadModule("MechanicalAnalysis");
|
||||
Base::Interpreter().loadModule("MechanicalMaterial");
|
||||
|
|
|
@ -133,6 +133,8 @@ SET(FemGui_SRCS_ViewProvider
|
|||
ViewProviderFemConstraintGear.h
|
||||
ViewProviderFemConstraintPulley.cpp
|
||||
ViewProviderFemConstraintPulley.h
|
||||
ViewProviderResult.cpp
|
||||
ViewProviderResult.h
|
||||
)
|
||||
SOURCE_GROUP("ViewProvider" FILES ${FemGui_SRCS_ViewProvider})
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
<file>icons/Fem_AddPart.svg</file>
|
||||
<file>icons/Fem_Material.svg</file>
|
||||
<file>icons/Fem_NewAnalysis.svg</file>
|
||||
<file>icons/Fem_Result.svg</file>
|
||||
<file>icons/Fem_ResultDisplacement.svg</file>
|
||||
<file>icons/Fem_ResultStress.svg</file>
|
||||
<file>translations/Fem_af.qm</file>
|
||||
<file>translations/Fem_de.qm</file>
|
||||
<file>translations/Fem_fi.qm</file>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
id="svg2860"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Fem_FemMesh.svg"
|
||||
sodipodi:docname="Fem_Analysis.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
|
@ -79,7 +79,7 @@
|
|||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.5"
|
||||
inkscape:cx="-0.90909091"
|
||||
inkscape:cx="1.1818182"
|
||||
inkscape:cy="29.272727"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
|
@ -87,8 +87,8 @@
|
|||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="750"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-x="1349"
|
||||
inkscape:window-y="189"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
|
@ -98,7 +98,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -108,7 +108,7 @@
|
|||
inkscape:groupmode="layer">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffff00;fill-opacity:1;stroke:#241c1c;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif"
|
||||
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffff00;fill-opacity:1;stroke:#241c1c;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.09999999999999960"
|
||||
x="10.909091"
|
||||
y="54.909092"
|
||||
id="text3014"
|
||||
|
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
175
src/Mod/Fem/Gui/Resources/icons/Fem_Result.svg
Normal file
175
src/Mod/Fem/Gui/Resources/icons/Fem_Result.svg
Normal file
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Fem_ResultDisplacement.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377"
|
||||
id="radialGradient3692"
|
||||
cx="45.883327"
|
||||
cy="28.869568"
|
||||
fx="45.883327"
|
||||
fy="28.869568"
|
||||
r="19.467436"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3377">
|
||||
<stop
|
||||
id="stop3379"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2868" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-8"
|
||||
id="radialGradient3703-7"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-8">
|
||||
<stop
|
||||
id="stop3379-0"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-6"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="radialGradient3703-1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-6">
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
id="stop3786"
|
||||
offset="0.5"
|
||||
style="stop-color:#0003f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-5"
|
||||
offset="1"
|
||||
style="stop-color:#ff0000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3788"
|
||||
x1="-0.01679256"
|
||||
y1="14.293757"
|
||||
x2="64.0868"
|
||||
y2="14.293757"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3814"
|
||||
x1="163.77647"
|
||||
y1="96.396309"
|
||||
x2="179.47777"
|
||||
y2="96.396309"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3816"
|
||||
x1="12.594974"
|
||||
y1="31.093735"
|
||||
x2="53.898453"
|
||||
y2="32.617771"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.01411218,-1.3055708,0.47684233,0.03863846,15.500382,72.056154)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8.7393979"
|
||||
inkscape:cx="24.04931"
|
||||
inkscape:cy="35.562796"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
inkscape:window-x="1042"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:url(#linearGradient3816);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.32764792;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="M 45.533176,61.752047 17.129484,61.744506 17.468441,2.1933317 45.262316,2.4730246 z"
|
||||
id="rect3520-7"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1.51256716px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 13.110404,79.471866 c 0.09167,0 0.183347,0 0,0 z"
|
||||
id="path2394"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.4 KiB |
181
src/Mod/Fem/Gui/Resources/icons/Fem_ResultDisplacement.svg
Normal file
181
src/Mod/Fem/Gui/Resources/icons/Fem_ResultDisplacement.svg
Normal file
|
@ -0,0 +1,181 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Fem_ResultStress.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377"
|
||||
id="radialGradient3692"
|
||||
cx="45.883327"
|
||||
cy="28.869568"
|
||||
fx="45.883327"
|
||||
fy="28.869568"
|
||||
r="19.467436"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3377">
|
||||
<stop
|
||||
id="stop3379"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2868" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-8"
|
||||
id="radialGradient3703-7"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-8">
|
||||
<stop
|
||||
id="stop3379-0"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-6"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="radialGradient3703-1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-6">
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
id="stop3786"
|
||||
offset="0.5"
|
||||
style="stop-color:#0003f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-5"
|
||||
offset="1"
|
||||
style="stop-color:#ff0000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3788"
|
||||
x1="-0.01679256"
|
||||
y1="14.293757"
|
||||
x2="64.0868"
|
||||
y2="14.293757"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3814"
|
||||
x1="163.77647"
|
||||
y1="96.396309"
|
||||
x2="179.47777"
|
||||
y2="96.396309"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3816"
|
||||
x1="12.594974"
|
||||
y1="31.093735"
|
||||
x2="53.898453"
|
||||
y2="32.617771"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.01411218,-1.3055708,0.47684233,0.03863846,2.7992781,72.628276)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8.7393979"
|
||||
inkscape:cx="24.04931"
|
||||
inkscape:cy="35.562796"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
inkscape:window-x="1042"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:url(#linearGradient3816);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.32764792;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="M 32.832072,62.324169 4.4283805,62.316628 4.7673371,2.7654535 32.561212,3.0451464 z"
|
||||
id="rect3520-7"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1.51256716px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 13.110404,79.471866 c 0.09167,0 0.183347,0 0,0 z"
|
||||
id="path2394"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#ffad00;fill-opacity:1;stroke:#000000;stroke-width:2.15225554px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 41.368413,56.44961 48.632684,9.5952235 55.77787,56.958895 z"
|
||||
id="path3822-2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.8 KiB |
194
src/Mod/Fem/Gui/Resources/icons/Fem_ResultStress.svg
Normal file
194
src/Mod/Fem/Gui/Resources/icons/Fem_ResultStress.svg
Normal file
|
@ -0,0 +1,194 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2860"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Fem_Result.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs2862">
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377"
|
||||
id="radialGradient3692"
|
||||
cx="45.883327"
|
||||
cy="28.869568"
|
||||
fx="45.883327"
|
||||
fy="28.869568"
|
||||
r="19.467436"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3377">
|
||||
<stop
|
||||
id="stop3379"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2868" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-8"
|
||||
id="radialGradient3703-7"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-8">
|
||||
<stop
|
||||
id="stop3379-0"
|
||||
offset="0"
|
||||
style="stop-color:#faff2b;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-6"
|
||||
offset="1"
|
||||
style="stop-color:#ffaa00;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="radialGradient3703-1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="135.38333"
|
||||
cy="97.369568"
|
||||
fx="135.38333"
|
||||
fy="97.369568"
|
||||
r="19.467436"
|
||||
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
|
||||
<linearGradient
|
||||
id="linearGradient3377-6">
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3784" />
|
||||
<stop
|
||||
id="stop3786"
|
||||
offset="0.5"
|
||||
style="stop-color:#0003f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381-5"
|
||||
offset="1"
|
||||
style="stop-color:#ff0000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3788"
|
||||
x1="-0.01679256"
|
||||
y1="14.293757"
|
||||
x2="64.0868"
|
||||
y2="14.293757"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3814"
|
||||
x1="163.77647"
|
||||
y1="96.396309"
|
||||
x2="179.47777"
|
||||
y2="96.396309"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3377-6"
|
||||
id="linearGradient3816"
|
||||
x1="12.594974"
|
||||
y1="31.093735"
|
||||
x2="53.898453"
|
||||
y2="32.617771"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.01411218,-1.3055708,0.47684233,0.03863846,2.7992781,72.628276)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8.7393979"
|
||||
inkscape:cx="24.04931"
|
||||
inkscape:cy="35.562796"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1137"
|
||||
inkscape:window-x="1042"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2865">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:url(#linearGradient3816);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.32764792;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="M 32.832072,62.324169 4.4283805,62.316628 4.7673371,2.7654535 32.561212,3.0451464 z"
|
||||
id="rect3520-7"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1.51256716px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 13.110404,79.471866 c 0.09167,0 0.183347,0 0,0 z"
|
||||
id="path2394"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:#ffff00;stroke:#241c1c"
|
||||
id="rect3818"
|
||||
width="18.536747"
|
||||
height="22.656023"
|
||||
x="38.675434"
|
||||
y="23.036079" />
|
||||
<path
|
||||
style="fill:#ffad00;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 40.792285,19.202863 47.77217,8.6758225 54.637632,19.317287 z"
|
||||
id="path3822-2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:#ffad00;fill-opacity:1;stroke:#000000;stroke-width:1.00258374px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 41.136849,49.268555 6.978582,10.583484 6.864181,-10.698521 z"
|
||||
id="path3822-2-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
|
@ -50,7 +50,7 @@ PROPERTY_SOURCE(FemGui::ViewProviderFemAnalysis, Gui::ViewProviderDocumentObject
|
|||
|
||||
ViewProviderFemAnalysis::ViewProviderFemAnalysis()
|
||||
{
|
||||
|
||||
sPixmap = "Fem_Analysis";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,9 @@ public:
|
|||
|
||||
virtual bool onDelete(const std::vector<std::string> &);
|
||||
|
||||
// shows solid in the tree
|
||||
virtual bool isShow(void) const{return true;}
|
||||
|
||||
protected:
|
||||
virtual bool setEdit(int ModNum);
|
||||
virtual void unsetEdit(int ModNum);
|
||||
|
|
|
@ -166,6 +166,7 @@ App::PropertyFloatConstraint::Constraints ViewProviderFemMesh::floatRange = {1.0
|
|||
|
||||
ViewProviderFemMesh::ViewProviderFemMesh()
|
||||
{
|
||||
sPixmap = "Fem_FemMesh";
|
||||
|
||||
ADD_PROPERTY(PointColor,(App::Color(0.7f,0.7f,0.7f)));
|
||||
ADD_PROPERTY(PointSize,(5.0f));
|
||||
|
|
73
src/Mod/Fem/Gui/ViewProviderResult.cpp
Normal file
73
src/Mod/Fem/Gui/ViewProviderResult.cpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
/***************************************************************************
|
||||
* Copyright (c) 2013 Jürgen Riegel (FreeCAD@juergen-riegel.net) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <Standard_math.hxx>
|
||||
|
||||
#endif
|
||||
|
||||
#include "ViewProviderResult.h"
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/Control.h>
|
||||
|
||||
#include <Mod/Fem/App/FemAnalysis.h>
|
||||
|
||||
#include "TaskDlgAnalysis.h"
|
||||
|
||||
using namespace FemGui;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PROPERTY_SOURCE(FemGui::ViewProviderResult, Gui::ViewProviderDocumentObject)
|
||||
|
||||
|
||||
ViewProviderResult::ViewProviderResult()
|
||||
{
|
||||
sPixmap = "Fem_Result";
|
||||
|
||||
}
|
||||
|
||||
ViewProviderResult::~ViewProviderResult()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Python feature -----------------------------------------------------------------------
|
||||
|
||||
namespace Gui {
|
||||
/// @cond DOXERR
|
||||
PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderResultPython, FemGui::ViewProviderResult)
|
||||
/// @endcond
|
||||
|
||||
// explicit template instantiation
|
||||
template class FemGuiExport ViewProviderPythonFeatureT<ViewProviderResult>;
|
||||
}
|
65
src/Mod/Fem/Gui/ViewProviderResult.h
Normal file
65
src/Mod/Fem/Gui/ViewProviderResult.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
/***************************************************************************
|
||||
* Copyright (c) 2013 Jürgen Riegel (FreeCAD@juergen-riegel.net) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef FEM_ViewProviderResult_H
|
||||
#define FEM_ViewProviderResult_H
|
||||
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Gui/ViewProviderBuilder.h>
|
||||
#include <Gui/ViewProviderPythonFeature.h>
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoDrawStyle;
|
||||
class SoIndexedFaceSet;
|
||||
class SoIndexedLineSet;
|
||||
class SoShapeHints;
|
||||
class SoMaterialBinding;
|
||||
|
||||
namespace FemGui
|
||||
{
|
||||
|
||||
|
||||
|
||||
class FemGuiExport ViewProviderResult : public Gui::ViewProviderDocumentObject
|
||||
{
|
||||
PROPERTY_HEADER(FemGui::ViewProviderResult);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderResult();
|
||||
|
||||
/// destructor
|
||||
~ViewProviderResult();
|
||||
|
||||
// shows solid in the tree
|
||||
virtual bool isShow(void) const{return true;}
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
typedef Gui::ViewProviderPythonFeatureT<ViewProviderResult> ViewProviderResultPython;
|
||||
|
||||
} //namespace FemGui
|
||||
|
||||
|
||||
#endif // FEM_ViewProviderResult_H
|
Loading…
Reference in New Issue
Block a user