FreeCAD-macros

Форк
0
/
MultiCopy.FCMacro 
121 строка · 4.8 Кб
1

2

3
##########################################################################################
4
#####				L I C E N S E					     #####
5
##########################################################################################
6
#
7
#  GNU LESSER GENERAL PUBLIC LICENSE
8
#  Version 2.1, February 1999
9
#
10
#  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
11
#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
12
#  Everyone is permitted to copy and distribute verbatim copies
13
#  of this license document, but changing it is not allowed.
14
#
15
#  [This is the first released version of the Lesser GPL. It also counts
16
#  as the successor of the GNU Library Public License, version 2, hence
17
#  the version number 2.1.]
18
#
19
#  'MultiCopy' is a FreeCAD macro package. MultiCopy allows the duplication 
20
#  (copy and paste) of multiple FreeCAD objects that can be labelled 
21
#  sequentially and in a custom manner.
22
#
23
#  Copyright (C) 2021  Melwyn Francis Carlo
24
#
25
#  This library is free software; you can redistribute it and/or
26
#  modify it under the terms of the GNU Lesser General Public
27
#  License as published by the Free Software Foundation; either
28
#  version 2.1 of the License, or (at your option) any later version.
29
#
30
#  This library is distributed in the hope that it will be useful,
31
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
32
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33
#  Lesser General Public License for more details.
34
#
35
#  You should have received a copy of the GNU Lesser General Public License
36
#  along with this library; if not, write to the Free Software Foundation, Inc.,
37
#  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
38
#
39
#  Contact Information :-
40
#  Email :  carlo.melwyn@outlook.com
41
#  FreeCAD UserTalk :  http://www.freecadweb.org/wiki/index.php?title=User:Melwyncarlo
42
#
43
##########################################################################################
44
#####				L I C E N S E					     #####
45
##########################################################################################
46
#
47
#
48
#
49
#  The MultiCopy macro was developed and tested on a platform containing the 
50
#  following system and FreeCAD software specifications : 
51
#
52
#  - OS			: Ubuntu 18.04.5 LTS (LXDE/Lubuntu)
53
#  - Word size of OS	: 64-bit
54
#  - Word size of FreeCAD: 64-bit
55
#  - Version		: 0.19
56
#  - Build type		: Release
57
#  - Branch		: unknown
58
#  - Hash		: 32200b604d421c4dad527fe587a7d047cf953b4f
59
#  - Python version	: 3.6.9
60
#  - Qt version		: 5.9.5
61
#  - Coin version	: 4.0.0a
62
#  - OCC version	: 7.3.0
63
#  - Locale		: English/UnitedKingdom (en_GB)
64

65

66

67
"""
68
  To use this macro, the steps to be followed are simple and straightforward :
69
  select one or more FreeCAD objects from the Tree view, and then select 'MultiCopy'.
70
  In the dialog box that pops up, choose the copy method, select and input the relevant 
71
  paste parameters and commands, and then click on 'Paste'.
72

73
  Note (1)	The single underscore prefix (e.g. _name) denotes a private 
74
		function or a private variable.
75
  Note (2)	Some of the short forms used in this script are as follows:
76
		  'mc' stands for MultiCopy
77
  		  'pcc' stands for Paste Code Commands
78
  		  'd' stands for Dialog (e.g. _d_, etc.)
79
"""
80

81

82

83
__Title__='MultiCopy'
84
__Author__='Melwyncarlo'
85
__Version__='2.0.0'
86
__Date__='2021-03-23'
87
__Comment__='MultiCopy allows the duplication (copy and paste) of multiple FreeCAD objects that can be labelled sequentially and in a custom manner.'
88
__Web__='https://github.com/melwyncarlo/MultiCopy'
89
__Wiki__='http://www.freecadweb.org/wiki/index.php?title=Macro_MultiCopy'
90
__Icon__='MultiCopy.svg'
91
__Help__='Select one or more FreeCAD objects, then click on the MultiCopy button/macro, and follow the instructions in the dialog box.'
92
__Status__='stable'
93
__Requires__='Freecad >= v0.17'
94
__Communication__='https://github.com/melwyncarlo/MultiCopy/issues'
95
__Files__='MultiCopyGui.py, MultiCopyCore.py, MultiCopyAuxFunc.py, MultiCopy/resources/MultiCopy_Main_Dialog.ui, MultiCopy/resources/MultiCopy_Commands_Dialog.ui, MultiCopy/resources/MultiCopy.svg'
96

97

98

99

100
# Library Imports
101
#------------------------------------------------------------------------------------------------
102

103
import MultiCopy
104

105

106

107
###################################################################
108
###-------------------------------------------------------------###
109
### 			MULTICOPY MACRO CALLS			###
110
###-------------------------------------------------------------###
111
###								###
112
###	This is the main macro call. The code below commences 	###
113
###	the MultiCopy GUI interface. This script cannot be 	###
114
###	called externally.					###
115
								###
116
								###
117
if __name__ == '__main__':					###
118
	MultiCopy.Gui.Launch()					###
119
								###
120
###-------------------------------------------------------------###
121
### 			MULTICOPY MACRO CALLS	   		###
122
###-------------------------------------------------------------###
123
###################################################################
124

125

126

127

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

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

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

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