forked from MariwanJ/Design456
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDesign456Init.py
More file actions
82 lines (70 loc) · 3.81 KB
/
Copy pathDesign456Init.py
File metadata and controls
82 lines (70 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#
# ***************************************************************************
# * *
# * This file is a apart of the Open Source Design456 Workbench - FreeCAD. *
# * *
# * Copyright (C) 2025 *
# * *
# * *
# * This library is free software; you can redistribute it and/or *
# * modify it under the terms of the GNU Lesser 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 *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with this library; if not, If not, see *
# * <http://www.gnu.org/licenses/>. *
# * *
# * Author : Mariwan Jalal mariwan.jalal@gmail.com *
# ***************************************************************************
import os,sys
import FreeCAD as App
from draftutils.translate import translate #for translate
"""
This file will add all paths needed for the Design456.
It makes life easier. By doing that you can import any file
in any of the subdirectories. Adding more subdirectories
needs be added here.
ICON path should be always added as below
'Resources/icons/'
"""
__updated__ = '2022-10-05 20:55:16'
#Design456
__dir__ = os.path.dirname(__file__)
ICON_PATH = os.path.join(__dir__, 'Resources/icons/')
IMAGE_PATH = os.path.join(__dir__, 'Resources/images/')
IMPORT_PATH= os.path.join(__dir__, 'Imported/')
UI_PATH = os.path.join(__dir__, 'Resources/ui/')
PATH_PREF=os.path.join(__dir__, 'Preferences/')
#Pyramid shapes
PYRAMID_PATH = os.path.join(__dir__, 'PyramidMo/')
PYRAMID_ICON_PATH = os.path.join(__dir__, 'PyramidMo/Resources/icons/')
#Coin3D New widget system
WIDGETS3D_PATH=os.path.join(__dir__,'ThreeDWidgets/')
#Direct Modeling implementation
DIRECTMODELING_PATH=os.path.join(__dir__,'DirectModeling/')
#From DRAFT
__dirname__ = os.path.join(App.getResourceDir(), "Mod", "Draft")
# Defeaturing WB
DEFEATURING_WB = os.path.join(__dir__,'DefeaturingWB/')
DefeaturingWB_icons_path = os.path.join( DEFEATURING_WB, 'Resources', 'icons')
# PART #Causes issue - Reported by luzpaz as per https://github.com/MariwanJ/Design456/issues/81#issuecomment-2306974570
#App.addImportType("BREP format (*.brep *.brp)", "Part")
#App.addExportType("BREP format (*.brep *.brp)", "Part")
#App.addImportType("IGES format (*.iges *.igs)", "Part")
#App.addExportType("IGES format (*.iges *.igs)", "Part")
#App.addImportType("STEP with colors (*.step *.stp)", "Import")
#App.addExportType("STEP with colors (*.step *.stp)", "Import")
#Desing456 WB Default view
#Default Extrusion direction, i.e. 2D/3D objects are placed on XY plane by default.
DefaultDirectionOfExtrusion='z' # We need to know this always. Any change in the plane should be saved here.
#Pointer to the workbench
pToWorkbench=None
App.__unit_test__ += ["TestPartApp"]