-
Notifications
You must be signed in to change notification settings - Fork 61
/
widgets.py
368 lines (347 loc) · 38.3 KB
/
widgets.py
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
COLLECTION_NAME = 'Rigacar widgets'
def create():
if COLLECTION_NAME not in bpy.data.collections:
c = bpy.data.collections.new(COLLECTION_NAME)
c.hide_viewport = True
c.hide_render = True
c.hide_select = True
widgets_collection = bpy.data.collections[COLLECTION_NAME]
if COLLECTION_NAME not in bpy.context.scene.collection.children:
bpy.context.scene.collection.children.link(widgets_collection)
for name, widget in get_widgets().items():
object_name = 'WGT-CarRig.%s' % name
if object_name not in bpy.data.objects:
m = bpy.data.meshes.new(object_name)
m.from_pydata(widget['vertices'], widget['edges'], [])
o = bpy.data.objects.new(object_name, m)
else:
o = bpy.data.objects[object_name]
if object_name not in widgets_collection.objects:
widgets_collection.objects.link(o)
def get_widgets():
"""
Return array of data compatible with method Mesh.from_pydata.
To get data in Blender from the selected object, use:
{'vertices': [v.co[:] for v in bpy.context.object.data.vertices], 'edges': [e.vertices[:] for e in bpy.context.object.data.edges]}
"""
widgets = {}
widgets['DriftHandle'] = {
'vertices': [(0.560016930103302, 3.5614462490229926e-07, 0.0), (0.5472726821899414, 0.051212746649980545, 0.0),
(0.5173879265785217, 0.09973714500665665, 0.0), (0.4643173813819885, 0.14344893395900726, 0.0),
(0.3959912657737732, 0.1842898577451706, 0.0), (0.3111281096935272, 0.21670186519622803, 0.0),
(0.21430844068527222, 0.2407861351966858, 0.0), (0.10925304144620895, 0.2556171119213104, 0.0),
(0.5551204085350037, 0.025475479662418365, 0.0), (0.5348702073097229, 0.07644488662481308, 0.0),
(0.4915122985839844, 0.12226644158363342, 0.0), (0.4308139681816101, 0.1645427942276001, 0.0),
(0.3535597026348114, 0.2004958689212799, 0.0), (0.2627182900905609, 0.22874398529529572, 0.0),
(0.16178074479103088, 0.2482016384601593, 0.0), (0.05462652072310448, 0.2581210136413574, 0.0),
(0.4683051109313965, 2.978201791847823e-07, 0.0), (0.46016228199005127, 0.03240064159035683, 0.0),
(0.43346360325813293, 0.06059274449944496, 0.0), (0.38938117027282715, 0.08542850613594055, 0.0),
(0.33114129304885864, 0.110313281416893, 0.0), (0.2601758539676666, 0.13103415071964264, 0.0),
(0.17921197414398193, 0.1465274840593338, 0.0), (0.09136109799146652, 0.15609556436538696, 0.0),
(0.4649912118911743, 0.015658844262361526, 0.0), (0.450432151556015, 0.04798557236790657, 0.0),
(0.41178521513938904, 0.07347165793180466, 0.0), (0.3602612316608429, 0.09748400002717972, 0.0),
(0.29565858840942383, 0.12036669254302979, 0.0), (0.21969391405582428, 0.13851231336593628, 0.0),
(0.13528653979301453, 0.15106302499771118, 0.0), (0.04568054899573326, 0.15747304260730743, 0.0),
(-0.560016930103302, 3.5614462490229926e-07, 0.0), (-0.5472726821899414, 0.051212746649980545, 0.0),
(-0.5173879265785217, 0.09973714500665665, 0.0), (-0.46497008204460144, 0.14364132285118103, 0.0),
(-0.3959912657737732, 0.1842898577451706, 0.0), (-0.3111281096935272, 0.21670186519622803, 0.0),
(-0.21430844068527222, 0.2407861351966858, 0.0), (-0.10925304144620895, 0.2556171119213104, 0.0),
(-0.5551204085350037, 0.025475479662418365, 0.0), (-0.5348702073097229, 0.07644488662481308, 0.0),
(-0.4915122985839844, 0.12226644158363342, 0.0), (-0.4308139681816101, 0.1645427942276001, 0.0),
(-0.3535597026348114, 0.2004958689212799, 0.0), (-0.2627182900905609, 0.22874398529529572, 0.0),
(-0.16178074479103088, 0.2482016384601593, 0.0), (-0.05462652072310448, 0.2581210136413574, 0.0),
(-0.4683051109313965, 2.978201791847823e-07, 0.0), (-0.46016228199005127, 0.03240064159035683, 0.0),
(-0.43346360325813293, 0.06059274449944496, 0.0), (-0.38938117027282715, 0.08542850613594055, 0.0),
(-0.33114129304885864, 0.110313281416893, 0.0), (-0.2601758539676666, 0.13103415071964264, 0.0),
(-0.17921197414398193, 0.1465274840593338, 0.0), (-0.09136109799146652, 0.15609556436538696, 0.0),
(-0.4649912118911743, 0.015658844262361526, 0.0), (-0.450432151556015, 0.04798557236790657, 0.0),
(-0.41178521513938904, 0.07347165793180466, 0.0), (-0.3602612316608429, 0.09748400002717972, 0.0),
(-0.29565858840942383, 0.12036669254302979, 0.0), (-0.21969391405582428, 0.13851231336593628, 0.0),
(-0.13528653979301453, 0.15106302499771118, 0.0), (-0.04568054899573326, 0.15747304260730743, 0.0),
(0.0, 0.26062488555908203, 0.0), (0.0, 0.15932999551296234, 0.0)],
'edges': [(8, 0), (9, 1), (10, 2), (11, 3), (12, 4), (13, 5), (14, 6), (15, 7), (1, 8), (2, 9), (3, 10), (4, 11),
(5, 12), (6, 13), (7, 14), (64, 15), (24, 16), (25, 17), (26, 18), (27, 19), (28, 20), (29, 21),
(30, 22), (31, 23), (17, 24), (18, 25), (19, 26), (20, 27), (21, 28), (22, 29), (23, 30), (65, 31),
(0, 16), (24, 8), (1, 17), (25, 9), (40, 32), (41, 33), (42, 34), (43, 35), (44, 36), (45, 37), (46, 38),
(47, 39), (33, 40), (34, 41), (35, 42), (36, 43), (37, 44), (38, 45), (39, 46), (64, 47), (56, 48),
(57, 49), (58, 50), (59, 51), (60, 52), (61, 53), (62, 54), (63, 55), (49, 56), (50, 57), (51, 58),
(52, 59), (53, 60), (54, 61), (55, 62), (65, 63), (32, 48), (56, 40), (33, 49), (57, 41)]
}
widgets['Root'] = {
'vertices': [(-0.5, -0.8844379782676697, 0.0), (-0.3844379782676697, -1.0, 0.0), (-0.4912033677101135, -0.9286617040634155, 0.0),
(-0.4661526679992676, -0.9661527276039124, 0.0), (-0.42866164445877075, -0.9912034273147583, 0.0), (0.3844379782676697, -1.0, 0.0),
(0.5, -0.8844379782676697, 0.0), (0.42866164445877075, -0.9912034273147583, 0.0), (0.4661526679992676, -0.9661527276039124, 0.0),
(0.4912033677101135, -0.9286617040634155, 0.0), (-0.5, 0.8844379782676697, 0.0), (-0.3844379782676697, 1.0, 0.0),
(-0.4912033677101135, 0.9286617040634155, 0.0), (-0.4661526679992676, 0.9661527276039124, 0.0), (-0.42866164445877075, 0.9912034273147583, 0.0),
(0.5, 0.8844379782676697, 0.0), (0.3844379782676697, 1.0, 0.0), (0.4912033677101135, 0.9286617040634155, 0.0),
(0.4661526679992676, 0.9661527276039124, 0.0), (0.42866164445877075, 0.9912034273147583, 0.0), (0.1234154999256134, -1.0, 0.0),
(-0.1234154999256134, -1.0, 0.0), (0.1234154999256134, -1.0971899032592773, 0.0), (-0.1234154999256134, -1.0971899032592773, 0.0),
(0.3031257688999176, -1.0971899032592773, 0.0), (-0.3031257688999176, -1.0971899032592773, 0.0), (0.0, -1.25, 0.0)],
'edges': [(0, 2), (2, 3), (3, 4), (4, 1), (5, 7), (7, 8), (8, 9), (9, 6), (10, 12), (12, 13), (13, 14), (14, 11), (15, 17), (17, 18), (18, 19),
(19, 16), (0, 10), (6, 15), (11, 16), (20, 5), (21, 1), (22, 20), (23, 21), (24, 22), (25, 23), (26, 24), (26, 25)]
}
widgets['GroundSensor'] = {
'vertices': [(-0.5, -0.822191596031189, 0.0), (-0.32219159603118896, -1.0, 0.0), (-0.4761781692504883, -0.9110957980155945, 0.0),
(-0.4110957980155945, -0.9761781692504883, 0.0), (0.32219159603118896, -1.0, 0.0), (0.5, -0.822191596031189, 0.0),
(0.4110957980155945, -0.9761781692504883, 0.0), (0.47617819905281067, -0.9110957980155945, 0.0), (-0.5, 0.822191596031189, 0.0),
(-0.32219159603118896, 1.0, 0.0), (-0.4761781692504883, 0.9110957980155945, 0.0), (-0.4110957980155945, 0.9761781692504883, 0.0),
(0.5, 0.822191596031189, 0.0), (0.32219159603118896, 1.0, 0.0), (0.4761781692504883, 0.9110957980155945, 0.0),
(0.4110957980155945, 0.9761781692504883, 0.0)],
'edges': [(0, 2), (2, 3), (3, 1), (4, 6), (6, 7), (7, 5), (8, 10), (10, 11), (11, 9), (12, 14), (14, 15), (15, 13), (0, 8), (1, 4), (5, 12), (9, 13)]
}
widgets['GroundSensor.Axle'] = {
'vertices': [(0.0, 0.5, 0.0), (-0.19134172797203064, 0.4619397521018982, 0.0), (-0.3535533845424652, 0.3535533845424652, 0.0),
(-0.4619397521018982, 0.19134171307086945, 0.0), (-0.5, -2.1855694143368964e-08, 0.0), (-0.4619397521018982, -0.19134175777435303, 0.0),
(-0.3535533845424652, -0.3535533845424652, 0.0), (-0.19134174287319183, -0.4619397521018982, 0.0), (-7.549790126404332e-08, -0.5, 0.0),
(0.1913416087627411, -0.46193981170654297, 0.0), (0.35355329513549805, -0.35355350375175476, 0.0), (0.4619397521018982, -0.19134178757667542, 0.0),
(0.5, 5.962440319251527e-09, 0.0), (0.4619397222995758, 0.1913418024778366, 0.0), (0.35355326533317566, 0.35355350375175476, 0.0),
(0.19134148955345154, 0.46193987131118774, 0.0), (0.0, 0.2866188585758209, 0.0), (-0.1096842959523201, 0.2648012936115265, 0.0),
(-0.2026701420545578, 0.2026701420545578, 0.0), (-0.2648012936115265, 0.1096842885017395, 0.0), (-0.2866188585758209, -1.2528508008813333e-08, 0.0),
(-0.2648012936115265, -0.10968431085348129, 0.0), (-0.2026701420545578, -0.2026701420545578, 0.0), (-0.1096843034029007, -0.2648012936115265, 0.0),
(-4.327824498773225e-08, -0.2866188585758209, 0.0), (0.10968422889709473, -0.2648013234138489, 0.0),
(0.20267008244991302, -0.20267020165920258, 0.0), (0.2648012936115265, -0.10968433320522308, 0.0),
(0.2866188585758209, 3.4178957442065894e-09, 0.0), (0.2648012638092041, 0.10968434065580368, 0.0),
(0.20267006754875183, 0.20267020165920258, 0.0), (0.10968416184186935, 0.26480135321617126, 0.0), (-2.1639122493866125e-08, 0.0, 0.0)],
'edges': [(1, 0), (2, 1), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7), (9, 8), (10, 9), (11, 10), (12, 11), (13, 12), (14, 13), (15, 14), (0, 15),
(17, 16), (18, 17), (19, 18), (20, 19), (21, 20), (22, 21), (23, 22), (24, 23), (25, 24), (26, 25), (27, 26), (28, 27), (29, 28), (30, 29),
(31, 30), (16, 31), (32, 24), (16, 32), (20, 32), (28, 32)]
}
widgets['Wheel'] = {
'vertices': [(0, 0.9999999403953552, -1.1874362826347351e-07), (0, 0.9807851910591125, 0.19509020447731018),
(0, 0.9238794445991516, 0.38268333673477173), (0, 0.8314695358276367, 0.555570125579834),
(0, 0.7071067094802856, 0.7071066498756409), (0, 0.555570125579834, 0.8314695358276367),
(0, 0.3826833963394165, 0.9238793849945068), (0, 0.19509033858776093, 0.9807851314544678),
(0, 7.549790836947068e-08, 0.9999998807907104), (0, -0.195090189576149, 0.9807851910591125),
(0, -0.38268324732780457, 0.9238794445991516), (0, -0.555570125579834, 0.8314695358276367),
(0, -0.7071067094802856, 0.7071066498756409), (0, -0.8314695954322815, 0.5555700659751892),
(0, -0.9238795638084412, 0.3826831579208374), (0, -0.9807852506637573, 0.19508996605873108),
(0, -0.9999998211860657, -4.445849981493666e-07), (0, -0.9807851314544678, -0.19509084522724152),
(0, -0.9238792657852173, -0.38268399238586426), (0, -0.8314692378044128, -0.5555708408355713),
(0, -0.7071062922477722, -0.7071073651313782), (0, -0.555569589138031, -0.8314701318740845),
(0, -0.3826826512813568, -0.9238799810409546), (0, -0.1950894445180893, -0.9807855486869812),
(0, 9.655991561885457e-07, -1.0000001192092896), (0, 0.1950913369655609, -0.9807851910591125),
(0, 0.3826844394207001, -0.9238792061805725), (0, 0.5555711984634399, -0.8314690589904785),
(0, 0.7071076035499573, -0.7071059942245483), (0, 0.8314703106880188, -0.5555692315101624),
(0, 0.9238800406455994, -0.382682204246521), (0, 0.9807854890823364, -0.1950889378786087),
(0, 0.9439931511878967, -1.099180622077256e-07), (0, 0.9258545637130737, 0.18416382372379303),
(0, 0.8721359372138977, 0.36125046014785767), (0, 0.7849016189575195, 0.5244544148445129),
(0, 0.6675039529800415, 0.667503833770752), (0, 0.5244544148445129, 0.7849015593528748),
(0, 0.36125051975250244, 0.8721358180046082), (0, 0.18416395783424377, 0.9258544445037842),
(0, 8.652769167838414e-08, 0.9439930319786072), (0, -0.18416379392147064, 0.925854504108429),
(0, -0.3612503409385681, 0.8721358776092529), (0, -0.5244543552398682, 0.7849015593528748),
(0, -0.6675038933753967, 0.667503833770752), (0, -0.7849015593528748, 0.5244543552398682),
(0, -0.8721359372138977, 0.36125028133392334), (0, -0.9258545637130737, 0.18416360020637512),
(0, -0.9439929723739624, -4.1751010826374113e-07), (0, -0.9258544445037842, -0.18416441977024078),
(0, -0.8721356987953186, -0.3612510859966278), (0, -0.7849012613296509, -0.5244550704956055),
(0, -0.6675034761428833, -0.6675045490264893), (0, -0.52445387840271, -0.7849021553993225),
(0, -0.36124980449676514, -0.8721364140510559), (0, -0.18416307866573334, -0.9258548617362976),
(0, 9.267772043131117e-07, -0.9439932703971863), (0, 0.18416491150856018, -0.925854504108429),
(0, 0.36125150322914124, -0.8721356987953186), (0, 0.5244554281234741, -0.7849010825157166),
(0, 0.6675047874450684, -0.6675032377243042), (0, 0.7849022746086121, -0.5244535803794861),
(0, 0.8721364140510559, -0.3612493872642517), (0, 0.9258548021316528, -0.18416263163089752)],
'edges': [(1, 0), (2, 1), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7), (9, 8), (10, 9), (11, 10), (12, 11),
(13, 12), (14, 13), (15, 14), (16, 15), (17, 16), (18, 17), (19, 18), (20, 19), (21, 20), (22, 21),
(23, 22), (24, 23), (25, 24), (26, 25), (27, 26), (28, 27), (29, 28), (30, 29), (31, 30), (0, 31),
(33, 32), (34, 33), (35, 34), (36, 35), (37, 36), (38, 37), (39, 38), (40, 39), (41, 40), (42, 41),
(43, 42), (44, 43), (45, 44), (46, 45), (47, 46), (48, 47), (49, 48), (50, 49), (51, 50), (52, 51),
(53, 52), (54, 53), (55, 54), (56, 55), (57, 56), (58, 57), (59, 58), (60, 59), (61, 60), (62, 61),
(63, 62), (32, 63)]
}
widgets['WheelBrake'] = {
'vertices': [(0, 0.8759009838104248, -1.0943974615429397e-07), (0, 0.8590707778930664, 0.17087969183921814),
(0, 0.728285014629364, 0.48662444949150085), (0, 0.6193554997444153, 0.6193553805351257),
(0, 0.48662441968917847, 0.7282849550247192), (0, 0.17087985575199127, 0.8590706586837769),
(0, 1.0010809603500093e-07, 0.8759008646011353), (0, -0.17087966203689575, 0.8590707182884216),
(0, -0.48662441968917847, 0.7282849550247192), (0, -0.6193554401397705, 0.6193553805351257),
(0, -0.728285014629364, 0.4866243898868561), (0, -0.8590707182884216, 0.17087948322296143),
(0, -0.8759008049964905, -3.948445055357297e-07), (0, -0.8590705990791321, -0.1708802729845047),
(0, -0.7282846570014954, -0.4866250157356262), (0, -0.6193550825119019, -0.6193560361862183),
(0, -0.48662394285202026, -0.7282854914665222), (0, -0.17087900638580322, -0.8590710163116455),
(0, 8.797486543699051e-07, -0.8759011626243591), (0, 0.17088072001934052, -0.8590707182884216),
(0, 0.4866253733634949, -0.7282845973968506), (0, 0.6193562746047974, -0.6193548440933228),
(0, 0.7282857298851013, -0.486623615026474), (0, 0.8590710163116455, -0.170878604054451),
(0, 0.7276514172554016, -1.0585000609353301e-07), (0, 0.7136697769165039, 0.14195764064788818),
(0, 0.6050200462341309, 0.40426141023635864), (0, 0.5145272016525269, 0.5145270824432373),
(0, 0.40426141023635864, 0.6050199270248413), (0, 0.14195780456066132, 0.7136696577072144),
(0, 9.063110439910815e-08, 0.7276512980461121), (0, -0.141957625746727, 0.7136697173118591),
(0, -0.40426141023635864, 0.6050199270248413), (0, -0.5145271420478821, 0.5145270824432373),
(0, -0.6050199866294861, 0.40426138043403625), (0, -0.7136697173118591, 0.14195746183395386),
(0, -0.7276512384414673, -3.429489368045324e-07), (0, -0.7136696577072144, -0.14195814728736877),
(0, -0.6050196886062622, -0.40426191687583923), (0, -0.514526903629303, -0.5145276784896851),
(0, -0.4042609930038452, -0.6050204634666443), (0, -0.141957089304924, -0.713670015335083),
(0, 7.383145543826686e-07, -0.7276515960693359), (0, 0.14195851981639862, -0.7136697769165039),
(0, 0.4042621850967407, -0.6050196886062622), (0, 0.5145279169082642, -0.5145267248153687),
(0, 0.6050206422805786, -0.4042607545852661), (0, 0.713670015335083, -0.14195676147937775),
(0, 0.695227324962616, -1.0113333814842917e-07), (0, 0.6818687319755554, 0.13563202321529388),
(0, 0.5780603885650635, 0.38624757528305054), (0, 0.4915999174118042, 0.49159979820251465),
(0, 0.38624757528305054, 0.5780603289604187), (0, 0.13563217222690582, 0.6818686127662659),
(0, 8.659259265186847e-08, 0.6952272057533264), (0, -0.1356320083141327, 0.6818686723709106),
(0, -0.38624757528305054, 0.5780603289604187), (0, -0.4915998578071594, 0.49159979820251465),
(0, -0.5780603885650635, 0.38624754548072815), (0, -0.6818686723709106, 0.13563185930252075),
(0, -0.6952271461486816, -3.276671804997022e-07), (0, -0.6818686127662659, -0.1356325000524521),
(0, -0.5780600905418396, -0.38624805212020874), (0, -0.4915996491909027, -0.49160036444664),
(0, -0.3862471580505371, -0.5780608057975769), (0, -0.1356315016746521, -0.6818689703941345),
(0, 7.054153456920176e-07, -0.6952275037765503), (0, 0.13563285768032074, -0.6818687319755554),
(0, 0.38624829053878784, -0.5780600905418396), (0, 0.4916006028652191, -0.4915994703769684),
(0, 0.5780609846115112, -0.3862469494342804), (0, 0.6818689703941345, -0.13563118875026703),
(0, 0.670251727104187, -9.750018392651327e-08), (0, 0.6573730111122131, 0.13075952231884003),
(0, 0.5572939515113831, 0.3723718822002411), (0, 0.4739395081996918, 0.4739393889904022),
(0, 0.3723718822002411, 0.5572938919067383), (0, 0.13075967133045197, 0.6573728919029236),
(0, 8.348180813300132e-08, 0.6702516078948975), (0, -0.13075950741767883, 0.6573729515075684),
(0, -0.3723718822002411, 0.5572938919067383), (0, -0.473939448595047, 0.4739393889904022),
(0, -0.5572939515113831, 0.3723718523979187), (0, -0.6573729515075684, 0.1307593733072281),
(0, -0.6702515482902527, -3.158959316351684e-07), (0, -0.6573728919029236, -0.13075998425483704),
(0, -0.5572936534881592, -0.3723723292350769), (0, -0.4739392399787903, -0.4739399254322052),
(0, -0.37237146496772766, -0.5572943091392517), (0, -0.13075903058052063, -0.6573732495307922),
(0, 6.800737537560053e-07, -0.6702519059181213), (0, 0.1307603269815445, -0.6573730111122131),
(0, 0.372372567653656, -0.5572936534881592), (0, 0.4739401638507843, -0.47393906116485596),
(0, 0.557294487953186, -0.37237125635147095), (0, 0.6573732495307922, -0.13075871765613556)],
'edges': [(1, 0), (3, 2), (4, 3), (6, 5), (7, 6), (9, 8), (10, 9), (12, 11), (13, 12), (15, 14), (16, 15),
(18, 17), (19, 18), (21, 20), (22, 21), (0, 23), (25, 24), (27, 26), (28, 27), (30, 29), (31, 30),
(33, 32), (34, 33), (36, 35), (37, 36), (39, 38), (40, 39), (42, 41), (43, 42), (45, 44), (46, 45),
(24, 47), (34, 10), (46, 22), (11, 35), (25, 1), (23, 47), (37, 13), (2, 26), (14, 38), (28, 4),
(40, 16), (5, 29), (17, 41), (31, 7), (43, 19), (8, 32), (20, 44), (49, 48), (51, 50), (52, 51),
(54, 53), (55, 54), (57, 56), (58, 57), (60, 59), (61, 60), (63, 62), (64, 63), (66, 65), (67, 66),
(69, 68), (70, 69), (48, 71), (73, 72), (75, 74), (76, 75), (78, 77), (79, 78), (81, 80), (82, 81),
(84, 83), (85, 84), (87, 86), (88, 87), (90, 89), (91, 90), (93, 92), (94, 93), (72, 95)]
}
widgets['Steering'] = {
'vertices': [(0.7296777367591858, 0.07034172862768173, 0.0), (0.057004380971193314, -0.07034172862768173, 0.0), (0.7296777367591858, -0.07034172862768173, 0.0),
(0.057004380971193314, 0.07034172862768173, 0.0), (0.7296777367591858, 0.16664999723434448, 0.0), (0.7296777367591858, -0.16664999723434448, 0.0),
(0.9998999834060669, 0.0, 0.0), (-0.7296777367591858, 0.07034172862768173, 0.0), (-0.057004380971193314, -0.07034172862768173, 0.0),
(-0.7296777367591858, -0.07034172862768173, 0.0), (-0.057004380971193314, 0.07034172862768173, 0.0), (-0.7296777367591858, 0.16664999723434448, 0.0),
(-0.7296777367591858, -0.16664999723434448, 0.0), (-0.9998999834060669, 0.0, 0.0)],
'edges': [(2, 1), (3, 0), (1, 3), (0, 4), (5, 2), (4, 6), (6, 5), (9, 8), (10, 7), (8, 10), (7, 11), (12, 9), (11, 13), (13, 12)]
}
widgets['Suspension'] = {
'vertices': [(-0.42728525400161743, -0.12928833067417145, -0.04404989629983902), (-0.06909304857254028, 0.2578587830066681, 0.0),
(-0.13347753882408142, 0.23118986189365387, 0.0), (-0.1887657195329666, 0.1887657195329666, 0.0),
(-0.23118992149829865, 0.13347753882408142, 0.0), (-0.2578587830066681, 0.06909307092428207, 0.0),
(-0.42728525400161743, -0.06909316033124924, -0.025838270783424377), (-0.2578587830066681, -0.06909302622079849, 0.0),
(-0.23118986189365387, -0.13347747921943665, 0.0), (-0.18876579403877258, -0.18876568973064423, 0.0),
(-0.1334775984287262, -0.23118983209133148, 0.0), (-0.06909313797950745, -0.2578587532043457, 0.0),
(-0.42728525400161743, 0.06909292191267014, -0.025838270783424377), (0.06909293681383133, -0.2578587830066681, 0.0),
(0.13347743451595306, -0.23118995130062103, 0.0), (0.18876565992832184, -0.18876583874225616, 0.0),
(0.23118983209133148, -0.1334775984287262, 0.0), (0.2578587532043457, -0.06909316033124924, 0.0),
(0.42728525400161743, -0.06909316033124924, -0.025838270783424377), (0.2578587830066681, 0.06909292191267014, 0.0),
(0.23118992149829865, 0.13347740471363068, 0.0), (0.18876585364341736, 0.18876561522483826, 0.0),
(0.13347768783569336, 0.2311897873878479, 0.0), (0.0690932497382164, 0.2578587532043457, 0.0),
(0.42728525400161743, 0.06909292191267014, -0.025838270783424377), (0.42728525400161743, -0.12928833067417145, -0.04404989629983902),
(0.42728525400161743, 0.12928791344165802, -0.04404982924461365), (0.6011841893196106, -2.227646831443053e-07, -0.12004293501377106),
(-0.42728525400161743, 0.12928791344165802, -0.04404982924461365), (-0.6011841893196106, -2.227646831443053e-07, -0.12004293501377106),
(-0.06909316033124924, -0.42728525400161743, -0.025838270783424377), (0.06909292191267014, -0.42728525400161743, -0.025838270783424377),
(-0.12928833067417145, -0.42728525400161743, -0.04404989629983902), (0.12928785383701324, -0.42728525400161743, -0.04404980689287186),
(-2.545882011872891e-07, -0.6011841893196106, -0.12004290521144867), (-0.06909316033124924, 0.42728525400161743, -0.025838270783424377),
(0.06909292191267014, 0.42728525400161743, -0.025838270783424377), (-0.12928833067417145, 0.42728525400161743, -0.04404989629983902),
(0.12928785383701324, 0.42728525400161743, -0.04404982924461365), (-2.545882011872891e-07, 0.6011841893196106, -0.12004293501377106),
(0.0, 0.1595769226551056, 0.0), (-0.0797884613275528, 0.13819767534732819, 0.0), (-0.13819767534732819, 0.079788438975811, 0.0),
(-0.1595769226551056, -6.975329203129377e-09, 0.0), (-0.13819767534732819, -0.0797884613275528, 0.0),
(-0.0797884613275528, -0.13819767534732819, 0.0), (-2.409544741510672e-08, -0.1595769226551056, 0.0),
(0.07978841662406921, -0.13819767534732819, 0.0), (0.1381976306438446, -0.07978851348161697, 0.0),
(0.1595769226551056, -7.418926628588451e-08, 0.0), (0.13819773495197296, 0.07978837937116623, 0.0),
(0.07978855073451996, 0.1381976157426834, 0.0), (0.3002154231071472, 0.06909292191267014, -0.0018598437309265137),
(0.34257203340530396, 0.06909292191267014, -0.007112756371498108), (0.3849286139011383, 0.06909292191267014, -0.015268802642822266),
(0.3849286139011383, -0.06909316033124924, -0.015268847346305847), (0.34257200360298157, -0.06909316033124924, -0.00711272656917572),
(0.30021539330482483, -0.06909316033124924, -0.0018598437309265137), (-0.3002154231071472, 0.06909303367137909, -0.0018598437309265137),
(-0.34257203340530396, 0.0690929964184761, -0.007112756371498108), (-0.3849286139011383, 0.06909295171499252, -0.015268802642822266),
(-0.3849286139011383, -0.06909313052892685, -0.015268802642822266), (-0.34257200360298157, -0.06909309327602386, -0.007112711668014526),
(-0.30021539330482483, -0.06909305602312088, -0.0018598586320877075), (-0.06909314543008804, -0.30021539330482483, -0.0018598437309265137),
(-0.06909314543008804, -0.34257200360298157, -0.00711272656917572), (-0.06909315288066864, -0.3849286139011383, -0.015268847346305847),
(0.06909293681383133, -0.3002154231071472, -0.0018598437309265137), (0.06909292936325073, -0.34257203340530396, -0.007112756371498108),
(0.06909292191267014, -0.3849286139011383, -0.015268802642822266), (-0.06909307837486267, 0.3002154231071472, -0.0018598437309265137),
(-0.06909310817718506, 0.34257203340530396, -0.007112756371498108), (-0.06909313052892685, 0.3849286139011383, -0.015268802642822266),
(0.06909316033124924, 0.30021539330482483, -0.0018598437309265137), (0.06909307837486267, 0.34257200360298157, -0.00711272656917572),
(0.0690930038690567, 0.3849286139011383, -0.015268847346305847)],
'edges': [(2, 1), (3, 2), (4, 3), (5, 4), (12, 28), (0, 6), (8, 7), (9, 8), (10, 9), (11, 10), (28, 29), (29, 0), (14, 13), (15, 14), (16, 15),
(17, 16), (54, 24), (57, 17), (20, 19), (21, 20), (22, 21), (23, 22), (60, 12), (25, 18), (24, 26), (27, 25), (26, 27), (63, 7),
(32, 30), (31, 33), (34, 32), (33, 34), (66, 30), (69, 31), (37, 35), (36, 38), (39, 37), (38, 39), (72, 35), (75, 36), (41, 40),
(42, 41), (43, 42), (44, 43), (45, 44), (46, 45), (47, 46), (48, 47), (49, 48), (50, 49), (51, 50), (40, 51), (19, 52), (52, 53),
(53, 54), (18, 55), (55, 56), (56, 57), (5, 58), (58, 59), (59, 60), (6, 61), (61, 62), (62, 63), (11, 64), (64, 65), (65, 66),
(13, 67), (67, 68), (68, 69), (1, 70), (70, 71), (71, 72), (23, 73), (73, 74), (74, 75)]
}
widgets['WheelDamper'] = {
'vertices': [(-0.17770397663116455, -0.09192684292793274, 0.14030149579048157), (-0.17770397663116455, -0.09192684292793274, 0.23383590579032898),
(-0.10793274641036987, -0.16846297681331635, 0.13250692188739777), (-0.10793278366327286, -0.16846297681331635, 0.22604137659072876),
(-0.009241040796041489, -0.1998595893383026, 0.12471239268779755), (-0.009241056628525257, -0.19985966384410858, 0.21824686229228973),
(0.09192679077386856, -0.17770402133464813, 0.11691785603761673), (0.09192682057619095, -0.17770402133464813, 0.21045231819152832),
(0.16846293210983276, -0.10793281346559525, 0.1091233491897583), (0.16846293210983276, -0.10793281346559525, 0.2026577889919281),
(0.1998595893383026, -0.009241072461009026, 0.10132881999015808), (0.1998595893383026, -0.009241089224815369, 0.19486328959465027),
(0.17770397663116455, 0.09192679077386856, 0.09353431314229965), (0.1777040809392929, 0.09192677587270737, 0.18706879019737244),
(0.10793274641036987, 0.16846294701099396, 0.08573977649211884), (0.10793281346559525, 0.16846294701099396, 0.17927424609661102),
(0.009240993298590183, 0.19985954463481903, 0.0779452696442604), (0.009241056628525257, 0.1998595893383026, 0.1714797168970108),
(-0.09192684292793274, 0.17770391702651978, 0.07015073299407959), (-0.09192682057619095, 0.17770402133464813, 0.16368518769741058),
(-0.16846294701099396, 0.10793264955282211, 0.06235618144273758), (-0.16846297681331635, 0.10793274641036987, 0.15589064359664917),
(-0.19985954463481903, 0.009240960702300072, 0.05456162989139557), (-0.1998595893383026, 0.00924102496355772, 0.14809606969356537),
(-0.17770391702651978, -0.09192687273025513, 0.04676707834005356), (-0.17770402133464813, -0.09192684292793274, 0.14030154049396515),
(-0.1079326793551445, -0.16846294701099396, 0.03897252678871155), (-0.10793278366327286, -0.16846302151679993, 0.13250696659088135),
(-0.00924097653478384, -0.19985954463481903, 0.03117799013853073), (-0.009241056628525257, -0.19985966384410858, 0.12471242249011993),
(0.09192684292793274, -0.17770391702651978, 0.02338346280157566), (0.09192682057619095, -0.1777040809392929, 0.11691789329051971),
(0.16846293210983276, -0.1079326942563057, 0.015588936395943165), (0.16846293210983276, -0.10793283581733704, 0.10912337899208069),
(0.19985954463481903, -0.009240993298590183, 0.0077944230288267136), (0.1998595893383026, -0.009241105057299137, 0.10132886469364166),
(0.17770391702651978, 0.09192683547735214, -9.42906623890849e-08), (0.1777040809392929, 0.09192677587270737, 0.09353433549404144),
(0.1079326793551445, 0.16846290230751038, -0.007794610224664211), (0.10793281346559525, 0.16846294701099396, 0.08573982864618301),
(0.00924097653478384, 0.19985945522785187, -0.015589137561619282), (0.009241056628525257, 0.1998595893383026, 0.0779452919960022),
(-0.09192682057619095, 0.177703857421875, -0.023383673280477524), (-0.09192682057619095, 0.17770402133464813, 0.07015074789524078),
(-0.16846290230751038, 0.10793262720108032, -0.031178224831819534), (-0.16846294701099396, 0.10793274641036987, 0.06235621124505997),
(-0.19985945522785187, 0.009240944869816303, -0.03897276148200035), (-0.1998595893383026, 0.00924102496355772, 0.05456166714429855),
(-0.177703857421875, -0.09192684292793274, -0.046767283231019974), (-0.17770402133464813, -0.09192684292793274, 0.04676711559295654),
(-0.10793262720108032, -0.16846290230751038, -0.054561812430620193), (-0.10793278366327286, -0.16846302151679993, 0.038972560316324234),
(-0.009240960702300072, -0.19985948503017426, -0.062356337904930115), (-0.00924102496355772, -0.19985966384410858, 0.031178021803498268),
(0.09192684292793274, -0.177703857421875, -0.07015086710453033), (0.09192683547735214, -0.17770402133464813, 0.023383498191833496),
(0.16846293210983276, -0.10793262720108032, -0.07794538885354996), (0.16846302151679993, -0.10793278366327286, 0.015588970854878426),
(0.19985945522785187, -0.009240944869816303, -0.08573991060256958), (0.19985966384410858, -0.009241040796041489, 0.007794454228132963),
(0.1777038276195526, 0.09192683547735214, -0.09353446215391159), (0.1777040809392929, 0.09192684292793274, -6.286042264491698e-08),
(0.10793259739875793, 0.1684628427028656, -0.10132896900177002), (0.10793281346559525, 0.16846302151679993, -0.007794579025357962),
(0.00924092996865511, 0.1998593956232071, -0.10912348330020905), (0.009241040796041489, 0.19985966384410858, -0.015589105896651745),
(-0.09192682057619095, 0.17770376801490784, -0.11691801995038986), (-0.09192684292793274, 0.17770405113697052, -0.023383641615509987),
(-0.1684628427028656, 0.10793255269527435, -0.12471257150173187), (-0.16846302151679993, 0.10793274641036987, -0.031178191304206848),
(-0.1998593509197235, 0.009240913204848766, -0.1325071007013321), (-0.19985966384410858, 0.009240993298590183, -0.03897274285554886),
(-0.17770376801490784, -0.09192683547735214, -0.1403016299009323), (-0.17770402133464813, -0.09192688763141632, -0.046767283231019974),
(-0.10793255269527435, -0.1684628427028656, -0.14809612929821014), (-0.10793274641036987, -0.16846303641796112, -0.054561812430620193),
(-0.009240896441042423, -0.1998593509197235, -0.15589067339897156), (-0.009240993298590183, -0.19985966384410858, -0.062356337904930115),
(0.09192683547735214, -0.17770375311374664, -0.16368518769741058), (0.09192688763141632, -0.17770402133464813, -0.07015086710453033),
(0.1684628129005432, -0.10793253034353256, -0.1714797168970108), (0.16846302151679993, -0.10793274641036987, -0.07794538885354996),
(0.1998593509197235, -0.009240913204848766, -0.17927424609661102), (0.1998595893383026, -0.009241009131073952, -0.08573991060256958),
(0.17770375311374664, 0.09192679077386856, -0.18706879019737244), (0.17770397663116455, 0.09192684292793274, -0.09353446215391159),
(0.10793255269527435, 0.1684628278017044, -0.19486330449581146), (0.10793274641036987, 0.16846294701099396, -0.10132896900177002),
(0.00924092996865511, 0.1998593509197235, -0.20265783369541168), (0.00924102496355772, 0.19985954463481903, -0.10912348330020905),
(-0.09192678332328796, 0.17770370841026306, -0.2104523628950119), (-0.09192679077386856, 0.17770394682884216, -0.11691801995038986),
(-0.1684628129005432, 0.10793255269527435, -0.21824689209461212), (-0.16846290230751038, 0.10793272405862808, -0.12471257150173187),
(-0.19985929131507874, 0.00924092996865511, -0.22604137659072876), (-0.19985954463481903, 0.00924102496355772, -0.1325071007013321),
(-0.17770370841026306, -0.09192678332328796, -0.23383590579032898), (-0.17770391702651978, -0.09192680567502975, -0.1403016299009323),
(-0.21371114253997803, -0.21371114253997803, 0.24772925674915314), (0.21371114253997803, -0.21371114253997803, 0.24772925674915314),
(-0.21371114253997803, 0.21371114253997803, 0.24772925674915314), (0.21371114253997803, 0.21371114253997803, 0.24772925674915314),
(-0.21371114253997803, -0.21371114253997803, -0.24772925674915314), (0.21371114253997803, -0.21371114253997803, -0.24772925674915314),
(-0.21371114253997803, 0.21371114253997803, -0.24772925674915314), (0.21371114253997803, 0.21371114253997803, -0.24772925674915314)],
'edges': [(1, 3), (2, 0), (3, 5), (4, 2), (5, 7), (6, 4), (7, 9), (8, 6), (9, 11), (10, 8), (11, 13), (12, 10), (13, 15), (14, 12),
(15, 17), (16, 14), (17, 19), (18, 16), (19, 21), (20, 18), (21, 23), (22, 20), (23, 25), (24, 22), (25, 27), (26, 24),
(27, 29), (28, 26), (29, 31), (30, 28), (31, 33), (32, 30), (33, 35), (34, 32), (35, 37), (36, 34), (37, 39), (38, 36),
(39, 41), (40, 38), (41, 43), (42, 40), (43, 45), (44, 42), (45, 47), (46, 44), (47, 49), (48, 46), (49, 51), (50, 48),
(51, 53), (52, 50), (53, 55), (54, 52), (55, 57), (56, 54), (57, 59), (58, 56), (59, 61), (60, 58), (61, 63), (62, 60),
(63, 65), (64, 62), (65, 67), (66, 64), (67, 69), (68, 66), (69, 71), (70, 68), (71, 73), (72, 70), (73, 75), (74, 72),
(75, 77), (76, 74), (77, 79), (78, 76), (79, 81), (80, 78), (81, 83), (82, 80), (83, 85), (84, 82), (85, 87), (86, 84),
(87, 89), (88, 86), (89, 91), (90, 88), (91, 93), (92, 90), (93, 95), (94, 92), (95, 97), (96, 94), (100, 98), (98, 99),
(99, 101), (101, 100), (104, 102), (102, 103), (103, 105), (105, 104)]
}
return widgets
if __name__ == "__main__":
create()