From e214567a64e49d2625b5bb4aeee3599d92b0ec5e Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 1 Feb 2016 19:17:32 +0100 Subject: [PATCH] Start: add FEM example to Start page --- data/examples/CMakeLists.txt | 1 + src/Mod/Start/CMakeLists.txt | 1 + src/Mod/Start/StartPage/LoadFemExample.py | 26 +++++++++++++++++++++++ src/Mod/Start/StartPage/StartPage.py | 2 ++ 4 files changed, 30 insertions(+) create mode 100644 src/Mod/Start/StartPage/LoadFemExample.py diff --git a/data/examples/CMakeLists.txt b/data/examples/CMakeLists.txt index 91831a7d2..845af0bc4 100644 --- a/data/examples/CMakeLists.txt +++ b/data/examples/CMakeLists.txt @@ -6,6 +6,7 @@ SET(Examples_Files PartDesignExample.FCStd RobotExample.FCStd ArchDetail.FCStd + FemCalculixCantilever3D.FCStd ) ADD_CUSTOM_TARGET(Example_data ALL diff --git a/src/Mod/Start/CMakeLists.txt b/src/Mod/Start/CMakeLists.txt index 76d28d63b..0bd49b7bc 100644 --- a/src/Mod/Start/CMakeLists.txt +++ b/src/Mod/Start/CMakeLists.txt @@ -17,6 +17,7 @@ if(BUILD_GUI) LoadMRU1.py LoadMRU2.py LoadArchExample.py + LoadFemExample.py Mesh.py PartDesign.py Background.jpg diff --git a/src/Mod/Start/StartPage/LoadFemExample.py b/src/Mod/Start/StartPage/LoadFemExample.py new file mode 100644 index 000000000..80d2fecbd --- /dev/null +++ b/src/Mod/Start/StartPage/LoadFemExample.py @@ -0,0 +1,26 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 * +#* Yorik van Havre * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* This program 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 program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +import FreeCAD,FreeCADGui +FreeCAD.open(FreeCAD.getResourceDir()+"examples/FemCalculixCantilever3D.FCStd") +FreeCADGui.activeDocument().sendMsgToViews("ViewFit") diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 34b8ccba9..df4590def 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -106,6 +106,7 @@ text56 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=T text57 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=Power_users_hub") text58 = translate("StartPage","Your version of FreeCAD is up to date.") text59 = translate("StartPage","There is a new release of FreeCAD available.") +text60 = translate("StartPage","Load an FEM example analysis") # get FreeCAD version @@ -434,6 +435,7 @@ def getExamples():
  •  """ + text12 + """
  •  """ + text13 + """
  •  """ + text55 + """
  • +
  •  """ + text60 + """
  • """ def getLinks():