1 : #VRML V2.0 utf8
2 :
3 : # "All work and no play makes Jack a dull boy."
4 :
5 : WorldInfo {
6 : info "Author: Tomash Kazmar"
7 : title "Old 'Underwood Noiseless' Typwriter"
8 : }
9 :
10 : PROTO TWPlastic []
11 : {
12 : Appearance {
13 : material Material {
14 : diffuseColor .15 .15 .15
15 : specularColor .5 .5 .5
16 : ambientIntensity 0
17 : emissiveColor .14 .14 .14
18 : }
19 : }
20 : }
21 :
22 : PROTO TWSteel []
23 : {
24 : Appearance {
25 : material Material {
26 : diffuseColor .373 .31 .251
27 : specularColor .475 .475 .373
28 : ambientIntensity .122
29 : shininess .1
30 : emissiveColor .129 .129 .129
31 : }
32 : }
33 : }
34 :
35 : PROTO TWKey []
36 : {
37 : Group {
38 : children [
39 : Shape {
40 : geometry Cylinder {
41 : bottom FALSE
42 : top TRUE
43 : side FALSE
44 : radius 0.00798
45 : height 0.001
46 : }
47 : appearance Appearance {
48 : material Material {
49 : diffuseColor .76 .66 .38
50 : shininess .1
51 : emissiveColor .2 .18 .1
52 : ambientIntensity 0
53 : specularColor .15 .15 .15
54 : }
55 : }
56 : }
57 : Shape {
58 : geometry Cylinder {
59 : bottom FALSE
60 : top FALSE
61 : side TRUE
62 : radius 0.008
63 : height 0.002
64 : }
65 : appearance TWSteel {}
66 : }
67 : Shape {
68 : geometry Extrusion {
69 : beginCap FALSE
70 : endCap FALSE
71 : creaseAngle 1.0
72 : scale 0.001 0.0015
73 : spine [0 0 0, 0 -0.01 0, 0 0 -0.18]
74 : crossSection [0.7 0.7, 1.0 0, 0.7 -0.7, 0 -1.0,
75 : -0.7 -0.7, -1.0 0, -0.7 0.7, 0 1.0
76 : 0.7 0.7]
77 : }
78 : appearance TWSteel {}
79 : }
80 : ]
81 : }
82 : }
83 :
84 : PROTO TWScrew []
85 : {
86 : Group {
87 : children [
88 : Shape {
89 : geometry Cylinder {
90 : bottom FALSE
91 : height 0.001
92 : radius 0.005
93 : }
94 : appearance TWSteel {}
95 : }
96 : Shape {
97 : geometry IndexedFaceSet {
98 : coord Coordinate {
99 : point [
100 : -0.005 0.00051 0.0005,
101 : -0.005 0.00051 -0.0005,
102 : 0.005 0.00051 0.0005,
103 : 0.005 0.00051 -0.0005
104 : ]
105 : }
106 : coordIndex [0 2 3 1 -1]
107 : }
108 : appearance Appearance {
109 : material Material {
110 : diffuseColor 0 0 0
111 : specularColor .29 .298 .29
112 : ambientIntensity 0
113 : shininess .063
114 : transparency .224
115 : }
116 : }
117 : }
118 : ]
119 : }
120 : }
121 :
122 : PROTO TWSpacebar []
123 : {
124 : Group {
125 : children [
126 : Shape {
127 : geometry Box {
128 : size 0.18 0.008 0.01
129 : }
130 : appearance TWPlastic {}
131 : }
132 : DEF LeftPart Shape {
133 : geometry Extrusion {
134 : beginCap TRUE
135 : endCap TRUE
136 : solid TRUE
137 : creaseAngle 0.3
138 : spine [-0.09 -0.004 -0.005, -0.09 -0.004 0.005]
139 : scale 0.01 0.01
140 : crossSection [-1 0, 0 0, 0 -0.8, -0.1 -0.7, -0.2 -0.6,
141 : -0.3 -0.53, -0.4 -0.47, -0.5 -0.41,
142 : -0.6 -0.36, -0.7 -0.32, -0.8 -0.28,
143 : -0.9 -0.26, -1 -0.20, -1 0]
144 : }
145 : appearance TWPlastic {}
146 : }
147 : Transform {
148 : children USE LeftPart
149 : rotation 0 1 0 3.14
150 : translation 0 0 0
151 : }
152 : DEF LeftStick Shape {
153 : geometry Extrusion {
154 : beginCap FALSE
155 : endCap FALSE
156 : creaseAngle 1.0
157 : scale 0.001 0.0015
158 : spine [-0.07 0 0, -0.07 -0.01 0, -0.07 0 -0.22]
159 : crossSection [0.7 0.7, 1.0 0, 0.7 -0.7, 0 -1.0,
160 : -0.7 -0.7, -1.0 0, -0.7 0.7, 0 1.0
161 : 0.7 0.7]
162 : }
163 : appearance TWSteel {}
164 : }
165 : Transform {
166 : children USE LeftStick
167 : translation 0.14 0 0
168 : }
169 :
170 : ]
171 : }
172 : }
173 :
174 : PROTO TWTopBox []
175 : {
176 : Shape {
177 : geometry Extrusion {
178 : spine [ #0.98 0 0.21,
179 : 0.97 0 0.26, 0.87 0 0.50,
180 : 0.70 0 0.70, 0.50 0 0.87, 0.26 0 0.97,
181 : 0.00 0 1.00, -0.26 0 0.97, -0.50 0 0.87,
182 : -0.70 0 0.70, -0.87 0 0.50, -0.97 0 0.26
183 : #,
184 : #-0.98 0 0.21
185 : ]
186 : creaseAngle 1.5
187 : scale 1 0.5
188 : solid TRUE
189 : ccw FALSE
190 : crossSection [0 0, 0 -6, 3.6 -6, 3.8 -6.2, 4 -7.8, 4.2 -8, 8.5 -8,
191 : 9.5 -5, 10 -2, 10.3 -2, 10.5 0, 0 0]
192 : }
193 : appearance TWPlastic {}
194 : }
195 : }
196 :
197 : PROTO TWTape []
198 : {
199 : Group {
200 : children [
201 : Shape {
202 : geometry Cylinder {
203 : height 0.015
204 : radius 0.03
205 : }
206 : appearance TWPlastic {}
207 : }
208 : Transform {
209 : children Shape {
210 : geometry Cylinder {
211 : bottom FALSE
212 : height 0.01
213 : radius 0.005
214 : }
215 : appearance TWSteel {}
216 : }
217 : translation 0 0.008 0
218 : }
219 : ]
220 : }
221 : }
222 :
223 : PROTO TWRoller []
224 : {
225 : Group {
226 : children [
227 : Shape { # cylinder
228 : geometry Cylinder {
229 : height 0.249
230 : radius 0.015
231 : }
232 : appearance Appearance {
233 : material Material {
234 : diffuseColor 0 0 0
235 : specularColor .631 .69 1
236 : ambientIntensity 0
237 : }
238 : }
239 : }
240 : Transform {
241 : children DEF LeftStick Shape { # left steel stick to cap
242 : geometry Cylinder {
243 : top FALSE
244 : bottom FALSE
245 : height 0.02
246 : radius 0.004
247 : }
248 : appearance TWSteel {}
249 : }
250 : translation 0 0.135 0
251 : }
252 : Transform { # right ...
253 : children USE LeftStick
254 : translation 0 -0.135 0
255 : }
256 : Transform {
257 : children DEF LeftCap Shape { # left handle of cylinder
258 : geometry Cylinder {
259 : height 0.008
260 : radius 0.017
261 : }
262 : appearance TWPlastic {}
263 : }
264 : translation 0 0.15 0
265 : }
266 : Transform { # right ...
267 : children USE LeftCap
268 : translation 0 -0.15 0
269 : }
270 : ]
271 : }
272 : }
273 :
274 : PROTO TWReturn []
275 : {
276 : Shape {
277 : geometry Extrusion {
278 : creaseAngle 2
279 : spine [0 0 0, 0 0.01 0.01, 0 0.015 0.02, 0 0.018 0.03,
280 : 0 0.02 0.04, 0 0.016 0.075, 0.0001 0.018 0.082,
281 : 0.0003 0.023 0.089,0.00031 0.025 0.09,
282 : 0.00035 0.03 0.092,
283 : 0.001 0.045 0.094,
284 : #0.00099 0.046 0.0941,
285 : #,
286 : #0.0008 0.048 0.0941
287 : #0.0007 0.053 0.09415
288 : , 0 0.060 0.0942
289 : #,
290 : -0.004 0.065 0.0942,
291 : -0.012 0.066 0.0942
292 : ]
293 : scale 0.002 0.006
294 : crossSection [1 1, 1 -1, -1 -1, -1 1, 1 1]
295 : }
296 : appearance TWSteel {}
297 : }
298 : }
299 :
300 : PROTO TWRearScale []
301 : {
302 : Group {
303 : children [
304 : Shape {
305 : geometry Box {
306 : size 0.254 0.01 0.002
307 : }
308 : appearance TWPlastic {}
309 : }
310 : Transform {
311 : children DEF LeftStuff Shape {
312 : geometry Extrusion {
313 : solid TRUE
314 : creaseAngle 0.3
315 : spine [0 -0.033 0.043, 0 -0.001 0.007, 0 0 0, 0 0.001 -0.007]
316 : scale 0.005 0.002
317 : crossSection [-1 0, -1 1, 1 1, 1 -1, -1 0, -1 0]
318 : }
319 : appearance TWSteel {}
320 : }
321 : translation -0.127 0 0
322 : }
323 : Transform {
324 : children USE LeftStuff
325 : translation 0.127 0 0
326 : }
327 : ]
328 : }
329 : }
330 :
331 : PROTO TWWindow []
332 : {
333 : Group {
334 : children [
335 : Transform {
336 : children Shape {
337 : geometry Extrusion {
338 : beginCap FALSE
339 : endCap FALSE
340 : creaseAngle 0.3
341 : scale 0.001 0.001
342 : spine [-0.005 0 0, 0.005 0 0, 0.005 0.01 0, -0.005 0.01 0, -0.005 0 0]
343 : crossSection [1 1, 1 -1, -1 -1, -1 1, 1 1]
344 : }
345 : appearance TWSteel {}
346 : }
347 : translation 0 0 0.001
348 : }
349 : Transform {
350 : children DEF LeftStick Shape {
351 : geometry Box {
352 : size 0.119 0.008 0.001
353 : }
354 : appearance TWSteel {}
355 : }
356 : translation -0.065 0.004 0.0005
357 : }
358 : Transform {
359 : children USE LeftStick
360 : translation 0.065 0.004 0.0005
361 : }
362 : Transform {
363 : children DEF LeftHandle Shape {
364 : geometry Box {
365 : size 0.001 0.008 0.024
366 : }
367 : appearance TWSteel {}
368 : }
369 : translation -0.125 0.004 -0.011
370 : }
371 : Transform {
372 : children USE LeftHandle
373 : translation 0.125 0.004 -0.011
374 : }
375 : ]
376 : }
377 : }
378 :
379 : PROTO TW []
380 : {
381 : Transform {
382 : children [
383 : Shape { # front handle
384 : geometry Extrusion {
385 : beginCap FALSE
386 : endCap FALSE
387 : solid TRUE
388 : ccw FALSE
389 : creaseAngle 0.3
390 : spine [-0.1225 0 0, -0.1225 0 0.15, 0.1225 0 0.15, 0.1225 0 0]
391 : crossSection [-0.0025 0, 0.0025 0, 0.0025 0.01, -0.0025 0.01, -0.0025 0]
392 : }
393 : appearance TWPlastic {}
394 : }
395 :
396 : ################# MIDDLE BOX #####################
397 : Transform { # middle bottom
398 : children DEF MBottom Shape {
399 : geometry Box {
400 : size 0.248 0.004 0.10
401 : }
402 : appearance TWPlastic {}
403 : }
404 : translation 0 0.002 -0.05
405 : }
406 : Transform { # left middle side
407 : children DEF LMSide Shape {
408 : geometry Box {
409 : size 0.004 0.18 0.10
410 : }
411 : appearance TWPlastic {}
412 : }
413 : translation -0.123 0.09 -0.05
414 : }
415 : Transform { # right middle side
416 : children USE LMSide
417 : translation 0.123 0.09 -0.05
418 : }
419 : Transform { # middle top
420 : children [
421 : USE MBottom
422 : Transform {
423 : children TWScrew {}
424 : translation -0.115 0.002 0.04
425 : }
426 : Transform {
427 : children TWScrew {}
428 : translation 0.115 0.002 0.04
429 : }
430 : ]
431 : translation 0 0.178 -0.06
432 : scale 1 1 1.2
433 : }
434 : Transform {
435 : children TWTopBox {}
436 : translation 0 0.18 -0.11
437 : scale 0.012 0.009 0.011
438 : }
439 : Transform { # front
440 : children [
441 : Shape {
442 : geometry Box {
443 : size 0.248 0.108 0.004
444 : }
445 : appearance TWPlastic {}
446 : }
447 : Transform {
448 : children TWScrew {}
449 : rotation 1 0 0 1.57
450 : translation -0.11 0.04 0.002
451 : scale 0.5 1.5 0.5
452 : }
453 : Transform {
454 : children TWScrew {}
455 : rotation 1 0 0 1.57
456 : translation -0.11 -0.04 0.002
457 : scale 0.5 1.5 0.5
458 : }
459 : Transform {
460 : children TWScrew {}
461 : rotation 1 0 0 1.57
462 : translation 0.11 0.04 0.002
463 : scale 0.5 1.5 0.5
464 : }
465 : Transform {
466 : children TWScrew {}
467 : rotation 1 0 0 1.57
468 : translation 0.11 -0.04 0.002
469 : scale 0.5 1.5 0.5
470 : }
471 : ]
472 : translation 0 0.125 -0.007
473 : }
474 :
475 : ################## REAR BOX ######################
476 : Transform { # left rear side
477 : children DEF LRSide Shape {
478 : geometry Box {
479 : size 0.004 0.16 0.10
480 : }
481 : appearance TWPlastic {}
482 : }
483 : translation -0.123 0.08 -0.148
484 : }
485 : Transform { # right rear side
486 : children USE LRSide
487 : translation 0.123 0.08 -0.148
488 : }
489 : Transform { # rear side
490 : children Shape {
491 : geometry Box {
492 : size 0.25 0.18 0.004
493 : }
494 : appearance TWPlastic {}
495 : }
496 : translation 0 0.09 -0.198
497 : }
498 : Transform { # rear bottom
499 : children Shape {
500 : geometry Box {
501 : size 0.248 0.004 0.10
502 : }
503 : appearance TWPlastic {}
504 : }
505 : translation 0 0.002 -0.15
506 : }
507 : Transform {
508 : children TWTape {} # left tape box
509 : translation -0.10 0.1875 -0.11
510 : }
511 : Transform {
512 : children TWTape {} # right tape box
513 : translation 0.10 0.1875 -0.11
514 : }
515 : Transform {
516 : children TWRoller {} # cylinder
517 : translation 0 0.18 -0.17
518 : rotation 0 0 1 1.57
519 : }
520 : Transform {
521 : children TWRearScale {} # rearest scale
522 : translation 0 0.21 -0.21
523 : }
524 : Transform {
525 : children TWWindow {}
526 : translation 0 0.175 -0.15
527 : }
528 : Transform {
529 : children TWReturn {}
530 : translation -0.135 0.184 -0.172
531 : }
532 :
533 : ################## KEYBOARD ######################
534 : Transform { # spacebar key
535 : children TWSpacebar {}
536 : translation 0 0.02 0.135
537 : }
538 :
539 : Transform { ### first row - debugging
540 : children [
541 : Transform { # z
542 : children TWKey {}
543 : translation -0.10 0.025 0.110
544 : }
545 : Transform { # x
546 : children TWKey {}
547 : translation -0.08 0.025 0.110
548 : }
549 : Transform { # c
550 : children TWKey {}
551 : translation -0.06 0.025 0.110
552 : }
553 : Transform { # v
554 : children TWKey {}
555 : translation -0.04 0.025 0.110
556 : }
557 : Transform { # b
558 : children TWKey {}
559 : translation -0.02 0.025 0.110
560 : }
561 : Transform { # n
562 : children TWKey {}
563 : translation -0.00 0.025 0.110
564 : }
565 : Transform { # m
566 : children TWKey {}
567 : translation 0.02 0.025 0.110
568 : }
569 : Transform { # ,
570 : children TWKey {}
571 : translation 0.04 0.025 0.110
572 : }
573 : Transform { # .
574 : children TWKey {}
575 : translation 0.06 0.025 0.110
576 : }
577 : Transform { # /
578 : children TWKey {}
579 : translation 0.08 0.025 0.110
580 : }
581 : ]
582 : translation 0.01 0.005 0
583 : }
584 :
585 : Transform { ### second row - debugging
586 : children [
587 : Transform { # a
588 : children TWKey {}
589 : translation -0.10 0.025 0.110
590 : }
591 : Transform { # s
592 : children TWKey {}
593 : translation -0.08 0.025 0.110
594 : }
595 : Transform { # d
596 : children TWKey {}
597 : translation -0.06 0.025 0.110
598 : }
599 : Transform { # f
600 : children TWKey {}
601 : translation -0.04 0.025 0.110
602 : }
603 : Transform { # g
604 : children TWKey {}
605 : translation -0.02 0.025 0.110
606 : }
607 : Transform { # h
608 : children TWKey {}
609 : translation -0.00 0.025 0.110
610 : }
611 : Transform { # j
612 : children TWKey {}
613 : translation 0.02 0.025 0.110
614 : }
615 : Transform { # k
616 : children TWKey {}
617 : translation 0.04 0.025 0.110
618 : }
619 : Transform { # l
620 : children TWKey {}
621 : translation 0.06 0.025 0.110
622 : }
623 : Transform { # ;
624 : children TWKey {}
625 : translation 0.08 0.025 0.110
626 : }
627 : ]
628 : translation 0.02 0.015 -0.025
629 : }
630 :
631 : Transform { ### third row - debugging
632 : children [
633 : Transform { # q
634 : children TWKey {}
635 : translation -0.10 0.025 0.110
636 : }
637 : Transform { # w
638 : children TWKey {}
639 : translation -0.08 0.025 0.110
640 : }
641 : Transform { # e
642 : children TWKey {}
643 : translation -0.06 0.025 0.110
644 : }
645 : Transform { # r
646 : children TWKey {}
647 : translation -0.04 0.025 0.110
648 : }
649 : Transform { # t
650 : children TWKey {}
651 : translation -0.02 0.025 0.110
652 : }
653 : Transform { # y
654 : children TWKey {}
655 : translation -0.00 0.025 0.110
656 : }
657 : Transform { # u
658 : children TWKey {}
659 : translation 0.02 0.025 0.110
660 : }
661 : Transform { # i
662 : children TWKey {}
663 : translation 0.04 0.025 0.110
664 : }
665 : Transform { # o
666 : children TWKey {}
667 : translation 0.06 0.025 0.110
668 : }
669 : Transform { # p
670 : children TWKey {}
671 : translation 0.08 0.025 0.110
672 : }
673 : Transform { # (
674 : children TWKey {}
675 : translation 0.10 0.025 0.110
676 : }
677 : ]
678 : translation -0.003 0.025 -0.050
679 : }
680 :
681 : Transform { ### fourth row - debugging
682 : children [
683 : Transform { # 1
684 : children TWKey {}
685 : translation -0.10 0.025 0.110
686 : }
687 : Transform { # 2
688 : children TWKey {}
689 : translation -0.08 0.025 0.110
690 : }
691 : Transform { # 3
692 : children TWKey {}
693 : translation -0.06 0.025 0.110
694 : }
695 : Transform { # 4
696 : children TWKey {}
697 : translation -0.04 0.025 0.110
698 : }
699 : Transform { # 5
700 : children TWKey {}
701 : translation -0.02 0.025 0.110
702 : }
703 : Transform { # 6
704 : children TWKey {}
705 : translation -0.00 0.025 0.110
706 : }
707 : Transform { # 7
708 : children TWKey {}
709 : translation 0.02 0.025 0.110
710 : }
711 : Transform { # 8
712 : children TWKey {}
713 : translation 0.04 0.025 0.110
714 : }
715 : Transform { # 9
716 : children TWKey {}
717 : translation 0.06 0.025 0.110
718 : }
719 : Transform { # 0
720 : children TWKey {}
721 : translation 0.08 0.025 0.110
722 : }
723 : ]
724 : translation 0.005 0.035 -0.075
725 : }
726 : ]
727 : }
728 : }
729 :
730 : TW {}