summaryrefslogtreecommitdiff
path: root/grammar.yaml
blob: 101970a70688638e9e311bd51212356001f2c0e7 (plain)
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
# this file more or less describes the grammar used for constructing things out of  Lego
#for part examples see http://guide.lugnet.com/partsref/search.cgi?q=XXXX
features:
    face: !lego_feature
        complement: [face, tire]
        shear: 0*N
        tensile: 0*N
        compression: 2000lbf #fenn guess
        rotation: 0*N
    stud: !lego_feature
        complement: [anti stud] #, stud cup, pin hole]
        example: 3005
        technique: press_fit #this should be different... somehow
        kinematics: revolute
        shear: 100lbf #fenn guess
        tensile: 1lbf #fenn measured; probably off by a factor of 2
        compression: 2000lbf #fenn guess
        rotation: 1in*lbf/rev #co-axial, fenn guess
    anti stud: !lego_feature
        comment: this typically has 3 or 4 contact points, but is not round
        complement: [stud, technic stud]
        example: 3005
        technique: press_fit
        kinematics: revolute
    stud cup: !lego_feature
        complement: anti stud cup #[stud, anti stud cup, technic stud]
        example: 4073
        technique: press_fit
        kinematics: revolute
        tensile: 2lbf
    anti stud cup: !lego_feature
        comment: this occurs when there are 4 studs or technic studs in a square
        complement: stud cup
        example: 2654
        technique: press_fit
        kinematics: revolute
    tall stud cup: !lego_feature
        complement: [stud, anti stud cup]
        example: '3062a'
        technique: press_fit
        kinematics: revolute
    technic stud: !lego_feature
        complement: anti stud #[anti stud, pin hole, stud cup]
        #TODO finish technic
    hollow stud : !lego_feature
        #assert isinstance(  revolute joint)
        complement: [bar, anti stud]
        example: '3062b' #4081b
        technique: press_fit
        kinematics: revolute
    duplo stud: !lego_feature
        complement: duplo anti stud
        technique: press_fit
        kinematics: revolute
    duplo anti stud: !lego_feature
        complement: duplo stud
        technique: press_fit
        kinematics: revolute
    bar: !lego_feature
        complement: [clip, hollow stud]
        example: 3957
        technique: [snap_fit, press_fit]
        kinematics: revolute
    clip: !lego_feature
        complement: bar
        example: 6019
        technique: snap_fit
        kinematics: revolute
    pin: !lego_feature
        complement: pin hole
        example: 3673
        technique: snap_fit
        kinematics: revolute
        rotation: 1g*cm/rev #fenn guess
    sticky pin: !lego_feature
        #TODO finish
        technique: snap_fit
        kinematics: revolute
        rotation: 30g*cm/rev #fenn guess
    pin hole: !lego_feature 
        complement: [pin] #, stud, technic stud, hollow stud]
        example: 3700
        technique: [snap_fit, press_fit]
        kinematics: [revolute, prismatic]
    mini pin: !lego_feature
        complement: mini pin hole
        example: 4488
        technique: snap_fit
        kinematics: revolute
    mini pin hole: !lego_feature
        complement: mini pin
        example: none #find one then!
        technique: snap_fit
        kinematics: revolute
    short pin: !lego_feature
        complement: plate hole
        example: 'that step file pin0 or whatever'
        technique: snap_fit
        kinematics: revolute
    plate hole: !lego_feature
        # add something about stacking two plates is compatible with  pin
        complement: shortpin
        example: '3709b'
        technique: snap_fit
        kinematics: revolute
    tow ball: !lego_feature
        complement: tow ball socket
        example: 3184
        technique: snap_fit
        kinematics: spherical
    tow ball socket: !lego_feature
        complement: tow ball
        example: 3183
        technique: snap_fit
        kinematics: spherical
    magnet: !lego_feature
        # do magnets have the same stub axle as wheels?
        complement: magnet
        example: 73092
        technique: positioning
        kinematics: planar
    wheel holder: !lego_feature
        # is this the same as 2607?
        complement: wheel axle
        example: 8
        technique: snap_fit
        kinematics: revolute
    wheel axle: !lego_feature # snap fit?
        complement: wheel holder
        example: 3464
        technique: snap_fit
        kinematics: revolute
    wheel rim: !lego_feature
        complement: tire inner
        example: 3464
        technique: snap_fit
        kinematics: revolute
    tire inner: !lego_feature
        complement: wheel rim
        technique: snap_fit
        kinematics: revolute
    tire outer: !lego_feature
        complement: edge
        technique: positioning
        kinematics: gear
    swivel top: !lego_feature
        # is this really a  minifig shoulder?
        complement: swivel bottom
        example: 3679
        technique: snap_fit
        kinematics: revolute
    swivel bottom: !lego_feature
        # is this really a  minifig shoulder hole?
        complement: swivel top
        example: 3680
        technique: snap_fit
        kinematics: revolute
    turntable top: !lego_feature
        complement: turntable bottom
        example: 3404
        technique: snap_fit
        kinematics: revolute
    turntable bottom: !lego_feature
        complement: turntable top
        example: 3403
        technique: snap_fit
        kinematics: revolute
    scissor hinge top: !lego_feature
        complement: scissor hinge bottom
        example: 2430
        technique: snap_fit
        kinematics: hinge
    scissor hinge bottom: !lego_feature
        complement: scissor hinge top
        example: 2429
        technique: snap_fit
        kinematics: hinge
    elevation hinge holder: !lego_feature
        complement: elevation hinge
        example: 3937
        technique: snap_fit
        kinematics: hinge
    elevation hinge: !lego_feature
        complement: elevation hinge holder
        example: 3938
        technique: snap_fit
        kinematics: hinge
    flat hinge2: !lego_feature
        complement: flat hinge3
        example: 4276
        technique: snap_fit
        kinematics: hinge
    flat hinge3: !lego_feature
        complement: flat hinge2
        example: 2452
        technique: snap_fit
        kinematics: hinge
    wide hinge m: !lego_feature
        complement: wide hinge f
        example: 4315
        technique: snap_fit
        kinematics: hinge
    wide hinge f: !lego_feature
        complement: wide hinge m
        example: 2872
        technique: snap_fit
        kinematics: hinge
    trailer hinge m: !lego_feature
        complement: [trailer hinge f, clip]
        example: 3639
        technique: snap_fit
        kinematics: hinge
    trailer hinge f: !lego_feature
        complement: [trailer hinge m, bar]
        example: 3640
        technique: snap_fit
        kinematics: hinge
    round hinge 2: !lego_feature
        complement: round hinge 3
        example: 6048
        technique: snap_fit
        kinematics: hinge
    round hinge 3: !lego_feature
        complement: round hinge 2
        example: 6217
        technique: snap_fit
        kinematics: hinge
    locking hinge 1: !lego_feature
        # sorta iffy on these as i've never seen them
        complement: locking hinge 2
        example: 30364
        technique: snap_fit
        kinematics: [hinge, discrete_angle]
        angle: 20deg #?
    locking hinge 2: !lego_feature
        complement: locking hinge 1
        example: 30365
        technique: snap_fit
        kinematics: [hinge, discrete_angle]
        angle: 20deg #?
    axle: !lego_feature
        complement: [anti axle, pin hole]
        example: 3705
        technique: [press_fit, positioning]
        kinematics: [revolute, prismatic, discrete_angle]
        angle: rev/4
    anti axle: !lego_feature
        complement: axle
        example: 32064
        technique: press_fit
        kinematics: [prismatic, discrete_angle]
        angle: rev/4
    toothed joint: !lego_feature
        # there are 16 possible mates between two  toothed joint interfaces
        complement: toothed joint
        example: 4263
        technique: press_fit
        kinematics: discrete_angle
        angle: rev/16 
    minifig neck: !lego_feature
        complement: [minifig neck hole, anti stud]
        example: 973
        technique: press_fit
        kinematics: revolute
    minifig neck hole: !lego_feature
        complement: [minifig neck, stud]
        example: 'standard lego head'
        technique: press_fit
        kinematics: revolute
    minifig backpack: !lego_feature #not actually a  press fit; it's loose
        complement: minifig torso
        example: 'wtf srsly where is it'
        technique: positioning
        kinematics: discrete_angle
        angle: rev/2
    minifig torso: !lego_feature #not actually a  press fit; it's loose
        # for backpacks and armor and so on
        complement: minifig backpack
        example: 3838
        technique: positioning
        kinematics: discrete_angle
        angle: rev/2
    minifig wrist: !lego_feature #is this a snap fit?
        complement: minifig wrist hole
        example: 983
        technique: snap_fit
        kinematics: revolute
    minifig wrist hole: !lego_feature #is this a snap fit?
        complement: minifig wrist
        example: 976
        technique: snap_fit
        kinematics: revolute
    minifig shoulder: !lego_feature
        complement: minifig shoulder hole
        example: 976
        technique: snap_fit
        kinematics: revolute
    minifig shoulder hole: !lego_feature
        complement: minifig shoulder
        example: 973
        technique: snap_fit
        kinematics: revolute
    minifig waist: !lego_feature
        complement: minifig hip
        example: 973
        technique: press_fit
        kinematics: revolute
    minifig hip stud: !lego_feature
        # does this really not interface with anything else?
        complement: minifig waist
        example: 970
        technique: press_fit
        kinematics: discrete_angle
        angle: rev/4
    minifig leg pin: !lego_feature
        complement: minifig leg hole
        example: 970
        technique: snap_fit
        kinematics: hinge
    minifig leg hole: !lego_feature
        complement: minifig leg pin
        example: 971
        technique: snap_fit
        kinematics: hinge