FreeCAD

Форк
0
/
InitGui.py 
58 строк · 2.6 Кб
1
# Mesh gui init module
2
# (c) 2004 Werner Mayer
3
#
4
# Gathering all the information to start FreeCAD
5
# This is the second one of three init scripts, the third one
6
# runs when the gui is up
7

8
# ***************************************************************************
9
# *   Copyright (c) 2004 Werner Mayer <werner.wm.mayer@gmx.de>              *
10
# *                                                                         *
11
# *   This file is part of the FreeCAD CAx development system.              *
12
# *                                                                         *
13
# *   This program is free software; you can redistribute it and/or modify  *
14
# *   it under the terms of the GNU Lesser General Public License (LGPL)    *
15
# *   as published by the Free Software Foundation; either version 2 of     *
16
# *   the License, or (at your option) any later version.                   *
17
# *   for detail see the LICENCE text file.                                 *
18
# *                                                                         *
19
# *   FreeCAD is distributed in the hope that it will be useful,            *
20
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
21
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
22
# *   GNU Lesser General Public License for more details.                   *
23
# *                                                                         *
24
# *   You should have received a copy of the GNU Library General Public     *
25
# *   License along with FreeCAD; if not, write to the Free Software        *
26
# *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
27
# *   USA                                                                   *
28
# *                                                                         *
29
# ***************************************************************************/
30

31

32
class MeshWorkbench(Workbench):
33
    "Mesh workbench object"
34

35
    def __init__(self):
36
        self.__class__.Icon = (
37
            FreeCAD.getResourceDir() + "Mod/Mesh/Resources/icons/MeshWorkbench.svg"
38
        )
39
        self.__class__.MenuText = "Mesh"
40
        self.__class__.ToolTip = "Mesh workbench"
41

42
    def Initialize(self):
43
        import Mesh
44
        import MeshGui
45

46
        try:
47
            import flatmesh
48
            import MeshFlatteningCommand
49
        except ImportError as e:
50
            import FreeCAD
51

52
            FreeCAD.Console.PrintLog((str(e)))
53

54
    def GetClassName(self):
55
        return "MeshGui::Workbench"
56

57

58
Gui.addWorkbench(MeshWorkbench())
59

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.