FEM: mesh groups, add icon and make use of it, thanks to bitacovir

This commit is contained in:
Bernd Hahnebach
2020-03-18 23:06:11 +01:00
parent 30e7df5ec2
commit 054ff67928
4 changed files with 451 additions and 4 deletions

View File

@@ -47,6 +47,7 @@
<file>icons/FEM_MeshClear.svg</file>
<file>icons/FEM_MeshDisplayInfo.svg</file>
<file>icons/FEM_MeshGmshFromShape.svg</file>
<file>icons/FEM_MeshGroup.svg</file>
<file>icons/FEM_MeshNetgenFromShape.svg</file>
<file>icons/FEM_MeshRegion.svg</file>

View File

@@ -0,0 +1,450 @@
<?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.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="Fem-femmesh-meshgroup.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" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3703"
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">
<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>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436"
gradientTransform="matrix(1.3852588,-0.05136783,0.03705629,0.9993132,-60.392403,7.7040438)" />
<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" />
<linearGradient
gradientTransform="translate(0,-4)"
inkscape:collect="always"
xlink:href="#linearGradient3767"
id="linearGradient3773"
x1="22.116516"
y1="55.717518"
x2="17.328547"
y2="21.31134"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient3767">
<stop
style="stop-color:#edd400;stop-opacity:1"
offset="0"
id="stop3769" />
<stop
style="stop-color:#fce94f;stop-opacity:1"
offset="1"
id="stop3771" />
</linearGradient>
<linearGradient
gradientTransform="translate(0,-4)"
inkscape:collect="always"
xlink:href="#linearGradient3777"
id="linearGradient3783"
x1="53.896763"
y1="51.179787"
x2="47.502235"
y2="21.83742"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient3777">
<stop
style="stop-color:#c4a000;stop-opacity:1"
offset="0"
id="stop3779" />
<stop
style="stop-color:#edd400;stop-opacity:1"
offset="1"
id="stop3781" />
</linearGradient>
<linearGradient
id="linearGradient4387">
<stop
id="stop4389"
offset="0"
style="stop-color:#71b2f8;stop-opacity:1;" />
<stop
id="stop4391"
offset="1"
style="stop-color:#002795;stop-opacity:1;" />
</linearGradient>
<radialGradient
gradientTransform="translate(-0.23443224,0.23443198)"
gradientUnits="userSpaceOnUse"
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
id="radialGradient3692-2"
xlink:href="#linearGradient3377"
inkscape:collect="always" />
<radialGradient
gradientTransform="matrix(0.52711064,1.8158874,-1.4534843,0.42191331,203.23405,-187.6583)"
r="19.467436"
fy="93.557289"
fx="131.48187"
cy="93.557289"
cx="131.48187"
gradientUnits="userSpaceOnUse"
id="radialGradient3703-5"
xlink:href="#linearGradient4387"
inkscape:collect="always" />
<radialGradient
gradientTransform="matrix(1.2966028,0.17711231,-0.14092861,1.0317094,-32.689929,-29.109274)"
r="19.467436"
fy="83.989143"
fx="147.05713"
cy="83.989143"
cx="147.05713"
gradientUnits="userSpaceOnUse"
id="radialGradient3705-3"
xlink:href="#linearGradient4387"
inkscape:collect="always" />
<inkscape:perspective
id="perspective2868-1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
inkscape:vp_z="64 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 32 : 1"
sodipodi:type="inkscape:persp3d" />
<radialGradient
gradientTransform="translate(-0.23443224,0.23443198)"
gradientUnits="userSpaceOnUse"
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
id="radialGradient3692-5"
xlink:href="#linearGradient3377"
inkscape:collect="always" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="21.31134"
x2="17.328547"
y1="55.717518"
x1="22.116516"
id="linearGradient3773-2"
xlink:href="#linearGradient3767-4"
inkscape:collect="always"
gradientTransform="matrix(0.66009867,0,0,0.66009867,6.6667951,21.168353)" />
<linearGradient
id="linearGradient3767-4"
inkscape:collect="always">
<stop
id="stop3769-8"
offset="0"
style="stop-color:#edd400;stop-opacity:1" />
<stop
id="stop3771-5"
offset="1"
style="stop-color:#fce94f;stop-opacity:1" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="21.83742"
x2="47.502235"
y1="51.179787"
x1="53.896763"
id="linearGradient3783-2"
xlink:href="#linearGradient3777-0"
inkscape:collect="always"
gradientTransform="matrix(0.66009867,0,0,0.66009867,14.798523,20.734447)" />
<linearGradient
id="linearGradient3777-0"
inkscape:collect="always">
<stop
id="stop3779-2"
offset="0"
style="stop-color:#c4a000;stop-opacity:1" />
<stop
id="stop3781-4"
offset="1"
style="stop-color:#edd400;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3767-4"
id="linearGradient913"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.66009867,0,0,0.66009867,14.798523,20.734447)"
x1="22.116516"
y1="55.717518"
x2="17.328547"
y2="21.31134" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.7781746"
inkscape:cx="-12.577093"
inkscape:cy="20.345365"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1800"
inkscape:window-height="1046"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
inkscape:object-paths="true"
inkscape:snap-global="false">
<inkscape:grid
type="xygrid"
id="grid3018"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<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>
<dc:creator>
<cc:Agent>
<dc:title>[bitacobir]</dc:title>
</cc:Agent>
</dc:creator>
<dc:title>fem-femmesh-from-shape</dc:title>
<dc:date>2020-03-16</dc:date>
<dc:relation></dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier></dc:identifier>
<dc:rights>
<cc:Agent>
<dc:title>FreeCAD LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title></dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 55.818182,23.636364 c 0.242424,0 0.242424,0 0,0 z"
id="path2422"
inkscape:connector-curvature="0" />
<path
style="fill:#fce94f;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="M 3,13 37,19 61,11 31,7 z"
id="path2993"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3783);fill-opacity:1;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 61,11 61,47 37,57 37,19 z"
id="path2995"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"
id="path3825"
d="M 3,13 37,19 37,57 3,51 z"
style="fill:url(#linearGradient3773);fill-opacity:1;fill-rule:evenodd;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
style="fill:none;stroke:#fce94f;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 5,15.42772 0.00867,33.919116 30.008671,5.268799 -0.0087,-33.933614 z"
id="path3765"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;stroke:#edd400;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 39.01243,20.433833 -0.01226,33.535301 20.001105,-8.300993 3.6e-4,-31.867363 z"
id="path3775"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 25,54 25,17"
id="path3051"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 13,52 13,15"
id="path3051-3"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 47,51.999998 47,16"
id="path3051-6"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 55,49.5 55,13"
id="path3051-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 24.363636,8.5909091 55,13"
id="path3853"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.75,10.875 47,16"
id="path3873"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.049334,14.759655 40.369369,8.1385643"
id="path3875"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
d="M 25.745115,16.848834 50.365288,9.5849195"
id="path3875-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3,25 34,6"
id="path3895"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3,39 34,6"
id="path3895-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 37,45 61,35"
id="path3915"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#302b00;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 37,31 61,23"
id="path3915-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:#fce94f;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 16.778819,31.956124 22.443355,3.960592 15.842368,-5.280789 -19.80296,-2.640395 z"
id="path2993-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3783-2);fill-opacity:1;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 55.064542,30.635927 V 54.399479 L 39.222174,61.000466 V 35.916716 Z"
id="path2995-3"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"
id="path3825-9"
d="m 16.778819,31.956124 22.443355,3.960592 v 25.08375 L 16.778819,57.039874 Z"
style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient913);fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
style="fill:none;stroke:#fce94f;stroke-width:1.32019734;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 18.099016,33.558659 0.0057,22.389963 19.354139,3.387019 -0.0057,-22.217716 z"
id="path3765-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;stroke:#fce94f;stroke-width:1.32019734;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 40.777849,36.772279 0.128263,22.091152 12.839067,-5.34311 2.38e-4,-21.035604 z"
id="path3775-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 44.040819,29.293367 28.313546,33.838821 V 59.020639"
id="path897"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 27.677183,29.475185 20,3.636364 -0.04545,24.40909"
id="path899"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 16.768092,44.747912 22.545454,4.363637 16,-5.909091"
id="path901"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -560,7 +560,6 @@ class _MeshGroup(CommandManager):
def __init__(self):
super(_MeshGroup, self).__init__()
self.pixmap = "fem-femmesh-from-shape"
self.menuetext = "FEM mesh group"
self.accel = "M, G"
self.tooltip = "Creates a FEM mesh group"

View File

@@ -43,9 +43,6 @@ class _ViewProviderFemMeshGroup(ViewProviderFemConstraint.ViewProxy):
A View Provider for the FemMeshGroup object
"""
def getIcon(self):
return ":/icons/fem-femmesh-from-shape.svg"
def setEdit(self, vobj, mode=0):
ViewProviderFemConstraint.ViewProxy.setEdit(
self,