-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathbinBodyGeneratorInput.py
More file actions
261 lines (200 loc) · 6.2 KB
/
Copy pathbinBodyGeneratorInput.py
File metadata and controls
261 lines (200 loc) · 6.2 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
import adsk.core, adsk.fusion, traceback
from . import const
class BinBodyCompartmentDefinition():
def __init__(self, positionX=0, positionY=0, width=1, length=1, depth=9999999999999):
self.positionX = positionX
self.positionY = positionY
self.width = width
self.length = length
# set to something big so it would get limited by bin height
self.depth = depth
@property
def positionX(self) -> float:
return self._positionX
@positionX.setter
def positionX(self, value: float):
self._positionX = value
@property
def positionY(self) -> float:
return self._positionY
@positionY.setter
def positionY(self, value: float):
self._positionY = value
@property
def width(self) -> float:
return self._width
@width.setter
def width(self, value: float):
self._width = value
@property
def length(self) -> float:
return self._length
@length.setter
def length(self, value: float):
self._length = value
@property
def depth(self) -> float:
return self._depth
@depth.setter
def depth(self, value: float):
self._depth = value
class BinBodyGeneratorInput():
def __init__(self):
self.wallThickness = const.BIN_WALL_THICKNESS
self.isSolid = False
self.hasLip = False
self.hasLipNotches = False
self.hasScoop = False
self.scoopMaxRadius = const.BIN_SCOOP_MAX_RADIUS
self.tabOverhangAngle = const.BIN_TAB_OVERHANG_ANGLE
self.tabPosition = 0
self.tabLength = 1
self.tabWidth = const.BIN_TAB_WIDTH
self.compartments = [BinBodyCompartmentDefinition()]
self.compartmentsByX = 1
self.compartmentsByY = 1
self.binCornerFilletRadius = const.BIN_CORNER_FILLET_RADIUS
@property
def baseWidth(self) -> float:
return self._baseWidth
@baseWidth.setter
def baseWidth(self, value: float):
self._baseWidth = value
@property
def baseLength(self) -> float:
return self._baseLength
@baseLength.setter
def baseLength(self, value: float):
self._baseLength = value
@property
def heightUnit(self) -> float:
return self._heightUnit
@heightUnit.setter
def heightUnit(self, value: float):
self._heightUnit = value
@property
def xyClearance(self) -> float:
return self._xyClearance
@xyClearance.setter
def xyClearance(self, value: float):
self._xyClearance = value
@property
def binWidth(self) -> float:
return self._binWidth
@binWidth.setter
def binWidth(self, value: float):
self._binWidth = value
@property
def binLength(self) -> float:
return self._binLength
@binLength.setter
def binLength(self, value: float):
self._binLength = value
@property
def binHeight(self) -> float:
return self._binHeight
@binHeight.setter
def binHeight(self, value: float):
self._binHeight = value
@property
def binCornerFilletRadius(self) -> float:
return self._binCornerFilletRadius
@binCornerFilletRadius.setter
def binCornerFilletRadius(self, value: float):
self._binCornerFilletRadius = value
@property
def wallThickness(self) -> float:
return self._wallThickness
@wallThickness.setter
def wallThickness(self, value: float):
self._wallThickness = value
@property
def isSolid(self) -> bool:
return self._isSolid
@isSolid.setter
def isSolid(self, value: bool):
self._isSolid = value
@property
def hasLipNotches(self) -> bool:
return self._hasLipNotches
@hasLipNotches.setter
def hasLipNotches(self, value: bool):
self._hasLipNotches = value
@property
def hasLip(self) -> bool:
return self._hasLip
@hasLip.setter
def hasLip(self, value: bool):
self._hasLip = value
@property
def hasScoop(self) -> bool:
return self._hasScoop
@hasScoop.setter
def hasScoop(self, value: bool):
self._hasScoop = value
@property
def scoopMaxRadius(self) -> float:
return self._scoopMaxRadius
@scoopMaxRadius.setter
def scoopMaxRadius(self, value: float):
self._scoopMaxRadius = value
@property
def hasTab(self) -> bool:
return self._hasTab
@hasTab.setter
def hasTab(self, value: bool):
self._hasTab = value
@property
def isTabHollow(self) -> bool:
return self._isTabHollow
@isTabHollow.setter
def isTabHollow(self, value: bool):
self._isTabHollow = value
@property
def tabWidth(self) -> float:
return self._tabWidth
@tabWidth.setter
def tabWidth(self, value: float):
self._tabWidth = value
@property
def tabLength(self) -> float:
return self._tabLength
@tabLength.setter
def tabLength(self, value: float):
self._tabLength = value
@property
def tabPosition(self) -> float:
return self._tabPosition
@tabPosition.setter
def tabPosition(self, value: float):
self._tabPosition = value
@property
def tabLabelAngle(self) -> float:
return self._tabLabelAngle
@tabLabelAngle.setter
def tabLabelAngle(self, value: float):
self._tabLabelAngle = value
@property
def tabOverhangAngle(self) -> float:
return self._tabOverhangAngle
@tabOverhangAngle.setter
def tabOverhangAngle(self, value: float):
self._tabOverhangAngle = value
@property
def compartmentsByX(self) -> float:
return self._compartmentsByX
@compartmentsByX.setter
def compartmentsByX(self, value: float):
self._compartmentsByX = value
@property
def compartmentsByY(self) -> float:
return self._compartmentsByY
@compartmentsByY.setter
def compartmentsByY(self, value: float):
self._compartmentsByY = value
@property
def compartments(self) -> list[BinBodyCompartmentDefinition]:
return self._compartments
@compartments.setter
def compartments(self, value: list[BinBodyCompartmentDefinition]):
self._compartments = value