diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Key_SAMPLE.SLDPRT b/components/servos/nema23/23HS30-2804S-PG4/cad/Key_SAMPLE.SLDPRT new file mode 100644 index 000000000..8af8f8bf7 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Key_SAMPLE.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37de49fb48edfc7130e8f0ff23aea51f8da35d43adf0e020d196fb0bfc5142ee +size 138824 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/M5_Screw.SLDPRT b/components/servos/nema23/23HS30-2804S-PG4/cad/M5_Screw.SLDPRT new file mode 100644 index 000000000..cc5ad150e --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/M5_Screw.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:288b37439fb8da6546f86ec0c2262741a66cbd6ef78447b0f98376ef155da60d +size 148291 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.3MF b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.3MF new file mode 100644 index 000000000..3af8f155f Binary files /dev/null and b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.3MF differ diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.IGS b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.IGS new file mode 100644 index 000000000..ec6ba6119 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.IGS @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1c2664e3e137e60f22558f38287e227a154e74f9ae6a1d576720f61c7c00894 +size 1267966 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.STEP b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.STEP new file mode 100644 index 000000000..b7b85a1fb --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Motor.STEP @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59d146ccafec543052d40da125e49d3fa85597a69ff75b5dd9aaab68e827f603 +size 653889 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor.SLDPRT b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor.SLDPRT new file mode 100644 index 000000000..a5ab5c7c7 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71cee1fd4289471b8b2b835eddeb371b990f39df4b7b0661ebb24862686d2afc +size 336129 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_Shaft.SLDPRT b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_Shaft.SLDPRT new file mode 100644 index 000000000..8a5fdca3c --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_Shaft.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adac87feecaf70d85cf2c217c82bbb8c120a9f9dfc82b36936aa0bb7011fa787 +size 118045 diff --git a/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_assembly.SLDASM b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_assembly.SLDASM new file mode 100644 index 000000000..a9fd308eb --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/cad/Nema23_Planetary gear_Motor_assembly.SLDASM @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4229f5029d2691d1eb48453c436c4b7a6f26b9c3f242ec936d87471b0f5c9ed +size 230826 diff --git a/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.pdf b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.pdf new file mode 100644 index 000000000..51bdba1ac --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76b181d52561b97b098e92b79b8b5362e49116a5823b2d13c804e1b97abe6379 +size 276746 diff --git a/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.png b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.png new file mode 100644 index 000000000..219ff6459 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1421666a57f7d98af37d9f84e3e9feff63b0264cdb9cb95438fc252979dad59 +size 1117877 diff --git a/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4_CAD.png b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4_CAD.png new file mode 100644 index 000000000..59b20a0d3 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/renderings/23HS30-2804S-PG4_CAD.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a16449b9a72fc3e45ed9e1a88e902fef5fde977a6a2750b49e80877c9071031a +size 945055 diff --git a/components/servos/nema23/23HS30-2804S-PG4/renderings/Nema23_Photo.jpg b/components/servos/nema23/23HS30-2804S-PG4/renderings/Nema23_Photo.jpg new file mode 100644 index 000000000..f53c14610 --- /dev/null +++ b/components/servos/nema23/23HS30-2804S-PG4/renderings/Nema23_Photo.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91c58da3627357a53b38c5e01905c0922a9facdb5217479bd9f180c6d7fa9da6 +size 5195427 diff --git a/components/servos/nema23/gearbox/px57.zip b/components/servos/nema23/gearbox/px57.zip new file mode 100644 index 000000000..58b1aafd9 --- /dev/null +++ b/components/servos/nema23/gearbox/px57.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92b70815a67392fafcd273e7e37569ac5c85ec31be3e6a85ba5561b6988dfcbb +size 1874715 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.EPRT b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.EPRT new file mode 100644 index 000000000..229dd3480 Binary files /dev/null and b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.EPRT differ diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.IGS b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.IGS new file mode 100644 index 000000000..9ca3b6acc --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.IGS @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31aca9f0b8dee8989665fc6f73a85f190abe430326f59d26c909f66bb606a826 +size 61304922 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.STEP b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.STEP new file mode 100644 index 000000000..3a0e3ede1 --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.STEP @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52a66e1c276fcdee97844d55c880751c85ca7b4a4010da1646686fe892bda5f6 +size 63924518 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.x_t b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.x_t new file mode 100644 index 000000000..30d848fe4 --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-LS.x_t @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55d0700674837d7461f7311d2f880ab6930611406bc21ff493185e59f530e442 +size 16840224 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.EPRT b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.EPRT new file mode 100644 index 000000000..e64f99a6b Binary files /dev/null and b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.EPRT differ diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.IGS b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.IGS new file mode 100644 index 000000000..a2811f2b7 --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.IGS @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ef8f2b600c78733525111053576a0631e04b7134104a3640d671f783b1b39b +size 61254410 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.STEP b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.STEP new file mode 100644 index 000000000..d03deae67 --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.STEP @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e25970077fdf16de480aac4bb8579942456684513e8df8c3e5ecab077a33e8a4 +size 63908516 diff --git a/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.x_t b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.x_t new file mode 100644 index 000000000..0895fee71 --- /dev/null +++ b/components/servos/nema23/teknic/CPM-232x/CPM-_ _ _ _ -232x_-Q.x_t @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19af292e8f06a413b2ff661be308ab1ccb6fea2735684c1374b88e4f996ea87d +size 17223557 diff --git a/components/shared/3Pos-Switch-22mm.SLDPRT b/components/shared/3Pos-Switch-22mm.SLDPRT index 5218b6a1b..55858f1f7 100644 --- a/components/shared/3Pos-Switch-22mm.SLDPRT +++ b/components/shared/3Pos-Switch-22mm.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4f41368d649a434c59c4154d4095ba05aaf1fcd1d6de8446450f688730e6df4 -size 516260 +oid sha256:11bc07bb4c1e2d2339b5e483354ebf0fe7877429ec46e3d75bd42042630e4239 +size 509025 diff --git a/components/shared/LED_button_green.SLDPRT b/components/shared/LED_button_green.SLDPRT index c7ee7a440..bd66ed47c 100644 --- a/components/shared/LED_button_green.SLDPRT +++ b/components/shared/LED_button_green.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f43c01f37c05305a4f83a08ad9ce472841a73d119f1553023e46dffc75e0cf5 -size 96237 +oid sha256:e569d7ffc120d0bf7aecb83baf4c2322352c4481a157e4be325fceb16b4c549a +size 97336 diff --git a/components/shared/electronics/knobs/a10c-knobs/AAP Page knob corrected.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/AAP Page knob corrected.SLDPRT new file mode 100644 index 000000000..cf63bf37f --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/AAP Page knob corrected.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bc10cc1d364b0883d071706507f20b9aea5029c0cf4a4fe06456948909cd1a3 +size 414208 diff --git a/components/shared/electronics/knobs/a10c-knobs/AAP Page knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/AAP Page knob.SLDPRT new file mode 100644 index 000000000..9a6c59590 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/AAP Page knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74fa51d0cc0ed7d668a3571ab9d6f5284da906a1a84424861372415fef253d1f +size 433664 diff --git a/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob corrected.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob corrected.SLDPRT new file mode 100644 index 000000000..3d73291f6 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob corrected.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a9d50301e2f5d6860e016bddf0711182c8129ea65097a5c3c2797a1ac3e4450 +size 558080 diff --git a/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob.SLDPRT new file mode 100644 index 000000000..e7b1795dc --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/AAP Steer knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e062b0b3b1f3cd38ecdfe228afee8efbcdff458c59cff62b9a813f1eebc060bf +size 599552 diff --git a/components/shared/electronics/knobs/a10c-knobs/ADIknob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/ADIknob.SLDPRT new file mode 100644 index 000000000..8bf4a5afb --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/ADIknob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f82a38b71e5183f95a3dcfa6314a6633b67120a437cc18ecc7fa13f6c5e5e93 +size 1122304 diff --git a/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob 42mm.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob 42mm.SLDPRT new file mode 100644 index 000000000..076fbebca --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob 42mm.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d60303add5d6856a0aa67b15879bbf61b106b35a58dec9e8e814f164348adfc +size 1564672 diff --git a/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob.SLDPRT new file mode 100644 index 000000000..ab80ecf58 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Canopy Defog knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7482eb1fbb387544f6de39e3854eff572b50dda7d42eb856817301baf6f7e887 +size 3176960 diff --git a/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel mode knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel mode knob.SLDPRT new file mode 100644 index 000000000..2ca781779 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel mode knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d3b4cdea55bb4cc61881a1b90cc6428f967e9b58d1242bb0ec16bf0b3cbdb81 +size 4310016 diff --git a/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel selector knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel selector knob.SLDPRT new file mode 100644 index 000000000..bbac366b3 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Countermeasures panel selector knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0823997f368e32cf069e6cc79ecafabd9eb750c29f133cdc12e30c3525f00a8a +size 640000 diff --git a/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text 16mm OD.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text 16mm OD.SLDPRT new file mode 100644 index 000000000..e51d55871 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text 16mm OD.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00b871d0eb6ffd10147cb763ff7500ab6890aa5dc7311805368dd68655efe5b7 +size 10260992 diff --git a/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text.SLDPRT new file mode 100644 index 000000000..c0abf3c4f --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Course Set knob positive text.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7f7b83469c0522122d673e04cf651b90b72e479970a51728cd56ae8eb4993b7 +size 10128384 diff --git a/components/shared/electronics/knobs/a10c-knobs/Course set knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Course set knob.SLDPRT new file mode 100644 index 000000000..3f897225d --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Course set knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bd01e5e2e63b6f2699dc5bd6109914c459215f36defca120442d22a6e1abb85 +size 9013760 diff --git a/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel 2.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel 2.SLDPRT new file mode 100644 index 000000000..0b495bd34 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel 2.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71a1b28024b05b239a29c4c89fb79b011c91dfaab315f4b21a319713aa32ecb9 +size 1327616 diff --git a/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel.SLDPRT new file mode 100644 index 000000000..df86b6e20 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Environmental panel flow wheel.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89664a8714347c964d0c7cb8459ce15d7ee2f7ccc0ad3c33d91fc0c65aa9c1eb +size 1519104 diff --git a/components/shared/electronics/knobs/a10c-knobs/FPB2562-04GA4 modified.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/FPB2562-04GA4 modified.SLDPRT new file mode 100644 index 000000000..3702abfc9 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/FPB2562-04GA4 modified.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d61616c70fad1152935daebedc1a274dc4fcc3b6a1340d961531b7357611df49 +size 569856 diff --git a/components/shared/electronics/knobs/a10c-knobs/Fuel selector knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Fuel selector knob.SLDPRT new file mode 100644 index 000000000..57d093571 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Fuel selector knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32e9b1516708d811cf748408a5db69962301c2db07b26c82d806549ec37d164f +size 583168 diff --git a/components/shared/electronics/knobs/a10c-knobs/Heading Set knob positive text 16mm OD.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Heading Set knob positive text 16mm OD.SLDPRT new file mode 100644 index 000000000..7d2001143 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Heading Set knob positive text 16mm OD.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:193253f07de1e61c6cf9022e583685100df50dd5fd3be05b2bf23b95d7b8a1f9 +size 10302976 diff --git a/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob positive text.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob positive text.SLDPRT new file mode 100644 index 000000000..a1f13d1e7 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob positive text.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31f931e4d499ee0b5c3306e0f378872c3b99582722446404c2e78d797b914a92 +size 10181120 diff --git a/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob.SLDPRT new file mode 100644 index 000000000..5b6b44a92 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Heading indicator knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1810f793afc9d21d98a2169dade219c7d4ec85b3f9e38f119b1468aa8dfce98 +size 8753152 diff --git a/components/shared/electronics/knobs/a10c-knobs/ICP mic switch knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/ICP mic switch knob.SLDPRT new file mode 100644 index 000000000..30675a7f9 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/ICP mic switch knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f7ecde0fbf58fc0d397d38d259d068f723429bce7ece2890b73250790bf82e3 +size 157696 diff --git a/components/shared/electronics/knobs/a10c-knobs/ICP rotary selector.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/ICP rotary selector.SLDPRT new file mode 100644 index 000000000..914dbbbab --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/ICP rotary selector.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ec61f5451c716af96d3f16a0d4bf2176886fa33a82e7cee3dc44124f0d34768 +size 390144 diff --git a/components/shared/electronics/knobs/a10c-knobs/ICP switch buttons.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/ICP switch buttons.SLDPRT new file mode 100644 index 000000000..6d1f680d9 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/ICP switch buttons.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cf610034994e5a971b6dbb2b4fa27a9e4c2562779258c49cfab013f1c4b5a91 +size 179712 diff --git a/components/shared/electronics/knobs/a10c-knobs/ICP volume knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/ICP volume knob.SLDPRT new file mode 100644 index 000000000..535ce65d1 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/ICP volume knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7167310ede9dcfa57d0bb00317a099a786684b0e43255226c471fb8686656eb +size 94133 diff --git a/components/shared/electronics/knobs/a10c-knobs/IFF rotary knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/IFF rotary knob.SLDPRT new file mode 100644 index 000000000..a0f428f1f --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/IFF rotary knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2d8ba9b891904e5043d117eafb76a83be015c16e18378af3a3e5200b9886e18 +size 622592 diff --git a/components/shared/electronics/knobs/a10c-knobs/Knob4 modified.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Knob4 modified.SLDPRT new file mode 100644 index 000000000..fa8f6584c --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Knob4 modified.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c6efaefa5ae857d9a2fa6f4ad4f9f68e39b278f3ad55a0df56f88569a78243f +size 377856 diff --git a/components/shared/electronics/knobs/a10c-knobs/Knob7.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Knob7.SLDPRT new file mode 100644 index 000000000..21a2a43ec --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Knob7.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a676445dd808b30ca23b215e43fef4975e6dc2f54f5ab9812e7b89b8059e3640 +size 307200 diff --git a/components/shared/electronics/knobs/a10c-knobs/Light Dimmer Knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Light Dimmer Knob.SLDPRT new file mode 100644 index 000000000..85567ce95 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Light Dimmer Knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7b16cf4da8b2e5438196ae0199135d57cf95f01bddf3fd59d16b956fcfe7f42 +size 870912 diff --git a/components/shared/electronics/knobs/a10c-knobs/MFCD knob knurled.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/MFCD knob knurled.SLDPRT new file mode 100644 index 000000000..4711cb62d --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/MFCD knob knurled.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c39f3c7d090de2ef922e1f52755079be0c5ed3e642813f958ca433a5a744ac9d +size 17546752 diff --git a/components/shared/electronics/knobs/a10c-knobs/MFCD knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/MFCD knob.SLDPRT new file mode 100644 index 000000000..3845ca4a4 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/MFCD knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc4518df79108edd068df03af203f60e394c428d0f86c495a7f3950b3501609e +size 392192 diff --git a/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob 2.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob 2.SLDPRT new file mode 100644 index 000000000..1a0253763 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob 2.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c6760116232086b8ca43b933bc23e006b1588881377bcf1e061ac2bf417f10d +size 453632 diff --git a/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob without flange.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob without flange.SLDPRT new file mode 100644 index 000000000..d1a576d73 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob without flange.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc840d7e309d104ae9338df6f508c6f932a151ebcca5479d664fd9afb0bf09f5 +size 466944 diff --git a/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob.SLDPRT new file mode 100644 index 000000000..f1daed1e6 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Multi use rotary knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ac207918909d8303e141456fad69388e9568c61696ff6a1027601f74c3b43e3 +size 2031616 diff --git a/components/shared/electronics/knobs/a10c-knobs/PR8402-04GA4.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/PR8402-04GA4.SLDPRT new file mode 100644 index 000000000..a0b3f4317 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/PR8402-04GA4.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bae0efc69e12111799ca355313bb9f7ae31fad91b2d0358598794385e874a30 +size 572416 diff --git a/components/shared/electronics/knobs/a10c-knobs/RE8509-04GA4 with star attachment and arrow.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/RE8509-04GA4 with star attachment and arrow.SLDPRT new file mode 100644 index 000000000..cbcee2ec9 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/RE8509-04GA4 with star attachment and arrow.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21a87489273a98faeabda4a633b000ba4fe6d5fae9985aa416d0252c0b3d509c +size 920576 diff --git a/components/shared/electronics/knobs/a10c-knobs/Status panel knob blank.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Status panel knob blank.SLDPRT new file mode 100644 index 000000000..64d25a746 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Status panel knob blank.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0981bde04603097a1d1192186770ca4d66d11119e2df610e7e6f318a120d923f +size 1902592 diff --git a/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob deeper.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob deeper.SLDPRT new file mode 100644 index 000000000..ce78c126a --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob deeper.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:debcbc5a913d330d08ec5029d39570912c6d4acbdee45439505148a161e42890 +size 644096 diff --git a/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob.SLDPRT new file mode 100644 index 000000000..01d57f0bd --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/TACAN slector knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a841870236e3ac4176bf05de19d91de6e0fdeb817c8bec78751e8c3e8720a04 +size 610816 diff --git a/components/shared/electronics/knobs/a10c-knobs/TACAN volume knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/TACAN volume knob.SLDPRT new file mode 100644 index 000000000..bef7abae9 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/TACAN volume knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8dc82f2be0bd4328d07b4de37966ff5f22de76a30a09189a13a7bf1736177e0 +size 252416 diff --git a/components/shared/electronics/knobs/a10c-knobs/Yaw SAS panel knob.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/Yaw SAS panel knob.SLDPRT new file mode 100644 index 000000000..3d697456f --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/Yaw SAS panel knob.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0624a4bf26ff8431ec92888cd455c29f57c209fd34c91d9a7b6a2bbd5b048b6 +size 9033216 diff --git a/components/shared/electronics/knobs/a10c-knobs/refuelling light.SLDPRT b/components/shared/electronics/knobs/a10c-knobs/refuelling light.SLDPRT new file mode 100644 index 000000000..635d6ac12 --- /dev/null +++ b/components/shared/electronics/knobs/a10c-knobs/refuelling light.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54c400c3d6a9876f18bcbde887647054e9e6930e003548de26d743bf62768e55 +size 391680 diff --git a/extrusion/components/202_FilamentHousing/bazar/output.html b/extrusion/components/202_FilamentHousing/bazar/output.html index af16dc96d..07cdeded9 100644 --- a/extrusion/components/202_FilamentHousing/bazar/output.html +++ b/extrusion/components/202_FilamentHousing/bazar/output.html @@ -6,181 +6,129 @@
  • 3 Pulleys included
  • -


    - Please always contact us through EMAIL : sales@plastic-hub.com
    +
    + Please always contact us by EMail : sales@plastic-hub.com

    -
    -

    +


    -

    -
    +

    Dimensions

    + +

    + + +

    +
    +
    +
    +
    +
    +
    +

    Specification

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    Version1
    VariantStandard
    Weight12kG
    Package Dimensions60 x 20 x 20 cm
    Voltage220V
    Input Flake SizeSmall - Medium
    LicenseCERN Open Source Hardware License
    -

    Dimensions

    - -

    - -

    -
    -
    +
    + +
    + + +

    Authors

    + + - -
    -
    -
    - -
    -

    Specification

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    Version1
    VariantStandard
    Weight12kG
    Package Dimensions60 x 20 x 20 cm
    Voltage220V
    Input Flake SizeSmall - Medium
    LicenseCERN Open Source Hardware License
    - -
    - -
    - - -

    Authors

    - - - - -
    -

    Resources

    -
    +

    Components

    +

    Resources

    + +
    +
    +

    Payment terms

    +

    Industrial machines : 100% of the total cost of the machine(s) to be paid at the moment of the order.

    +

    Machines manufactured in-house

    +

    70% of the total cost of the machine(s) to be paid at the moment of the order. + The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full + payment).

    +
    + + + + - - -
  • -

    3D-Preview

    -
  • -
  • -

    Source Code Reposity

    -
  • - - -
  • -

    How-tos

    -
  • - -
  • -

    Library

    -
  • - -
    -
    -
    + + + +
    - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    -

    Our latest Instagram posts

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/extrusion/components/202_FilamentHousing/bazar/raw.html b/extrusion/components/202_FilamentHousing/bazar/raw.html new file mode 100644 index 000000000..01012480a --- /dev/null +++ b/extrusion/components/202_FilamentHousing/bazar/raw.html @@ -0,0 +1,163 @@ + + + + +Filament Cooling unit + +### Features / Details +- Uses 3 CPU coolers (120mm) +- Flexible housing, ideal for hacking +- 3 Pulleys included + +
    + Please always contact us by EMail : sales@plastic-hub.com
    +
    + + +

    Dimensions

    + +

    + +

    +
    +
    +
    + +
    +
    +
    +

    Specification

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    Version1
    VariantStandard
    Weight12kG
    Package Dimensions60 x 20 x 20 cm
    Voltage220V
    Input Flake SizeSmall - Medium
    LicenseCERN Open Source Hardware License
    + +
    + +
    + + +

    Authors

    + + + + + +
    +
    +
    + + +## Components + + + + + + + + +### Resources + + +- [Download](https://files.osr-plastic.org/files/osr-machines/extrusion/components/202_FilamentHousing) + + +- [3D Preview](https://assets.osr-plastic.org/machines//extrusion/components/202_FilamentHousing/resources/edrawings.html) +- [Source Code Repository](https://git.osr-plastic.org/osr-plastic/osr-machines/src/branch/master/extrusion/components/202_FilamentHousing) +
    + + + +
    + + + + + + + +

    Payment terms

    + +**Industrial machines** : 100% of the total cost of the machine(s) to be paid at the moment of the order. + +**Machines manufactured in-house** + +70% of the total cost of the machine(s) to be paid at the moment of the order. +The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full +payment). + +
    + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +
    + + + diff --git a/extrusion/components/300_Housing/300_Housing.SLDASM b/extrusion/components/300_Housing/300_Housing.SLDASM index dea2f9f29..e02fe782a 100644 --- a/extrusion/components/300_Housing/300_Housing.SLDASM +++ b/extrusion/components/300_Housing/300_Housing.SLDASM @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c5a1b85551777d86b1a9c50d1d9c1e0bc00ab952758cb91cec79b6a08a12d5c -size 671903 +oid sha256:986d623e6fb5136af384eb1140f8748e381ea400cef6d7a0be798955f89faff6 +size 673118 diff --git a/extrusion/components/300_Housing/301_Front_x1_2mm_INOX.SLDPRT b/extrusion/components/300_Housing/301_Front_x1_2mm_INOX.SLDPRT index 8c623ae4f..1db3d7ddc 100644 --- a/extrusion/components/300_Housing/301_Front_x1_2mm_INOX.SLDPRT +++ b/extrusion/components/300_Housing/301_Front_x1_2mm_INOX.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:971fc39e96a8cfa330203c487dd4cb218e15ca04f5a898172ceb6966053a591a -size 167941 +oid sha256:e909e112a7513fa65bc2f9b3eedd753b65206d2513e02ed160833f4ae870b2f4 +size 163272 diff --git a/extrusion/components/300_Housing/303_TOP_x1_10mm_FERRO.SLDPRT b/extrusion/components/300_Housing/303_TOP_x1_10mm_FERRO.SLDPRT index 8eb399ed6..005d1f5b1 100644 --- a/extrusion/components/300_Housing/303_TOP_x1_10mm_FERRO.SLDPRT +++ b/extrusion/components/300_Housing/303_TOP_x1_10mm_FERRO.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a7bb11753348b17892856d3286aac1f7fba47400c433919fa7ae45876500d61 -size 224349 +oid sha256:1ef4e37b556bd8f5f953d153fa54c105c77c9300a4da383dc576fdb0b73f9732 +size 202285 diff --git a/extrusion/components/300_Housing/304_BACK_x1_2mm_INOX.SLDPRT b/extrusion/components/300_Housing/304_BACK_x1_2mm_INOX.SLDPRT index 91f1c456e..f18443d05 100644 --- a/extrusion/components/300_Housing/304_BACK_x1_2mm_INOX.SLDPRT +++ b/extrusion/components/300_Housing/304_BACK_x1_2mm_INOX.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a3e0eeb9ebe77e251a22aa406c43a3b5ff29acc4abe730f7265a0c933abcded -size 107132 +oid sha256:dbc901eaadca4e297996eaf860139c80010a96f87ec05347c0df1dd1aa8483a8 +size 105692 diff --git a/extrusion/components/300_Housing/305_FRAMEL_x2_4mm_FERRO.SLDPRT b/extrusion/components/300_Housing/305_FRAMEL_x2_4mm_FERRO.SLDPRT index 28cb55495..63b983ad1 100644 --- a/extrusion/components/300_Housing/305_FRAMEL_x2_4mm_FERRO.SLDPRT +++ b/extrusion/components/300_Housing/305_FRAMEL_x2_4mm_FERRO.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3797ffff33b74fb251e892ba99d3e79c1992c997dedbd62035086f3f6da664e4 -size 183825 +oid sha256:1516915498fc7434e180011e14ee86afbd90dceec94f7ffb6dcf104e85349a81 +size 169581 diff --git a/extrusion/components/300_Housing/307_SIDE_x2_4mm_FERRO.SLDPRT b/extrusion/components/300_Housing/307_SIDE_x2_4mm_FERRO.SLDPRT index 9a7f79493..59135799b 100644 --- a/extrusion/components/300_Housing/307_SIDE_x2_4mm_FERRO.SLDPRT +++ b/extrusion/components/300_Housing/307_SIDE_x2_4mm_FERRO.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e216ddb7ca46da4ea98fe2b94b2378c9399a169a1cc06ba5919b5957c4e23f98 -size 150396 +oid sha256:c91160c6384057082bbee74e311c57160eba13fd0d252581f90d12662a4f795d +size 137733 diff --git a/extrusion/components/300_Housing/308_Extension_x1_2mm_INOX.SLDPRT b/extrusion/components/300_Housing/308_Extension_x1_2mm_INOX.SLDPRT index 7904984e9..5128078f4 100644 --- a/extrusion/components/300_Housing/308_Extension_x1_2mm_INOX.SLDPRT +++ b/extrusion/components/300_Housing/308_Extension_x1_2mm_INOX.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a8f0ab1c40b137db6ed6539ca6d79861a67200e9d9e1bdc2cff46c42637ec18 -size 99326 +oid sha256:9475e412c07d1c46e9c8c670f2dc0f0dcdb1f8297bd99aff8ed06fd7ce5d7a53 +size 99173 diff --git a/extrusion/components/300_Housing/309_SIDE_x1_2mm_INOX.SLDPRT b/extrusion/components/300_Housing/309_SIDE_x1_2mm_INOX.SLDPRT index ba00cc27e..092e298fd 100644 --- a/extrusion/components/300_Housing/309_SIDE_x1_2mm_INOX.SLDPRT +++ b/extrusion/components/300_Housing/309_SIDE_x1_2mm_INOX.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a06006087b3ccc0eed7aed61b076e59e4485a13cb85fa710ba8f9cab88b8d0b0 -size 139621 +oid sha256:0bb56dfbbb4d68c64ae77eb5975417267cc47fe7297ec374bcd87dd5ff017fd3 +size 135491 diff --git a/extrusion/components/450_Hopper-Medium/500_HopperMedium.SLDASM b/extrusion/components/450_Hopper-Medium/500_HopperMedium.SLDASM index d07e80894..2c0ca7060 100644 --- a/extrusion/components/450_Hopper-Medium/500_HopperMedium.SLDASM +++ b/extrusion/components/450_Hopper-Medium/500_HopperMedium.SLDASM @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:020702eaae0f81f1087071c0f6f31b032581e9ebd3f1eb732711d87d04d8c541 -size 338152 +oid sha256:059aa20b2b30cee26fac7c9c25826307ea51e2aa8d71f951663f169889d0ce8a +size 361937 diff --git a/extrusion/components/450_Hopper-Medium/520_HopperSlide_x1_2mm_INOX.SLDPRT b/extrusion/components/450_Hopper-Medium/520_HopperSlide_x1_2mm_INOX.SLDPRT new file mode 100644 index 000000000..177a7aa9b --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/520_HopperSlide_x1_2mm_INOX.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:737cb913ab15e701a6f2befed8b4e0daaa8546c22e0706a9de5f5ea93ee63722 +size 218593 diff --git a/extrusion/components/450_Hopper-Medium/Body3.SLDPRT b/extrusion/components/450_Hopper-Medium/Body3.SLDPRT new file mode 100644 index 000000000..6d230ddb9 --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body3.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:655ac2907bece2b042256f2a4f086d49471fe52dbd06c6473c687c4edabf4656 +size 30292 diff --git a/extrusion/components/450_Hopper-Medium/Body4.SLDPRT b/extrusion/components/450_Hopper-Medium/Body4.SLDPRT new file mode 100644 index 000000000..d6327790f --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body4.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:771570ccb80d9e507918f26f06bd54061e794df82696712ea50df704d131c6f9 +size 30361 diff --git a/extrusion/components/450_Hopper-Medium/Body5.SLDPRT b/extrusion/components/450_Hopper-Medium/Body5.SLDPRT new file mode 100644 index 000000000..c5fc8ed4c --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body5.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d09c2d2d37e3c7f4d888cb003de7991639792443bb9ce0713162dbc46d677f5 +size 29950 diff --git a/extrusion/components/450_Hopper-Medium/Body6.SLDPRT b/extrusion/components/450_Hopper-Medium/Body6.SLDPRT new file mode 100644 index 000000000..7df11356b --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body6.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a95397dc5e127731ae68ea84bc9aff997c20d73fb1ae67f15d216b88e58f6e08 +size 34010 diff --git a/extrusion/components/450_Hopper-Medium/Body7.SLDPRT b/extrusion/components/450_Hopper-Medium/Body7.SLDPRT new file mode 100644 index 000000000..a18f3e238 --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body7.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6693e63d5ee5319f89387c8fe485330b609cf670981604202b25b6dfb06f6e3b +size 33440 diff --git a/extrusion/components/450_Hopper-Medium/Body8.SLDPRT b/extrusion/components/450_Hopper-Medium/Body8.SLDPRT new file mode 100644 index 000000000..1d8e60dc5 --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/Body8.SLDPRT @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c5e22c80e5cde47950f731101feef6e7e53eaac46506051bd8aa6aac3627ca7 +size 44443 diff --git a/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide-A_x2_2mm_INOX.DXF b/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide-A_x2_2mm_INOX.DXF new file mode 100644 index 000000000..65a878e90 --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide-A_x2_2mm_INOX.DXF @@ -0,0 +1,3128 @@ + 0 +SECTION + 2 +HEADER + 9 +$ACADVER + 1 +AC1015 + 9 +$ACADMAINTVER + 70 + 6 + 9 +$DWGCODEPAGE + 3 +ANSI_1252 + 9 +$INSBASE + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$EXTMIN + 10 +-60.0 + 20 +-42.5 + 30 +0.0 + 9 +$EXTMAX + 10 +60.0 + 20 +-23.5 + 30 +0.0 + 9 +$LIMMIN + 10 +0.0 + 20 +0.0 + 9 +$LIMMAX + 10 +420.0 + 20 +297.0 + 9 +$ORTHOMODE + 70 + 0 + 9 +$REGENMODE + 70 + 1 + 9 +$FILLMODE + 70 + 1 + 9 +$QTEXTMODE + 70 + 0 + 9 +$MIRRTEXT + 70 + 1 + 9 +$LTSCALE + 40 +1.0 + 9 +$ATTMODE + 70 + 1 + 9 +$TEXTSIZE + 40 +3.175 + 9 +$TRACEWID + 40 +1.0 + 9 +$TEXTSTYLE + 7 +Standard + 9 +$CLAYER + 8 +0 + 9 +$CELTYPE + 6 +ByLayer + 9 +$CECOLOR + 62 + 256 + 9 +$CELTSCALE + 40 +1.0 + 9 +$DISPSILH + 70 + 0 + 9 +$DIMSCALE + 40 +1.0 + 9 +$DIMASZ + 40 +3.302 + 9 +$DIMEXO + 40 +0.0 + 9 +$DIMDLI + 40 +3.75 + 9 +$DIMRND + 40 +0.0 + 9 +$DIMDLE + 40 +0.0 + 9 +$DIMEXE + 40 +3.175 + 9 +$DIMTP + 40 +0.0 + 9 +$DIMTM + 40 +0.0 + 9 +$DIMTXT + 40 +3.175 + 9 +$DIMCEN + 40 +2.5 + 9 +$DIMTSZ + 40 +0.0 + 9 +$DIMTOL + 70 + 0 + 9 +$DIMLIM + 70 + 0 + 9 +$DIMTIH + 70 + 1 + 9 +$DIMTOH + 70 + 1 + 9 +$DIMSE1 + 70 + 0 + 9 +$DIMSE2 + 70 + 0 + 9 +$DIMTAD + 70 + 0 + 9 +$DIMZIN + 70 + 1 + 9 +$DIMBLK + 1 + + 9 +$DIMASO + 70 + 1 + 9 +$DIMSHO + 70 + 1 + 9 +$DIMPOST + 1 + + 9 +$DIMAPOST + 1 + + 9 +$DIMALT + 70 + 0 + 9 +$DIMALTD + 70 + 3 + 9 +$DIMALTF + 40 +0.0393700787 + 9 +$DIMLFAC + 40 +1.0 + 9 +$DIMTOFL + 70 + 1 + 9 +$DIMTVP + 40 +0.0 + 9 +$DIMTIX + 70 + 0 + 9 +$DIMSOXD + 70 + 0 + 9 +$DIMSAH + 70 + 0 + 9 +$DIMBLK1 + 1 + + 9 +$DIMBLK2 + 1 + + 9 +$DIMSTYLE + 2 +ISO-25 + 9 +$DIMCLRD + 70 + 0 + 9 +$DIMCLRE + 70 + 0 + 9 +$DIMCLRT + 70 + 0 + 9 +$DIMTFAC + 40 +1.0 + 9 +$DIMGAP + 40 +1.524 + 9 +$DIMJUST + 70 + 0 + 9 +$DIMSD1 + 70 + 0 + 9 +$DIMSD2 + 70 + 0 + 9 +$DIMTOLJ + 70 + 0 + 9 +$DIMTZIN + 70 + 1 + 9 +$DIMALTZ + 70 + 0 + 9 +$DIMALTTZ + 70 + 0 + 9 +$DIMUPT + 70 + 0 + 9 +$DIMDEC + 70 + 2 + 9 +$DIMTDEC + 70 + 2 + 9 +$DIMALTU + 70 + 2 + 9 +$DIMALTTD + 70 + 3 + 9 +$DIMTXSTY + 7 +Standard + 9 +$DIMAUNIT + 70 + 0 + 9 +$DIMADEC + 70 + 2 + 9 +$DIMALTRND + 40 +0.0 + 9 +$DIMAZIN + 70 + 0 + 9 +$DIMDSEP + 70 + 44 + 9 +$DIMATFIT + 70 + 3 + 9 +$DIMFRAC + 70 + 0 + 9 +$DIMLDRBLK + 1 + + 9 +$DIMLUNIT + 70 + 2 + 9 +$DIMLWD + 70 + -2 + 9 +$DIMLWE + 70 + -2 + 9 +$DIMTMOVE + 70 + 0 + 9 +$LUNITS + 70 + 2 + 9 +$LUPREC + 70 + 2 + 9 +$SKETCHINC + 40 +1.0 + 9 +$FILLETRAD + 40 +0.0 + 9 +$AUNITS + 70 + 0 + 9 +$AUPREC + 70 + 2 + 9 +$MENU + 1 +. + 9 +$ELEVATION + 40 +0.0 + 9 +$PELEVATION + 40 +0.0 + 9 +$THICKNESS + 40 +0.0 + 9 +$LIMCHECK + 70 + 0 + 9 +$CHAMFERA + 40 +0.0 + 9 +$CHAMFERB + 40 +0.0 + 9 +$CHAMFERC + 40 +0.0 + 9 +$CHAMFERD + 40 +0.0 + 9 +$SKPOLY + 70 + 0 + 9 +$TDCREATE + 40 +2460314.92720191 + 9 +$TDUCREATE + 40 +2460314.885535243 + 9 +$TDUPDATE + 40 +2460314.927214757 + 9 +$TDUUPDATE + 40 +2460314.88554809 + 9 +$TDINDWG + 40 +0.0000000116 + 9 +$TDUSRTIMER + 40 +0.0000000116 + 9 +$USRTIMER + 70 + 1 + 9 +$ANGBASE + 50 +0.0 + 9 +$ANGDIR + 70 + 0 + 9 +$PDMODE + 70 + 0 + 9 +$PDSIZE + 40 +-1.0 + 9 +$PLINEWID + 40 +0.0 + 9 +$SPLFRAME + 70 + 0 + 9 +$SPLINETYPE + 70 + 6 + 9 +$SPLINESEGS + 70 + 8 + 9 +$HANDSEED + 5 +6A + 9 +$SURFTAB1 + 70 + 6 + 9 +$SURFTAB2 + 70 + 6 + 9 +$SURFTYPE + 70 + 6 + 9 +$SURFU + 70 + 6 + 9 +$SURFV + 70 + 6 + 9 +$UCSBASE + 2 + + 9 +$UCSNAME + 2 + + 9 +$UCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$UCSORTHOREF + 2 + + 9 +$UCSORTHOVIEW + 70 + 0 + 9 +$UCSORGTOP + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGBOTTOM + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGLEFT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGRIGHT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGFRONT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGBACK + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSBASE + 2 + + 9 +$PUCSNAME + 2 + + 9 +$PUCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$PUCSORTHOREF + 2 + + 9 +$PUCSORTHOVIEW + 70 + 0 + 9 +$PUCSORGTOP + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGBOTTOM + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGLEFT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGRIGHT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGFRONT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGBACK + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$USERI1 + 70 + 0 + 9 +$USERI2 + 70 + 0 + 9 +$USERI3 + 70 + 0 + 9 +$USERI4 + 70 + 0 + 9 +$USERI5 + 70 + 0 + 9 +$USERR1 + 40 +0.0 + 9 +$USERR2 + 40 +0.0 + 9 +$USERR3 + 40 +0.0 + 9 +$USERR4 + 40 +0.0 + 9 +$USERR5 + 40 +0.0 + 9 +$WORLDVIEW + 70 + 1 + 9 +$SHADEDGE + 70 + 3 + 9 +$SHADEDIF + 70 + 70 + 9 +$TILEMODE + 70 + 1 + 9 +$MAXACTVP + 70 + 64 + 9 +$PINSBASE + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PLIMCHECK + 70 + 0 + 9 +$PEXTMIN + 10 +1.0000000000E+20 + 20 +1.0000000000E+20 + 30 +1.0000000000E+20 + 9 +$PEXTMAX + 10 +-1.0000000000E+20 + 20 +-1.0000000000E+20 + 30 +-1.0000000000E+20 + 9 +$PLIMMIN + 10 +0.0 + 20 +0.0 + 9 +$PLIMMAX + 10 +420.0 + 20 +297.0 + 9 +$UNITMODE + 70 + 0 + 9 +$VISRETAIN + 70 + 1 + 9 +$PLINEGEN + 70 + 0 + 9 +$PSLTSCALE + 70 + 1 + 9 +$TREEDEPTH + 70 + 3020 + 9 +$CMLSTYLE + 2 +Standard + 9 +$CMLJUST + 70 + 0 + 9 +$CMLSCALE + 40 +20.0 + 9 +$PROXYGRAPHICS + 70 + 1 + 9 +$MEASUREMENT + 70 + 1 + 9 +$CELWEIGHT +370 + -1 + 9 +$ENDCAPS +280 + 0 + 9 +$JOINSTYLE +280 + 0 + 9 +$LWDISPLAY +290 + 1 + 9 +$INSUNITS + 70 + 4 + 9 +$HYPERLINKBASE + 1 + + 9 +$STYLESHEET + 1 + + 9 +$XEDIT +290 + 1 + 9 +$CEPSNTYPE +380 + 0 + 9 +$PSTYLEMODE +290 + 1 + 9 +$FINGERPRINTGUID + 2 +{58b0bb70-895d-4a55-b1f3-27ee043f9399} + 9 +$VERSIONGUID + 2 +{FAEB1C32-E019-11D5-929B-00C0DF256EC4} + 9 +$EXTNAMES +290 + 1 + 9 +$PSVPSCALE + 40 +0.0 + 9 +$OLESTARTUP +290 + 0 + 0 +ENDSEC + 0 +SECTION + 2 +CLASSES + 0 +CLASS + 1 +ACDBDICTIONARYWDFLT + 2 +AcDbDictionaryWithDefault + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +CLASS + 1 +VISUALSTYLE + 2 +AcDbVisualStyle + 3 +ObjectDBX Classes + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +MATERIAL + 2 +AcDbMaterial + 3 +ObjectDBX Classes + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +SCALE + 2 +AcDbScale + 3 +ObjectDBX Classes + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +TABLESTYLE + 2 +AcDbTableStyle + 3 +ObjectDBX Classes + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +MLEADERSTYLE + 2 +AcDbMLeaderStyle + 3 +ACDB_MLEADERSTYLE_CLASS + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +SUN + 2 +AcDbSun + 3 +SCENEOE + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +ACDBPLACEHOLDER + 2 +AcDbPlaceHolder + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +CLASS + 1 +LAYOUT + 2 +AcDbLayout + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +TABLE + 2 +VPORT + 5 +8 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +VPORT + 5 +29 +330 +8 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord + 2 +*Active + 70 + 0 + 10 +0.0 + 20 +0.0 + 11 +1.0 + 21 +1.0 + 12 +0.0 + 22 +-33.0 + 13 +0.0 + 23 +0.0 + 14 +10.0 + 24 +10.0 + 15 +10.0 + 25 +10.0 + 16 +0.0 + 26 +0.0 + 36 +1.0 + 17 +0.0 + 27 +0.0 + 37 +0.0 + 40 +19.38 + 41 +6.3157894737 + 42 +50.0 + 43 +0.0 + 44 +0.0 + 50 +0.0 + 51 +0.0 + 71 + 0 + 72 + 100 + 73 + 1 + 74 + 3 + 75 + 0 + 76 + 0 + 77 + 0 + 78 + 0 +281 + 0 + 65 + 1 +110 +0.0 +120 +0.0 +130 +0.0 +111 +1.0 +121 +0.0 +131 +0.0 +112 +0.0 +122 +1.0 +132 +0.0 + 79 + 0 +146 +0.0 + 0 +ENDTAB + 0 +TABLE + 2 +LTYPE + 5 +5 +330 +0 +100 +AcDbSymbolTable + 70 + 6 + 0 +LTYPE + 5 +14 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByBlock + 70 + 0 + 3 + + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +15 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByLayer + 70 + 0 + 3 + + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +16 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +Continuous + 70 + 0 + 3 +Solid line + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +5E +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +HIDDEN + 70 + 0 + 3 +Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ __ + 72 + 65 + 73 + 2 + 40 +1.905 + 49 +1.27 + 74 + 0 + 49 +-0.635 + 74 + 0 + 0 +LTYPE + 5 +5F +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +PHANTOM + 70 + 0 + 3 +Phantom ______ __ __ ______ __ __ ______ + 72 + 65 + 73 + 6 + 40 +12.7 + 49 +6.35 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 0 +LTYPE + 5 +60 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER + 70 + 0 + 3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ + 72 + 65 + 73 + 4 + 40 +10.16 + 49 +6.35 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 0 +LTYPE + 5 +61 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTERX2 + 70 + 0 + 3 +Center (2x) ________ __ ________ __ _____ + 72 + 65 + 73 + 4 + 40 +20.32 + 49 +12.7 + 74 + 0 + 49 +-2.54 + 74 + 0 + 49 +2.54 + 74 + 0 + 49 +-2.54 + 74 + 0 + 0 +LTYPE + 5 +62 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT2 + 70 + 0 + 3 +Dot (.5x) ........................................ + 72 + 65 + 73 + 2 + 40 +0.635 + 49 +0.0 + 74 + 0 + 49 +-0.635 + 74 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +LAYER + 5 +2 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +LAYER + 5 +10 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0 + 70 + 0 + 62 + 7 + 6 +Continuous +370 + -3 +390 +F + 0 +ENDTAB + 0 +TABLE + 2 +STYLE + 5 +3 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +STYLE + 5 +11 +330 +3 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord + 2 +Standard + 70 + 0 + 40 +0.0 + 41 +1.0 + 50 +0.0 + 71 + 0 + 42 +3.175 + 3 +txt + 4 + + 0 +ENDTAB + 0 +TABLE + 2 +VIEW + 5 +6 +330 +0 +100 +AcDbSymbolTable + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +UCS + 5 +7 +330 +0 +100 +AcDbSymbolTable + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +APPID + 5 +9 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +APPID + 5 +12 +330 +9 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord + 2 +ACAD + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +DIMSTYLE + 5 +A +330 +0 +100 +AcDbSymbolTable + 70 + 1 +100 +AcDbDimStyleTable + 0 +DIMSTYLE +105 +27 +330 +A +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord + 2 +ISO-25 + 70 + 0 + 41 +2.5 + 42 +0.625 + 43 +3.75 + 44 +1.25 + 73 + 0 + 74 + 0 + 77 + 1 + 78 + 8 +140 +2.5 +141 +2.5 +143 +0.0393700787 +147 +0.625 +171 + 3 +172 + 1 +178 + 0 +271 + 2 +272 + 2 +274 + 3 +278 + 44 +283 + 0 +284 + 8 +340 +11 + 0 +ENDTAB + 0 +TABLE + 2 +BLOCK_RECORD + 5 +1 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +BLOCK_RECORD + 5 +1F +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Model_Space +340 +22 + 0 +BLOCK_RECORD + 5 +1B +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space +340 +1E + 0 +BLOCK_RECORD + 5 +23 +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space0 +340 +26 + 0 +ENDTAB + 0 +ENDSEC + 0 +SECTION + 2 +BLOCKS + 0 +BLOCK + 5 +20 +330 +1F +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Model_Space + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Model_Space + 1 + + 0 +ENDBLK + 5 +21 +330 +1F +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +1C +330 +1B +100 +AcDbEntity + 67 + 1 + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space + 1 + + 0 +ENDBLK + 5 +1D +330 +1B +100 +AcDbEntity + 67 + 1 + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +24 +330 +23 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space0 + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space0 + 1 + + 0 +ENDBLK + 5 +25 +330 +23 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 5 +63 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +-60.0 + 20 +-23.5 + 30 +0.0 + 11 +60.0 + 21 +-23.5 + 31 +0.0 + 0 +LINE + 5 +64 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +-60.0 + 20 +-42.5 + 30 +0.0 + 11 +-60.0 + 21 +-23.5 + 31 +0.0 + 0 +LINE + 5 +65 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +-42.5 + 30 +0.0 + 11 +-60.0 + 21 +-42.5 + 31 +0.0 + 0 +LINE + 5 +66 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +-23.5 + 30 +0.0 + 11 +60.0 + 21 +-42.5 + 31 +0.0 + 0 +CIRCLE + 5 +67 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +50.0 + 20 +-33.5 + 30 +0.0 + 40 +4.100000000000001 + 0 +CIRCLE + 5 +68 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +-50.0 + 20 +-33.5 + 30 +0.0 + 40 +3.086658572115844 + 0 +ENDSEC + 0 +SECTION + 2 +OBJECTS + 0 +DICTIONARY + 5 +C +330 +0 +100 +AcDbDictionary +281 + 1 + 3 +ACAD_GROUP +350 +D + 3 +ACAD_LAYOUT +350 +1A + 3 +ACAD_MLINESTYLE +350 +17 + 3 +ACAD_PLOTSETTINGS +350 +19 + 3 +ACAD_PLOTSTYLENAME +350 +E + 3 +ACAD_SCALELIST +350 +47 + 3 +DWGPROPS +350 +69 + 0 +DICTIONARY + 5 +D +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 0 +DICTIONARY + 5 +1A +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Layout1 +350 +1E + 3 +Layout2 +350 +26 + 3 +Model +350 +22 + 0 +DICTIONARY + 5 +17 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Standard +350 +18 + 0 +DICTIONARY + 5 +19 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 0 +ACDBDICTIONARYWDFLT + 5 +E +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Normal +350 +F +100 +AcDbDictionaryWithDefault +340 +F + 0 +DICTIONARY + 5 +47 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +A0 +350 +48 + 3 +A1 +350 +49 + 3 +A2 +350 +4A + 3 +A3 +350 +4B + 3 +A4 +350 +4C + 3 +A5 +350 +4D + 3 +A6 +350 +4E + 3 +A7 +350 +4F + 3 +A8 +350 +50 + 3 +A9 +350 +51 + 3 +B0 +350 +52 + 3 +B1 +350 +53 + 3 +B2 +350 +54 + 3 +B3 +350 +55 + 3 +B4 +350 +56 + 3 +B5 +350 +57 + 3 +B6 +350 +58 + 0 +XRECORD + 5 +69 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbXrecord +280 + 1 + 1 +DWGPROPS COOKIE + 2 + + 3 + + 4 + + 6 + + 7 + + 8 +mc007 + 9 + +300 += +301 += +302 += +303 += +304 += +305 += +306 += +307 += +308 += +309 += + 40 +0.0 + 41 +2460314.885535243 + 42 +2460314.88554809 + 1 + + 90 + 0 + 0 +LAYOUT + 5 +1E +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 + 688 + 72 + 1 + 73 + 0 + 74 + 5 + 7 + + 75 + 16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout1 + 70 + 1 + 71 + 1 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +1.0000000000E+20 + 24 +1.0000000000E+20 + 34 +1.0000000000E+20 + 15 +-1.0000000000E+20 + 25 +-1.0000000000E+20 + 35 +-1.0000000000E+20 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +1B + 0 +LAYOUT + 5 +26 +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 + 688 + 72 + 1 + 73 + 0 + 74 + 5 + 7 + + 75 + 16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout2 + 70 + 1 + 71 + 2 + 10 +0.0 + 20 +0.0 + 11 +0.0 + 21 +0.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +23 + 0 +LAYOUT + 5 +22 +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 +ANSI_A_(11.00_x_8.50_Inches) + 6 + + 40 +6.35 + 41 +19.05 + 42 +6.35000508 + 43 +19.05000254 + 44 +279.4 + 45 +215.9 + 46 +133.34999746 + 47 +164.96664873 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +0.09075 +143 +1.0 + 70 + 1696 + 72 + 0 + 73 + 0 + 74 + 0 + 7 + + 75 + 0 +147 +0.0179189148 +148 +-1300.4909072572 +149 +0.0 +100 +AcDbLayout + 1 +Model + 70 + 1 + 71 + 0 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +-60.0 + 24 +-42.5 + 34 +0.0 + 15 +60.0 + 25 +-23.5 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +1F +331 +29 + 0 +MLINESTYLE + 5 +18 +102 +{ACAD_REACTORS +330 +17 +102 +} +330 +17 +100 +AcDbMlineStyle + 2 +Standard + 70 + 0 + 3 + + 62 + 256 + 51 +90.0 + 52 +90.0 + 71 + 2 + 49 +0.5 + 62 + 256 + 6 +BYLAYER + 49 +-0.5 + 62 + 256 + 6 +BYLAYER + 0 +ACDBPLACEHOLDER + 5 +F +102 +{ACAD_REACTORS +330 +E +102 +} +330 +E + 0 +SCALE + 5 +48 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:1 +140 +1.0 +141 +1.0 +290 + 1 + 0 +SCALE + 5 +49 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:2 +140 +1.0 +141 +2.0 +290 + 0 + 0 +SCALE + 5 +4A +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:4 +140 +1.0 +141 +4.0 +290 + 0 + 0 +SCALE + 5 +4B +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:5 +140 +1.0 +141 +5.0 +290 + 0 + 0 +SCALE + 5 +4C +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:8 +140 +1.0 +141 +8.0 +290 + 0 + 0 +SCALE + 5 +4D +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:10 +140 +1.0 +141 +10.0 +290 + 0 + 0 +SCALE + 5 +4E +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:16 +140 +1.0 +141 +16.0 +290 + 0 + 0 +SCALE + 5 +4F +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:20 +140 +1.0 +141 +20.0 +290 + 0 + 0 +SCALE + 5 +50 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:30 +140 +1.0 +141 +30.0 +290 + 0 + 0 +SCALE + 5 +51 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:40 +140 +1.0 +141 +40.0 +290 + 0 + 0 +SCALE + 5 +52 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:50 +140 +1.0 +141 +50.0 +290 + 0 + 0 +SCALE + 5 +53 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:100 +140 +1.0 +141 +100.0 +290 + 0 + 0 +SCALE + 5 +54 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +2:1 +140 +2.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +55 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +4:1 +140 +4.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +56 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +8:1 +140 +8.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +57 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +10:1 +140 +10.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +58 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +100:1 +140 +100.0 +141 +1.0 +290 + 0 + 0 +ENDSEC + 0 +EOF diff --git a/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide_x1_2mm_INOX.DXF b/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide_x1_2mm_INOX.DXF new file mode 100644 index 000000000..f3fbf177d --- /dev/null +++ b/extrusion/components/450_Hopper-Medium/laser/520_HopperSlide_x1_2mm_INOX.DXF @@ -0,0 +1,3598 @@ + 0 +SECTION + 2 +HEADER + 9 +$ACADVER + 1 +AC1015 + 9 +$ACADMAINTVER + 70 + 6 + 9 +$DWGCODEPAGE + 3 +ANSI_1252 + 9 +$INSBASE + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$EXTMIN + 10 +-92.0641587716 + 20 +-23.5 + 30 +0.0 + 9 +$EXTMAX + 10 +99.3746380788 + 20 +23.5 + 30 +0.0 + 9 +$LIMMIN + 10 +0.0 + 20 +0.0 + 9 +$LIMMAX + 10 +420.0 + 20 +297.0 + 9 +$ORTHOMODE + 70 + 0 + 9 +$REGENMODE + 70 + 1 + 9 +$FILLMODE + 70 + 1 + 9 +$QTEXTMODE + 70 + 0 + 9 +$MIRRTEXT + 70 + 1 + 9 +$LTSCALE + 40 +1.0 + 9 +$ATTMODE + 70 + 1 + 9 +$TEXTSIZE + 40 +3.175 + 9 +$TRACEWID + 40 +1.0 + 9 +$TEXTSTYLE + 7 +Standard + 9 +$CLAYER + 8 +0 + 9 +$CELTYPE + 6 +ByLayer + 9 +$CECOLOR + 62 + 256 + 9 +$CELTSCALE + 40 +1.0 + 9 +$DISPSILH + 70 + 0 + 9 +$DIMSCALE + 40 +1.0 + 9 +$DIMASZ + 40 +3.302 + 9 +$DIMEXO + 40 +0.0 + 9 +$DIMDLI + 40 +3.75 + 9 +$DIMRND + 40 +0.0 + 9 +$DIMDLE + 40 +0.0 + 9 +$DIMEXE + 40 +3.175 + 9 +$DIMTP + 40 +0.0 + 9 +$DIMTM + 40 +0.0 + 9 +$DIMTXT + 40 +3.175 + 9 +$DIMCEN + 40 +2.5 + 9 +$DIMTSZ + 40 +0.0 + 9 +$DIMTOL + 70 + 0 + 9 +$DIMLIM + 70 + 0 + 9 +$DIMTIH + 70 + 1 + 9 +$DIMTOH + 70 + 1 + 9 +$DIMSE1 + 70 + 0 + 9 +$DIMSE2 + 70 + 0 + 9 +$DIMTAD + 70 + 0 + 9 +$DIMZIN + 70 + 1 + 9 +$DIMBLK + 1 + + 9 +$DIMASO + 70 + 1 + 9 +$DIMSHO + 70 + 1 + 9 +$DIMPOST + 1 + + 9 +$DIMAPOST + 1 + + 9 +$DIMALT + 70 + 0 + 9 +$DIMALTD + 70 + 3 + 9 +$DIMALTF + 40 +0.0393700787 + 9 +$DIMLFAC + 40 +1.0 + 9 +$DIMTOFL + 70 + 1 + 9 +$DIMTVP + 40 +0.0 + 9 +$DIMTIX + 70 + 0 + 9 +$DIMSOXD + 70 + 0 + 9 +$DIMSAH + 70 + 0 + 9 +$DIMBLK1 + 1 + + 9 +$DIMBLK2 + 1 + + 9 +$DIMSTYLE + 2 +ISO-25 + 9 +$DIMCLRD + 70 + 0 + 9 +$DIMCLRE + 70 + 0 + 9 +$DIMCLRT + 70 + 0 + 9 +$DIMTFAC + 40 +1.0 + 9 +$DIMGAP + 40 +1.524 + 9 +$DIMJUST + 70 + 0 + 9 +$DIMSD1 + 70 + 0 + 9 +$DIMSD2 + 70 + 0 + 9 +$DIMTOLJ + 70 + 0 + 9 +$DIMTZIN + 70 + 1 + 9 +$DIMALTZ + 70 + 0 + 9 +$DIMALTTZ + 70 + 0 + 9 +$DIMUPT + 70 + 0 + 9 +$DIMDEC + 70 + 2 + 9 +$DIMTDEC + 70 + 2 + 9 +$DIMALTU + 70 + 2 + 9 +$DIMALTTD + 70 + 3 + 9 +$DIMTXSTY + 7 +Standard + 9 +$DIMAUNIT + 70 + 0 + 9 +$DIMADEC + 70 + 2 + 9 +$DIMALTRND + 40 +0.0 + 9 +$DIMAZIN + 70 + 0 + 9 +$DIMDSEP + 70 + 44 + 9 +$DIMATFIT + 70 + 3 + 9 +$DIMFRAC + 70 + 0 + 9 +$DIMLDRBLK + 1 + + 9 +$DIMLUNIT + 70 + 2 + 9 +$DIMLWD + 70 + -2 + 9 +$DIMLWE + 70 + -2 + 9 +$DIMTMOVE + 70 + 0 + 9 +$LUNITS + 70 + 2 + 9 +$LUPREC + 70 + 2 + 9 +$SKETCHINC + 40 +1.0 + 9 +$FILLETRAD + 40 +0.0 + 9 +$AUNITS + 70 + 0 + 9 +$AUPREC + 70 + 2 + 9 +$MENU + 1 +. + 9 +$ELEVATION + 40 +0.0 + 9 +$PELEVATION + 40 +0.0 + 9 +$THICKNESS + 40 +0.0 + 9 +$LIMCHECK + 70 + 0 + 9 +$CHAMFERA + 40 +0.0 + 9 +$CHAMFERB + 40 +0.0 + 9 +$CHAMFERC + 40 +0.0 + 9 +$CHAMFERD + 40 +0.0 + 9 +$SKPOLY + 70 + 0 + 9 +$TDCREATE + 40 +2460314.927340937 + 9 +$TDUCREATE + 40 +2460314.885674271 + 9 +$TDUPDATE + 40 +2460314.9273536 + 9 +$TDUUPDATE + 40 +2460314.885686933 + 9 +$TDINDWG + 40 +0.0000000116 + 9 +$TDUSRTIMER + 40 +0.0000000116 + 9 +$USRTIMER + 70 + 1 + 9 +$ANGBASE + 50 +0.0 + 9 +$ANGDIR + 70 + 0 + 9 +$PDMODE + 70 + 0 + 9 +$PDSIZE + 40 +-1.0 + 9 +$PLINEWID + 40 +0.0 + 9 +$SPLFRAME + 70 + 0 + 9 +$SPLINETYPE + 70 + 6 + 9 +$SPLINESEGS + 70 + 8 + 9 +$HANDSEED + 5 +79 + 9 +$SURFTAB1 + 70 + 6 + 9 +$SURFTAB2 + 70 + 6 + 9 +$SURFTYPE + 70 + 6 + 9 +$SURFU + 70 + 6 + 9 +$SURFV + 70 + 6 + 9 +$UCSBASE + 2 + + 9 +$UCSNAME + 2 + + 9 +$UCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$UCSORTHOREF + 2 + + 9 +$UCSORTHOVIEW + 70 + 0 + 9 +$UCSORGTOP + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGBOTTOM + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGLEFT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGRIGHT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGFRONT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$UCSORGBACK + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSBASE + 2 + + 9 +$PUCSNAME + 2 + + 9 +$PUCSORG + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSXDIR + 10 +1.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSYDIR + 10 +0.0 + 20 +1.0 + 30 +0.0 + 9 +$PUCSORTHOREF + 2 + + 9 +$PUCSORTHOVIEW + 70 + 0 + 9 +$PUCSORGTOP + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGBOTTOM + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGLEFT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGRIGHT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGFRONT + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PUCSORGBACK + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$USERI1 + 70 + 0 + 9 +$USERI2 + 70 + 0 + 9 +$USERI3 + 70 + 0 + 9 +$USERI4 + 70 + 0 + 9 +$USERI5 + 70 + 0 + 9 +$USERR1 + 40 +0.0 + 9 +$USERR2 + 40 +0.0 + 9 +$USERR3 + 40 +0.0 + 9 +$USERR4 + 40 +0.0 + 9 +$USERR5 + 40 +0.0 + 9 +$WORLDVIEW + 70 + 1 + 9 +$SHADEDGE + 70 + 3 + 9 +$SHADEDIF + 70 + 70 + 9 +$TILEMODE + 70 + 1 + 9 +$MAXACTVP + 70 + 64 + 9 +$PINSBASE + 10 +0.0 + 20 +0.0 + 30 +0.0 + 9 +$PLIMCHECK + 70 + 0 + 9 +$PEXTMIN + 10 +1.0000000000E+20 + 20 +1.0000000000E+20 + 30 +1.0000000000E+20 + 9 +$PEXTMAX + 10 +-1.0000000000E+20 + 20 +-1.0000000000E+20 + 30 +-1.0000000000E+20 + 9 +$PLIMMIN + 10 +0.0 + 20 +0.0 + 9 +$PLIMMAX + 10 +420.0 + 20 +297.0 + 9 +$UNITMODE + 70 + 0 + 9 +$VISRETAIN + 70 + 1 + 9 +$PLINEGEN + 70 + 0 + 9 +$PSLTSCALE + 70 + 1 + 9 +$TREEDEPTH + 70 + 3020 + 9 +$CMLSTYLE + 2 +Standard + 9 +$CMLJUST + 70 + 0 + 9 +$CMLSCALE + 40 +20.0 + 9 +$PROXYGRAPHICS + 70 + 1 + 9 +$MEASUREMENT + 70 + 1 + 9 +$CELWEIGHT +370 + -1 + 9 +$ENDCAPS +280 + 0 + 9 +$JOINSTYLE +280 + 0 + 9 +$LWDISPLAY +290 + 1 + 9 +$INSUNITS + 70 + 4 + 9 +$HYPERLINKBASE + 1 + + 9 +$STYLESHEET + 1 + + 9 +$XEDIT +290 + 1 + 9 +$CEPSNTYPE +380 + 0 + 9 +$PSTYLEMODE +290 + 1 + 9 +$FINGERPRINTGUID + 2 +{01451928-a154-4b45-b4b6-919740664665} + 9 +$VERSIONGUID + 2 +{FAEB1C32-E019-11D5-929B-00C0DF256EC4} + 9 +$EXTNAMES +290 + 1 + 9 +$PSVPSCALE + 40 +0.0 + 9 +$OLESTARTUP +290 + 0 + 0 +ENDSEC + 0 +SECTION + 2 +CLASSES + 0 +CLASS + 1 +ACDBDICTIONARYWDFLT + 2 +AcDbDictionaryWithDefault + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +CLASS + 1 +VISUALSTYLE + 2 +AcDbVisualStyle + 3 +ObjectDBX Classes + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +MATERIAL + 2 +AcDbMaterial + 3 +ObjectDBX Classes + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +SCALE + 2 +AcDbScale + 3 +ObjectDBX Classes + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +TABLESTYLE + 2 +AcDbTableStyle + 3 +ObjectDBX Classes + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +MLEADERSTYLE + 2 +AcDbMLeaderStyle + 3 +ACDB_MLEADERSTYLE_CLASS + 90 + 4095 +280 + 0 +281 + 0 + 0 +CLASS + 1 +SUN + 2 +AcDbSun + 3 +SCENEOE + 90 + 1153 +280 + 0 +281 + 0 + 0 +CLASS + 1 +ACDBPLACEHOLDER + 2 +AcDbPlaceHolder + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +CLASS + 1 +LAYOUT + 2 +AcDbLayout + 3 +ObjectDBX Classes + 90 + 0 +280 + 0 +281 + 0 + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +TABLE + 2 +VPORT + 5 +8 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +VPORT + 5 +29 +330 +8 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord + 2 +*Active + 70 + 0 + 10 +0.0 + 20 +0.0 + 11 +1.0 + 21 +1.0 + 12 +3.6552396536 + 22 +0.0 + 13 +0.0 + 23 +0.0 + 14 +10.0 + 24 +10.0 + 15 +10.0 + 25 +10.0 + 16 +0.0 + 26 +0.0 + 36 +1.0 + 17 +0.0 + 27 +0.0 + 37 +0.0 + 40 +47.94 + 41 +4.0731658904 + 42 +50.0 + 43 +0.0 + 44 +0.0 + 50 +0.0 + 51 +0.0 + 71 + 0 + 72 + 100 + 73 + 1 + 74 + 3 + 75 + 0 + 76 + 0 + 77 + 0 + 78 + 0 +281 + 0 + 65 + 1 +110 +0.0 +120 +0.0 +130 +0.0 +111 +1.0 +121 +0.0 +131 +0.0 +112 +0.0 +122 +1.0 +132 +0.0 + 79 + 0 +146 +0.0 + 0 +ENDTAB + 0 +TABLE + 2 +LTYPE + 5 +5 +330 +0 +100 +AcDbSymbolTable + 70 + 6 + 0 +LTYPE + 5 +14 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByBlock + 70 + 0 + 3 + + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +15 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +ByLayer + 70 + 0 + 3 + + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +16 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +Continuous + 70 + 0 + 3 +Solid line + 72 + 65 + 73 + 0 + 40 +0.0 + 0 +LTYPE + 5 +5E +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +HIDDEN + 70 + 0 + 3 +Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ __ + 72 + 65 + 73 + 2 + 40 +1.905 + 49 +1.27 + 74 + 0 + 49 +-0.635 + 74 + 0 + 0 +LTYPE + 5 +5F +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +PHANTOM + 70 + 0 + 3 +Phantom ______ __ __ ______ __ __ ______ + 72 + 65 + 73 + 6 + 40 +12.7 + 49 +6.35 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 0 +LTYPE + 5 +60 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTER + 70 + 0 + 3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ + 72 + 65 + 73 + 4 + 40 +10.16 + 49 +6.35 + 74 + 0 + 49 +-1.27 + 74 + 0 + 49 +1.27 + 74 + 0 + 49 +-1.27 + 74 + 0 + 0 +LTYPE + 5 +61 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +CENTERX2 + 70 + 0 + 3 +Center (2x) ________ __ ________ __ _____ + 72 + 65 + 73 + 4 + 40 +20.32 + 49 +12.7 + 74 + 0 + 49 +-2.54 + 74 + 0 + 49 +2.54 + 74 + 0 + 49 +-2.54 + 74 + 0 + 0 +LTYPE + 5 +62 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord + 2 +DOT2 + 70 + 0 + 3 +Dot (.5x) ........................................ + 72 + 65 + 73 + 2 + 40 +0.635 + 49 +0.0 + 74 + 0 + 49 +-0.635 + 74 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +LAYER + 5 +2 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +LAYER + 5 +10 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord + 2 +0 + 70 + 0 + 62 + 7 + 6 +Continuous +370 + -3 +390 +F + 0 +ENDTAB + 0 +TABLE + 2 +STYLE + 5 +3 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +STYLE + 5 +11 +330 +3 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord + 2 +Standard + 70 + 0 + 40 +0.0 + 41 +1.0 + 50 +0.0 + 71 + 0 + 42 +3.175 + 3 +txt + 4 + + 0 +ENDTAB + 0 +TABLE + 2 +VIEW + 5 +6 +330 +0 +100 +AcDbSymbolTable + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +UCS + 5 +7 +330 +0 +100 +AcDbSymbolTable + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +APPID + 5 +9 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +APPID + 5 +12 +330 +9 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord + 2 +ACAD + 70 + 0 + 0 +ENDTAB + 0 +TABLE + 2 +DIMSTYLE + 5 +A +330 +0 +100 +AcDbSymbolTable + 70 + 1 +100 +AcDbDimStyleTable + 0 +DIMSTYLE +105 +27 +330 +A +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord + 2 +ISO-25 + 70 + 0 + 41 +2.5 + 42 +0.625 + 43 +3.75 + 44 +1.25 + 73 + 0 + 74 + 0 + 77 + 1 + 78 + 8 +140 +2.5 +141 +2.5 +143 +0.0393700787 +147 +0.625 +171 + 3 +172 + 1 +178 + 0 +271 + 2 +272 + 2 +274 + 3 +278 + 44 +283 + 0 +284 + 8 +340 +11 + 0 +ENDTAB + 0 +TABLE + 2 +BLOCK_RECORD + 5 +1 +330 +0 +100 +AcDbSymbolTable + 70 + 1 + 0 +BLOCK_RECORD + 5 +1F +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Model_Space +340 +22 + 0 +BLOCK_RECORD + 5 +1B +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space +340 +1E + 0 +BLOCK_RECORD + 5 +23 +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord + 2 +*Paper_Space0 +340 +26 + 0 +ENDTAB + 0 +ENDSEC + 0 +SECTION + 2 +BLOCKS + 0 +BLOCK + 5 +20 +330 +1F +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Model_Space + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Model_Space + 1 + + 0 +ENDBLK + 5 +21 +330 +1F +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +1C +330 +1B +100 +AcDbEntity + 67 + 1 + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space + 1 + + 0 +ENDBLK + 5 +1D +330 +1B +100 +AcDbEntity + 67 + 1 + 8 +0 +100 +AcDbBlockEnd + 0 +BLOCK + 5 +24 +330 +23 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockBegin + 2 +*Paper_Space0 + 70 + 0 + 10 +0.0 + 20 +0.0 + 30 +0.0 + 3 +*Paper_Space0 + 1 + + 0 +ENDBLK + 5 +25 +330 +23 +100 +AcDbEntity + 8 +0 +100 +AcDbBlockEnd + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 5 +63 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +88.7981869569 + 20 +-9.6749570289 + 30 +0.0 + 11 +88.7981869569 + 21 +9.6749570289 + 31 +0.0 + 0 +ARC + 5 +64 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +83.7981869569 + 20 +-9.6749570289 + 30 +0.0 + 40 +5.000000000000002 +100 +AcDbArc + 50 +270.0 + 51 +0.0 + 0 +LINE + 5 +65 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +76.4024245925 + 20 +-14.6749570289 + 30 +0.0 + 11 +83.7981869569 + 21 +-14.6749570289 + 31 +0.0 + 0 +ARC + 5 +66 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +76.4024245925 + 20 +-9.6749570289 + 30 +0.0 + 40 +5.000000000000014 +100 +AcDbArc + 50 +180.0 + 51 +270.0 + 0 +LINE + 5 +67 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +71.4024245925 + 20 +9.6749570289 + 30 +0.0 + 11 +71.4024245925 + 21 +-9.6749570289 + 31 +0.0 + 0 +ARC + 5 +68 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +76.4024245925 + 20 +9.6749570289 + 30 +0.0 + 40 +5.000000000000014 +100 +AcDbArc + 50 +90.0 + 51 +180.0 + 0 +LINE + 5 +69 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +83.7981869569 + 20 +14.6749570289 + 30 +0.0 + 11 +76.4024245925 + 21 +14.6749570289 + 31 +0.0 + 0 +ARC + 5 +6A +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +83.7981869569 + 20 +9.6749570289 + 30 +0.0 + 40 +5.000000000000002 +100 +AcDbArc + 50 +0.0 + 51 +90.0 + 0 +CIRCLE + 5 +6B +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +0.0 + 20 +0.0 + 30 +0.0 + 40 +21.0 + 0 +LINE + 5 +6C +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +23.5 + 30 +0.0 + 11 +60.0 + 21 +21.0 + 31 +0.0 + 0 +LINE + 5 +6D +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +-87.0641587716 + 20 +23.5 + 30 +0.0 + 11 +60.0 + 21 +23.5 + 31 +0.0 + 0 +ARC + 5 +6E +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +-87.0641587716 + 20 +18.5 + 30 +0.0 + 40 +5.0 +100 +AcDbArc + 50 +90.0 + 51 +180.0 + 0 +LINE + 5 +6F +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +-92.0641587716 + 20 +-18.5 + 30 +0.0 + 11 +-92.0641587716 + 21 +18.5 + 31 +0.0 + 0 +ARC + 5 +70 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +-87.0641587716 + 20 +-18.5 + 30 +0.0 + 40 +5.0 +100 +AcDbArc + 50 +180.0 + 51 +270.0 + 0 +LINE + 5 +71 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +-23.5 + 30 +0.0 + 11 +-87.0641587716 + 21 +-23.5 + 31 +0.0 + 0 +LINE + 5 +72 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +-21.0 + 30 +0.0 + 11 +60.0 + 21 +-23.5 + 31 +0.0 + 0 +LINE + 5 +73 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +94.3746380788 + 20 +-21.0 + 30 +0.0 + 11 +60.0 + 21 +-21.0 + 31 +0.0 + 0 +ARC + 5 +74 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +94.3746380788 + 20 +-16.0 + 30 +0.0 + 40 +5.0 +100 +AcDbArc + 50 +270.0 + 51 +0.0 + 0 +LINE + 5 +75 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +99.3746380788 + 20 +16.0 + 30 +0.0 + 11 +99.3746380788 + 21 +-16.0 + 31 +0.0 + 0 +ARC + 5 +76 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbCircle + 10 +94.3746380788 + 20 +16.0 + 30 +0.0 + 40 +5.0 +100 +AcDbArc + 50 +0.0 + 51 +90.0 + 0 +LINE + 5 +77 +330 +1F +100 +AcDbEntity + 8 +0 + 6 +Continuous + 62 + 7 +370 + 25 +100 +AcDbLine + 10 +60.0 + 20 +21.0 + 30 +0.0 + 11 +94.3746380788 + 21 +21.0 + 31 +0.0 + 0 +ENDSEC + 0 +SECTION + 2 +OBJECTS + 0 +DICTIONARY + 5 +C +330 +0 +100 +AcDbDictionary +281 + 1 + 3 +ACAD_GROUP +350 +D + 3 +ACAD_LAYOUT +350 +1A + 3 +ACAD_MLINESTYLE +350 +17 + 3 +ACAD_PLOTSETTINGS +350 +19 + 3 +ACAD_PLOTSTYLENAME +350 +E + 3 +ACAD_SCALELIST +350 +47 + 3 +DWGPROPS +350 +78 + 0 +DICTIONARY + 5 +D +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 0 +DICTIONARY + 5 +1A +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Layout1 +350 +1E + 3 +Layout2 +350 +26 + 3 +Model +350 +22 + 0 +DICTIONARY + 5 +17 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Standard +350 +18 + 0 +DICTIONARY + 5 +19 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 0 +ACDBDICTIONARYWDFLT + 5 +E +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +Normal +350 +F +100 +AcDbDictionaryWithDefault +340 +F + 0 +DICTIONARY + 5 +47 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbDictionary +281 + 1 + 3 +A0 +350 +48 + 3 +A1 +350 +49 + 3 +A2 +350 +4A + 3 +A3 +350 +4B + 3 +A4 +350 +4C + 3 +A5 +350 +4D + 3 +A6 +350 +4E + 3 +A7 +350 +4F + 3 +A8 +350 +50 + 3 +A9 +350 +51 + 3 +B0 +350 +52 + 3 +B1 +350 +53 + 3 +B2 +350 +54 + 3 +B3 +350 +55 + 3 +B4 +350 +56 + 3 +B5 +350 +57 + 3 +B6 +350 +58 + 0 +XRECORD + 5 +78 +102 +{ACAD_REACTORS +330 +C +102 +} +330 +C +100 +AcDbXrecord +280 + 1 + 1 +DWGPROPS COOKIE + 2 + + 3 + + 4 + + 6 + + 7 + + 8 +mc007 + 9 + +300 += +301 += +302 += +303 += +304 += +305 += +306 += +307 += +308 += +309 += + 40 +0.0 + 41 +2460314.885674271 + 42 +2460314.885686933 + 1 + + 90 + 0 + 0 +LAYOUT + 5 +1E +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 + 688 + 72 + 1 + 73 + 0 + 74 + 5 + 7 + + 75 + 16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout1 + 70 + 1 + 71 + 1 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +1.0000000000E+20 + 24 +1.0000000000E+20 + 34 +1.0000000000E+20 + 15 +-1.0000000000E+20 + 25 +-1.0000000000E+20 + 35 +-1.0000000000E+20 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +1B + 0 +LAYOUT + 5 +26 +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 + + 6 + + 40 +0.0 + 41 +0.0 + 42 +0.0 + 43 +0.0 + 44 +0.0 + 45 +0.0 + 46 +0.0 + 47 +0.0 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +1.0 +143 +1.0 + 70 + 688 + 72 + 1 + 73 + 0 + 74 + 5 + 7 + + 75 + 16 +147 +1.0 +148 +0.0 +149 +0.0 +100 +AcDbLayout + 1 +Layout2 + 70 + 1 + 71 + 2 + 10 +0.0 + 20 +0.0 + 11 +0.0 + 21 +0.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +0.0 + 24 +0.0 + 34 +0.0 + 15 +0.0 + 25 +0.0 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +23 + 0 +LAYOUT + 5 +22 +102 +{ACAD_REACTORS +330 +1A +102 +} +330 +1A +100 +AcDbPlotSettings + 1 + + 2 +none_device + 4 +ANSI_A_(11.00_x_8.50_Inches) + 6 + + 40 +6.35 + 41 +19.05 + 42 +6.35000508 + 43 +19.05000254 + 44 +279.4 + 45 +215.9 + 46 +128.0686164847 + 47 +88.89999873 + 48 +0.0 + 49 +0.0 +140 +0.0 +141 +0.0 +142 +0.0568850211 +143 +1.0 + 70 + 1696 + 72 + 0 + 73 + 0 + 74 + 0 + 7 + + 75 + 0 +147 +0.0179189148 +148 +-1300.4909072572 +149 +0.0 +100 +AcDbLayout + 1 +Model + 70 + 1 + 71 + 0 + 10 +0.0 + 20 +0.0 + 11 +420.0 + 21 +297.0 + 12 +0.0 + 22 +0.0 + 32 +0.0 + 14 +-92.0641587716 + 24 +-23.5 + 34 +0.0 + 15 +99.3746380788 + 25 +23.5 + 35 +0.0 +146 +0.0 + 13 +0.0 + 23 +0.0 + 33 +0.0 + 16 +1.0 + 26 +0.0 + 36 +0.0 + 17 +0.0 + 27 +1.0 + 37 +0.0 + 76 + 0 +330 +1F +331 +29 + 0 +MLINESTYLE + 5 +18 +102 +{ACAD_REACTORS +330 +17 +102 +} +330 +17 +100 +AcDbMlineStyle + 2 +Standard + 70 + 0 + 3 + + 62 + 256 + 51 +90.0 + 52 +90.0 + 71 + 2 + 49 +0.5 + 62 + 256 + 6 +BYLAYER + 49 +-0.5 + 62 + 256 + 6 +BYLAYER + 0 +ACDBPLACEHOLDER + 5 +F +102 +{ACAD_REACTORS +330 +E +102 +} +330 +E + 0 +SCALE + 5 +48 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:1 +140 +1.0 +141 +1.0 +290 + 1 + 0 +SCALE + 5 +49 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:2 +140 +1.0 +141 +2.0 +290 + 0 + 0 +SCALE + 5 +4A +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:4 +140 +1.0 +141 +4.0 +290 + 0 + 0 +SCALE + 5 +4B +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:5 +140 +1.0 +141 +5.0 +290 + 0 + 0 +SCALE + 5 +4C +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:8 +140 +1.0 +141 +8.0 +290 + 0 + 0 +SCALE + 5 +4D +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:10 +140 +1.0 +141 +10.0 +290 + 0 + 0 +SCALE + 5 +4E +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:16 +140 +1.0 +141 +16.0 +290 + 0 + 0 +SCALE + 5 +4F +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:20 +140 +1.0 +141 +20.0 +290 + 0 + 0 +SCALE + 5 +50 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:30 +140 +1.0 +141 +30.0 +290 + 0 + 0 +SCALE + 5 +51 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:40 +140 +1.0 +141 +40.0 +290 + 0 + 0 +SCALE + 5 +52 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:50 +140 +1.0 +141 +50.0 +290 + 0 + 0 +SCALE + 5 +53 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +1:100 +140 +1.0 +141 +100.0 +290 + 0 + 0 +SCALE + 5 +54 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +2:1 +140 +2.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +55 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +4:1 +140 +4.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +56 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +8:1 +140 +8.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +57 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +10:1 +140 +10.0 +141 +1.0 +290 + 0 + 0 +SCALE + 5 +58 +102 +{ACAD_REACTORS +330 +47 +102 +} +330 +47 +100 +AcDbScale + 70 + 0 +300 +100:1 +140 +100.0 +141 +1.0 +290 + 0 + 0 +ENDSEC + 0 +EOF diff --git a/extrusion/components/800_Flanges/78-24-Blank.SLDPRT b/extrusion/components/800_Flanges/78-24-Blank.SLDPRT index b78d93a61..2d8f96a58 100644 --- a/extrusion/components/800_Flanges/78-24-Blank.SLDPRT +++ b/extrusion/components/800_Flanges/78-24-Blank.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:49269ab1f33c51290a93ca9a93c3802d061002a180788f908598219f025353db -size 139886 +oid sha256:c43c6d0467803fcae3e368323280b8f4e257dc0f19b007ea5500cf769ab3e2ed +size 162768 diff --git a/extrusion/components/900_FeedScrew/cad/900_GlobalAssembly.SLDASM b/extrusion/components/900_FeedScrew/cad/900_GlobalAssembly.SLDASM index 85992042a..9a763d9b1 100644 --- a/extrusion/components/900_FeedScrew/cad/900_GlobalAssembly.SLDASM +++ b/extrusion/components/900_FeedScrew/cad/900_GlobalAssembly.SLDASM @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4d817c28e9f24fd9697ec6b76ec13a4e80c59cd0d9a982d72a0fc861a8d777e6 -size 2832060 +oid sha256:184029c358fe5a8a58bb04bcf2a37c9238f77a3557d9713f059520ef93c5c3ea +size 2831829 diff --git a/extrusion/components/900_FeedScrew/cad/CouplingHousing.SLDPRT b/extrusion/components/900_FeedScrew/cad/CouplingHousing.SLDPRT index 45ba4e877..5e935b391 100644 --- a/extrusion/components/900_FeedScrew/cad/CouplingHousing.SLDPRT +++ b/extrusion/components/900_FeedScrew/cad/CouplingHousing.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64e2287a95af19033cf65f081ddd777d6c47ab56af84afdc1de64f003b186f13 -size 183096 +oid sha256:1ac7425da5c7cb68764cc20f8652b1e33e8cb3d5f2ca7a4259a3479d6f34ed7d +size 189734 diff --git a/extrusion/components/common/MSPX-14-14-F/78191.SLDASM b/extrusion/components/common/MSPX-14-14-F/78191.SLDASM index 6af36b72f..ae2d9e535 100644 --- a/extrusion/components/common/MSPX-14-14-F/78191.SLDASM +++ b/extrusion/components/common/MSPX-14-14-F/78191.SLDASM @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5cda8b8eaae69284999824e77f462ea45f7c518ce3fa9681e1cf837395d848f -size 176953 +oid sha256:5226b8831ef94a60bac8628cc951eb3ae027614c678800c0d2dbad41690abcc2 +size 178646 diff --git a/extrusion/components/common/MSPX-14-14-F/78191_02.SLDPRT b/extrusion/components/common/MSPX-14-14-F/78191_02.SLDPRT index 030ed97c3..af33c8bed 100644 --- a/extrusion/components/common/MSPX-14-14-F/78191_02.SLDPRT +++ b/extrusion/components/common/MSPX-14-14-F/78191_02.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5766522aab28c98c7a897558d22ad75358fe8e68a85af330e2687615e4d67037 -size 31979 +oid sha256:2da236af037bd9933a7d1a501fe4a6d3caf691adbd4b75e9598ba2a84b3862c8 +size 32005 diff --git a/extrusion/components/common/MSPX-14-14-F/78191_03.SLDPRT b/extrusion/components/common/MSPX-14-14-F/78191_03.SLDPRT index 93a8c1bfe..446abb601 100644 --- a/extrusion/components/common/MSPX-14-14-F/78191_03.SLDPRT +++ b/extrusion/components/common/MSPX-14-14-F/78191_03.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc1651138246ef7b78c366a03a0d67e6d8070442813db0da89c3b483b61a26fb -size 30961 +oid sha256:1ec0face38239103f983cd10a3f70e60583b84041e7750afc5b230eedb31f45e +size 32127 diff --git a/extrusion/components/common/MSPX-14-14-F/78191_04.SLDPRT b/extrusion/components/common/MSPX-14-14-F/78191_04.SLDPRT index 6ccd65d35..c6fa5dec4 100644 --- a/extrusion/components/common/MSPX-14-14-F/78191_04.SLDPRT +++ b/extrusion/components/common/MSPX-14-14-F/78191_04.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:536713872263e3322824f3cb504d80727badac6f9755afe2f2e1d5fd5c5cb862 -size 31404 +oid sha256:7adf4be4507da48aa688323b3edbf5704aeb45ae145177ee7a359556c9f262f6 +size 31733 diff --git a/extrusion/components/common/MSPX-14-14-F/78191_05.SLDPRT b/extrusion/components/common/MSPX-14-14-F/78191_05.SLDPRT index 36067dfc0..d350b6edd 100644 --- a/extrusion/components/common/MSPX-14-14-F/78191_05.SLDPRT +++ b/extrusion/components/common/MSPX-14-14-F/78191_05.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:542f0997f34574cb509709b82d533fd9103cf0fc54990233be7503600783a69c -size 31681 +oid sha256:5092d9bb15fe8a115767f3bd38d3fa664c6d93d25cbe3ade47ac83e2067e507d +size 32528 diff --git a/extrusion/components/common/MSPX-14-14-F/coupling.SLDPRT b/extrusion/components/common/MSPX-14-14-F/coupling.SLDPRT index 33e0e7c94..b85b95b35 100644 --- a/extrusion/components/common/MSPX-14-14-F/coupling.SLDPRT +++ b/extrusion/components/common/MSPX-14-14-F/coupling.SLDPRT @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0325115540ac3b3cef8fef0aa375ece5a990e65792e9c0e7daf7e19688e68ea -size 204718 +oid sha256:7a98eb173b538cef0443fa49f3d82e45729f5a5de502b8173562c4b232800026 +size 209970 diff --git a/injection/components/2000_Clamps/OSR-300-40-30-25-80/renderings/perspective2.jpg b/injection/components/2000_Clamps/OSR-300-40-30-25-80/renderings/perspective2.jpg new file mode 100644 index 000000000..f96f95387 --- /dev/null +++ b/injection/components/2000_Clamps/OSR-300-40-30-25-80/renderings/perspective2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3fce86052593e03b19a6c896c0d24cd4805f6ba97f4a620aee9c3ca30d867e8 +size 362462 diff --git a/resources/workshop/.gitattributes b/resources/workshop/.gitattributes new file mode 100644 index 000000000..b00e591a7 --- /dev/null +++ b/resources/workshop/.gitattributes @@ -0,0 +1,11 @@ +*.pdf filter=lfs diff=lfs merge=lfs -text +*.igs filter=lfs diff=lfs merge=lfs -text +*.iges filter=lfs diff=lfs merge=lfs -text +*.step filter=lfs diff=lfs merge=lfs -text +SLDASM filter=lfs diff=lfs merge=lfs -text +STEP filter=lfs diff=lfs merge=lfs -text +jpg filter=lfs diff=lfs merge=lfs -text +*.SLDASM filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.SLDPRT filter=lfs diff=lfs merge=lfs -text diff --git a/resources/workshop/.gitignore b/resources/workshop/.gitignore new file mode 100644 index 000000000..2ca868298 --- /dev/null +++ b/resources/workshop/.gitignore @@ -0,0 +1,4 @@ +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata diff --git a/resources/workshop/.inc/.gitignore b/resources/workshop/.inc/.gitignore new file mode 100644 index 000000000..67045665d --- /dev/null +++ b/resources/workshop/.inc/.gitignore @@ -0,0 +1,104 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port diff --git a/resources/workshop/.inc/LICENSE b/resources/workshop/.inc/LICENSE new file mode 100644 index 000000000..6e398b8e7 --- /dev/null +++ b/resources/workshop/.inc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Plastic Hub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/workshop/.inc/README.md b/resources/workshop/.inc/README.md new file mode 100644 index 000000000..54006375b --- /dev/null +++ b/resources/workshop/.inc/README.md @@ -0,0 +1,2 @@ +# pp-webinars +Online webinars for PP diff --git a/resources/workshop/.inc/assets/git-flow.jpg b/resources/workshop/.inc/assets/git-flow.jpg new file mode 100644 index 000000000..f851960d7 --- /dev/null +++ b/resources/workshop/.inc/assets/git-flow.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e926c2e6a312da96ef349e2451a98676abfcaf677695ba7c210bf4dac9bcbf1 +size 8548 diff --git a/resources/workshop/.inc/assets/plastic-hub-tooling.jpg b/resources/workshop/.inc/assets/plastic-hub-tooling.jpg new file mode 100644 index 000000000..16acca440 --- /dev/null +++ b/resources/workshop/.inc/assets/plastic-hub-tooling.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bee0d2df7d9730d37492ef1b048720d64e3ec1bb228e6a25e670c0dcc0a1abe3 +size 38180 diff --git a/resources/workshop/.inc/basics/readme.md b/resources/workshop/.inc/basics/readme.md new file mode 100644 index 000000000..ad9b89c5f --- /dev/null +++ b/resources/workshop/.inc/basics/readme.md @@ -0,0 +1,50 @@ +# Basic - course about open-source tools for makers and PPers + +A walk through open-source tools and services to update your infrastructure. I will present the essential modern day tools to manage & maintaine production and development for any type of project as well. + +[**Zoom (conference) invitation - meeting**](https://zoom.us/j/551567106) + +The session will be published on youtube, so you can watch it later. You can also ask questions on the [chat](https://discord.gg/wU5AQgS) + +[Facebook event](https://www.facebook.com/events/2177260425710339/?event_time_id=2177260432377005) + +**Date** : 25.01.2019 | 10.30am (Berlin Time) + +**Key subjects** : + +1. How and where to opensource your project. This is the very basic setup. +2. How to use open source tooling to maintain and manage your production and development for any type of project. In this part we explain Markdown + +**Tools to be presented** : + +- Git & Github (1st. session) +- Markdown (1st session) +- Text editors (VSCode, 1st session) +- CAD & CAM (Fusion-360, 2nd session) + +**Speaker** : Guenter - Senior Software Engineer + +**Attendee Support** : Anne - PhD - Psycho-sociology + +## The webinar + +- I will speak in 15 minute intervals, and then we answer questions + +## Requirements + +### Hardware + +- a headset ! +- a good internet connection + +Please install this on your computer (we assume you're on windows) : + +1. [Zoom client - conference software](../software/zoom.exe) | Or signup and download from the [zoom webpage](https://zoom.us/j/551567106) +2. Install [Git](https://tortoisegit.org/download/) +3. Install [VSCode](https://code.visualstudio.com/download) +4. Create a Google account ! + +## Reference links for later + +- [The factory pipe](../assets/plastic-hub-tooling.jpg) +- [Git flow](../assets/git-flow.jpg) diff --git a/resources/workshop/.inc/saturn/.dockerignore b/resources/workshop/.inc/saturn/.dockerignore new file mode 100644 index 000000000..27d2dae2b --- /dev/null +++ b/resources/workshop/.inc/saturn/.dockerignore @@ -0,0 +1,2 @@ +*/node_modules +*.log diff --git a/resources/workshop/.inc/saturn/.gitattributes b/resources/workshop/.inc/saturn/.gitattributes new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/resources/workshop/.inc/saturn/.gitattributes @@ -0,0 +1 @@ + diff --git a/resources/workshop/.inc/saturn/.gitignore b/resources/workshop/.inc/saturn/.gitignore new file mode 100644 index 000000000..ca70912a1 --- /dev/null +++ b/resources/workshop/.inc/saturn/.gitignore @@ -0,0 +1,69 @@ +# Logs +logs +archives +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +academy +~$*.SLDDRW +~$*.SLDPRT +~$*.SLDASM +# Runtime data +pids +*.pid +*.seed +*.pid.lock +_site +.jekyll-cache +.jekyll-metadata + + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next diff --git a/resources/workshop/.inc/saturn/.htaccess b/resources/workshop/.inc/saturn/.htaccess new file mode 100644 index 000000000..f3d573b87 --- /dev/null +++ b/resources/workshop/.inc/saturn/.htaccess @@ -0,0 +1,34 @@ +# turn off directory browsing +IndexIgnore * + +# show custom error pages for these HTTP statuses +ErrorDocument 404 /error/404.html +ErrorDocument 403 /error/403.html +ErrorDocument 401 /error/403.html + +# start rewrite rules + +RewriteEngine On + + + +# pass through requests when the page exists +RewriteCond %{REQUEST_FILENAME} -f +RewriteRule ^(.*)$ - [L] + +# static pages +RewriteRule ^about/?$ /about.html [R=301,L] +RewriteRule ^contact/?$ /contact.html [R=301,L] +RewriteRule feed/?$ /feed.xml [R=301,L] + +# pass anything ending in HTML - prevents infinite redirect if the wildcard formulas below are incorrect +RewriteRule ^(.*).html$ - [L] + +# Blog posts start with year, ^20___ . +# match a trailing slash, but omit it from the destination +RewriteRule ^20(.*)\/$ /20$1.html [R=301,L] +# tack html onto anything else +RewriteRule ^20(.*)$ /20$1.html [R=301,L] + +# end rewrite rules + \ No newline at end of file diff --git a/resources/workshop/.inc/saturn/404.html b/resources/workshop/.inc/saturn/404.html new file mode 100644 index 000000000..086a5c9ea --- /dev/null +++ b/resources/workshop/.inc/saturn/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
    +

    404

    + +

    Page not found :(

    +

    The requested page could not be found.

    +
    diff --git a/resources/workshop/.inc/saturn/Dockerfile b/resources/workshop/.inc/saturn/Dockerfile new file mode 100644 index 000000000..c7f1856c1 --- /dev/null +++ b/resources/workshop/.inc/saturn/Dockerfile @@ -0,0 +1,10 @@ +FROM node:lts + +WORKDIR /app/website + +EXPOSE 3000 35729 +COPY ./docs /app/docs +COPY ./website /app/website +RUN yarn install + +CMD ["yarn", "start"] diff --git a/resources/workshop/.inc/saturn/Gemfile b/resources/workshop/.inc/saturn/Gemfile new file mode 100644 index 000000000..f7ba88ac4 --- /dev/null +++ b/resources/workshop/.inc/saturn/Gemfile @@ -0,0 +1,40 @@ +source "https://rubygems.org" +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! +gem "jekyll", "~> 4.0.0" +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima", "~> 2.5" +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +# gem "github-pages", group: :jekyll_plugins +# If you have any plugins, put them here! +group :jekyll_plugins do + gem "jekyll-paginate" + gem "jekyll-sitemap" + gem "jekyll-gist" + gem "jemoji" + gem "jekyll-include-cache" + gem "jekyll-algolia" + gem 'jekyll-seo-tag' + gem 'jekyll-pwa-plugin' +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do + gem "tzinfo", "~> 1.2" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? + +gem "minimal-mistakes-jekyll" + +gem 'jekyll-admin', group: :jekyll_plugins \ No newline at end of file diff --git a/resources/workshop/.inc/saturn/LICENSE b/resources/workshop/.inc/saturn/LICENSE new file mode 100644 index 000000000..6e398b8e7 --- /dev/null +++ b/resources/workshop/.inc/saturn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Plastic Hub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/resources/workshop/.inc/saturn/README.md b/resources/workshop/.inc/saturn/README.md new file mode 100644 index 000000000..b88b68a0d --- /dev/null +++ b/resources/workshop/.inc/saturn/README.md @@ -0,0 +1,52 @@ +# Lab Saturn + +Lab files - PlasticHub - Cat1 + +## Building + +- [Floorplan](./building) + +- [Stations](./stations.md) + +## Product Files and sites + +- [Products - CAD & CAM](file:///~./plastichub/plastichub/products) +- [Production / Processes](http://library.plastic-hub.com/) + +## Intranet Services & hosts + +- [VPN Main server : 'ecu-espana.es:1794' - login with your plastic-hub email and password](ecu-espana.es:1794). +- [Common Files & Shares & Printer](\\plastichub-intern) +- [PlasticHub main office](\\plastichub-saturn) +- [PlasticHub development](\\plastichub-dev) + +## Office Sites + +- [Zoho](https://books.zoho.com/app#/home/dashboard) +- [Orders](https://docs.google.com/spreadsheets/d/1oVEiGH4o3SV-mAA3Mb-WNVJMyYl4VMxLjWjrSw_ipJY/edit#gid=1462790708) +- [Directory](http://library.plastic-hub.com/directory) +- [Kanban board - Lab](https://plastichub.kanbanize.com/ctrl_board/1) + +## Email addresses + +- [Office](anne.babier@plastic-hub.com) +- [Guenter](guenter.baumgart@plastic-hub.com) +- [Nial](nial.oflyn@plastic-hub.com) +- [Gil](guiliam@plastic-hub.com) +- [Kampru](kampru@plastic-hub.com) +- [Support - for clients](support@plastic-hub.com) + +## Customer Projects (intern/private) + +- [Print-Head - 3dtreehouse](https://github.com/plastic-hub/lydia-print-head) +- [Asterix - SanAniol](https://github.com/plastic-hub/products/asterix) +- [Idefix - Paris](https://github.com/plastic-hub/products/idefix) + +--- + +For admins: + +- ## ISO-9001 + + - [IT checklist](./iso9001.md) + - [IT tools](./iso9001-tools.md) diff --git a/resources/workshop/.inc/saturn/_config.yml b/resources/workshop/.inc/saturn/_config.yml new file mode 100644 index 000000000..5d00bfd8a --- /dev/null +++ b/resources/workshop/.inc/saturn/_config.yml @@ -0,0 +1,306 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. +# +# If you need help with YAML syntax, here are some quick references for you: +# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml +# https://learnxinyminutes.com/docs/yaml/ +# +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }} + +pwa: + enabled: false # Optional + sw_src_filepath: service-worker.js # Optional + sw_dest_filename: service-worker.js # Optional + dest_js_directory: assets/js # Required + precache_recent_posts_num: 5 # Optional + precache_glob_directory: / # Optional + precache_glob_patterns: # Optional + - "{js,css,fonts}/**/*.{js,css,eot,svg,ttf,woff}" + - index.html + precache_glob_ignores: # Optional + - sw-register.js + - "fonts/**/*" + +keywords: "precious, injection, extrusion, machine, bazar, plastichub, preciousplastic, recycling, machines, plastic recycling, machines, plastic" +title: Plastic Hub +logo: "assets/site/logo.png" +email: your-email@example.com +description: "The unofficial library for Precious Plastic" +baseurl: "" # the subpath of your site, e.g. /blog +social_url: "https://saturn.plastic-hub.com" +url: "https://saturn.plastic-hub.com" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: jekyllrb +github_username: catx23 +relative_url: "" +git_repo: "https://github.com/plastic-hub/lab-saturn" +host : 0.0.0.0 + + +admin_url: "http://127.0.0.1:8008/admin/" +edit_url: "http://127.0.0.1:15555/app/pp/" + +search : true # true, false (default) +search_full_content : true # true, false (default) +search_provider : "lunr" +algolia: + application_id : "QB6HVGBSBA" + index_name : "dev_minimal-mistakes" + search_only_api_key : "9d5014e5bbc77372547bce778dfa5663" + powered_by : true + +comments: + provider : "facebook" + facebook: + # https://developers.facebook.com/docs/plugins/comments + appid : 598113287788244 + num_posts : 5 + colorscheme : "light" + + +# Analytics +analytics: + provider : "google" + google: + tracking_id : "UA-176859075-1" + anonymize_ip : false + + +# Build settings +# theme: minima +# theme: minimal-mistakes-jekyll +plugins: + - jekyll-paginate + - jekyll-gist + - jemoji + - jekyll-include-cache + +include: + - .htaccess + - _pages + - _machines + - _howto + - _projects + - _products + +exclude: + - "*.sublime-project" + - "*.sublime-workspace" + - vendor + - .asset-cache + - .bundle + - .jekyll-assets-cache + - .sass-cache + - assets/js/plugins + - templates/site/ + - assets/js/_main.js + - assets/js/vendor + - Capfile + - CHANGELOG + - node_modules + - config + - Gemfile + - Gruntfile.js + - gulpfile.js + - LICENSE + - log + - node_modules + - package.json + - Rakefile + - README + - cad + - tests/ + - assets/filegrid + - cli/ + - lang/ + - tasks/ + - api/ + - people/ + - tmp/ + - workshop/ + - bazar/ + - "*.SLDDRW" + - "*.sldprt" + - "*.step" + - archives/ + - templates/jekyll + +# Conversion +markdown: kramdown +highlighter: rouge +lsi: false +excerpt_separator: "\n\n" +incremental: false +breadcrumbs: true +markdown_ext: "markdown,mkdown,mkdn,mkd,md" + +# minimal_mistakes_skin : "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise" + +minimal_mistakes_skin : "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise" + +kramdown: + input: GFM + hard_wrap: false + auto_ids: true + footnote_nr: 1 + entity_output: as_char + toc_levels: 1..6 + smart_quotes: lsquo,rsquo,ldquo,rdquo + enable_coderay: false + + + # Site Author +author: + name : *name # *name is a YAML reference pointing to the &anchor earlier + avatar : "/assets/images/michael-rose.jpg" + bio : "Just another *boring*, *tattooed*, *time traveling*, *designer*." + location : "Buffalo, NY" + links: + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/plastichub" + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + url: "https://instagram.com/plastichubcat" + + +prefixes: + machines: machines + howto: howto + + +# Site Footer +footer: + links: + - label: "GitHub" + icon: "fab fa-fw fa-github" + url: "https://github.com/plastic-hub" + - label: "Instagram" + icon: "fab fa-fw fa-instagram" + url: "https://instagram.com/plastichubcat" + - label: "EMail" + icon: "fab fa-fw fa-envelope-open" + url: "mailto://sales@plastic-hub.com" + - label: "Phone & Whatsapp" + icon: "fab fa-fw fa-phone" + url: "tel://0034666894789" + +collections: + docs: + output: true + permalink: /:collection/:path/ + breadcrumbs: true + products: + output: true + permalink: /:collection/:path:output_ext + breadcrumbs: true + howto: + output: true + permalink: /:collection/:path:output_ext + breadcrumbs: true + machines: + output: true + permalink: /:collection/:path:output_ext + breadcrumbs: true + projects: + output: true + permalink: /:collection/:path:output_ext + breadcrumbs: true + +# Defaults +defaults: + # _posts + - scope: + path: "" + type: posts + values: + layout: single + author_profile: true + read_time: true + comments: true + share: true + related: true + # _pages + - scope: + path: "_pages" + type: pages + values: + layout: single + author_profile: false + ctype: pages + comments: true + # _docs + - scope: + path: "" + type: docs + values: + layout: single + read_time: false + author_profile: false + share: false + comments: true + sidebar: + nav: "docs" + - scope: + path: "_howto" + type: howto + values: + ctype: collections + layout: single + read_time: true + author_profile: false + share: true + comments: true + related: true + sidebar: + nav: "howto" + - scope: + path: "_projects" + type: projects + values: + layout: single + read_time: true + author_profile: false + share: true + comments: true + related: true + ctype: collections + sidebar: + nav: "projects" + # products + - scope: + path: "_machines" + type: machines + values: + layout: single + author_profile: false + share: true + related: true + ctype: collections + comments: true + sidebar: + nav: "machines" + - scope: + path: "_products" + type: products + values: + layout: stretched + author_profile: false + pagination: false + share: true + related: false + ctype: collections + comments: true +sass: + style: compact # possible values: nested expanded compact compressed + diff --git a/resources/workshop/.inc/saturn/building/floor_plan.pdf b/resources/workshop/.inc/saturn/building/floor_plan.pdf new file mode 100644 index 000000000..dbdb45035 --- /dev/null +++ b/resources/workshop/.inc/saturn/building/floor_plan.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47567f4edf0d5057952c32889d0cfc48097907d65723c18d5f928db540508620 +size 116985 diff --git a/resources/workshop/.inc/saturn/building/floor_plan_page.jpg b/resources/workshop/.inc/saturn/building/floor_plan_page.jpg new file mode 100644 index 000000000..ebc82b4cb --- /dev/null +++ b/resources/workshop/.inc/saturn/building/floor_plan_page.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26ff0bfd8523072fd24a06abed766cd1d12749a865cab318de38600d64053132 +size 215851 diff --git a/resources/workshop/.inc/saturn/building/readme.md b/resources/workshop/.inc/saturn/building/readme.md new file mode 100644 index 000000000..64e2139aa --- /dev/null +++ b/resources/workshop/.inc/saturn/building/readme.md @@ -0,0 +1,42 @@ +## Building + +### Floorplan + +![](./floor_plan_page.jpg) + +### 1. Entry - Lane + +- needs to stay free for 20T trucks + +### 2. Cutting area / Sheet-Stock + +- saw, plasma + +- 3kW + +### 3. Metal stock (standard 6m) + +### 4. Offices/Storage + +- 2kW + +### 5. Drilling / Abresive / Plasma + +- 6kW + +### 6. Tools / Shaper / Grinder + +- 5kW + +### 7. Lathe - CNC + +- 15kW +### 8. VMC + +- 22kW +### 9. Assembly tables, mobile / 2 side + +- 2kW +### 10. Sheetpress - Assembly + +- 15kW diff --git a/resources/workshop/.inc/saturn/docker-compose.yml b/resources/workshop/.inc/saturn/docker-compose.yml new file mode 100644 index 000000000..6711192ae --- /dev/null +++ b/resources/workshop/.inc/saturn/docker-compose.yml @@ -0,0 +1,18 @@ +version: "3" + +services: + docusaurus: + build: . + ports: + - 3000:3000 + - 35729:35729 + volumes: + - ./docs:/app/docs + - ./website/blog:/app/website/blog + - ./website/core:/app/website/core + - ./website/i18n:/app/website/i18n + - ./website/pages:/app/website/pages + - ./website/static:/app/website/static + - ./website/sidebars.json:/app/website/sidebars.json + - ./website/siteConfig.js:/app/website/siteConfig.js + working_dir: /app/website diff --git a/resources/workshop/.inc/saturn/iso9001.md b/resources/workshop/.inc/saturn/iso9001.md new file mode 100644 index 000000000..e69de29bb diff --git a/resources/workshop/.inc/saturn/mc/fanuc2/fanuc incremental.cps b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc incremental.cps new file mode 100644 index 000000000..96de547bf --- /dev/null +++ b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc incremental.cps @@ -0,0 +1,2184 @@ +/** + Copyright (C) 2012-2020 by Autodesk, Inc. + All rights reserved. + + FANUC post processor configuration. + + $Revision: 42645 dab327b1b16b423b75c69877cc91aea7ea31c0ac $ + $Date: 2020-02-06 06:32:21 $ + + FORKID {04622D27-72F0-45d4-85FB-DB346FD1AE22} +*/ + +description = "FANUC (with G91)"; +vendor = "Fanuc"; +vendorUrl = "http://www.fanuc.com"; +legal = "Copyright (C) 2012-2020 by Autodesk, Inc."; +certificationLevel = 2; +minimumRevision = 40783; + +longDescription = "Generic post for Fanuc using incremental (G91) values."; + +extension = "nc"; +programNameIsInteger = true; +setCodePage("ascii"); + +capabilities = CAPABILITY_MILLING; +tolerance = spatial(0.002, MM); + +minimumChordLength = spatial(0.25, MM); +minimumCircularRadius = spatial(0.01, MM); +maximumCircularRadius = spatial(1000, MM); +minimumCircularSweep = toRad(0.01); +maximumCircularSweep = toRad(180); +allowHelicalMoves = true; +allowedCircularPlanes = undefined; // allow any circular motion +highFeedrate = (unit == IN) ? 500 : 5000; + +// user-defined properties +properties = { + writeMachine: true, // write machine + writeTools: true, // writes the tools + preloadTool: true, // preloads next tool on tool change if any + showSequenceNumbers: true, // show sequence numbers + sequenceNumberStart: 10, // first sequence number + sequenceNumberIncrement: 5, // increment for sequence numbers + optionalStop: true, // optional stop + o8: false, // specifies 8-digit program number + separateWordsWithSpace: true, // specifies that the words should be separated with a white space + allow3DArcs: false, // specifies that 3D circular arcs are allowed + useRadius: false, // specifies that arcs should be output using the radius (R word) instead of the I, J, and K words + forceIJK: false, // force output of IJK for G2/G3 when not using R word + useIncremental: true, // specifies that incremental XYZABC should be output. + useParametricFeed: false, // specifies that feed should be output using Q values + showNotes: false, // specifies that operation notes should be output + useSmoothing: false, // specifies if smoothing should be used or not + usePitchForTapping: false, // enable to use pitch instead of feed for the F-word for canned tapping cycles - note that your CNC control must be setup for pitch mode! + useG95: false, // use IPR/MPR instead of IPM/MPM + useG54x4: false, // Fanuc 30i supports G54.4 for Workpiece Error Compensation + useRigidTapping: "yes" // output rigid tapping block +}; + +// user-defined property definitions +propertyDefinitions = { + writeMachine: {title:"Write machine", description:"Output the machine settings in the header of the code.", group:0, type:"boolean"}, + writeTools: {title:"Write tool list", description:"Output a tool list in the header of the code.", group:0, type:"boolean"}, + preloadTool: {title:"Preload tool", description:"Preloads the next tool at a tool change (if any).", group:1, type:"boolean"}, + showSequenceNumbers: {title:"Use sequence numbers", description:"Use sequence numbers for each block of outputted code.", group:1, type:"boolean"}, + sequenceNumberStart: {title:"Start sequence number", description:"The number at which to start the sequence numbers.", group:1, type:"integer"}, + sequenceNumberIncrement: {title:"Sequence number increment", description:"The amount by which the sequence number is incremented by in each block.", group:1, type:"integer"}, + optionalStop: {title:"Optional stop", description:"Outputs optional stop code during when necessary in the code.", type:"boolean"}, + o8: {title:"8 Digit program number", description:"Specifies that an 8 digit program number is needed.", type:"boolean"}, + separateWordsWithSpace: {title:"Separate words with space", description:"Adds spaces between words if 'yes' is selected.", type:"boolean"}, + allow3DArcs: {title:"Allow 3D arcs", description:"Specifies whether 3D circular arcs are allowed.", type:"boolean"}, + useRadius: {title:"Radius arcs", description:"If yes is selected, arcs are outputted using radius values rather than IJK.", type:"boolean"}, + forceIJK: {title:"Force IJK", description:"Force the output of IJK for G2/G3 when not using R mode.", type:"boolean"}, + useIncremental: {title:"Use Incremental", description:"Specifies whether incremental XYZABC should be output.", type:"boolean"}, + useParametricFeed: {title:"Parametric feed", description:"Specifies the feed value that should be output using a Q value.", type:"boolean"}, + showNotes: {title:"Show notes", description:"Writes operation notes as comments in the outputted code.", type:"boolean"}, + useSmoothing: {title:"Use smoothing", description:"Specifies if smoothing should be used or not.", type:"boolean"}, + usePitchForTapping: {title:"Use pitch for tapping", description:"Enables the use of pitch instead of feed for the F-word in canned tapping cycles. Your CNC control must be setup for pitch mode!", type:"boolean"}, + useG95: {title:"Use G95", description:"Use IPR/MPR instead of IPM/MPM.", type:"boolean"}, + useG54x4: {title:"Use G54.4", description:"Fanuc 30i supports G54.4 for workpiece error compensation.", type:"boolean"}, + useRigidTapping: { + title: "Use rigid tapping", + description: "Select 'Yes' to enable, 'No' to disable, or 'Without spindle direction' to enable rigid tapping without outputting the spindle direction block.", + type: "enum", + values:[ + {title:"Yes", id:"yes"}, + {title:"No", id:"no"}, + {title:"Without spindle direction", id:"without"} + ] + } +}; + +var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines +// samples: +// {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} +// {id: COOLANT_THROUGH_TOOL, on: [8, 88], off: [9, 89]} +var coolants = [ + {id: COOLANT_FLOOD, on: 8}, + {id: COOLANT_MIST}, + {id: COOLANT_THROUGH_TOOL, on: 88, off: 89}, + {id: COOLANT_AIR}, + {id: COOLANT_AIR_THROUGH_TOOL}, + {id: COOLANT_SUCTION}, + {id: COOLANT_FLOOD_MIST}, + {id: COOLANT_FLOOD_THROUGH_TOOL}, + {id: COOLANT_OFF, off: 9} +]; + +var permittedCommentChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,=_-"; + +var gFormat = createFormat({prefix:"G", width:2, zeropad:true, decimals:1}); +var mFormat = createFormat({prefix:"M", width:2, zeropad:true, decimals:1}); +var hFormat = createFormat({prefix:"H", width:2, zeropad:true, decimals:1}); +var dFormat = createFormat({prefix:"D", width:2, zeropad:true, decimals:1}); +var probe100Format = createFormat({decimals:3, zeropad:true, width:3, forceDecimal:true}); + +var xyzFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var ijkFormat = createFormat({decimals:6, forceDecimal:true}); // unitless +var rFormat = xyzFormat; // radius +var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG}); +var feedFormat = createFormat({decimals:(unit == MM ? 0 : 1), forceDecimal:true}); +var pitchFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var toolFormat = createFormat({decimals:0}); +var rpmFormat = createFormat({decimals:0}); +var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999 +var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-9999 +var taperFormat = createFormat({decimals:1, scale:DEG}); +var peckFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +// var peckFormat = createFormat({decimals:0, forceDecimal:false, trim:false, width:4, zeropad:true, scale:(unit == MM ? 1000 : 10000)}); + +var xOutput = createVariable({prefix:"X"}, xyzFormat); +var yOutput = createVariable({prefix:"Y"}, xyzFormat); +var zOutput = createVariable({onchange: function() {retracted = false;}, prefix:"Z"}, xyzFormat); +var aOutput = createVariable({prefix:"A"}, abcFormat); +var bOutput = createVariable({prefix:"B"}, abcFormat); +var cOutput = createVariable({prefix:"C"}, abcFormat); +var feedOutput = createVariable({prefix:"F"}, feedFormat); +var pitchOutput = createVariable({prefix:"F", force:true}, pitchFormat); +var sOutput = createVariable({prefix:"S", force:true}, rpmFormat); +var dOutput = createVariable({}, dFormat); +var peckOutput = createVariable({prefix:"Q", force:true}, peckFormat); + +// circular output +var iOutput = createReferenceVariable({prefix:"I"}, xyzFormat); +var jOutput = createReferenceVariable({prefix:"J"}, xyzFormat); +var kOutput = createReferenceVariable({prefix:"K"}, xyzFormat); + +var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ... +var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19 +var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91 +var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G94-95 +var gUnitModal = createModal({}, gFormat); // modal group 6 // G20-21 +var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ... +var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99 +var gRotationModal = createModal({}, gFormat); // modal group 16 // G68-G69 + +// fixed settings +var firstFeedParameter = 500; +var useMultiAxisFeatures = true; +var forceMultiAxisIndexing = false; // force multi-axis indexing for 3D programs +var cancelTiltFirst = false; // cancel G68.2 with G69 prior to G54-G59 WCS block +var useABCPrepositioning = false; // position ABC axes prior to G68.2 block + +var WARNING_WORK_OFFSET = 0; + +var ANGLE_PROBE_NOT_SUPPORTED = 0; +var ANGLE_PROBE_USE_ROTATION = 1; +var ANGLE_PROBE_USE_CAXIS = 2; + +// collected state +var sequenceNumber; +var currentWorkOffset; +var useIncremental = false; +var optionalSection = false; +var forceSpindleSpeed = false; +var activeMovements; // do not use by default +var currentFeedId; +var g68RotationMode = 0; +var angularProbingMode; +var retracted = false; // specifies that the tool has been retracted to the safe plane +probeMultipleFeatures = true; + +/** + Writes the specified block. +*/ +function writeBlock() { + var text = formatWords(arguments); + if (!text) { + return; + } + if (properties.showSequenceNumbers) { + if (optionalSection) { + if (text) { + writeWords("/", "N" + sequenceNumber, text); + } + } else { + writeWords2("N" + sequenceNumber, arguments); + } + sequenceNumber += properties.sequenceNumberIncrement; + } else { + if (optionalSection) { + writeWords2("/", arguments); + } else { + writeWords(arguments); + } + } +} + +/** + Writes the specified optional block. +*/ +function writeOptionalBlock() { + if (properties.showSequenceNumbers) { + var words = formatWords(arguments); + if (words) { + writeWords("/", "N" + sequenceNumber, words); + sequenceNumber += properties.sequenceNumberIncrement; + } + } else { + writeWords2("/", arguments); + } +} + +function formatComment(text) { + return "(" + filterText(String(text).toUpperCase(), permittedCommentChars).replace(/[()]/g, "") + ")"; +} + +/** + Output a comment. +*/ +function writeComment(text) { + writeln(formatComment(text)); +} + +function onOpen() { + if (properties.useRadius) { + maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC + } + gRotationModal.format(69); // Default to G69 Rotation Off + + if (false) { // note: setup your machine here + var aAxis = createAxis({coordinate:0, table:false, axis:[1, 0, 0], range:[-360, 360], preference:1}); + var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], range:[-360, 360], preference:1}); + machineConfiguration = new MachineConfiguration(aAxis, cAxis); + + setMachineConfiguration(machineConfiguration); + optimizeMachineAngles2(0); // TCP mode + } + + if (!machineConfiguration.isMachineCoordinate(0)) { + aOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(1)) { + bOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(2)) { + cOutput.disable(); + } + + if (!properties.separateWordsWithSpace) { + setWordSeparator(""); + } + + if (properties.forceIJK) { + iOutput = createReferenceVariable({prefix:"I", force:true}, xyzFormat); + jOutput = createReferenceVariable({prefix:"J", force:true}, xyzFormat); + kOutput = createReferenceVariable({prefix:"K", force:true}, xyzFormat); + } + + sequenceNumber = properties.sequenceNumberStart; + writeln("%"); + + if (programName) { + var programId; + try { + programId = getAsInt(programName); + } catch (e) { + error(localize("Program name must be a number.")); + return; + } + if (properties.o8) { + if (!((programId >= 1) && (programId <= 99999999))) { + error(localize("Program number is out of range.")); + return; + } + } else { + if (!((programId >= 1) && (programId <= 9999))) { + error(localize("Program number is out of range.")); + return; + } + } + if ((programId >= 8000) && (programId <= 9999)) { + warning(localize("Program number is reserved by tool builder.")); + } + var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + if (programComment) { + writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); + } else { + writeln("O" + oFormat.format(programId)); + } + } else { + error(localize("Program name has not been specified.")); + return; + } + + // dump machine configuration + var vendor = machineConfiguration.getVendor(); + var model = machineConfiguration.getModel(); + var description = machineConfiguration.getDescription(); + + if (properties.writeMachine && (vendor || model || description)) { + writeComment(localize("Machine")); + if (vendor) { + writeComment(" " + localize("vendor") + ": " + vendor); + } + if (model) { + writeComment(" " + localize("model") + ": " + model); + } + if (description) { + writeComment(" " + localize("description") + ": " + description); + } + } + + // dump tool information + if (properties.writeTools) { + var zRanges = {}; + if (is3D()) { + var numberOfSections = getNumberOfSections(); + for (var i = 0; i < numberOfSections; ++i) { + var section = getSection(i); + var zRange = section.getGlobalZRange(); + var tool = section.getTool(); + if (zRanges[tool.number]) { + zRanges[tool.number].expandToRange(zRange); + } else { + zRanges[tool.number] = zRange; + } + } + } + + var tools = getToolTable(); + if (tools.getNumberOfTools() > 0) { + for (var i = 0; i < tools.getNumberOfTools(); ++i) { + var tool = tools.getTool(i); + var comment = "T" + toolFormat.format(tool.number) + " " + + "D=" + xyzFormat.format(tool.diameter) + " " + + localize("CR") + "=" + xyzFormat.format(tool.cornerRadius); + if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) { + comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg"); + } + if (zRanges[tool.number]) { + comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum()); + } + comment += " - " + getToolTypeName(tool.type); + writeComment(comment); + } + } + } + + if (false) { + // check for duplicate tool number + for (var i = 0; i < getNumberOfSections(); ++i) { + var sectioni = getSection(i); + var tooli = sectioni.getTool(); + for (var j = i + 1; j < getNumberOfSections(); ++j) { + var sectionj = getSection(j); + var toolj = sectionj.getTool(); + if (tooli.number == toolj.number) { + if (xyzFormat.areDifferent(tooli.diameter, toolj.diameter) || + xyzFormat.areDifferent(tooli.cornerRadius, toolj.cornerRadius) || + abcFormat.areDifferent(tooli.taperAngle, toolj.taperAngle) || + (tooli.numberOfFlutes != toolj.numberOfFlutes)) { + error( + subst( + localize("Using the same tool number for different cutter geometry for operation '%1' and '%2'."), + sectioni.hasParameter("operation-comment") ? sectioni.getParameter("operation-comment") : ("#" + (i + 1)), + sectionj.hasParameter("operation-comment") ? sectionj.getParameter("operation-comment") : ("#" + (j + 1)) + ) + ); + return; + } + } + } + } + } + + if ((getNumberOfSections() > 0) && (getSection(0).workOffset == 0)) { + for (var i = 0; i < getNumberOfSections(); ++i) { + if (getSection(i).workOffset > 0) { + error(localize("Using multiple work offsets is not possible if the initial work offset is 0.")); + return; + } + } + } + + // absolute coordinates and feed per min + writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(properties.useG95 ? 95 : 94), gPlaneModal.format(17), gFormat.format(49), gFormat.format(40), gFormat.format(80)); + + switch (unit) { + case IN: + writeBlock(gUnitModal.format(20)); + break; + case MM: + writeBlock(gUnitModal.format(21)); + break; + } + + if (properties.useG95 && properties.useParametricFeed) { + error(localize("Parametric feed is not supported when using G95.")); + return; + } + + if (properties.useG95) { + feedFormat = createFormat({decimals:(unit == MM ? 4 : 5), forceDecimal:true}); + feedOutput = createVariable({prefix:"F"}, feedFormat); + } +} + +function onComment(message) { + var comments = String(message).split(";"); + for (comment in comments) { + writeComment(comments[comment]); + } +} + +/** Force output of X, Y, and Z. */ +function forceXYZ() { + xOutput.reset(); + yOutput.reset(); + zOutput.reset(); +} + +/** Force output of A, B, and C. */ +function forceABC() { + aOutput.reset(); + bOutput.reset(); + cOutput.reset(); +} + +function forceFeed() { + currentFeedId = undefined; + feedOutput.reset(); +} + +/** Force output of X, Y, Z, A, B, C, and F on next output. */ +function forceAny() { + forceXYZ(); + forceABC(); + forceFeed(); +} + +var lengthCompensationActive = false; + +/** Disables length compensation if currently active or if forced. */ +function disableLengthCompensation(force) { + if (lengthCompensationActive || force) { + validate(retracted, "Cannot cancel length compensation if the machine is not fully retracted."); + writeBlock(gFormat.format(49)); + lengthCompensationActive = false; + } +} + +var currentSmoothing = false; + +function setSmoothing(mode) { + if (mode == currentSmoothing) { + return false; + } + + // 1) Make sure G49 is called before the execution of G05.1 Q1 Rx + // 2) G05.1 Q1 Rx must be engaged BEFORE G43-Tool Length Comp + // 3) AICC and AIAPC need to be turned on and off for each tool + // 4) AICC and AIAPC does not apply to canned drilling cycles + validate(!lengthCompensationActive, "Length compensation is active while trying to update smoothing."); + + currentSmoothing = mode; + writeBlock(gFormat.format(5.1), mode ? "Q1" : "Q0"); + return true; +} + +function FeedContext(id, description, feed) { + this.id = id; + this.description = description; + this.feed = feed; +} + +function getFeed(f) { + if (properties.useG95) { + return feedOutput.format(f / spindleSpeed); // use feed value + } + if (activeMovements) { + var feedContext = activeMovements[movement]; + if (feedContext != undefined) { + if (!feedFormat.areDifferent(feedContext.feed, f)) { + if (feedContext.id == currentFeedId) { + return ""; // nothing has changed + } + forceFeed(); + currentFeedId = feedContext.id; + return "F#" + (firstFeedParameter + feedContext.id); + } + } + currentFeedId = undefined; // force Q feed next time + } + return feedOutput.format(f); // use feed value +} + +function initializeActiveFeeds() { + activeMovements = new Array(); + var movements = currentSection.getMovements(); + + var id = 0; + var activeFeeds = new Array(); + if (hasParameter("operation:tool_feedCutting")) { + if (movements & ((1 << MOVEMENT_CUTTING) | (1 << MOVEMENT_LINK_TRANSITION) | (1 << MOVEMENT_EXTENDED))) { + var feedContext = new FeedContext(id, localize("Cutting"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_CUTTING] = feedContext; + activeMovements[MOVEMENT_LINK_TRANSITION] = feedContext; + activeMovements[MOVEMENT_EXTENDED] = feedContext; + } + ++id; + if (movements & (1 << MOVEMENT_PREDRILL)) { + feedContext = new FeedContext(id, localize("Predrilling"), getParameter("operation:tool_feedCutting")); + activeMovements[MOVEMENT_PREDRILL] = feedContext; + activeFeeds.push(feedContext); + } + ++id; + } + + if (hasParameter("operation:finishFeedrate")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:finishFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedEntry")) { + if (movements & (1 << MOVEMENT_LEAD_IN)) { + var feedContext = new FeedContext(id, localize("Entry"), getParameter("operation:tool_feedEntry")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_IN] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LEAD_OUT)) { + var feedContext = new FeedContext(id, localize("Exit"), getParameter("operation:tool_feedExit")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_OUT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:noEngagementFeedrate")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), getParameter("operation:noEngagementFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting") && + hasParameter("operation:tool_feedEntry") && + hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), Math.max(getParameter("operation:tool_feedCutting"), getParameter("operation:tool_feedEntry"), getParameter("operation:tool_feedExit"))); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:reducedFeedrate")) { + if (movements & (1 << MOVEMENT_REDUCED)) { + var feedContext = new FeedContext(id, localize("Reduced"), getParameter("operation:reducedFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_REDUCED] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedRamp")) { + if (movements & ((1 << MOVEMENT_RAMP) | (1 << MOVEMENT_RAMP_HELIX) | (1 << MOVEMENT_RAMP_PROFILE) | (1 << MOVEMENT_RAMP_ZIG_ZAG))) { + var feedContext = new FeedContext(id, localize("Ramping"), getParameter("operation:tool_feedRamp")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_RAMP] = feedContext; + activeMovements[MOVEMENT_RAMP_HELIX] = feedContext; + activeMovements[MOVEMENT_RAMP_PROFILE] = feedContext; + activeMovements[MOVEMENT_RAMP_ZIG_ZAG] = feedContext; + } + ++id; + } + if (hasParameter("operation:tool_feedPlunge")) { + if (movements & (1 << MOVEMENT_PLUNGE)) { + var feedContext = new FeedContext(id, localize("Plunge"), getParameter("operation:tool_feedPlunge")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_PLUNGE] = feedContext; + } + ++id; + } + if (true) { // high feed + if (movements & (1 << MOVEMENT_HIGH_FEED)) { + var feedContext = new FeedContext(id, localize("High Feed"), this.highFeedrate); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_HIGH_FEED] = feedContext; + } + ++id; + } + + for (var i = 0; i < activeFeeds.length; ++i) { + var feedContext = activeFeeds[i]; + writeBlock("#" + (firstFeedParameter + feedContext.id) + "=" + feedFormat.format(feedContext.feed), formatComment(feedContext.description)); + } +} + +var currentWorkPlaneABC = undefined; + +function forceWorkPlane() { + currentWorkPlaneABC = undefined; +} + +function cancelWorkPlane() { + writeBlock(gRotationModal.format(69)); // cancel frame + forceWorkPlane(); +} + +function setWorkPlane(abc) { + if (!forceMultiAxisIndexing && is3D() && !machineConfiguration.isMultiAxisConfiguration()) { + return; // ignore + } + + if (!((currentWorkPlaneABC == undefined) || + abcFormat.areDifferent(abc.x, currentWorkPlaneABC.x) || + abcFormat.areDifferent(abc.y, currentWorkPlaneABC.y) || + abcFormat.areDifferent(abc.z, currentWorkPlaneABC.z))) { + return; // no change + } + + onCommand(COMMAND_UNLOCK_MULTI_AXIS); + if (!retracted) { + writeRetract(Z); + } + + if (useMultiAxisFeatures) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + if (machineConfiguration.isMultiAxisConfiguration() && useABCPrepositioning) { + var angles = abc.isNonZero() ? getWorkPlaneMachineABC(currentSection.workPlane, false, false) : abc; + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(angles.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(angles.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(angles.z)) + ); + } + if (abc.isNonZero()) { + gRotationModal.reset(); + writeBlock(gRotationModal.format(68.2), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "Z" + xyzFormat.format(0), "I" + abcFormat.format(abc.x), "J" + abcFormat.format(abc.y), "K" + abcFormat.format(abc.z)); // set frame + writeBlock(gFormat.format(53.1)); // turn machine + } else { + if (!cancelTiltFirst) { + cancelWorkPlane(); + } + } + } else { + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z)) + ); + } + + onCommand(COMMAND_LOCK_MULTI_AXIS); + + currentWorkPlaneABC = abc; +} + +var closestABC = false; // choose closest machine angles +var currentMachineABC; + +function getWorkPlaneMachineABC(workPlane, _setWorkPlane, rotate) { + var W = workPlane; // map to global frame + + var abc = machineConfiguration.getABC(W); + if (closestABC) { + if (currentMachineABC) { + abc = machineConfiguration.remapToABC(abc, currentMachineABC); + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + + try { + abc = machineConfiguration.remapABC(abc); + if (_setWorkPlane) { + currentMachineABC = abc; + } + } catch (e) { + error( + localize("Machine angles not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + var direction = machineConfiguration.getDirection(abc); + if (!isSameDirection(direction, W.forward)) { + error(localize("Orientation not supported.")); + } + + if (!machineConfiguration.isABCSupported(abc)) { + error( + localize("Work plane is not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + if (rotate) { + var tcp = false; + if (tcp) { + setRotation(W); // TCP mode + } else { + var O = machineConfiguration.getOrientation(abc); + var R = machineConfiguration.getRemainingOrientation(abc, W); + setRotation(R); + } + } + + return abc; +} + +function isProbeOperation() { + return hasParameter("operation-strategy") && ((getParameter("operation-strategy") == "probe" || getParameter("operation-strategy") == "probe_geometry")); +} + +var probeOutputWorkOffset = 1; + +function onParameter(name, value) { + if (name == "probe-output-work-offset") { + probeOutputWorkOffset = (value > 0) ? value : 1; + } +} + +function onSection() { + var forceToolAndRetract = optionalSection && !currentSection.isOptional(); + optionalSection = currentSection.isOptional(); + + var insertToolCall = forceToolAndRetract || isFirstSection() || + currentSection.getForceToolChange && currentSection.getForceToolChange() || + (tool.number != getPreviousSection().getTool().number); + + var newWorkOffset = isFirstSection() || + (getPreviousSection().workOffset != currentSection.workOffset); // work offset changes + var newWorkPlane = isFirstSection() || + !isSameDirection(getPreviousSection().getGlobalFinalToolAxis(), currentSection.getGlobalInitialToolAxis()) || + (currentSection.isOptimizedForMachine() && getPreviousSection().isOptimizedForMachine() && + Vector.diff(getPreviousSection().getFinalToolAxisABC(), currentSection.getInitialToolAxisABC()).length > 1e-4) || + (!machineConfiguration.isMultiAxisConfiguration() && currentSection.isMultiAxis()) || + (!getPreviousSection().isMultiAxis() && currentSection.isMultiAxis() || + getPreviousSection().isMultiAxis() && !currentSection.isMultiAxis()); // force newWorkPlane between indexing and simultaneous operations + var forceSmoothing = properties.useSmoothing && + (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill") || + !isFirstSection() && getPreviousSection().hasParameter("operation-strategy") && (getPreviousSection().getParameter("operation-strategy") == "drill")); // force smoothing in case !insertToolCall (2d chamfer) + if (insertToolCall || newWorkOffset || newWorkPlane || forceSmoothing) { + + // stop spindle before retract during tool change + if (insertToolCall && !isFirstSection()) { + onCommand(COMMAND_STOP_SPINDLE); + } + + // retract to safe plane + writeRetract(Z); + writeBlock(gAbsIncModal.format(90)); + forceXYZ(); + if ((insertToolCall && !isFirstSection()) || forceSmoothing) { + disableLengthCompensation(); + setSmoothing(false); + } + } + + writeln(""); + + if (hasParameter("operation-comment")) { + var comment = getParameter("operation-comment"); + if (comment) { + writeComment(comment); + } + } + + if (properties.showNotes && hasParameter("notes")) { + var notes = getParameter("notes"); + if (notes) { + var lines = String(notes).split("\n"); + var r1 = new RegExp("^[\\s]+", "g"); + var r2 = new RegExp("[\\s]+$", "g"); + for (line in lines) { + var comment = lines[line].replace(r1, "").replace(r2, ""); + if (comment) { + writeComment(comment); + } + } + } + } + + if (insertToolCall) { + forceWorkPlane(); + + setCoolant(COOLANT_OFF); + + if (!isFirstSection() && properties.optionalStop) { + onCommand(COMMAND_OPTIONAL_STOP); + } + + if (tool.number > 99) { + warning(localize("Tool number exceeds maximum value.")); + } + + disableLengthCompensation(); + writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); + if (tool.comment) { + writeComment(tool.comment); + } + var showToolZMin = false; + if (showToolZMin) { + if (is3D()) { + var numberOfSections = getNumberOfSections(); + var zRange = currentSection.getGlobalZRange(); + var number = tool.number; + for (var i = currentSection.getId() + 1; i < numberOfSections; ++i) { + var section = getSection(i); + if (section.getTool().number != number) { + break; + } + zRange.expandToRange(section.getGlobalZRange()); + } + writeComment(localize("ZMIN") + "=" + zRange.getMinimum()); + } + } + + if (properties.preloadTool) { + var nextTool = getNextTool(tool.number); + if (nextTool) { + writeBlock("T" + toolFormat.format(nextTool.number)); + } else { + // preload first tool + var section = getSection(0); + var firstToolNumber = section.getTool().number; + if (tool.number != firstToolNumber) { + writeBlock("T" + toolFormat.format(firstToolNumber)); + } + } + } + } + + if (!isProbeOperation() && + (insertToolCall || + forceSpindleSpeed || + isFirstSection() || + (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) || + (tool.clockwise != getPreviousSection().getTool().clockwise))) { + forceSpindleSpeed = false; + + if (spindleSpeed < 1) { + error(localize("Spindle speed out of range.")); + return; + } + if (spindleSpeed > 99999) { + warning(localize("Spindle speed exceeds maximum value.")); + } + var tapping = hasParameter("operation:cycleType") && + ((getParameter("operation:cycleType") == "tapping") || + (getParameter("operation:cycleType") == "right-tapping") || + (getParameter("operation:cycleType") == "left-tapping") || + (getParameter("operation:cycleType") == "tapping-with-chip-breaking")); + if (!tapping || (tapping && !(properties.useRigidTapping == "without"))) { + writeBlock( + sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4) + ); + } + + onCommand(COMMAND_START_CHIP_TRANSPORT); + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { + // writeBlock(mFormat.format(xxx)); // shortest path traverse + } + } + + // wcs + if (insertToolCall) { // force work offset when changing tool + currentWorkOffset = undefined; + } + var workOffset = currentSection.workOffset; + if (workOffset == 0) { + warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET); + workOffset = 1; + } + if (workOffset != currentWorkOffset) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + forceWorkPlane(); + } + if (workOffset > 0) { + if (workOffset > 6) { + var p = workOffset - 6; // 1->... + if (p > 300) { + error(localize("Work offset out of range.")); + return; + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(54.1), "P" + p); // G54.1P + currentWorkOffset = workOffset; + } + } + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(53 + workOffset)); // G54->G59 + currentWorkOffset = workOffset; + } + } + } + + forceXYZ(); + + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { // use 5-axis indexing for multi-axis mode + // set working plane after datum shift + + if (currentSection.isMultiAxis()) { + forceWorkPlane(); + cancelTransformation(); + } else { + var abc = new Vector(0, 0, 0); + if (useMultiAxisFeatures) { + var euler = currentSection.workPlane.getEuler2(EULER_ZXZ_R); + abc = new Vector(euler.x, euler.y, euler.z); + cancelTransformation(); + } else { + abc = getWorkPlaneMachineABC(currentSection.workPlane, true, true); + } + setWorkPlane(abc); + } + } else { // pure 3D + var remaining = currentSection.workPlane; + if (!isSameDirection(remaining.forward, new Vector(0, 0, 1))) { + error(localize("Tool orientation is not supported.")); + return; + } + setRotation(remaining); + } + + // set coolant after we have positioned at Z + setCoolant(tool.coolant); + + if (properties.useSmoothing) { + if (hasParameter("operation-strategy") && (getParameter("operation-strategy") != "drill")) { + if (setSmoothing(true)) { + // we force G43 using lengthCompensationActive + } + } else { + if (setSmoothing(false)) { + // we force G43 using lengthCompensationActive + } + } + } + + forceAny(); + gMotionModal.reset(); + + var initialPosition = getFramePosition(currentSection.getInitialPosition()); + if (!retracted && !insertToolCall) { + if (getCurrentPosition().z < initialPosition.z) { + writeBlock(gAbsIncModal.format(90), gMotionModal.format(0), zOutput.format(initialPosition.z)); + } + } + + if (insertToolCall || !lengthCompensationActive || retracted || (!isFirstSection() && getPreviousSection().isMultiAxis())) { + var lengthOffset = tool.lengthOffset; + if (lengthOffset > 99) { + error(localize("Length offset out of range.")); + return; + } + + gMotionModal.reset(); + writeBlock(gPlaneModal.format(17)); + + // cancel compensation prior to enabling it, required when switching G43/G43.4 modes + disableLengthCompensation(false); + + // assumes a Head configuration uses TCP on a Fanuc controller + var offsetCode = 43; + if (currentSection.isMultiAxis()) { + if (machineConfiguration.isMultiAxisConfiguration() && (currentSection.getOptimizedTCPMode() == 0)) { + offsetCode = 43.4; + } else if (!machineConfiguration.isMultiAxisConfiguration()) { + offsetCode = 43.5; + } + } + + if (!machineConfiguration.isHeadConfiguration()) { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y) + ); + writeBlock( + gMotionModal.format(0), + gFormat.format(offsetCode), + zOutput.format(initialPosition.z), + hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + gFormat.format(offsetCode), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y), + zOutput.format(initialPosition.z), hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } + + gMotionModal.reset(); + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y) + ); + } + + validate(lengthCompensationActive, "Length compensation is not active."); + + if (properties.useParametricFeed && + hasParameter("operation-strategy") && + (getParameter("operation-strategy") != "drill") && // legacy + !(currentSection.hasAnyCycle && currentSection.hasAnyCycle())) { + if (!insertToolCall && + activeMovements && + (getCurrentSectionId() > 0) && + ((getPreviousSection().getPatternId() == currentSection.getPatternId()) && (currentSection.getPatternId() != 0))) { + // use the current feeds + } else { + initializeActiveFeeds(); + } + } else { + activeMovements = undefined; + } + + if (isProbeOperation()) { + if (g68RotationMode != 0) { + error(localize("You cannot probe while G68 Rotation is in effect.")); + return; + } + angularProbingMode = getAngularProbingMode(); + writeBlock(gFormat.format(65), "P" + 9832); // spin the probe on + } + + retracted = false; + + if (properties.useIncremental && !isProbeOperation()) { + writeBlock(gAbsIncModal.format(91)); + xOutput = createIncrementalVariable({prefix:"X"}, xyzFormat); + xOutput.format(initialPosition.x); + xOutput.format(initialPosition.x); + yOutput = createIncrementalVariable({prefix:"Y"}, xyzFormat); + yOutput.format(initialPosition.y); + yOutput.format(initialPosition.y); + zOutput = createIncrementalVariable({prefix:"Z"}, xyzFormat); + zOutput.format(initialPosition.z); + zOutput.format(initialPosition.z); + + var abc = new Vector(); // TAG: set if using multi-axis machine + aOutput = createIncrementalVariable({prefix:"A"}, abcFormat); + aOutput.format(abc.x); + aOutput.format(abc.x); + bOutput = createIncrementalVariable({prefix:"B"}, abcFormat); + bOutput.format(abc.y); + bOutput.format(abc.y); + cOutput = createIncrementalVariable({prefix:"C"}, abcFormat); + cOutput.format(abc.z); + cOutput.format(abc.z); + + useIncremental = true; + } else { + xOutput = createVariable({prefix:"X"}, xyzFormat); + yOutput = createVariable({prefix:"Y"}, xyzFormat); + zOutput = createVariable({prefix:"Z"}, xyzFormat); + aOutput = createVariable({prefix:"A"}, abcFormat); + bOutput = createVariable({prefix:"B"}, abcFormat); + cOutput = createVariable({prefix:"C"}, abcFormat); + } +} + +function onDwell(seconds) { + if (seconds > 99999.999) { + warning(localize("Dwelling time is out of range.")); + } + milliseconds = clamp(1, seconds * 1000, 99999999); + writeBlock(gFeedModeModal.format(94), gFormat.format(4), "P" + milliFormat.format(milliseconds)); + writeBlock(gFeedModeModal.format(properties.useG95 ? 95 : 94)); // back to G95 +} + +function onSpindleSpeed(spindleSpeed) { + writeBlock(sOutput.format(spindleSpeed)); +} + +function onCycle() { + writeBlock(gPlaneModal.format(17)); +} + +function getCommonCycle(x, y, z, r) { + forceXYZ(); // force xyz on first drill hole of any cycle + if (useIncremental) { + return [xOutput.format(x), yOutput.format(y), + "Z" + xyzFormat.format(z - r), + "R" + xyzFormat.format(r - zOutput.getCurrent())]; + } else { + return [xOutput.format(x), yOutput.format(y), + zOutput.format(z), + "R" + xyzFormat.format(r)]; + } +} + +/** Convert approach to sign. */ +function approach(value) { + validate((value == "positive") || (value == "negative"), "Invalid approach."); + return (value == "positive") ? 1 : -1; +} + +/** + Determine if angular probing is supported +*/ +function getAngularProbingMode() { + if (machineConfiguration.isMultiAxisConfiguration()) { + if (machineConfiguration.isMachineCoordinate(2)) { + return ANGLE_PROBE_USE_CAXIS; + } else { + return ANGLE_PROBE_NOT_SUPPORTED; + } + } else { + return ANGLE_PROBE_USE_ROTATION; + } +} + +/** + Output rotation offset based on angular probing cycle. +*/ +function setProbingAngle() { + if ((g68RotationMode == 1) || (g68RotationMode == 2)) { // Rotate coordinate system for Angle Probing + if (!properties.useG54x4) { + gRotationModal.reset(); + gAbsIncModal.reset(); + writeBlock( + gRotationModal.format(68), gAbsIncModal.format(90), + (g68RotationMode == 1) ? "X0" : "X[#135]", + (g68RotationMode == 1) ? "Y0" : "Y[#136]", + "Z0", "I0.0", "J0.0", "K1.0", "R[#139]" + ); + g68RotationMode = 3; + } else if (angularProbingMode != ANGLE_PROBE_NOT_SUPPORTED) { + writeBlock("#26010=#135"); + writeBlock("#26011=#136"); + writeBlock("#26012=#137"); + writeBlock("#26015=#139"); + writeBlock(gFormat.format(54.4), "P1"); + g68RotationMode = 0; + } else { + error(localize("Angular probing is not supported for this machine configuration.")); + return; + } + } +} + +function protectedProbeMove(_cycle, x, y, z) { + var _x = xOutput.format(x); + var _y = yOutput.format(y); + var _z = zOutput.format(z); + if (_z && z >= getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } + if (_x || _y) { + writeBlock(gFormat.format(65), "P" + 9810, _x, _y, getFeed(highFeedrate)); // protected positioning move + } + if (_z && z < getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } +} + +function onCyclePoint(x, y, z) { + if (!isSameDirection(getRotation().forward, new Vector(0, 0, 1))) { + expandCyclePoint(x, y, z); + return; + } + var probeWorkOffsetCode; + if (isProbeOperation()) { + if (!useMultiAxisFeatures && !isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) && (!cycle.probeMode || (cycle.probeMode == 0))) { + error(localize("Updating WCS / work offset using probing is only supported by the CNC in the WCS frame.")); + return; + } + protectedProbeMove(cycle, x, y, z); + + var workOffset = probeOutputWorkOffset ? probeOutputWorkOffset : currentWorkOffset; + if (workOffset > 99) { + error(localize("Work offset is out of range.")); + return; + } else if (workOffset > 6) { + probeWorkOffsetCode = probe100Format.format(workOffset - 6 + 100); + } else { + probeWorkOffsetCode = workOffset + "."; // G54->G59 + } + } + + if (isFirstCyclePoint() || isProbeOperation()) { + if (!isProbeOperation()) { + // return to initial Z which is clearance plane and set absolute mode + repositionToCycleClearance(cycle, x, y, z); + } + + var F = cycle.feedrate; + if (properties.useG95) { + F /= spindleSpeed; + } + var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds + + switch (cycleType) { + case "drilling": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + break; + case "counter-boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(82), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "chip-breaking": + // cycle.accumulatedDepth is ignored + if ((cycle.accumulatedDepth < cycle.depth) || (P > 0)) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(73), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + break; + case "deep-drilling": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(83), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + // conditional(P > 0, "P" + milliFormat.format(P)), + feedOutput.format(F) + ); + } + break; + case "tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "left-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "right-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "tapping-with-chip-breaking": + case "left-tapping-with-chip-breaking": + case "right-tapping-with-chip-breaking": + if (cycle.accumulatedDepth < cycle.depth) { + error(localize("Accumulated pecking depth is not supported for tapping cycles with chip breaking.")); + return; + } else { + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + } + break; + case "fine-boring": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(76), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + "Q" + xyzFormat.format(cycle.shift), + feedOutput.format(F) + ); + break; + case "back-boring": + var dx = (gPlaneModal.getCurrent() == 19) ? cycle.backBoreDistance : 0; + var dy = (gPlaneModal.getCurrent() == 18) ? cycle.backBoreDistance : 0; + var dz = (gPlaneModal.getCurrent() == 17) ? cycle.backBoreDistance : 0; + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(87), + getCommonCycle(x - dx, y - dy, z - dz, cycle.bottom), + "Q" + xyzFormat.format(cycle.shift), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "reaming": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "stop-boring": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(86), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "manual-boring": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(88), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(useIncremental ? 91 : 90), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + + case "probing-x": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + xOutput.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + yOutput.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-z": + protectedProbeMove(cycle, x, y, Math.min(z - cycle.depth + cycle.probeClearance, cycle.retract)); + writeBlock( + gFormat.format(65), "P" + 9811, + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "Z" + xyzFormat.format(z - cycle.depth), + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + + case "probing-xy-inner-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9815, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-xy-outer-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9816, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-x-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + xOutput.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + case "probing-y-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + yOutput.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + default: + expandCyclePoint(x, y, z); + } + } else { + if (cycleExpanded) { + expandCyclePoint(x, y, z); + } else { + writeBlock(xOutput.format(x), yOutput.format(y)); + } + } +} + +function getProbingArguments(cycle, probeWorkOffsetCode) { + var probeWCS = hasParameter("operation-strategy") && (getParameter("operation-strategy") == "probe"); + return [ + (cycle.angleAskewAction == "stop-message" ? "B" + xyzFormat.format(cycle.toleranceAngle ? cycle.toleranceAngle : 0) : undefined), + ((cycle.updateToolWear && cycle.toolWearErrorCorrection < 100) ? "F" + xyzFormat.format(cycle.toolWearErrorCorrection ? cycle.toolWearErrorCorrection / 100 : 100) : undefined), + (cycle.wrongSizeAction == "stop-message" ? "H" + xyzFormat.format(cycle.toleranceSize ? cycle.toleranceSize : 0) : undefined), + (cycle.outOfPositionAction == "stop-message" ? "M" + xyzFormat.format(cycle.tolerancePosition ? cycle.tolerancePosition : 0) : undefined), + ((cycle.updateToolWear && cycleType == "probing-z") ? "T" + xyzFormat.format(cycle.toolLengthOffset) : undefined), + ((cycle.updateToolWear && cycleType !== "probing-z") ? "T" + xyzFormat.format(cycle.toolDiameterOffset) : undefined), + (cycle.updateToolWear ? "V" + xyzFormat.format(cycle.toolWearUpdateThreshold ? cycle.toolWearUpdateThreshold : 0) : undefined), + (cycle.printResults ? "W" + xyzFormat.format(1 + cycle.incrementComponent) : undefined), // 1 for advance feature, 2 for reset feature count and advance component number. first reported result in a program should use W2. + conditional(probeWorkOffsetCode && probeWCS, "S" + probeWorkOffsetCode) + ]; +} + +function onCycleEnd() { + if (isProbeOperation()) { + zOutput.reset(); + gMotionModal.reset(); + writeBlock(gFormat.format(65), "P" + 9810, zOutput.format(cycle.retract)); // protected retract move + } else if (!cycleExpanded) { + writeBlock(conditional(!properties.useG95, gFeedModeModal.format(94)), gCycleModal.format(80)); + zOutput.reset(); + } +} + +var pendingRadiusCompensation = -1; + +function onRadiusCompensation() { + pendingRadiusCompensation = radiusCompensation; +} + +function onRapid(_x, _y, _z) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + writeBlock(gMotionModal.format(0), x, y, z); + forceFeed(); + } +} + +function onLinear(_x, _y, _z, feed) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var f = getFeed(feed); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + pendingRadiusCompensation = -1; + var d = tool.diameterOffset; + if (d > 99) { + warning(localize("The diameter offset exceeds the maximum value.")); + } + writeBlock(gPlaneModal.format(17)); + switch (radiusCompensation) { + case RADIUS_COMPENSATION_LEFT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, dOutput.format(d), f); + break; + case RADIUS_COMPENSATION_RIGHT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(42), x, y, z, dOutput.format(d), f); + break; + default: + writeBlock(gMotionModal.format(1), gFormat.format(40), x, y, z, f); + } + } else { + writeBlock(gMotionModal.format(1), x, y, z, f); + } + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } +} + +function onRapid5D(_x, _y, _z, _a, _b, _c) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, a, b, c); + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, "I" + i, "J" + j, "K" + k); + } + forceFeed(); +} + +function onLinear5D(_x, _y, _z, _a, _b, _c, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for 5-axis move.")); + return; + } + + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + var f = getFeed(feed); + if (x || y || z || a || b || c) { + writeBlock(gMotionModal.format(1), x, y, z, a, b, c, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + var f = getFeed(feed); + if (x || y || z || i || j || k) { + writeBlock(gMotionModal.format(1), x, y, z, "I" + i, "J" + j, "K" + k, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } +} + +function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for a circular move.")); + return; + } + + var start = getCurrentPosition(); + + if (isFullCircle()) { + if (properties.useRadius || isHelical()) { // radius mode does not support full arcs + linearize(tolerance); + return; + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } else if (!properties.useRadius) { + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } else { // use radius mode + var r = getCircularRadius(); + if (toDeg(getCircularSweep()) > (180 + 1e-9)) { + r = -r; // allow up to <360 deg arcs + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gAbsIncModal.format(useIncremental ? 91 : 90), gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } +} + +var currentCoolantMode = COOLANT_OFF; +var coolantOff = undefined; + +function setCoolant(coolant) { + var coolantCodes = getCoolantCodes(coolant); + if (Array.isArray(coolantCodes)) { + if (singleLineCoolant) { + writeBlock(coolantCodes.join(getWordSeparator())); + } else { + for (var c in coolantCodes) { + writeBlock(coolantCodes[c]); + } + } + return undefined; + } + return coolantCodes; +} + +function getCoolantCodes(coolant) { + var multipleCoolantBlocks = new Array(); // create a formatted array to be passed into the outputted line + if (!coolants) { + error(localize("Coolants have not been defined.")); + } + if (isProbeOperation()) { // avoid coolant output for probing + coolant = COOLANT_OFF; + } + if (coolant == currentCoolantMode) { + return undefined; // coolant is already active + } + if ((coolant != COOLANT_OFF) && (currentCoolantMode != COOLANT_OFF) && (coolantOff != undefined)) { + if (Array.isArray(coolantOff)) { + for (var i in coolantOff) { + multipleCoolantBlocks.push(mFormat.format(coolantOff[i])); + } + } else { + multipleCoolantBlocks.push(mFormat.format(coolantOff)); + } + } + + var m; + var coolantCodes = {}; + for (var c in coolants) { // find required coolant codes into the coolants array + if (coolants[c].id == coolant) { + coolantCodes.on = coolants[c].on; + if (coolants[c].off != undefined) { + coolantCodes.off = coolants[c].off; + break; + } else { + for (var i in coolants) { + if (coolants[i].id == COOLANT_OFF) { + coolantCodes.off = coolants[i].off; + break; + } + } + } + } + } + if (coolant == COOLANT_OFF) { + m = !coolantOff ? coolantCodes.off : coolantOff; // use the default coolant off command when an 'off' value is not specified + } else { + coolantOff = coolantCodes.off; + m = coolantCodes.on; + } + + if (!m) { + onUnsupportedCoolant(coolant); + m = 9; + } else { + if (Array.isArray(m)) { + for (var i in m) { + multipleCoolantBlocks.push(mFormat.format(m[i])); + } + } else { + multipleCoolantBlocks.push(mFormat.format(m)); + } + currentCoolantMode = coolant; + return multipleCoolantBlocks; // return the single formatted coolant value + } + return undefined; +} + +var mapCommand = { + COMMAND_STOP:0, + COMMAND_OPTIONAL_STOP:1, + COMMAND_END:2, + COMMAND_SPINDLE_CLOCKWISE:3, + COMMAND_SPINDLE_COUNTERCLOCKWISE:4, + COMMAND_STOP_SPINDLE:5, + COMMAND_ORIENTATE_SPINDLE:19 +}; + +function onCommand(command) { + switch (command) { + case COMMAND_COOLANT_OFF: + setCoolant(COOLANT_OFF); + return; + case COMMAND_COOLANT_ON: + setCoolant(COOLANT_FLOOD); + return; + case COMMAND_STOP: + writeBlock(mFormat.format(0)); + forceSpindleSpeed = true; + return; + case COMMAND_START_SPINDLE: + onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE); + return; + case COMMAND_LOCK_MULTI_AXIS: + return; + case COMMAND_UNLOCK_MULTI_AXIS: + return; + case COMMAND_START_CHIP_TRANSPORT: + return; + case COMMAND_STOP_CHIP_TRANSPORT: + return; + case COMMAND_BREAK_CONTROL: + return; + case COMMAND_TOOL_MEASURE: + return; + } + + var stringId = getCommandStringId(command); + var mcode = mapCommand[stringId]; + if (mcode != undefined) { + writeBlock(mFormat.format(mcode)); + } else { + onUnsupportedCommand(command); + } +} + +function onSectionEnd() { + writeBlock(gPlaneModal.format(17)); + + xOutput = createVariable({prefix:"X"}, xyzFormat); + yOutput = createVariable({prefix:"Y"}, xyzFormat); + zOutput = createVariable({prefix:"Z"}, xyzFormat); + aOutput = createVariable({prefix:"A"}, abcFormat); + bOutput = createVariable({prefix:"B"}, abcFormat); + cOutput = createVariable({prefix:"C"}, abcFormat); + useIncremental = false; + + if (!isLastSection() && (getNextSection().getTool().coolant != tool.coolant)) { + setCoolant(COOLANT_OFF); + } + if (((getCurrentSectionId() + 1) >= getNumberOfSections()) || + (tool.number != getNextSection().getTool().number)) { + onCommand(COMMAND_BREAK_CONTROL); + } + + if (isProbeOperation()) { + writeBlock(gFormat.format(65), "P" + 9833); // spin the probe off + setProbingAngle(); // define rotation of part + } + forceAny(); +} + +/** Output block to do safe retract and/or move to home position. */ +function writeRetract() { + if (arguments.length == 0) { + error(localize("No axis specified for writeRetract().")); + return; + } + var words = []; // store all retracted axes in an array + for (var i = 0; i < arguments.length; ++i) { + let instances = 0; // checks for duplicate retract calls + for (var j = 0; j < arguments.length; ++j) { + if (arguments[i] == arguments[j]) { + ++instances; + } + } + if (instances > 1) { // error if there are multiple retract calls for the same axis + error(localize("Cannot retract the same axis twice in one line")); + return; + } + switch (arguments[i]) { + case X: + words.push("X" + xyzFormat.format(machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : 0)); + break; + case Y: + words.push("Y" + xyzFormat.format(machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : 0)); + break; + case Z: + writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(machineConfiguration.getRetractPlane())); // retract + zOutput.reset(); + retracted = true; // specifies that the tool has been retracted to the safe plane + break; + default: + error(localize("Bad axis specified for writeRetract().")); + return; + } + } + if (words.length > 0) { + gMotionModal.reset(); + if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) { + writeBlock(gFormat.format(28), gAbsIncModal.format(91), words); // retract + if (!properties.useIncremental) { + writeBlock(gAbsIncModal.format(90)); + } + } else { + writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), words); // retract + writeBlock(gAbsIncModal.format(91)); + } + } +} + +function onClose() { + writeln(""); + optionalSection = false; + + onCommand(COMMAND_COOLANT_OFF); + + writeRetract(Z); + + disableLengthCompensation(true); + setSmoothing(false); + zOutput.reset(); + + setWorkPlane(new Vector(0, 0, 0)); // reset working plane + + if (properties.useG54x4) { + writeBlock(gFormat.format(54.4), "P0"); + } + + writeRetract(X, Y); + + onImpliedCommand(COMMAND_END); + onImpliedCommand(COMMAND_STOP_SPINDLE); + writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off + writeln("%"); +} diff --git a/resources/workshop/.inc/saturn/mc/fanuc2/fanuc turning.cps b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc turning.cps new file mode 100644 index 000000000..9a423490c --- /dev/null +++ b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc turning.cps @@ -0,0 +1,1676 @@ +/** + Copyright (C) 2012-2019 by Autodesk, Inc. + All rights reserved. + + FANUC Lathe post processor configuration. + + $Revision: 42631 621a6aaa12feb9f27eb24e2b06cf85758a41d354 $ + $Date: 2020-01-21 06:14:08 $ + + FORKID {88B77760-269E-4d46-8588-30814E7FE9A1} +*/ + +description = "FANUC Turning"; +vendor = "Fanuc"; +vendorUrl = "http://www.fanuc.com"; +legal = "Copyright (C) 2012-2019 by Autodesk, Inc."; +certificationLevel = 2; +minimumRevision = 40783; + +longDescription = "Generic turning post for FANUC. Use the property 'type' to switch the FANUC mode A, B, and C. The default mode is A. Use Turret 0 for Positional Turret, Turret 101 for QCTP on X- Post, Turret 102 for QCTP on X+ Post, Turret 103 for Gang Tooling on X- Post, Turret 104 for Gang Tooling on X+ Tool Post."; + +extension = "nc"; +programNameIsInteger = true; +setCodePage("ascii"); + +capabilities = CAPABILITY_TURNING; +tolerance = spatial(0.002, MM); + +minimumChordLength = spatial(0.25, MM); +minimumCircularRadius = spatial(0.01, MM); +maximumCircularRadius = spatial(1000, MM); +minimumCircularSweep = toRad(0.01); +maximumCircularSweep = toRad(180); +allowHelicalMoves = true; +allowedCircularPlanes = undefined; // allow any circular motion + +// user-defined properties +properties = { + writeMachine: false, // write machine + writeTools: false, // writes the tools + preloadTool: false, // preloads next tool on tool change if any + showSequenceNumbers: true, // show sequence numbers + sequenceNumberStart: 10, // first sequence number + sequenceNumberIncrement: 1, // increment for sequence numbers + optionalStop: true, // optional stop + o8: false, // specifies 8-digit program number + separateWordsWithSpace: true, // specifies that the words should be separated with a white space + useRadius: false, // specifies that arcs should be output using the radius (R word) instead of the I, J, and K words. + maximumSpindleSpeed: 100 * 60, // specifies the maximum spindle speed + type: "A", // specifies the type A, B, C + useParametricFeed: false, // specifies that feed should be output using Q values + showNotes: false, // specifies that operation notes should be output. + g53HomePositionX: 0, // home position for X-axis + g53HomePositionZ: 0, // home position for Z-axis + useRigidTapping: "yes" // output rigid tapping block +}; + +// user-defined property definitions +propertyDefinitions = { + writeMachine: {title:"Write machine", description:"Output the machine settings in the header of the code.", group:0, type:"boolean"}, + writeTools: {title:"Write tool list", description:"Output a tool list in the header of the code.", group:0, type:"boolean"}, + preloadTool: {title:"Preload tool", description:"Preloads the next tool at a tool change (if any).", group:1, type:"boolean"}, + showSequenceNumbers: {title:"Use sequence numbers", description:"Use sequence numbers for each block of outputted code.", group:1, type:"boolean"}, + sequenceNumberStart: {title:"Start sequence number", description:"The number at which to start the sequence numbers.", group:1, type:"integer"}, + sequenceNumberIncrement: {title:"Sequence number increment", description:"The amount by which the sequence number is incremented by in each block.", group:1, type:"integer"}, + optionalStop: {title:"Optional stop", description:"Outputs optional stop code during when necessary in the code.", type:"boolean"}, + o8: {title:"8 Digit program number", description:"Specifies that an 8 digit program number is needed.", type:"boolean"}, + separateWordsWithSpace: {title:"Separate words with space", description:"Adds spaces between words if 'yes' is selected.", type:"boolean"}, + useRadius: {title:"Radius arcs", description:"If yes is selected, arcs are outputted using radius values rather than IJK.", type:"boolean"}, + maximumSpindleSpeed: {title:"Max spindle speed", description:"Defines the maximum spindle speed allowed by your machines.", type:"integer", range:[0, 999999999]}, + type: {title:"Type", description:"Specifies the type A, B or C.", type:"enum", values:["A", "B", "C"]}, + useParametricFeed: {title:"Parametric feed", description:"Specifies the feed value that should be output using a Q value.", type:"boolean"}, + showNotes: {title:"Show notes", description:"Writes operation notes as comments in the outputted code.", type:"boolean"}, + g53HomePositionX: {title:"G53 home position X", description:"G53 X-axis home position.", type:"number"}, + g53HomePositionZ: {title:"G53 home position Z", description:"G53 Z-axis home position.", type:"number"}, + useRigidTapping: { + title: "Use rigid tapping", + description: "Select 'Yes' to enable, 'No' to disable, or 'Without spindle direction' to enable rigid tapping without outputting the spindle direction block.", + type: "enum", + values:[ + {title:"Yes", id:"yes"}, + {title:"No", id:"no"}, + {title:"Without spindle direction", id:"without"} + ] + } +}; + +var permittedCommentChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,=_-"; + +var gFormat = createFormat({prefix:"G", decimals:1}); +var mFormat = createFormat({prefix:"M", decimals:1}); + +var spatialFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var xFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true, scale:2}); // diameter mode +var yFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var zFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var rFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); // radius +var feedFormat = createFormat({decimals:(unit == MM ? 4 : 5), forceDecimal:true}); +var pitchFormat = createFormat({decimals:6, forceDecimal:true}); +var toolFormat = createFormat({decimals:0, width:4, zeropad:true}); +var rpmFormat = createFormat({decimals:0}); +var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999 +var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-9999 +var taperFormat = createFormat({decimals:1, scale:DEG}); +var peckFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +// var peckFormat = createFormat({decimals:0, forceDecimal:false, trim:false, width:4, zeropad:true, scale:(unit == MM ? 1000 : 10000)}); + +var xOutput = createVariable({prefix:"X"}, xFormat); +var yOutput = createVariable({prefix:"Y"}, yFormat); +var zOutput = createVariable({prefix:"Z"}, zFormat); +var feedOutput = createVariable({prefix:"F"}, feedFormat); +var pitchOutput = createVariable({prefix:"F", force:true}, pitchFormat); +var sOutput = createVariable({prefix:"S", force:true}, rpmFormat); + +// circular output +var kOutput = createReferenceVariable({prefix:"K"}, spatialFormat); +var iOutput = createReferenceVariable({prefix:"I"}, spatialFormat); // no scaling + +var g92ROutput = createVariable({prefix:"R"}, zFormat); // no scaling +var peckOutput = createVariable({prefix:"Q", force:true}, peckFormat); + +var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ... +var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19 +var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91 // only for B and C mode +var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G98-99 / G94-95 +var gSpindleModeModal = createModal({}, gFormat); // modal group 5 // G96-97 +var gUnitModal = createModal({}, gFormat); // modal group 6 // G20-21 +var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ... +var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99 + +// fixed settings +var firstFeedParameter = 500; +var gotSecondarySpindle = true; +var gotTailStock = false; + +var WARNING_WORK_OFFSET = 0; + +var QCTP = 0; +var TURRET = 1; +var GANG = 2; + +var FRONT = -1; +var REAR = 1; + +// collected state +var sequenceNumber; +var currentWorkOffset; +var optionalSection = false; +var forceSpindleSpeed = false; +var activeMovements; // do not use by default +var currentFeedId; +var toolingData; +var previousToolingData; + +function getCode(code) { + switch (code) { + // case "PART_CATCHER_ON": + // return mFormat.format(SPECIFY YOUR CODE HERE); + // case "PART_CATCHER_OFF": + // return mFormat.format(SPECIFY YOUR CODE HERE); + // case "TAILSTOCK_ON": + // return mFormat.format(SPECIFY YOUR CODE HERE); + // case "TAILSTOCK_OFF": + // return mFormat.format(SPECIFY YOUR CODE HERE); + // case "ENGAGE_C_AXIS": + // machineState.cAxisIsEngaged = true; + // return cAxisEngageModal.format(UNSUPPORTED); + // case "DISENGAGE_C_AXIS": + // machineState.cAxisIsEngaged = false; + // return cAxisEngageModal.format(UNSUPPORTED); + // case "POLAR_INTERPOLATION_ON": + // return gPolarModal.format(UNSUPPORTED); + // case "POLAR_INTERPOLATION_OFF": + // return gPolarModal.format(UNSUPPORTED); + // case "STOP_LIVE_TOOL": + // machineState.liveToolIsActive = false; + // return mFormat.format(UNSUPPORTED); + // case "STOP_MAIN_SPINDLE": + // machineState.mainSpindleIsActive = false; + // return mFormat.format(UNSUPPORTED); + // case "STOP_SUB_SPINDLE": + // machineState.subSpindleIsActive = false; + // return mFormat.format(UNSUPPORTED); + // case "START_LIVE_TOOL_CW": + // machineState.liveToolIsActive = true; + // return mFormat.format(UNSUPPORTED); + // case "START_LIVE_TOOL_CCW": + // machineState.liveToolIsActive = true; + // return mFormat.format(UNSUPPORTED); + case "START_MAIN_SPINDLE_CW": + // machineState.mainSpindleIsActive = true; + return mFormat.format(3); + case "START_MAIN_SPINDLE_CCW": + // machineState.mainSpindleIsActive = true; + return mFormat.format(4); + // case "START_SUB_SPINDLE_CW": + // machineState.subSpindleIsActive = true; + // return mFormat.format(UNSUPPORTED); + // case "START_SUB_SPINDLE_CCW": + // machineState.subSpindleIsActive = true; + // return mFormat.format(UNSUPPORTED); + // case "MAIN_SPINDLE_BRAKE_ON": + // machineState.mainSpindleBrakeIsActive = true; + // return cAxisBrakeModal.format(UNSUPPORTED); + // case "MAIN_SPINDLE_BRAKE_OFF": + // machineState.mainSpindleBrakeIsActive = false; + // return cAxisBrakeModal.format(UNSUPPORTED); + // case "SUB_SPINDLE_BRAKE_ON": + // machineState.subSpindleBrakeIsActive = true; + // return cAxisBrakeModal.format(UNSUPPORTED); + // case "SUB_SPINDLE_BRAKE_OFF": + // machineState.subSpindleBrakeIsActive = false; + // return cAxisBrakeModal.format(UNSUPPORTED); + case "FEED_MODE_UNIT_REV": + return gFeedModeModal.format((properties.type == "A") ? 99 : 95); + case "FEED_MODE_UNIT_MIN": + return gFeedModeModal.format((properties.type == "A") ? 98 : 94); + case "CONSTANT_SURFACE_SPEED_ON": + return gSpindleModeModal.format(96); + case "CONSTANT_SURFACE_SPEED_OFF": + return gSpindleModeModal.format(97); + // case "MAINSPINDLE_AIR_BLAST_ON": + // return mFormat.format(UNSUPPORTED); + // case "MAINSPINDLE_AIR_BLAST_OFF": + // return mFormat.format(UNSUPPORTED); + // case "SUBSPINDLE_AIR_BLAST_ON": + // return mFormat.format(UNSUPPORTED); + // case "SUBSPINDLE_AIR_BLAST_OFF": + // return mFormat.format(UNSUPPORTED); + // case "CLAMP_PRIMARY_CHUCK": + // return mFormat.format(UNSUPPORTED); + // case "UNCLAMP_PRIMARY_CHUCK": + // return mFormat.format(UNSUPPORTED); + // case "CLAMP_SECONDARY_CHUCK": + // return mFormat.format(UNSUPPORTED); + // case "UNCLAMP_SECONDARY_CHUCK": + // return mFormat.format(UNSUPPORTED); + // case "SPINDLE_SYNCHRONIZATION_ON": + // machineState.spindleSynchronizationIsActive = true; + // return gSynchronizedSpindleModal.format(UNSUPPORTED); + // case "SPINDLE_SYNCHRONIZATION_OFF": + // machineState.spindleSynchronizationIsActive = false; + // return gSynchronizedSpindleModal.format(UNSUPPORTED); + // case "START_CHIP_TRANSPORT": + // return mFormat.format(UNSUPPORTED); + // case "STOP_CHIP_TRANSPORT": + // return mFormat.format(UNSUPPORTED); + // case "OPEN_DOOR": + // return mFormat.format(UNSUPPORTED); + // case "CLOSE_DOOR": + // return mFormat.format(UNSUPPORTED); + case "COOLANT_FLOOD_ON": + return mFormat.format(8); + case "COOLANT_FLOOD_OFF": + return mFormat.format(9); + // case "COOLANT_AIR_ON": + // return mFormat.format(UNSUPPORTED); + // case "COOLANT_AIR_OFF": + // return mFormat.format(UNSUPPORTED); + case "COOLANT_THROUGH_TOOL_ON": + return mFormat.format(88); + case "COOLANT_THROUGH_TOOL_OFF": + return mFormat.format(89); + case "COOLANT_OFF": + return mFormat.format(9); + default: + error(localize("Command " + code + " is not defined.")); + return 0; + } +} + +/** + Writes the specified block. +*/ +function writeBlock() { + var text = formatWords(arguments); + if (!text) { + return; + } + if (properties.showSequenceNumbers) { + if (optionalSection) { + if (text) { + writeWords("/", "N" + sequenceNumber, text); + } + } else { + writeWords2("N" + sequenceNumber, arguments); + } + sequenceNumber += properties.sequenceNumberIncrement; + } else { + if (optionalSection) { + writeWords2("/", arguments); + } else { + writeWords(arguments); + } + } +} + +/** + Writes the specified optional block. +*/ +function writeOptionalBlock() { + if (properties.showSequenceNumbers) { + var words = formatWords(arguments); + if (words) { + writeWords("/", "N" + sequenceNumber, words); + sequenceNumber += properties.sequenceNumberIncrement; + } + } else { + writeWords2("/", arguments); + } +} + +function formatComment(text) { + return "(" + filterText(String(text).toUpperCase(), permittedCommentChars).replace(/[()]/g, "") + ")"; +} + +/** + Output a comment. +*/ +function writeComment(text) { + writeln(formatComment(text)); +} + +function onOpen() { + if (properties.useRadius) { + maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC + } + + yOutput.disable(); + + if (!(properties.type in {"A":0, "B":0, "C":0})) { + error(localize("Unsupported type. Only A, B, and C are allowed.")); + return; + } + + if (!properties.separateWordsWithSpace) { + setWordSeparator(""); + } + + sequenceNumber = properties.sequenceNumberStart; + writeln("%"); + + if (programName) { + var programId; + try { + programId = getAsInt(programName); + } catch (e) { + error(localize("Program name must be a number.")); + return; + } + if (properties.o8) { + if (!((programId >= 1) && (programId <= 99999999))) { + error(localize("Program number is out of range.")); + return; + } + } else { + if (!((programId >= 1) && (programId <= 9999))) { + error(localize("Program number is out of range.")); + return; + } + } + if ((programId >= 8000) && (programId <= 9999)) { + warning(localize("Program number is reserved by tool builder.")); + } + var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + if (programComment) { + writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); + } else { + writeln("O" + oFormat.format(programId)); + } + } else { + error(localize("Program name has not been specified.")); + return; + } + + // dump machine configuration + var vendor = machineConfiguration.getVendor(); + var model = machineConfiguration.getModel(); + var description = machineConfiguration.getDescription(); + + if (properties.writeMachine && (vendor || model || description)) { + writeComment(localize("Machine")); + if (vendor) { + writeComment(" " + localize("vendor") + ": " + vendor); + } + if (model) { + writeComment(" " + localize("model") + ": " + model); + } + if (description) { + writeComment(" " + localize("description") + ": " + description); + } + } + + if ((getNumberOfSections() > 0) && (getSection(0).workOffset == 0)) { + for (var i = 0; i < getNumberOfSections(); ++i) { + if (getSection(i).workOffset > 0) { + error(localize("Using multiple work offsets is not possible if the initial work offset is 0.")); + return; + } + } + } + + if (properties.writeTools) { + var zRanges = {}; + if (is3D()) { + var numberOfSections = getNumberOfSections(); + for (var i = 0; i < numberOfSections; ++i) { + var section = getSection(i); + var zRange = section.getGlobalZRange(); + var tool = section.getTool(); + if (zRanges[tool.number]) { + zRanges[tool.number].expandToRange(zRange); + } else { + zRanges[tool.number] = zRange; + } + } + } + + var tools = getToolTable(); + if (tools.getNumberOfTools() > 0) { + for (var i = 0; i < tools.getNumberOfTools(); ++i) { + var tool = tools.getTool(i); + var compensationOffset = tool.isTurningTool() ? tool.compensationOffset : tool.lengthOffset; + var comment = "T" + toolFormat.format(tool.number * 100 + compensationOffset % 100) + " " + + (tool.diameter != 0 ? "D=" + spatialFormat.format(tool.diameter) + " " : "") + + (tool.isTurningTool() ? localize("NR") + "=" + spatialFormat.format(tool.noseRadius) : localize("CR") + "=" + spatialFormat.format(tool.cornerRadius)) + + (tool.taperAngle > 0 && (tool.taperAngle < Math.PI) ? " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg") : "") + + (zRanges[tool.number] ? " - " + localize("ZMIN") + "=" + spatialFormat.format(zRanges[tool.number].getMinimum()) : "") + + " - " + localize(getToolTypeName(tool.type)); + writeComment(comment); + } + } + } + + // absolute coordinates and feed per min + if (properties.type == "A") { + writeBlock(gFeedModeModal.format(98), gPlaneModal.format(18)); + } else { + writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(95), gPlaneModal.format(18)); + } + + switch (unit) { + case IN: + writeBlock(gUnitModal.format(20)); + break; + case MM: + writeBlock(gUnitModal.format(21)); + break; + } + + if (properties.type == "A") { + writeBlock(gFormat.format(50), sOutput.format(properties.maximumSpindleSpeed)); + } else { + writeBlock(gFormat.format(92), sOutput.format(properties.maximumSpindleSpeed)); + } + + onCommand(COMMAND_START_CHIP_TRANSPORT); +} + +function onComment(message) { + writeComment(message); +} + +/** Force output of X, Y, and Z. */ +function forceXYZ() { + xOutput.reset(); + yOutput.reset(); + zOutput.reset(); +} + +function forceFeed() { + currentFeedId = undefined; + feedOutput.reset(); +} + +/** Force output of X, Y, Z, and F on next output. */ +function forceAny() { + forceXYZ(); + forceFeed(); +} + +function FeedContext(id, description, feed) { + this.id = id; + this.description = description; + this.feed = feed; +} + +function getFeed(f) { + if (activeMovements) { + var feedContext = activeMovements[movement]; + if (feedContext != undefined) { + if (!feedFormat.areDifferent(feedContext.feed, f)) { + if (feedContext.id == currentFeedId) { + return ""; // nothing has changed + } + forceFeed(); + currentFeedId = feedContext.id; + return "F#" + (firstFeedParameter + feedContext.id); + } + } + currentFeedId = undefined; // force Q feed next time + } + return feedOutput.format(f); // use feed value +} + +function initializeActiveFeeds() { + activeMovements = new Array(); + var movements = currentSection.getMovements(); + var feedPerRev = currentSection.feedMode == FEED_PER_REVOLUTION; + + var id = 0; + var activeFeeds = new Array(); + if (hasParameter("operation:tool_feedCutting")) { + if (movements & ((1 << MOVEMENT_CUTTING) | (1 << MOVEMENT_LINK_TRANSITION) | (1 << MOVEMENT_EXTENDED))) { + var feedContext = new FeedContext(id, localize("Cutting"), feedPerRev ? getParameter("operation:tool_feedCuttingRel") : getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_CUTTING] = feedContext; + activeMovements[MOVEMENT_LINK_TRANSITION] = feedContext; + activeMovements[MOVEMENT_EXTENDED] = feedContext; + } + ++id; + if (movements & (1 << MOVEMENT_PREDRILL)) { + feedContext = new FeedContext(id, localize("Predrilling"), feedPerRev ? getParameter("operation:tool_feedCuttingRel") : getParameter("operation:tool_feedCutting")); + activeMovements[MOVEMENT_PREDRILL] = feedContext; + activeFeeds.push(feedContext); + } + ++id; + } + + if (hasParameter("operation:finishFeedrate")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var finishFeedrateRel; + if (hasParameter("operation:finishFeedrateRel")) { + finishFeedrateRel = getParameter("operation:finishFeedrateRel"); + } else if (hasParameter("operation:finishFeedratePerRevolution")) { + finishFeedrateRel = getParameter("operation:finishFeedratePerRevolution"); + } + var feedContext = new FeedContext(id, localize("Finish"), feedPerRev ? finishFeedrateRel : getParameter("operation:finishFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), feedPerRev ? getParameter("operation:tool_feedCuttingRel") : getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedEntry")) { + if (movements & (1 << MOVEMENT_LEAD_IN)) { + var feedContext = new FeedContext(id, localize("Entry"), feedPerRev ? getParameter("operation:tool_feedEntryRel") : getParameter("operation:tool_feedEntry")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_IN] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LEAD_OUT)) { + var feedContext = new FeedContext(id, localize("Exit"), feedPerRev ? getParameter("operation:tool_feedExitRel") : getParameter("operation:tool_feedExit")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_OUT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:noEngagementFeedrate")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), feedPerRev ? getParameter("operation:noEngagementFeedrateRel") : getParameter("operation:noEngagementFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting") && + hasParameter("operation:tool_feedEntry") && + hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext( + id, + localize("Direct"), + Math.max( + feedPerRev ? getParameter("operation:tool_feedCuttingRel") : getParameter("operation:tool_feedCutting"), + feedPerRev ? getParameter("operation:tool_feedEntryRel") : getParameter("operation:tool_feedEntry"), + feedPerRev ? getParameter("operation:tool_feedExitRel") : getParameter("operation:tool_feedExit") + ) + ); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:reducedFeedrate")) { + if (movements & (1 << MOVEMENT_REDUCED)) { + var feedContext = new FeedContext(id, localize("Reduced"), feedPerRev ? getParameter("operation:reducedFeedrateRel") : getParameter("operation:reducedFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_REDUCED] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedRamp")) { + if (movements & ((1 << MOVEMENT_RAMP) | (1 << MOVEMENT_RAMP_HELIX) | (1 << MOVEMENT_RAMP_PROFILE) | (1 << MOVEMENT_RAMP_ZIG_ZAG))) { + var feedContext = new FeedContext(id, localize("Ramping"), feedPerRev ? getParameter("operation:tool_feedRampRel") : getParameter("operation:tool_feedRamp")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_RAMP] = feedContext; + activeMovements[MOVEMENT_RAMP_HELIX] = feedContext; + activeMovements[MOVEMENT_RAMP_PROFILE] = feedContext; + activeMovements[MOVEMENT_RAMP_ZIG_ZAG] = feedContext; + } + ++id; + } + if (hasParameter("operation:tool_feedPlunge")) { + if (movements & (1 << MOVEMENT_PLUNGE)) { + var feedContext = new FeedContext(id, localize("Plunge"), feedPerRev ? getParameter("operation:tool_feedPlungeRel") : getParameter("operation:tool_feedPlunge")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_PLUNGE] = feedContext; + } + ++id; + } + if (true) { // high feed + if (movements & (1 << MOVEMENT_HIGH_FEED)) { + var feedContext = new FeedContext(id, localize("High Feed"), this.highFeedrate); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_HIGH_FEED] = feedContext; + } + ++id; + } + + for (var i = 0; i < activeFeeds.length; ++i) { + var feedContext = activeFeeds[i]; + writeBlock("#" + (firstFeedParameter + feedContext.id) + "=" + feedFormat.format(feedContext.feed), formatComment(feedContext.description)); + } +} + +function getSpindle() { + if (getNumberOfSections() == 0) { + return SPINDLE_PRIMARY; + } + if (getCurrentSectionId() < 0) { + return getSection(getNumberOfSections() - 1).spindle == 0; + } + if (currentSection.getType() == TYPE_TURNING) { + return currentSection.spindle; + } else { + if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1))) { + return SPINDLE_PRIMARY; + } else if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) { + if (!gotSecondarySpindle) { + error(localize("Secondary spindle is not available.")); + } + return SPINDLE_SECONDARY; + } else { + return SPINDLE_PRIMARY; + } + } +} + +function ToolingData(_tool) { + switch (_tool.turret) { + // Positional Turret + case 0: + this.tooling = TURRET; + this.toolPost = REAR; + break; + // QCTP X- + case 101: + this.tooling = QCTP; + this.toolPost = FRONT; + break; + // QCTP X+ + case 102: + this.tooling = QCTP; + this.toolPost = REAR; + break; + // Gang Tooling X- + case 103: + this.tooling = GANG; + this.toolPost = FRONT; + break; + // Gang Tooling X+ + case 104: + this.tooling = GANG; + this.toolPost = REAR; + break; + default: + error(localize("Turret number must be 0 (main turret), 101 (QCTP X-), 102 (QCTP X+, 103 (gang tooling X-), or 104 (gang tooling X+).")); + break; + } + this.number = _tool.number; + this.comment = _tool.comment; + this.toolLength = _tool.bodyLength; + // HSMWorks returns 0 in tool.bodyLength + if ((tool.bodyLength == 0) && hasParameter("operation:tool_bodyLength")) { + this.toolLength = getParameter("operation:tool_bodyLength"); + } +} + +function onSection() { + if (currentSection.getType() != TYPE_TURNING) { + if (!hasParameter("operation-strategy") || (getParameter("operation-strategy") != "drill")) { + if (currentSection.getType() == TYPE_MILLING) { + error(localize("Milling toolpath is not supported.")); + } else { + error(localize("Non-turning toolpath is not supported.")); + } + return; + } + } + + var forceToolAndRetract = optionalSection && !currentSection.isOptional(); + optionalSection = currentSection.isOptional(); + + var turning = (currentSection.getType() == TYPE_TURNING); + + var insertToolCall = forceToolAndRetract || isFirstSection() || + currentSection.getForceToolChange && currentSection.getForceToolChange() || + (tool.number != getPreviousSection().getTool().number) || + (tool.compensationOffset != getPreviousSection().getTool().compensationOffset) || + (tool.diameterOffset != getPreviousSection().getTool().diameterOffset) || + (tool.lengthOffset != getPreviousSection().getTool().lengthOffset); + + var retracted = false; // specifies that the tool has been retracted to the safe plane + var newSpindle = isFirstSection() || + (getPreviousSection().spindle != currentSection.spindle); + var newWorkOffset = isFirstSection() || + (getPreviousSection().workOffset != currentSection.workOffset); // work offset changes + + // determine which tooling holder is used + if (!isFirstSection()) { + previousToolingData = toolingData; + } + toolingData = new ToolingData(tool); + toolingData.operationComment = ""; + if (hasParameter("operation-comment")) { + toolingData.operationComment = getParameter("operation-comment"); + } + toolingData.toolChange = insertToolCall; + if (isFirstSection()) { + previousToolingData = toolingData; + } + + // turning using front tool post + if (toolingData.toolPost == FRONT) { + xFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true, scale:-2}); + xOutput = createVariable({prefix:"X"}, xFormat); + iFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true, scale:-1}); // radius mode + iOutput = createReferenceVariable({prefix:"I"}, iFormat); + + // turning using rear tool post + } else { + xFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true, scale:2}); + xOutput = createVariable({prefix:"X"}, xFormat); + iFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true, scale:1}); // radius mode + iOutput = createReferenceVariable({prefix:"I"}, iFormat); + } + + if (insertToolCall || newSpindle || newWorkOffset) { + // retract to safe plane + retracted = true; + if (!isFirstSection() && insertToolCall) { + onCommand(COMMAND_COOLANT_OFF); + } + writeBlock(gFormat.format(28), "U" + xFormat.format(0)); // retract + forceXYZ(); + } + + writeln(""); + + if (hasParameter("operation-comment")) { + var comment = getParameter("operation-comment"); + if (comment) { + writeComment(comment); + } + } + + if (properties.showNotes && hasParameter("notes")) { + var notes = getParameter("notes"); + if (notes) { + var lines = String(notes).split("\n"); + var r1 = new RegExp("^[\\s]+", "g"); + var r2 = new RegExp("[\\s]+$", "g"); + for (line in lines) { + var comment = lines[line].replace(r1, "").replace(r2, ""); + if (comment) { + writeComment(comment); + } + } + } + } + + if (insertToolCall) { + retracted = true; + // onCommand(COMMAND_COOLANT_OFF); + + if (!isFirstSection() && properties.optionalStop) { + onCommand(COMMAND_OPTIONAL_STOP); + } + + if (tool.number > 99) { + warning(localize("Tool number exceeds maximum value.")); + } + + if ((toolingData.tooling == QCTP) || tool.getManualToolChange()) { + var comment = formatComment(localize("CHANGE TO T") + tool.number + " " + localize("ON") + " " + + localize((toolingData.toolPost == REAR) ? "REAR TOOL POST" : "FRONT TOOL POST")); + writeBlock(mFormat.format(0), comment); + } + + var compensationOffset = tool.isTurningTool() ? tool.compensationOffset : tool.lengthOffset; + if (compensationOffset > 99) { + error(localize("Compensation offset is out of range.")); + return; + } + writeBlock("T" + toolFormat.format(tool.number * 100 + compensationOffset)); + if (tool.comment) { + writeComment(tool.comment); + } + + if (properties.preloadTool) { + var nextTool = getNextTool(tool.number); + if (nextTool) { + var compensationOffset = nextTool.isTurningTool() ? nextTool.compensationOffset : nextTool.lengthOffset; + if (compensationOffset > 99) { + error(localize("Compensation offset is out of range.")); + return; + } + writeBlock("T" + toolFormat.format(nextTool.number * 100 + compensationOffset)); + } else { + // preload first tool + var section = getSection(0); + var firstTool = section.getTool().number; + if (tool.number != firstTool.number) { + var compensationOffset = firstTool.isTurningTool() ? firstTool.compensationOffset : firstTool.lengthOffset; + if (compensationOffset > 99) { + error(localize("Compensation offset is out of range.")); + return; + } + writeBlock("T" + toolFormat.format(firstTool.number * 100 + compensationOffset)); + } + } + } + } + + // wcs + if (insertToolCall) { // force work offset when changing tool + currentWorkOffset = undefined; + } + var workOffset = currentSection.workOffset; + if (workOffset == 0) { + warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET); + workOffset = 1; + } + if (workOffset > 0) { + if (workOffset > 6) { + var p = workOffset - 6; // 1->... + if (p > 300) { + error(localize("Work offset out of range.")); + return; + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(54.1), "P" + p); // G54.1P + currentWorkOffset = workOffset; + } + } + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(53 + workOffset)); // G54->G59 + currentWorkOffset = workOffset; + } + } + } + + // set coolant after we have positioned at Z + setCoolant(tool.coolant); + + forceAny(); + gMotionModal.reset(); + + gFeedModeModal.reset(); + if (currentSection.feedMode == FEED_PER_REVOLUTION) { + writeBlock(getCode("FEED_MODE_UNIT_REV")); + } else { + writeBlock(getCode("FEED_MODE_UNIT_MIN")); + } + + if (gotTailStock) { + writeBlock(currentSection.tailstock ? getCode("TAILSTOCK_ON") : getCode("TAILSTOCK_OFF")); + } + // writeBlock(mFormat.format(clampPrimaryChuck ? x : x)); + // writeBlock(mFormat.format(clampSecondaryChuck ? x : x)); + + var tapping = hasParameter("operation:cycleType") && + ((getParameter("operation:cycleType") == "tapping") || + (getParameter("operation:cycleType") == "right-tapping") || + (getParameter("operation:cycleType") == "left-tapping") || + (getParameter("operation:cycleType") == "tapping-with-chip-breaking")); + var initialPosition = getFramePosition(currentSection.getInitialPosition()); + if (!tapping || (tapping && !(properties.useRigidTapping == "without"))) { + startSpindle(false, true, initialPosition); + } + + setRotation(currentSection.workPlane); + + if (currentSection.partCatcher) { + engagePartCatcher(true); + } + + if (!retracted) { + // TAG: need to retract along X or Z + if (getCurrentPosition().z < initialPosition.z) { + writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z)); + } + } + + if (insertToolCall || tool.getSpindleMode() == SPINDLE_CONSTANT_SURFACE_SPEED) { + gMotionModal.reset(); + + if (properties.type == "A") { + writeBlock( + gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), zOutput.format(initialPosition.z) + ); + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y), zOutput.format(initialPosition.z) + ); + } + + gMotionModal.reset(); + } + + // enable SFM spindle speed + if (tool.getSpindleMode() == SPINDLE_CONSTANT_SURFACE_SPEED) { + startSpindle(false, false); + } + + if (properties.useParametricFeed && + hasParameter("operation-strategy") && + (getParameter("operation-strategy") != "drill") && // legacy + !(currentSection.hasAnyCycle && currentSection.hasAnyCycle())) { + if (!insertToolCall && + activeMovements && + (getCurrentSectionId() > 0) && + ((getPreviousSection().getPatternId() == currentSection.getPatternId()) && (currentSection.getPatternId() != 0))) { + // use the current feeds + } else { + initializeActiveFeeds(); + } + } else { + activeMovements = undefined; + } + + if (insertToolCall || retracted) { + gPlaneModal.reset(); + } +} + +function onDwell(seconds) { + if (seconds > 99999.999) { + warning(localize("Dwelling time is out of range.")); + } + milliseconds = clamp(1, seconds * 1000, 99999999); + writeBlock(/*gFeedModeModal.format(94),*/ gFormat.format(4), "P" + milliFormat.format(milliseconds)); +} + +var pendingRadiusCompensation = -1; + +function onRadiusCompensation() { + pendingRadiusCompensation = radiusCompensation; +} + +function onRapid(_x, _y, _z) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + pendingRadiusCompensation = -1; + switch (radiusCompensation) { + case RADIUS_COMPENSATION_LEFT: + writeBlock(gMotionModal.format(0), gFormat.format(41), x, y, z); + break; + case RADIUS_COMPENSATION_RIGHT: + writeBlock(gMotionModal.format(0), gFormat.format(42), x, y, z); + break; + default: + writeBlock(gMotionModal.format(0), gFormat.format(40), x, y, z); + } + } else { + writeBlock(gMotionModal.format(0), x, y, z); + } + forceFeed(); + } +} + +var resetFeed = false; + +function onLinear(_x, _y, _z, feed) { + if (isSpeedFeedSynchronizationActive()) { + resetFeed = true; + var threadPitch = getParameter("operation:threadPitch"); + var threadsPerInch = 1.0 / threadPitch; // per mm for metric + writeBlock(gMotionModal.format(32), xOutput.format(_x), yOutput.format(_y), zOutput.format(_z), pitchOutput.format(1 / threadsPerInch)); + return; + } + if (resetFeed) { + resetFeed = false; + forceFeed(); + } + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var f = getFeed(feed); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + pendingRadiusCompensation = -1; + writeBlock(gPlaneModal.format(18)); + switch (radiusCompensation) { + case RADIUS_COMPENSATION_LEFT: + writeBlock(gMotionModal.format(isSpeedFeedSynchronizationActive() ? 32 : 1), gFormat.format(41), x, y, z, f); + break; + case RADIUS_COMPENSATION_RIGHT: + writeBlock(gMotionModal.format(isSpeedFeedSynchronizationActive() ? 32 : 1), gFormat.format(42), x, y, z, f); + break; + default: + writeBlock(gMotionModal.format(isSpeedFeedSynchronizationActive() ? 32 : 1), gFormat.format(40), x, y, z, f); + } + } else { + writeBlock(gMotionModal.format(isSpeedFeedSynchronizationActive() ? 32 : 1), x, y, z, f); + } + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(isSpeedFeedSynchronizationActive() ? 32 : 1), f); + } + } +} + +function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { + if (isSpeedFeedSynchronizationActive()) { + error(localize("Speed-feed synchronization is not supported for circular moves.")); + return; + } + + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for a circular move.")); + return; + } + + var start = getCurrentPosition(); + var directionCode = (toolingData.toolPost == REAR) ? (clockwise ? 2 : 3) : (clockwise ? 3 : 2); + + if (isFullCircle()) { + if (properties.useRadius || isHelical()) { // radius mode does not support full arcs + linearize(tolerance); + return; + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(directionCode), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(directionCode), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(directionCode), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } else if (!properties.useRadius) { + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(17), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(18), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(conditional(properties.type != "A", gAbsIncModal.format(90)), gPlaneModal.format(19), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } else { // use radius mode + var r = getCircularRadius(); + if (toDeg(getCircularSweep()) > (180 + 1e-9)) { + r = -r; // allow up to <360 deg arcs + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gPlaneModal.format(17), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gPlaneModal.format(18), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gPlaneModal.format(19), gMotionModal.format(directionCode), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } +} + +function onCycle() { +} + +var saveShowSequenceNumbers = true; +var xyzFormat = createFormat({decimals:(unit == MM ? 4 : 5), forceDecimal:true}); +var pathBlockNumber = {start: 0, end: 0}; + +function onCyclePath() { + saveShowSequenceNumbers = properties.showSequenceNumbers; + + // buffer all paths and stop feeds being output + feedOutput.disable(); + properties.showSequenceNumbers = false; + redirectToBuffer(); + gMotionModal.reset(); + if ((hasParameter("operation:grooving") && getParameter("operation:grooving").toUpperCase() != "OFF")) { + forceXYZ(); + } +} + +function onCyclePathEnd() { + properties.showSequenceNumbers = saveShowSequenceNumbers; // reset property to initial state + feedOutput.enable(); + var cyclePath = String(getRedirectionBuffer()).split(EOL); // get cycle path from buffer + closeRedirection(); + for (line in cyclePath) { // remove empty elements + if (cyclePath[line] == "") { + cyclePath.splice(line); + } + } + + var verticalPasses; + if (cycle.profileRoughingCycle == 0) { + verticalPasses = false; + } else if (cycle.profileRoughingCycle == 1) { + verticalPasses = true; + } else { + error(localize("Unsupported passes type.")); + return; + } + // output cycle data + switch (cycleType) { + case "turning-canned-rough": + writeBlock(gFormat.format(verticalPasses ? 72 : 71), + (verticalPasses ? "W" : "U") + xyzFormat.format(cycle.depthOfCut), + "R" + xyzFormat.format(cycle.retractLength) + ); + writeBlock(gFormat.format(verticalPasses ? 72 : 71), + "P" + (getStartEndSequenceNumber(cyclePath, true)), + "Q" + (getStartEndSequenceNumber(cyclePath, false)), + "U" + xFormat.format(cycle.xStockToLeave), + "W" + xyzFormat.format(cycle.zStockToLeave), + getFeed(cycle.cutfeedrate) + ); + break; + default: + error(localize("Unsupported turning canned cycle.")); + } + + for (var i = 0; i < cyclePath.length; ++i) { + if (i == 0 || i == (cyclePath.length - 1)) { // write sequence number on first and last line of the cycle path + properties.showSequenceNumbers = true; + if ((i == 0 && pathBlockNumber.start != sequenceNumber) || (i == (cyclePath.length - 1) && pathBlockNumber.end != sequenceNumber)) { + error(localize("Mismatch of start/end block number in turning canned cycle.")); + return; + } + } + writeBlock(cyclePath[i]); // output cycle path + properties.showSequenceNumbers = saveShowSequenceNumbers; // reset property to initial state + } +} + +function getStartEndSequenceNumber(cyclePath, start) { + if (start) { + pathBlockNumber.start = sequenceNumber + conditional(saveShowSequenceNumbers, properties.sequenceNumberIncrement); + return pathBlockNumber.start; + } else { + pathBlockNumber.end = sequenceNumber + properties.sequenceNumberIncrement + conditional(saveShowSequenceNumbers, (cyclePath.length - 1) * properties.sequenceNumberIncrement); + return pathBlockNumber.end; + } +} + +function getCommonCycle(x, y, z, r) { + forceXYZ(); // force xyz on first drill hole of any cycle + return [xOutput.format(x), yOutput.format(y), + zOutput.format(z), + "R" + spatialFormat.format(r)]; +} + +function onCyclePoint(x, y, z) { + if (isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) || + isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, -1))) { + gPlaneModal.format(17); // 2-axis lathes typically don't use G17 + } else { + expandCyclePoint(x, y, z); + return; + } + + switch (cycleType) { + case "thread-turning": + var inverted = (toolingData.toolPost == REAR) ? 1 : -1; + var r = -cycle.incrementalX * inverted; // positive if taper goes down - delta radius + var threadsPerInch = 1.0 / cycle.pitch; // per mm for metric + var f = 1 / threadsPerInch; + var codes = {A: 92, B: 78, C: 21}; + writeBlock( + gMotionModal.format(codes[properties.type]), + xOutput.format(x - cycle.incrementalX), + yOutput.format(y), + zOutput.format(z), + conditional(zFormat.isSignificant(r), g92ROutput.format(r)), + feedOutput.format(f) + ); + return; + } + + if (isFirstCyclePoint()) { + repositionToCycleClearance(cycle, x, y, z); + + var F = cycle.feedrate; + var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds + + switch (cycleType) { + case "drilling": + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + break; + case "counter-boring": + if (P > 0) { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(82), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "chip-breaking": + if ((cycle.accumulatedDepth < cycle.depth) || (P > 0)) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(73), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + break; + case "deep-drilling": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(83), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + // conditional(P > 0, "P" + milliFormat.format(P)), + feedOutput.format(F) + ); + } + break; + case "tapping": + F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + if (properties.useRigidTapping != "no") { + startSpindle(true, false); + } + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + break; + case "left-tapping": + F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + if (properties.useRigidTapping != "no") { + startSpindle(true, false); + } + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + break; + case "right-tapping": + F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + if (properties.useRigidTapping != "no") { + startSpindle(true, false); + } + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + break; + case "tapping-with-chip-breaking": + case "left-tapping-with-chip-breaking": + case "right-tapping-with-chip-breaking": + F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + if (properties.useRigidTapping != "no") { + startSpindle(true, false); + } + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + break; + case "fine-boring": + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(76), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + "Q" + xFormat.format(cycle.shift), + feedOutput.format(F) + ); + break; + case "reaming": + if (P > 0) { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "stop-boring": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(86), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "boring": + if (P > 0) { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + } else { + writeBlock( + (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + default: + expandCyclePoint(x, y, z); + } + } else { + if (cycleExpanded) { + expandCyclePoint(x, y, z); + } else { + var _x = xOutput.format(x); + var _y = yOutput.format(y); + var _z = zOutput.format(z); + if (!_x && !_y && !_z) { + switch (gPlaneModal.getCurrent()) { + case 17: // XY + xOutput.reset(); // at least one axis is required + _x = xOutput.format(x); + break; + case 18: // ZX + zOutput.reset(); // at least one axis is required + _z = zOutput.format(z); + break; + case 19: // YZ + yOutput.reset(); // at least one axis is required + _y = yOutput.format(y); + break; + } + } + writeBlock(_x, _y, _z); + } + } +} + +function onCycleEnd() { + if (!cycleExpanded) { + switch (cycleType) { + case "thread-turning": + forceFeed(); + xOutput.reset(); + zOutput.reset(); + g92ROutput.reset(); + break; + default: + writeBlock(gCycleModal.format(80)); + } + } +} + +var currentCoolantMode = COOLANT_OFF; + +function setCoolant(coolant) { + if (coolant == currentCoolantMode) { + return; // coolant is already active + } + + var m = undefined; + if (coolant == COOLANT_OFF) { + writeBlock((currentCoolantMode == COOLANT_THROUGH_TOOL) ? getCode("COOLANT_THROUGH_TOOL_OFF") : getCode("COOLANT_OFF")); + currentCoolantMode = COOLANT_OFF; + return; + } + + switch (coolant) { + case COOLANT_FLOOD: + m = getCode("COOLANT_FLOOD_ON"); + break; + case COOLANT_THROUGH_TOOL: + m = getCode("COOLANT_THROUGH_TOOL_ON"); + break; + default: + onUnsupportedCoolant(coolant); + m = getCode("COOLANT_OFF"); + } + + if (m) { + writeBlock(m); + currentCoolantMode = coolant; + } +} + +function onSpindleSpeed(spindleSpeed) { + if (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) { + writeBlock(sOutput.format(spindleSpeed)); + } +} + +function startSpindle(tappingMode, forceRPMMode, initialPosition) { + var spindleDir; + var _spindleSpeed; + var spindleMode; + var maxSpeed = ""; + gSpindleModeModal.reset(); + gSpindleModeModal.reset(); + + if ((getSpindle() == SPINDLE_SECONDARY) && !gotSecondarySpindle) { + error(localize("Secondary spindle is not available.")); + return; + } + + if (tappingMode) { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + return; + } else { + if (getSpindle() == SPINDLE_SECONDARY) { + spindleDir = tool.clockwise ? getCode("START_SUB_SPINDLE_CW") : getCode("START_SUB_SPINDLE_CCW"); + } else { + spindleDir = tool.clockwise ? getCode("START_MAIN_SPINDLE_CW") : getCode("START_MAIN_SPINDLE_CCW"); + } + } + + var maximumSpindleSpeed = (tool.maximumSpindleSpeed > 0) ? Math.min(tool.maximumSpindleSpeed, properties.maximumSpindleSpeed) : properties.maximumSpindleSpeed; + if (tool.getSpindleMode() == SPINDLE_CONSTANT_SURFACE_SPEED) { + _spindleSpeed = tool.surfaceSpeed * ((unit == MM) ? 1 / 1000.0 : 1 / 12.0); + if (forceRPMMode) { // RPM mode is forced until move to initial position + if (xFormat.getResultingValue(initialPosition.x) == 0) { + _spindleSpeed = maximumSpindleSpeed; + } else { + _spindleSpeed = Math.min((_spindleSpeed * ((unit == MM) ? 1000.0 : 12.0) / (Math.PI * Math.abs(initialPosition.x * 2))), maximumSpindleSpeed); + } + spindleMode = getCode("CONSTANT_SURFACE_SPEED_OFF"); + } else { + if (properties.type == "A") { + writeBlock(gFormat.format(50), sOutput.format(maximumSpindleSpeed)); + } else { + writeBlock(gFormat.format(92), sOutput.format(maximumSpindleSpeed)); + } + spindleMode = getCode("CONSTANT_SURFACE_SPEED_ON"); + } + } else { + _spindleSpeed = spindleSpeed; + spindleMode = getCode("CONSTANT_SURFACE_SPEED_OFF"); + } + if (getSpindle(true) == SPINDLE_SECONDARY) { + writeBlock( + spindleMode, + sOutput.format(_spindleSpeed), + spindleDir + ); + } else { + writeBlock( + spindleMode, + sOutput.format(_spindleSpeed), + spindleDir + ); + } + // wait for spindle here if required +} + +function onCommand(command) { + switch (command) { + case COMMAND_COOLANT_OFF: + setCoolant(COOLANT_OFF); + return; + case COMMAND_COOLANT_ON: + setCoolant(COOLANT_FLOOD); + return; + case COMMAND_LOCK_MULTI_AXIS: + return; + case COMMAND_UNLOCK_MULTI_AXIS: + return; + case COMMAND_START_CHIP_TRANSPORT: + // getCode("START_CHIP_TRANSPORT"); + return; + case COMMAND_STOP_CHIP_TRANSPORT: + // getCode("STOP_CHIP_TRANSPORT"); + return; + case COMMAND_BREAK_CONTROL: + return; + case COMMAND_TOOL_MEASURE: + return; + case COMMAND_ACTIVATE_SPEED_FEED_SYNCHRONIZATION: + return; + case COMMAND_DEACTIVATE_SPEED_FEED_SYNCHRONIZATION: + return; + case COMMAND_STOP: + writeBlock(mFormat.format(0)); + forceSpindleSpeed = true; + return; + case COMMAND_OPTIONAL_STOP: + writeBlock(mFormat.format(1)); + break; + case COMMAND_END: + writeBlock(mFormat.format(2)); + break; + case COMMAND_SPINDLE_CLOCKWISE: + switch (currentSection.spindle) { + case SPINDLE_PRIMARY: + writeBlock(mFormat.format(3)); + break; + case SPINDLE_SECONDARY: + writeBlock(mFormat.format(143)); + break; + } + break; + case COMMAND_SPINDLE_COUNTERCLOCKWISE: + switch (currentSection.spindle) { + case SPINDLE_PRIMARY: + writeBlock(mFormat.format(4)); + break; + case SPINDLE_SECONDARY: + writeBlock(mFormat.format(144)); + break; + } + break; + case COMMAND_START_SPINDLE: + onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE); + return; + case COMMAND_STOP_SPINDLE: + switch (currentSection.spindle) { + case SPINDLE_PRIMARY: + writeBlock(mFormat.format(5)); + break; + case SPINDLE_SECONDARY: + writeBlock(mFormat.format(145)); + break; + } + break; + case COMMAND_ORIENTATE_SPINDLE: + if (getSpindle() == 0) { + writeBlock(mFormat.format(19)); // use P or R to set angle (optional) + } else { + writeBlock(mFormat.format(119)); + } + break; + //case COMMAND_CLAMP: // TAG: add support for clamping + //case COMMAND_UNCLAMP: // TAG: add support for clamping + default: + onUnsupportedCommand(command); + } +} + +function engagePartCatcher(engage) { + if (engage) { + // catch part here + writeBlock(getCode("PART_CATCHER_ON"), formatComment(localize("PART CATCHER ON"))); + } else { + onCommand(COMMAND_COOLANT_OFF); + writeBlock(gFormat.format(28), gMotionModal.format(0), "U" + xFormat.format(properties.g53HomePositionX)); // retract + writeBlock(gFormat.format(28), gMotionModal.format(0), "W" + zFormat.format(properties.g53HomePositionZ)); // retract + writeBlock(getCode("PART_CATCHER_OFF"), formatComment(localize("PART CATCHER OFF"))); + forceXYZ(); + } +} + +function onSectionEnd() { + + // cancel SFM mode to preserve spindle speed + if (tool.getSpindleMode() == SPINDLE_CONSTANT_SURFACE_SPEED) { + startSpindle(false, true, getFramePosition(currentSection.getFinalPosition())); + } + + if (currentSection.partCatcher) { + engagePartCatcher(false); + } + + forceAny(); +} + +function onClose() { + writeln(""); + + optionalSection = false; + + onCommand(COMMAND_COOLANT_OFF); + + onCommand(COMMAND_STOP_CHIP_TRANSPORT); + + // we might want to retract in Z before X + // writeBlock(gFormat.format(28), "U" + xFormat.format(0)); // retract + + forceXYZ(); + if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) { + writeBlock(gFormat.format(28), "U" + xFormat.format(0), conditional(yOutput.isEnabled(), "V" + yFormat.format(0)), "W" + zFormat.format(0)); // return to home + } else { + var homeX; + if (machineConfiguration.hasHomePositionX()) { + homeX = xOutput.format(machineConfiguration.getHomePositionX()); + } + var homeY; + if (yOutput.isEnabled() && machineConfiguration.hasHomePositionY()) { + homeY = yOutput.format(machineConfiguration.getHomePositionY()); + } + if (properties.type == "A") { + writeBlock(gFormat.format(53), gMotionModal.format(0), homeX, homeY, zOutput.format(machineConfiguration.getRetractPlane())); + } else { + writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY, zOutput.format(machineConfiguration.getRetractPlane())); + } + } + + onImpliedCommand(COMMAND_END); + onImpliedCommand(COMMAND_STOP_SPINDLE); + writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off + writeln("%"); +} diff --git a/resources/workshop/.inc/saturn/mc/fanuc2/fanuc with subprograms.cps b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc with subprograms.cps new file mode 100644 index 000000000..bd38d7159 --- /dev/null +++ b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc with subprograms.cps @@ -0,0 +1,2087 @@ +/** + Copyright (C) 2012-2020 by Autodesk, Inc. + All rights reserved. + + FANUC post processor configuration. + + $Revision: 42645 dab327b1b16b423b75c69877cc91aea7ea31c0ac $ + $Date: 2020-02-06 06:32:21 $ + + FORKID {04622D27-72F0-45d4-85FB-DB346FD1AE22} +*/ + +description = "FANUC with subprograms"; +vendor = "Fanuc"; +vendorUrl = "http://www.fanuc.com"; +legal = "Copyright (C) 2012-2020 by Autodesk, Inc."; +certificationLevel = 2; +minimumRevision = 40783; + +longDescription = "Generic FANUC post which has built-in support for subprograms. By default each operation will be output in separate files. If you turn off the 'useFilesForSubprograms' property you will get the subprograms embedded in the main program."; + +extension = "nc"; +programNameIsInteger = true; +setCodePage("ascii"); + +capabilities = CAPABILITY_MILLING; +tolerance = spatial(0.002, MM); + +minimumChordLength = spatial(0.25, MM); +minimumCircularRadius = spatial(0.01, MM); +maximumCircularRadius = spatial(1000, MM); +minimumCircularSweep = toRad(0.01); +maximumCircularSweep = toRad(180); +allowHelicalMoves = true; +allowedCircularPlanes = undefined; // allow any circular motion +highFeedrate = (unit == IN) ? 500 : 5000; + +// user-defined properties +properties = { + writeMachine: true, // write machine + writeTools: true, // writes the tools + preloadTool: true, // preloads next tool on tool change if any + showSequenceNumbers: true, // show sequence numbers + sequenceNumberStart: 10, // first sequence number + sequenceNumberIncrement: 5, // increment for sequence numbers + optionalStop: true, // optional stop + o8: false, // specifies 8-digit program number + separateWordsWithSpace: true, // specifies that the words should be separated with a white space + useFilesForSubprograms: true, // specifies that one file should be generated to section + allow3DArcs: false, // specifies that 3D circular arcs are allowed + useRadius: false, // specifies that arcs should be output using the radius (R word) instead of the I, J, and K words + forceIJK: false, // force output of IJK for G2/G3 when not using R word + useParametricFeed: false, // specifies that feed should be output using Q values + showNotes: false, // specifies that operation notes should be output + useSmoothing: false, // specifies if smoothing should be used or not + usePitchForTapping: false, // enable to use pitch instead of feed for the F-word for canned tapping cycles - note that your CNC control must be setup for pitch mode! + useG95: false, // use IPR/MPR instead of IPM/MPM + useG54x4: false, // Fanuc 30i supports G54.4 for Workpiece Error Compensation + useRigidTapping: "yes" // output rigid tapping block +}; + +// user-defined property definitions +propertyDefinitions = { + writeMachine: {title:"Write machine", description:"Output the machine settings in the header of the code.", group:0, type:"boolean"}, + writeTools: {title:"Write tool list", description:"Output a tool list in the header of the code.", group:0, type:"boolean"}, + preloadTool: {title:"Preload tool", description:"Preloads the next tool at a tool change (if any).", group:1, type:"boolean"}, + showSequenceNumbers: {title:"Use sequence numbers", description:"Use sequence numbers for each block of outputted code.", group:1, type:"boolean"}, + sequenceNumberStart: {title:"Start sequence number", description:"The number at which to start the sequence numbers.", group:1, type:"integer"}, + sequenceNumberIncrement: {title:"Sequence number increment", description:"The amount by which the sequence number is incremented by in each block.", group:1, type:"integer"}, + optionalStop: {title:"Optional stop", description:"Outputs optional stop code during when necessary in the code.", type:"boolean"}, + o8: {title:"8 Digit program number", description:"Specifies that an 8 digit program number is needed.", type:"boolean"}, + separateWordsWithSpace: {title:"Separate words with space", description:"Adds spaces between words if 'yes' is selected.", type:"boolean"}, + useFilesForSubprograms: {title:"Use files for subprograms", description:"Specifies that one file should be generated for each section.", type:"boolean"}, + allow3DArcs: {title:"Allow 3D arcs", description:"Specifies whether 3D circular arcs are allowed.", type:"boolean"}, + useRadius: {title:"Radius arcs", description:"If yes is selected, arcs are outputted using radius values rather than IJK.", type:"boolean"}, + forceIJK: {title:"Force IJK", description:"Force the output of IJK for G2/G3 when not using R mode.", type:"boolean"}, + useParametricFeed: {title:"Parametric feed", description:"Specifies the feed value that should be output using a Q value.", type:"boolean"}, + showNotes: {title:"Show notes", description:"Writes operation notes as comments in the outputted code.", type:"boolean"}, + useSmoothing: {title:"Use smoothing", description:"Specifies if smoothing should be used or not.", type:"boolean"}, + usePitchForTapping: {title:"Use pitch for tapping", description:"Enables the use of pitch instead of feed for the F-word in canned tapping cycles. Your CNC control must be setup for pitch mode!", type:"boolean"}, + useG95: {title:"Use G95", description:"Use IPR/MPR instead of IPM/MPM.", type:"boolean"}, + useG54x4: {title:"Use G54.4", description:"Fanuc 30i supports G54.4 for workpiece error compensation.", type:"boolean"}, + useRigidTapping: { + title: "Use rigid tapping", + description: "Select 'Yes' to enable, 'No' to disable, or 'Without spindle direction' to enable rigid tapping without outputting the spindle direction block.", + type: "enum", + values:[ + {title:"Yes", id:"yes"}, + {title:"No", id:"no"}, + {title:"Without spindle direction", id:"without"} + ] + } +}; + +var permittedCommentChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,=_-"; + +var gFormat = createFormat({prefix:"G", width:2, zeropad:true, decimals:1}); +var mFormat = createFormat({prefix:"M", width:2, zeropad:true, decimals:1}); +var hFormat = createFormat({prefix:"H", width:2, zeropad:true, decimals:1}); +var dFormat = createFormat({prefix:"D", width:2, zeropad:true, decimals:1}); +var probe100Format = createFormat({decimals:3, zeropad:true, width:3, forceDecimal:true}); + +var xyzFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var ijkFormat = createFormat({decimals:6, forceDecimal:true}); // unitless +var rFormat = xyzFormat; // radius +var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG}); +var feedFormat = createFormat({decimals:(unit == MM ? 0 : 1), forceDecimal:true}); +var pitchFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var toolFormat = createFormat({decimals:0}); +var rpmFormat = createFormat({decimals:0}); +var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999 +var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-9999 +var taperFormat = createFormat({decimals:1, scale:DEG}); +var peckFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +// var peckFormat = createFormat({decimals:0, forceDecimal:false, trim:false, width:4, zeropad:true, scale:(unit == MM ? 1000 : 10000)}); + +var xOutput = createVariable({prefix:"X"}, xyzFormat); +var yOutput = createVariable({prefix:"Y"}, xyzFormat); +var zOutput = createVariable({prefix:"Z"}, xyzFormat); +var aOutput = createVariable({prefix:"A"}, abcFormat); +var bOutput = createVariable({prefix:"B"}, abcFormat); +var cOutput = createVariable({prefix:"C"}, abcFormat); +var feedOutput = createVariable({prefix:"F"}, feedFormat); +var pitchOutput = createVariable({prefix:"F", force:true}, pitchFormat); +var sOutput = createVariable({prefix:"S", force:true}, rpmFormat); +var dOutput = createVariable({}, dFormat); +var peckOutput = createVariable({prefix:"Q", force:true}, peckFormat); + +// circular output +var iOutput = createReferenceVariable({prefix:"I"}, xyzFormat); +var jOutput = createReferenceVariable({prefix:"J"}, xyzFormat); +var kOutput = createReferenceVariable({prefix:"K"}, xyzFormat); + +var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ... +var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19 +var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91 +var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G94-95 +var gUnitModal = createModal({}, gFormat); // modal group 6 // G20-21 +var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ... +var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99 +var gRotationModal = createModal({}, gFormat); // modal group 16 // G68-G69 + +// fixed settings +var firstFeedParameter = 500; +var useMultiAxisFeatures = true; +var forceMultiAxisIndexing = false; // force multi-axis indexing for 3D programs +var cancelTiltFirst = false; // cancel G68.2 with G69 prior to G54-G59 WCS block +var useABCPrepositioning = false; // position ABC axes prior to G68.2 block + +var WARNING_WORK_OFFSET = 0; + +var ANGLE_PROBE_NOT_SUPPORTED = 0; +var ANGLE_PROBE_USE_ROTATION = 1; +var ANGLE_PROBE_USE_CAXIS = 2; + +// collected state +var sequenceNumber; +var currentWorkOffset; +var previousSequenceNumber; +var subprograms = ""; +var optionalSection = false; +var forceSpindleSpeed = false; +var activeMovements; // do not use by default +var currentFeedId; +var g68RotationMode = 0; +var angularProbingMode; +probeMultipleFeatures = true; + +/** + Writes the specified block. +*/ +function writeBlock() { + if (properties.showSequenceNumbers) { + if (optionalSection) { + var text = formatWords(arguments); + if (text) { + writeWords("/", "N" + sequenceNumber, text); + } + } else { + writeWords2("N" + sequenceNumber, arguments); + } + sequenceNumber += properties.sequenceNumberIncrement; + } else { + if (optionalSection) { + writeWords2("/", arguments); + } else { + writeWords(arguments); + } + } +} + +/** + Writes the specified optional block. +*/ +function writeOptionalBlock() { + if (properties.showSequenceNumbers) { + var words = formatWords(arguments); + if (words) { + writeWords("/", "N" + sequenceNumber, words); + sequenceNumber += properties.sequenceNumberIncrement; + } + } else { + writeWords2("/", arguments); + } +} + +function formatComment(text) { + return "(" + filterText(String(text).toUpperCase(), permittedCommentChars).replace(/[()]/g, "") + ")"; +} + +/** + Output a comment. +*/ +function writeComment(text) { + writeln(formatComment(text)); +} + +function onOpen() { + if (properties.useRadius) { + maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC + } + gRotationModal.format(69); // Default to G69 Rotation Off + + if (false) { // note: setup your machine here + var aAxis = createAxis({coordinate:0, table:false, axis:[1, 0, 0], range:[-360, 360], preference:1}); + var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], range:[-360, 360], preference:1}); + machineConfiguration = new MachineConfiguration(aAxis, cAxis); + + setMachineConfiguration(machineConfiguration); + optimizeMachineAngles2(0); // TCP mode + } + + if (!machineConfiguration.isMachineCoordinate(0)) { + aOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(1)) { + bOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(2)) { + cOutput.disable(); + } + + if (!properties.separateWordsWithSpace) { + setWordSeparator(""); + } + + if (properties.forceIJK) { + iOutput = createReferenceVariable({prefix:"I", force:true}, xyzFormat); + jOutput = createReferenceVariable({prefix:"J", force:true}, xyzFormat); + kOutput = createReferenceVariable({prefix:"K", force:true}, xyzFormat); + } + + sequenceNumber = properties.sequenceNumberStart; + writeln("%"); + + if (programName) { + var programId; + try { + programId = getAsInt(programName); + } catch (e) { + error(localize("Program name must be a number.")); + return; + } + if (properties.o8) { + if (!((programId >= 1) && (programId <= 99999999))) { + error(localize("Program number is out of range.")); + return; + } + } else { + if (!((programId >= 1) && (programId <= 9999))) { + error(localize("Program number is out of range.")); + return; + } + } + if ((programId >= 8000) && (programId <= 9999)) { + warning(localize("Program number is reserved by tool builder.")); + } + var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + if (programComment) { + writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); + } else { + writeln("O" + oFormat.format(programId)); + } + } else { + error(localize("Program name has not been specified.")); + return; + } + + // dump machine configuration + var vendor = machineConfiguration.getVendor(); + var model = machineConfiguration.getModel(); + var description = machineConfiguration.getDescription(); + + if (properties.writeMachine && (vendor || model || description)) { + writeComment(localize("Machine")); + if (vendor) { + writeComment(" " + localize("vendor") + ": " + vendor); + } + if (model) { + writeComment(" " + localize("model") + ": " + model); + } + if (description) { + writeComment(" " + localize("description") + ": " + description); + } + } + + // dump tool information + if (properties.writeTools) { + var zRanges = {}; + if (is3D()) { + var numberOfSections = getNumberOfSections(); + for (var i = 0; i < numberOfSections; ++i) { + var section = getSection(i); + var zRange = section.getGlobalZRange(); + var tool = section.getTool(); + if (zRanges[tool.number]) { + zRanges[tool.number].expandToRange(zRange); + } else { + zRanges[tool.number] = zRange; + } + } + } + + var tools = getToolTable(); + if (tools.getNumberOfTools() > 0) { + for (var i = 0; i < tools.getNumberOfTools(); ++i) { + var tool = tools.getTool(i); + var comment = "T" + toolFormat.format(tool.number) + " " + + "D=" + xyzFormat.format(tool.diameter) + " " + + localize("CR") + "=" + xyzFormat.format(tool.cornerRadius); + if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) { + comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg"); + } + if (zRanges[tool.number]) { + comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum()); + } + comment += " - " + getToolTypeName(tool.type); + writeComment(comment); + } + } + } + + if (false) { + // check for duplicate tool number + for (var i = 0; i < getNumberOfSections(); ++i) { + var sectioni = getSection(i); + var tooli = sectioni.getTool(); + for (var j = i + 1; j < getNumberOfSections(); ++j) { + var sectionj = getSection(j); + var toolj = sectionj.getTool(); + if (tooli.number == toolj.number) { + if (xyzFormat.areDifferent(tooli.diameter, toolj.diameter) || + xyzFormat.areDifferent(tooli.cornerRadius, toolj.cornerRadius) || + abcFormat.areDifferent(tooli.taperAngle, toolj.taperAngle) || + (tooli.numberOfFlutes != toolj.numberOfFlutes)) { + error( + subst( + localize("Using the same tool number for different cutter geometry for operation '%1' and '%2'."), + sectioni.hasParameter("operation-comment") ? sectioni.getParameter("operation-comment") : ("#" + (i + 1)), + sectionj.hasParameter("operation-comment") ? sectionj.getParameter("operation-comment") : ("#" + (j + 1)) + ) + ); + return; + } + } + } + } + } + + if ((getNumberOfSections() > 0) && (getSection(0).workOffset == 0)) { + for (var i = 0; i < getNumberOfSections(); ++i) { + if (getSection(i).workOffset > 0) { + error(localize("Using multiple work offsets is not possible if the initial work offset is 0.")); + return; + } + } + } + + // absolute coordinates and feed per min + writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(properties.useG95 ? 95 : 94), gPlaneModal.format(17), gFormat.format(49), gFormat.format(40), gFormat.format(80)); + + switch (unit) { + case IN: + writeBlock(gUnitModal.format(20)); + break; + case MM: + writeBlock(gUnitModal.format(21)); + break; + } + + if (properties.useG95 && properties.useParametricFeed) { + error(localize("Parametric feed is not supported when using G95.")); + return; + } + + if (properties.useG95) { + feedFormat = createFormat({decimals:(unit == MM ? 4 : 5), forceDecimal:true}); + feedOutput = createVariable({prefix:"F"}, feedFormat); + } +} + +function onComment(message) { + var comments = String(message).split(";"); + for (comment in comments) { + writeComment(comments[comment]); + } +} + +/** Force output of X, Y, and Z. */ +function forceXYZ() { + xOutput.reset(); + yOutput.reset(); + zOutput.reset(); +} + +/** Force output of A, B, and C. */ +function forceABC() { + aOutput.reset(); + bOutput.reset(); + cOutput.reset(); +} + +function forceFeed() { + currentFeedId = undefined; + feedOutput.reset(); +} + +/** Force output of X, Y, Z, A, B, C, and F on next output. */ +function forceAny() { + forceXYZ(); + forceABC(); + forceFeed(); +} + +var lengthCompensationActive = false; +var retracted = false; // specifies that the tool has been retracted to the safe plane + +/** Disables length compensation if currently active or if forced. */ +function disableLengthCompensation(force) { + if (lengthCompensationActive || force) { + validate(retracted, "Cannot cancel length compensation if the machine is not fully retracted."); + writeBlock(gFormat.format(49)); + lengthCompensationActive = false; + } +} + +var currentSmoothing = false; + +function setSmoothing(mode) { + if (mode == currentSmoothing) { + return false; + } + + // 1) Make sure G49 is called before the execution of G05.1 Q1 Rx + // 2) G05.1 Q1 Rx must be engaged BEFORE G43-Tool Length Comp + // 3) AICC and AIAPC need to be turned on and off for each tool + // 4) AICC and AIAPC does not apply to canned drilling cycles + validate(!lengthCompensationActive, "Length compensation is active while trying to update smoothing."); + + currentSmoothing = mode; + writeBlock(gFormat.format(5.1), mode ? "Q1" : "Q0"); + return true; +} + +function FeedContext(id, description, feed) { + this.id = id; + this.description = description; + this.feed = feed; +} + +function getFeed(f) { + if (properties.useG95) { + return feedOutput.format(f / spindleSpeed); // use feed value + } + if (activeMovements) { + var feedContext = activeMovements[movement]; + if (feedContext != undefined) { + if (!feedFormat.areDifferent(feedContext.feed, f)) { + if (feedContext.id == currentFeedId) { + return ""; // nothing has changed + } + forceFeed(); + currentFeedId = feedContext.id; + return "F#" + (firstFeedParameter + feedContext.id); + } + } + currentFeedId = undefined; // force Q feed next time + } + return feedOutput.format(f); // use feed value +} + +function initializeActiveFeeds() { + activeMovements = new Array(); + var movements = currentSection.getMovements(); + + var id = 0; + var activeFeeds = new Array(); + if (hasParameter("operation:tool_feedCutting")) { + if (movements & ((1 << MOVEMENT_CUTTING) | (1 << MOVEMENT_LINK_TRANSITION) | (1 << MOVEMENT_EXTENDED))) { + var feedContext = new FeedContext(id, localize("Cutting"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_CUTTING] = feedContext; + activeMovements[MOVEMENT_LINK_TRANSITION] = feedContext; + activeMovements[MOVEMENT_EXTENDED] = feedContext; + } + ++id; + if (movements & (1 << MOVEMENT_PREDRILL)) { + feedContext = new FeedContext(id, localize("Predrilling"), getParameter("operation:tool_feedCutting")); + activeMovements[MOVEMENT_PREDRILL] = feedContext; + activeFeeds.push(feedContext); + } + ++id; + } + + if (hasParameter("operation:finishFeedrate")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:finishFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedEntry")) { + if (movements & (1 << MOVEMENT_LEAD_IN)) { + var feedContext = new FeedContext(id, localize("Entry"), getParameter("operation:tool_feedEntry")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_IN] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LEAD_OUT)) { + var feedContext = new FeedContext(id, localize("Exit"), getParameter("operation:tool_feedExit")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_OUT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:noEngagementFeedrate")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), getParameter("operation:noEngagementFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting") && + hasParameter("operation:tool_feedEntry") && + hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), Math.max(getParameter("operation:tool_feedCutting"), getParameter("operation:tool_feedEntry"), getParameter("operation:tool_feedExit"))); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:reducedFeedrate")) { + if (movements & (1 << MOVEMENT_REDUCED)) { + var feedContext = new FeedContext(id, localize("Reduced"), getParameter("operation:reducedFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_REDUCED] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedRamp")) { + if (movements & ((1 << MOVEMENT_RAMP) | (1 << MOVEMENT_RAMP_HELIX) | (1 << MOVEMENT_RAMP_PROFILE) | (1 << MOVEMENT_RAMP_ZIG_ZAG))) { + var feedContext = new FeedContext(id, localize("Ramping"), getParameter("operation:tool_feedRamp")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_RAMP] = feedContext; + activeMovements[MOVEMENT_RAMP_HELIX] = feedContext; + activeMovements[MOVEMENT_RAMP_PROFILE] = feedContext; + activeMovements[MOVEMENT_RAMP_ZIG_ZAG] = feedContext; + } + ++id; + } + if (hasParameter("operation:tool_feedPlunge")) { + if (movements & (1 << MOVEMENT_PLUNGE)) { + var feedContext = new FeedContext(id, localize("Plunge"), getParameter("operation:tool_feedPlunge")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_PLUNGE] = feedContext; + } + ++id; + } + if (true) { // high feed + if (movements & (1 << MOVEMENT_HIGH_FEED)) { + var feedContext = new FeedContext(id, localize("High Feed"), this.highFeedrate); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_HIGH_FEED] = feedContext; + } + ++id; + } + + for (var i = 0; i < activeFeeds.length; ++i) { + var feedContext = activeFeeds[i]; + writeBlock("#" + (firstFeedParameter + feedContext.id) + "=" + feedFormat.format(feedContext.feed), formatComment(feedContext.description)); + } +} + +var currentWorkPlaneABC = undefined; + +function forceWorkPlane() { + currentWorkPlaneABC = undefined; +} + +function cancelWorkPlane() { + writeBlock(gRotationModal.format(69)); // cancel frame + forceWorkPlane(); +} + +function setWorkPlane(abc) { + if (!forceMultiAxisIndexing && is3D() && !machineConfiguration.isMultiAxisConfiguration()) { + return; // ignore + } + + if (!((currentWorkPlaneABC == undefined) || + abcFormat.areDifferent(abc.x, currentWorkPlaneABC.x) || + abcFormat.areDifferent(abc.y, currentWorkPlaneABC.y) || + abcFormat.areDifferent(abc.z, currentWorkPlaneABC.z))) { + return; // no change + } + + onCommand(COMMAND_UNLOCK_MULTI_AXIS); + if (!retracted) { + writeRetract(Z); + } + + if (useMultiAxisFeatures) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + if (machineConfiguration.isMultiAxisConfiguration() && useABCPrepositioning) { + var angles = abc.isNonZero() ? getWorkPlaneMachineABC(currentSection.workPlane, false, false) : abc; + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(angles.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(angles.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(angles.z)) + ); + } + if (abc.isNonZero()) { + gRotationModal.reset(); + writeBlock(gRotationModal.format(68.2), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "Z" + xyzFormat.format(0), "I" + abcFormat.format(abc.x), "J" + abcFormat.format(abc.y), "K" + abcFormat.format(abc.z)); // set frame + writeBlock(gFormat.format(53.1)); // turn machine + } else { + if (!cancelTiltFirst) { + cancelWorkPlane(); + } + } + } else { + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z)) + ); + } + + onCommand(COMMAND_LOCK_MULTI_AXIS); + + currentWorkPlaneABC = abc; +} + +var closestABC = false; // choose closest machine angles +var currentMachineABC; + +function getWorkPlaneMachineABC(workPlane, _setWorkPlane, rotate) { + var W = workPlane; // map to global frame + + var abc = machineConfiguration.getABC(W); + if (closestABC) { + if (currentMachineABC) { + abc = machineConfiguration.remapToABC(abc, currentMachineABC); + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + + try { + abc = machineConfiguration.remapABC(abc); + if (_setWorkPlane) { + currentMachineABC = abc; + } + } catch (e) { + error( + localize("Machine angles not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + var direction = machineConfiguration.getDirection(abc); + if (!isSameDirection(direction, W.forward)) { + error(localize("Orientation not supported.")); + } + + if (!machineConfiguration.isABCSupported(abc)) { + error( + localize("Work plane is not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + if (rotate) { + var tcp = false; + if (tcp) { + setRotation(W); // TCP mode + } else { + var O = machineConfiguration.getOrientation(abc); + var R = machineConfiguration.getRemainingOrientation(abc, W); + setRotation(R); + } + } + + return abc; +} + +function isProbeOperation() { + return hasParameter("operation-strategy") && ((getParameter("operation-strategy") == "probe" || getParameter("operation-strategy") == "probe_geometry")); +} + +var probeOutputWorkOffset = 1; + +function onParameter(name, value) { + if (name == "probe-output-work-offset") { + probeOutputWorkOffset = (value > 0) ? value : 1; + } +} + +function onSection() { + var forceToolAndRetract = optionalSection && !currentSection.isOptional(); + optionalSection = currentSection.isOptional(); + + var insertToolCall = forceToolAndRetract || isFirstSection() || + currentSection.getForceToolChange && currentSection.getForceToolChange() || + (tool.number != getPreviousSection().getTool().number); + + if (insertToolCall) { + forceWorkPlane(); + + writeComment("T" + toolFormat.format(tool.number)); + if (tool.comment) { + writeComment(tool.comment); + } + } + + var makeSubprogram = true; + if (false) { + var subprogramLevel = 3; + makeSubprogram = false; + if (hasParameter("hsmworks:path")) { // autodeskcam + var path = getParameter("hsmworks:path"); // autodeskcam + var sections = path.split("\\"); + var level = sections.length; + makeSubprogram = level >= subprogramLevel; + } + } + + if (makeSubprogram) { // when to do a subprogram + var programId; + try { + programId = getAsInt(programName); + } catch (e) { + error(localize("Program name must be a number.")); + return; + } + + var subprogram = programId + 1 + getCurrentSectionId(); + var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + writeBlock(mFormat.format(98), "P" + oFormat.format(subprogram)); // call subprogram + + previousSequenceNumber = sequenceNumber; + sequenceNumber = properties.sequenceNumberStart; + if (properties.useFilesForSubprograms) { + var path = FileSystem.getCombinedPath(FileSystem.getFolderPath(getOutputPath()), subprogram + "." + extension); + redirectToFile(path); + writeln("%"); + } else { + redirectToBuffer(); + writeln(""); // separate subprograms + } + + var oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + writeln("O" + oFormat.format(subprogram)); + } + + var newWorkOffset = isFirstSection() || + (getPreviousSection().workOffset != currentSection.workOffset); // work offset changes + var newWorkPlane = isFirstSection() || + !isSameDirection(getPreviousSection().getGlobalFinalToolAxis(), currentSection.getGlobalInitialToolAxis()); + var forceSmoothing = properties.useSmoothing && + (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill") || + !isFirstSection() && getPreviousSection().hasParameter("operation-strategy") && (getPreviousSection().getParameter("operation-strategy") == "drill")); // force smoothing in case !insertToolCall (2d chamfer) + if (insertToolCall || newWorkOffset || newWorkPlane || forceSmoothing) { + + // stop spindle before retract during tool change + if (insertToolCall && !isFirstSection()) { + onCommand(COMMAND_STOP_SPINDLE); + } + + // retract to safe plane + retracted = true; + writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(0)); // retract + writeBlock(gAbsIncModal.format(90)); + forceXYZ(); + if ((insertToolCall && !isFirstSection()) || forceSmoothing) { + disableLengthCompensation(); + setSmoothing(false); + } + } + + writeln(""); + + if (hasParameter("operation-comment")) { + var comment = getParameter("operation-comment"); + if (comment) { + writeComment(comment); + } + } + + if (properties.showNotes && hasParameter("notes")) { + var notes = getParameter("notes"); + if (notes) { + var lines = String(notes).split("\n"); + var r1 = new RegExp("^[\\s]+", "g"); + var r2 = new RegExp("[\\s]+$", "g"); + for (line in lines) { + var comment = lines[line].replace(r1, "").replace(r2, ""); + if (comment) { + writeComment(comment); + } + } + } + } + + if (insertToolCall) { + forceWorkPlane(); + + retracted = true; + onCommand(COMMAND_COOLANT_OFF); + + if (!isFirstSection() && properties.optionalStop) { + onCommand(COMMAND_OPTIONAL_STOP); + } + + if (tool.number > 99) { + warning(localize("Tool number exceeds maximum value.")); + } + + disableLengthCompensation(); + writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); + if (tool.comment) { + writeComment(tool.comment); + } + var showToolZMin = false; + if (showToolZMin) { + if (is3D()) { + var numberOfSections = getNumberOfSections(); + var zRange = currentSection.getGlobalZRange(); + var number = tool.number; + for (var i = currentSection.getId() + 1; i < numberOfSections; ++i) { + var section = getSection(i); + if (section.getTool().number != number) { + break; + } + zRange.expandToRange(section.getGlobalZRange()); + } + writeComment(localize("ZMIN") + "=" + zRange.getMinimum()); + } + } + + if (properties.preloadTool) { + var nextTool = getNextTool(tool.number); + if (nextTool) { + writeBlock("T" + toolFormat.format(nextTool.number)); + } else { + // preload first tool + var section = getSection(0); + var firstToolNumber = section.getTool().number; + if (tool.number != firstToolNumber) { + writeBlock("T" + toolFormat.format(firstToolNumber)); + } + } + } + } else { + writeComment("T" + toolFormat.format(tool.number)); + } + + if (!isProbeOperation() && + (insertToolCall || + forceSpindleSpeed || + isFirstSection() || + (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) || + (tool.clockwise != getPreviousSection().getTool().clockwise))) { + forceSpindleSpeed = false; + + if (spindleSpeed < 1) { + error(localize("Spindle speed out of range.")); + return; + } + if (spindleSpeed > 99999) { + warning(localize("Spindle speed exceeds maximum value.")); + } + var tapping = hasParameter("operation:cycleType") && + ((getParameter("operation:cycleType") == "tapping") || + (getParameter("operation:cycleType") == "right-tapping") || + (getParameter("operation:cycleType") == "left-tapping") || + (getParameter("operation:cycleType") == "tapping-with-chip-breaking")); + if (!tapping || (tapping && !(properties.useRigidTapping == "without"))) { + writeBlock( + sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4) + ); + } + + onCommand(COMMAND_START_CHIP_TRANSPORT); + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { + // writeBlock(mFormat.format(xxx)); // shortest path traverse + } + } + + // wcs + if (insertToolCall) { // force work offset when changing tool + currentWorkOffset = undefined; + } + var workOffset = currentSection.workOffset; + if (workOffset == 0) { + warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET); + workOffset = 1; + } + if (workOffset != currentWorkOffset) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + forceWorkPlane(); + } + if (workOffset > 0) { + if (workOffset > 6) { + var p = workOffset - 6; // 1->... + if (p > 300) { + error(localize("Work offset out of range.")); + return; + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(54.1), "P" + p); // G54.1P + currentWorkOffset = workOffset; + } + } + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(53 + workOffset)); // G54->G59 + currentWorkOffset = workOffset; + } + } + } + + forceXYZ(); + + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { // use 5-axis indexing for multi-axis mode + // set working plane after datum shift + + if (currentSection.isMultiAxis()) { + forceWorkPlane(); + cancelTransformation(); + } else { + var abc = new Vector(0, 0, 0); + if (useMultiAxisFeatures) { + var euler = currentSection.workPlane.getEuler2(EULER_ZXZ_R); + abc = new Vector(euler.x, euler.y, euler.z); + cancelTransformation(); + } else { + abc = getWorkPlaneMachineABC(currentSection.workPlane, true, true); + } + setWorkPlane(abc); + } + } else { // pure 3D + var remaining = currentSection.workPlane; + if (!isSameDirection(remaining.forward, new Vector(0, 0, 1))) { + error(localize("Tool orientation is not supported.")); + return; + } + setRotation(remaining); + } + + // set coolant after we have positioned at Z + setCoolant(tool.coolant); + + if (properties.useSmoothing) { + if (hasParameter("operation-strategy") && (getParameter("operation-strategy") != "drill")) { + if (setSmoothing(true)) { + // we force G43 using lengthCompensationActive + } + } else { + if (setSmoothing(false)) { + // we force G43 using lengthCompensationActive + } + } + } + + forceAny(); + gMotionModal.reset(); + + var initialPosition = getFramePosition(currentSection.getInitialPosition()); + if (!retracted && !insertToolCall) { + if (getCurrentPosition().z < initialPosition.z) { + writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z)); + } + } + + if (insertToolCall || !lengthCompensationActive || retracted || (!isFirstSection() && getPreviousSection().isMultiAxis())) { + var lengthOffset = tool.lengthOffset; + if (lengthOffset > 99) { + error(localize("Length offset out of range.")); + return; + } + + gMotionModal.reset(); + writeBlock(gPlaneModal.format(17)); + + // cancel compensation prior to enabling it, required when switching G43/G43.4 modes + disableLengthCompensation(false); + + // assumes a Head configuration uses TCP on a Fanuc controller + var offsetCode = 43; + if (currentSection.isMultiAxis()) { + if (machineConfiguration.isMultiAxisConfiguration() && (currentSection.getOptimizedTCPMode() == 0)) { + offsetCode = 43.4; + } else if (!machineConfiguration.isMultiAxisConfiguration()) { + offsetCode = 43.5; + } + } + + if (!machineConfiguration.isHeadConfiguration()) { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y) + ); + writeBlock( + gMotionModal.format(0), + gFormat.format(offsetCode), + zOutput.format(initialPosition.z), + hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + gFormat.format(offsetCode), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y), + zOutput.format(initialPosition.z), hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } + + gMotionModal.reset(); + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y) + ); + } + + validate(lengthCompensationActive, "Length compensation is not active."); + + if (properties.useParametricFeed && + hasParameter("operation-strategy") && + (getParameter("operation-strategy") != "drill") && // legacy + !(currentSection.hasAnyCycle && currentSection.hasAnyCycle())) { + if (!insertToolCall && + activeMovements && + (getCurrentSectionId() > 0) && + ((getPreviousSection().getPatternId() == currentSection.getPatternId()) && (currentSection.getPatternId() != 0))) { + // use the current feeds + } else { + initializeActiveFeeds(); + } + } else { + activeMovements = undefined; + } + + if (isProbeOperation()) { + if (g68RotationMode != 0) { + error(localize("You cannot probe while G68 Rotation is in effect.")); + return; + } + angularProbingMode = getAngularProbingMode(); + writeBlock(gFormat.format(65), "P" + 9832); // spin the probe on + } + + retracted = false; +} + +function onDwell(seconds) { + if (seconds > 99999.999) { + warning(localize("Dwelling time is out of range.")); + } + milliseconds = clamp(1, seconds * 1000, 99999999); + writeBlock(gFeedModeModal.format(94), gFormat.format(4), "P" + milliFormat.format(milliseconds)); + writeBlock(gFeedModeModal.format(properties.useG95 ? 95 : 94)); // back to G95 +} + +function onSpindleSpeed(spindleSpeed) { + writeBlock(sOutput.format(spindleSpeed)); +} + +function onCycle() { + writeBlock(gPlaneModal.format(17)); +} + +function getCommonCycle(x, y, z, r) { + forceXYZ(); // force xyz on first drill hole of any cycle + return [xOutput.format(x), yOutput.format(y), + zOutput.format(z), + "R" + xyzFormat.format(r)]; +} + +/** Convert approach to sign. */ +function approach(value) { + validate((value == "positive") || (value == "negative"), "Invalid approach."); + return (value == "positive") ? 1 : -1; +} + +/** + Determine if angular probing is supported +*/ +function getAngularProbingMode() { + if (machineConfiguration.isMultiAxisConfiguration()) { + if (machineConfiguration.isMachineCoordinate(2)) { + return ANGLE_PROBE_USE_CAXIS; + } else { + return ANGLE_PROBE_NOT_SUPPORTED; + } + } else { + return ANGLE_PROBE_USE_ROTATION; + } +} + +/** + Output rotation offset based on angular probing cycle. +*/ +function setProbingAngle() { + if ((g68RotationMode == 1) || (g68RotationMode == 2)) { // Rotate coordinate system for Angle Probing + if (!properties.useG54x4) { + gRotationModal.reset(); + gAbsIncModal.reset(); + writeBlock( + gRotationModal.format(68), gAbsIncModal.format(90), + (g68RotationMode == 1) ? "X0" : "X[#135]", + (g68RotationMode == 1) ? "Y0" : "Y[#136]", + "Z0", "I0.0", "J0.0", "K1.0", "R[#139]" + ); + g68RotationMode = 3; + } else if (angularProbingMode != ANGLE_PROBE_NOT_SUPPORTED) { + writeBlock("#26010=#135"); + writeBlock("#26011=#136"); + writeBlock("#26012=#137"); + writeBlock("#26015=#139"); + writeBlock(gFormat.format(54.4), "P1"); + g68RotationMode = 0; + } else { + error(localize("Angular probing is not supported for this machine configuration.")); + return; + } + } +} + +function protectedProbeMove(_cycle, x, y, z) { + var _x = xOutput.format(x); + var _y = yOutput.format(y); + var _z = zOutput.format(z); + if (_z && z >= getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } + if (_x || _y) { + writeBlock(gFormat.format(65), "P" + 9810, _x, _y, getFeed(highFeedrate)); // protected positioning move + } + if (_z && z < getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } +} + +function onCyclePoint(x, y, z) { + if (!isSameDirection(getRotation().forward, new Vector(0, 0, 1))) { + expandCyclePoint(x, y, z); + return; + } + var probeWorkOffsetCode; + if (isProbeOperation()) { + protectedProbeMove(cycle, x, y, z); + var workOffset = probeOutputWorkOffset ? probeOutputWorkOffset : currentWorkOffset; + if (workOffset > 99) { + error(localize("Work offset is out of range.")); + return; + } else if (workOffset > 6) { + probeWorkOffsetCode = probe100Format.format(workOffset - 6 + 100); + } else { + probeWorkOffsetCode = workOffset + "."; // G54->G59 + } + } + + if (isFirstCyclePoint() || isProbeOperation()) { + if (!isProbeOperation()) { + // return to initial Z which is clearance plane and set absolute mode + repositionToCycleClearance(cycle, x, y, z); + } + + var F = cycle.feedrate; + if (properties.useG95) { + F /= spindleSpeed; + } + var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds + + switch (cycleType) { + case "drilling": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + break; + case "counter-boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(82), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "chip-breaking": + if ((cycle.accumulatedDepth < cycle.depth) || (P > 0)) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(73), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + break; + case "deep-drilling": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(83), + getCommonCycle(x, y, z, cycle.retract), + peckOutput.format(cycle.incrementalDepth), + // conditional(P > 0, "P" + milliFormat.format(P)), + feedOutput.format(F) + ); + } + break; + case "tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "left-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(90), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "right-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(90), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "tapping-with-chip-breaking": + case "left-tapping-with-chip-breaking": + case "right-tapping-with-chip-breaking": + if (cycle.accumulatedDepth < cycle.depth) { + error(localize("Accumulated pecking depth is not supported for tapping cycles with chip breaking.")); + return; + } else { + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gAbsIncModal.format(90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + } + break; + case "fine-boring": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(76), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + "Q" + xyzFormat.format(cycle.shift), + feedOutput.format(F) + ); + break; + case "back-boring": + var dx = (gPlaneModal.getCurrent() == 19) ? cycle.backBoreDistance : 0; + var dy = (gPlaneModal.getCurrent() == 18) ? cycle.backBoreDistance : 0; + var dz = (gPlaneModal.getCurrent() == 17) ? cycle.backBoreDistance : 0; + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(87), + getCommonCycle(x - dx, y - dy, z - dz, cycle.bottom), + "Q" + xyzFormat.format(cycle.shift), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "reaming": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "stop-boring": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(86), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + case "manual-boring": + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(88), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gAbsIncModal.format(90), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract), + feedOutput.format(F) + ); + } + break; + + case "probing-x": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + "X" + xyzFormat.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + "Y" + xyzFormat.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-z": + protectedProbeMove(cycle, x, y, Math.min(z - cycle.depth + cycle.probeClearance, cycle.retract)); + writeBlock( + gFormat.format(65), "P" + 9811, + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "Z" + xyzFormat.format(z - cycle.depth), + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + + case "probing-xy-inner-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9815, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-xy-outer-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9816, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-x-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + "X" + xyzFormat.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + case "probing-y-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + "Y" + xyzFormat.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + default: + expandCyclePoint(x, y, z); + } + } else { + if (cycleExpanded) { + expandCyclePoint(x, y, z); + } else { + writeBlock(xOutput.format(x), yOutput.format(y)); + } + } +} + +function getProbingArguments(cycle, probeWorkOffsetCode) { + var probeWCS = hasParameter("operation-strategy") && (getParameter("operation-strategy") == "probe"); + return [ + (cycle.angleAskewAction == "stop-message" ? "B" + xyzFormat.format(cycle.toleranceAngle ? cycle.toleranceAngle : 0) : undefined), + ((cycle.updateToolWear && cycle.toolWearErrorCorrection < 100) ? "F" + xyzFormat.format(cycle.toolWearErrorCorrection ? cycle.toolWearErrorCorrection / 100 : 100) : undefined), + (cycle.wrongSizeAction == "stop-message" ? "H" + xyzFormat.format(cycle.toleranceSize ? cycle.toleranceSize : 0) : undefined), + (cycle.outOfPositionAction == "stop-message" ? "M" + xyzFormat.format(cycle.tolerancePosition ? cycle.tolerancePosition : 0) : undefined), + ((cycle.updateToolWear && cycleType == "probing-z") ? "T" + xyzFormat.format(cycle.toolLengthOffset) : undefined), + ((cycle.updateToolWear && cycleType !== "probing-z") ? "T" + xyzFormat.format(cycle.toolDiameterOffset) : undefined), + (cycle.updateToolWear ? "V" + xyzFormat.format(cycle.toolWearUpdateThreshold ? cycle.toolWearUpdateThreshold : 0) : undefined), + (cycle.printResults ? "W" + xyzFormat.format(1 + cycle.incrementComponent) : undefined), // 1 for advance feature, 2 for reset feature count and advance component number. first reported result in a program should use W2. + conditional(probeWorkOffsetCode && probeWCS, "S" + probeWorkOffsetCode) + ]; +} + +function onCycleEnd() { + if (isProbeOperation()) { + zOutput.reset(); + gMotionModal.reset(); + writeBlock(gFormat.format(65), "P" + 9810, zOutput.format(cycle.retract)); // protected retract move + } else if (!cycleExpanded) { + writeBlock(conditional(!properties.useG95, gFeedModeModal.format(94)), gCycleModal.format(80)); + zOutput.reset(); + } +} + +var pendingRadiusCompensation = -1; + +function onRadiusCompensation() { + pendingRadiusCompensation = radiusCompensation; +} + +function onRapid(_x, _y, _z) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + writeBlock(gMotionModal.format(0), x, y, z); + forceFeed(); + } +} + +function onLinear(_x, _y, _z, feed) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var f = getFeed(feed); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + pendingRadiusCompensation = -1; + var d = tool.diameterOffset; + if (d > 99) { + warning(localize("The diameter offset exceeds the maximum value.")); + } + writeBlock(gPlaneModal.format(17)); + switch (radiusCompensation) { + case RADIUS_COMPENSATION_LEFT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, dOutput.format(d), f); + break; + case RADIUS_COMPENSATION_RIGHT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(42), x, y, z, dOutput.format(d), f); + break; + default: + writeBlock(gMotionModal.format(1), gFormat.format(40), x, y, z, f); + } + } else { + writeBlock(gMotionModal.format(1), x, y, z, f); + } + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } +} + +function onRapid5D(_x, _y, _z, _a, _b, _c) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, a, b, c); + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, "I" + i, "J" + j, "K" + k); + } + forceFeed(); +} + +function onLinear5D(_x, _y, _z, _a, _b, _c, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for 5-axis move.")); + return; + } + + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + var f = getFeed(feed); + if (x || y || z || a || b || c) { + writeBlock(gMotionModal.format(1), x, y, z, a, b, c, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + var f = getFeed(feed); + if (x || y || z || i || j || k) { + writeBlock(gMotionModal.format(1), x, y, z, "I" + i, "J" + j, "K" + k, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } +} + +function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for a circular move.")); + return; + } + + var start = getCurrentPosition(); + + if (isFullCircle()) { + if (properties.useRadius || isHelical()) { // radius mode does not support full arcs + linearize(tolerance); + return; + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } else if (!properties.useRadius) { + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gAbsIncModal.format(90), gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } else { // use radius mode + var r = getCircularRadius(); + if (toDeg(getCircularSweep()) > (180 + 1e-9)) { + r = -r; // allow up to <360 deg arcs + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gAbsIncModal.format(90), gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } +} + +var currentCoolantMode = COOLANT_OFF; + +function setCoolant(coolant) { + if (isProbeOperation()) { // avoid coolant output for probing + coolant = COOLANT_OFF; + } + + if (coolant == currentCoolantMode) { + return; // coolant is already active + } + + if (coolant == COOLANT_OFF) { + writeBlock(mFormat.format((currentCoolantMode == COOLANT_THROUGH_TOOL) ? 89 : 9)); + currentCoolantMode = COOLANT_OFF; + return; + } + + var m; + switch (coolant) { + case COOLANT_FLOOD: + m = 8; + break; + case COOLANT_THROUGH_TOOL: + m = 88; + break; + default: + onUnsupportedCoolant(coolant); + m = 9; + } + + if (m) { + writeBlock(mFormat.format(m)); + currentCoolantMode = coolant; + } +} + +var mapCommand = { + COMMAND_STOP:0, + COMMAND_OPTIONAL_STOP:1, + COMMAND_END:2, + COMMAND_SPINDLE_CLOCKWISE:3, + COMMAND_SPINDLE_COUNTERCLOCKWISE:4, + COMMAND_STOP_SPINDLE:5, + COMMAND_ORIENTATE_SPINDLE:19 +}; + +function onCommand(command) { + switch (command) { + case COMMAND_COOLANT_OFF: + setCoolant(COOLANT_OFF); + return; + case COMMAND_COOLANT_ON: + setCoolant(COOLANT_FLOOD); + return; + case COMMAND_STOP: + writeBlock(mFormat.format(0)); + forceSpindleSpeed = true; + return; + case COMMAND_START_SPINDLE: + onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE); + return; + case COMMAND_LOCK_MULTI_AXIS: + return; + case COMMAND_UNLOCK_MULTI_AXIS: + return; + case COMMAND_START_CHIP_TRANSPORT: + return; + case COMMAND_STOP_CHIP_TRANSPORT: + return; + case COMMAND_BREAK_CONTROL: + return; + case COMMAND_TOOL_MEASURE: + return; + } + + var stringId = getCommandStringId(command); + var mcode = mapCommand[stringId]; + if (mcode != undefined) { + writeBlock(mFormat.format(mcode)); + } else { + onUnsupportedCommand(command); + } +} + +function onSectionEnd() { + writeBlock(gPlaneModal.format(17)); + + if (((getCurrentSectionId() + 1) >= getNumberOfSections()) || + (tool.number != getNextSection().getTool().number)) { + onCommand(COMMAND_BREAK_CONTROL); + } + if (isProbeOperation()) { + writeBlock(gFormat.format(65), "P" + 9833); // spin the probe off + setProbingAngle(); // define rotation of part + } + if (isRedirecting()) { + writeBlock(mFormat.format(99)); // end subprogram + if (properties.useFilesForSubprograms) { + writeln("%"); + } + subprograms += getRedirectionBuffer(); + closeRedirection(); + sequenceNumber = previousSequenceNumber; + } + forceAny(); +} + +function onClose() { + writeln(""); + optionalSection = false; + + onCommand(COMMAND_COOLANT_OFF); + + writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(0)); // retract + retracted = true; + + disableLengthCompensation(true); + setSmoothing(false); + zOutput.reset(); + + setWorkPlane(new Vector(0, 0, 0)); // reset working plane + + if (properties.useG54x4) { + writeBlock(gFormat.format(54.4), "P0"); + } + + if (!machineConfiguration.hasHomePositionX() && !machineConfiguration.hasHomePositionY()) { + // 90/91 mode is don't care + writeBlock(gFormat.format(28), gAbsIncModal.format(91), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0)); // return to home + } else { + var homeX; + if (machineConfiguration.hasHomePositionX()) { + homeX = "X" + xyzFormat.format(machineConfiguration.getHomePositionX()); + } + var homeY; + if (machineConfiguration.hasHomePositionY()) { + homeY = "Y" + xyzFormat.format(machineConfiguration.getHomePositionY()); + } + writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), homeX, homeY); + } + + onImpliedCommand(COMMAND_END); + onImpliedCommand(COMMAND_STOP_SPINDLE); + writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off + write(subprograms); + writeln("%"); +} diff --git a/resources/workshop/.inc/saturn/mc/fanuc2/fanuc.cps b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc.cps new file mode 100644 index 000000000..89f1cb4d0 --- /dev/null +++ b/resources/workshop/.inc/saturn/mc/fanuc2/fanuc.cps @@ -0,0 +1,2599 @@ +/** + Copyright (C) 2012-2019 by Autodesk, Inc. + All rights reserved. + + FANUC post processor configuration. + + $Revision: 42622 c34293f826e4bfeffedc4842dce8aafb1fb3293e $ + $Date: 2020-01-09 08:05:53 $ + + FORKID {04622D27-72F0-45d4-85FB-DB346FD1AE22} +*/ + +description = "FANUC"; +vendor = "Fanuc"; +vendorUrl = "http://www.fanuc.com"; +legal = "Copyright (C) 2012-2019 by Autodesk, Inc."; +certificationLevel = 2; +minimumRevision = 40783; + +longDescription = "Generic post for Fanuc."; + +extension = "nc"; +programNameIsInteger = true; +setCodePage("ascii"); + +capabilities = CAPABILITY_MILLING; +tolerance = spatial(0.002, MM); + +minimumChordLength = spatial(0.25, MM); +minimumCircularRadius = spatial(0.01, MM); +maximumCircularRadius = spatial(1000, MM); +minimumCircularSweep = toRad(0.01); +maximumCircularSweep = toRad(180); +allowHelicalMoves = true; +allowedCircularPlanes = undefined; // allow any circular motion +highFeedrate = (unit == IN) ? 500 : 5000; + +// user-defined properties +properties = { + writeMachine: true, // write machine + writeTools: true, // writes the tools + preloadTool: true, // preloads next tool on tool change if any + showSequenceNumbers: true, // show sequence numbers + sequenceNumberStart: 10, // first sequence number + sequenceNumberIncrement: 5, // increment for sequence numbers + optionalStop: true, // optional stop + o8: false, // specifies 8-digit program number + separateWordsWithSpace: true, // specifies that the words should be separated with a white space + allow3DArcs: false, // specifies that 3D circular arcs are allowed + useRadius: false, // specifies that arcs should be output using the radius (R word) instead of the I, J, and K words + forceIJK: false, // force output of IJK for G2/G3 when not using R word + useParametricFeed: false, // specifies that feed should be output using Q values + showNotes: false, // specifies that operation notes should be output + useSmoothing: false, // specifies if smoothing should be used or not + usePitchForTapping: false, // enable to use pitch instead of feed for the F-word for canned tapping cycles - note that your CNC control must be setup for pitch mode! + useG95: false, // use IPR/MPR instead of IPM/MPM + useG28: true, // specifies that G28 should be used instead of G53 + useG54x4: false, // Fanuc 30i supports G54.4 for Workpiece Error Compensation + useSubroutines: false, // specifies that subroutines per each operation should be generated + useSubroutinePatterns: false, // generates subroutines for patterned operation + useSubroutineCycles: false, // generates subroutines for cycle operations on same holes + useRigidTapping: "yes" // output rigid tapping block +}; + +// user-defined property definitions +propertyDefinitions = { + writeMachine: {title:"Write machine", description:"Output the machine settings in the header of the code.", group:0, type:"boolean"}, + writeTools: {title:"Write tool list", description:"Output a tool list in the header of the code.", group:0, type:"boolean"}, + preloadTool: {title:"Preload tool", description:"Preloads the next tool at a tool change (if any).", group:1, type:"boolean"}, + showSequenceNumbers: {title:"Use sequence numbers", description:"Use sequence numbers for each block of outputted code.", group:1, type:"boolean"}, + sequenceNumberStart: {title:"Start sequence number", description:"The number at which to start the sequence numbers.", group:1, type:"integer"}, + sequenceNumberIncrement: {title:"Sequence number increment", description:"The amount by which the sequence number is incremented by in each block.", group:1, type:"integer"}, + optionalStop: {title:"Optional stop", description:"Outputs optional stop code during when necessary in the code.", type:"boolean"}, + o8: {title:"8 Digit program number", description:"Specifies that an 8 digit program number is needed.", type:"boolean"}, + separateWordsWithSpace: {title:"Separate words with space", description:"Adds spaces between words if 'yes' is selected.", type:"boolean"}, + allow3DArcs: {title:"Allow 3D arcs", description:"Specifies whether 3D circular arcs are allowed.", type:"boolean"}, + useRadius: {title:"Radius arcs", description:"If yes is selected, arcs are outputted using radius values rather than IJK.", type:"boolean"}, + forceIJK: {title:"Force IJK", description:"Force the output of IJK for G2/G3 when not using R mode.", type:"boolean"}, + useParametricFeed: {title:"Parametric feed", description:"Specifies the feed value that should be output using a Q value.", type:"boolean"}, + showNotes: {title:"Show notes", description:"Writes operation notes as comments in the outputted code.", type:"boolean"}, + useSmoothing: {title:"Use smoothing", description:"Specifies if smoothing should be used or not.", type:"boolean"}, + usePitchForTapping: {title:"Use pitch for tapping", description:"Enables the use of pitch instead of feed for the F-word in canned tapping cycles. Your CNC control must be setup for pitch mode!", type:"boolean"}, + useG95: {title:"Use G95", description:"Use IPR/MPR instead of IPM/MPM.", type:"boolean"}, + useG54x4: {title:"Use G54.4", description:"Fanuc 30i supports G54.4 for workpiece error compensation.", type:"boolean"}, + useSubroutines: {title:"Use subroutines", description:"Specifies that subroutines per each operation should be generated.", type:"boolean"}, + useSubroutinePatterns: {title:"Use subroutine patterns", description:"Generates subroutines for patterned operation.", type:"boolean"}, + useSubroutineCycles: {title: "Use subroutine cycles", description: "Generates subroutines for cycle operations on same holes.", type: "boolean"}, + useG28: {title: "G28 Safe retracts", description: "Disable to use G53 instead of G28 for retracts.", type: "boolean"}, + useRigidTapping: { + title: "Use rigid tapping", + description: "Select 'Yes' to enable, 'No' to disable, or 'Without spindle direction' to enable rigid tapping without outputting the spindle direction block.", + type: "enum", + values:[ + {title:"Yes", id:"yes"}, + {title:"No", id:"no"}, + {title:"Without spindle direction", id:"without"} + ] + } +}; + +var singleLineCoolant = false; // specifies to output multiple coolant codes in one line rather than in separate lines +// samples: +// {id: COOLANT_THROUGH_TOOL, on: 88, off: 89} +// {id: COOLANT_THROUGH_TOOL, on: [8, 88], off: [9, 89]} +var coolants = [ + {id: COOLANT_FLOOD, on: 8}, + {id: COOLANT_MIST}, + {id: COOLANT_THROUGH_TOOL, on: 88, off: 89}, + {id: COOLANT_AIR}, + {id: COOLANT_AIR_THROUGH_TOOL}, + {id: COOLANT_SUCTION}, + {id: COOLANT_FLOOD_MIST}, + {id: COOLANT_FLOOD_THROUGH_TOOL, on: [8, 88], off: [9, 89]}, + {id: COOLANT_OFF, off: 9} +]; + +var permittedCommentChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,=_-"; + +var gFormat = createFormat({prefix:"G", width:2, zeropad:true, decimals:1}); +var mFormat = createFormat({prefix:"M", width:2, zeropad:true, decimals:1}); +var hFormat = createFormat({prefix:"H", width:2, zeropad:true, decimals:1}); +var dFormat = createFormat({prefix:"D", width:2, zeropad:true, decimals:1}); +var probe100Format = createFormat({decimals:3, zeropad:true, width:3, forceDecimal:true}); + +var xyzFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var ijkFormat = createFormat({decimals:6, forceDecimal:true}); // unitless +var rFormat = xyzFormat; // radius +var abcFormat = createFormat({decimals:3, forceDecimal:true, scale:DEG}); +var feedFormat = createFormat({decimals:(unit == MM ? 0 : 1), forceDecimal:true}); +var pitchFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +var toolFormat = createFormat({decimals:0}); +var rpmFormat = createFormat({decimals:0}); +var secFormat = createFormat({decimals:3, forceDecimal:true}); // seconds - range 0.001-99999.999 +var milliFormat = createFormat({decimals:0}); // milliseconds // range 1-9999 +var taperFormat = createFormat({decimals:1, scale:DEG}); +var oFormat = createFormat({width:4, zeropad:true, decimals:0}); +var peckFormat = createFormat({decimals:(unit == MM ? 3 : 4), forceDecimal:true}); +// var peckFormat = createFormat({decimals:0, forceDecimal:false, trim:false, width:4, zeropad:true, scale:(unit == MM ? 1000 : 10000)}); + +var xOutput = createVariable({prefix:"X"}, xyzFormat); +var yOutput = createVariable({prefix:"Y"}, xyzFormat); +var zOutput = createVariable({onchange: function() {retracted = false;}, prefix:"Z"}, xyzFormat); +var aOutput = createVariable({prefix:"A"}, abcFormat); +var bOutput = createVariable({prefix:"B"}, abcFormat); +var cOutput = createVariable({prefix:"C"}, abcFormat); +var feedOutput = createVariable({prefix:"F"}, feedFormat); +var pitchOutput = createVariable({prefix:"F", force:true}, pitchFormat); +var sOutput = createVariable({prefix:"S", force:true}, rpmFormat); +var dOutput = createVariable({}, dFormat); +var peckOutput = createVariable({prefix:"Q", force:true}, peckFormat); + +// circular output +var iOutput = createReferenceVariable({prefix:"I"}, xyzFormat); +var jOutput = createReferenceVariable({prefix:"J"}, xyzFormat); +var kOutput = createReferenceVariable({prefix:"K"}, xyzFormat); + +var gMotionModal = createModal({}, gFormat); // modal group 1 // G0-G3, ... +var gPlaneModal = createModal({onchange:function () {gMotionModal.reset();}}, gFormat); // modal group 2 // G17-19 +var gAbsIncModal = createModal({}, gFormat); // modal group 3 // G90-91 +var gFeedModeModal = createModal({}, gFormat); // modal group 5 // G94-95 +var gUnitModal = createModal({}, gFormat); // modal group 6 // G20-21 +var gCycleModal = createModal({}, gFormat); // modal group 9 // G81, ... +var gRetractModal = createModal({}, gFormat); // modal group 10 // G98-99 +var gRotationModal = createModal({}, gFormat); // modal group 16 // G68-G69 + +// fixed settings +var firstFeedParameter = 500; +var useMultiAxisFeatures = true; +var forceMultiAxisIndexing = false; // force multi-axis indexing for 3D programs +var maximumLineLength = 80; // the maximum number of charaters allowed in a line +var minimumCyclePoints = 5; // minimum number of points in cycle operation to consider for subprogram +var cancelTiltFirst = false; // cancel G68.2 with G69 prior to G54-G59 WCS block +var useABCPrepositioning = false; // position ABC axes prior to G68.2 block + +var WARNING_WORK_OFFSET = 0; + +var ANGLE_PROBE_NOT_SUPPORTED = 0; +var ANGLE_PROBE_USE_ROTATION = 1; +var ANGLE_PROBE_USE_CAXIS = 2; + +var SUB_UNKNOWN = 0; +var SUB_PATTERN = 1; +var SUB_CYCLE = 2; + +// collected state +var sequenceNumber; +var currentWorkOffset; +var optionalSection = false; +var forceSpindleSpeed = false; +var activeMovements; // do not use by default +var currentFeedId; +var g68RotationMode = 0; +var angularProbingMode; +var subprograms = []; +var currentPattern = -1; +var firstPattern = false; +var currentSubprogram; +var lastSubprogram; +var definedPatterns = new Array(); +var incrementalMode = false; +var saveShowSequenceNumbers; +var cycleSubprogramIsActive = false; +var patternIsActive = false; +var lastOperationComment = ""; +var incrementalSubprogram; +probeMultipleFeatures = true; + +/** + Writes the specified block. +*/ +function writeBlock() { + var text = formatWords(arguments); + if (!text) { + return; + } + if (properties.showSequenceNumbers) { + if (optionalSection) { + if (text) { + writeWords("/", "N" + sequenceNumber, text); + } + } else { + writeWords2("N" + sequenceNumber, arguments); + } + sequenceNumber += properties.sequenceNumberIncrement; + } else { + if (optionalSection) { + writeWords2("/", arguments); + } else { + writeWords(arguments); + } + } +} + +/** + Writes the specified optional block. +*/ +function writeOptionalBlock() { + if (properties.showSequenceNumbers) { + var words = formatWords(arguments); + if (words) { + writeWords("/", "N" + sequenceNumber, words); + sequenceNumber += properties.sequenceNumberIncrement; + } + } else { + writeWords2("/", arguments); + } +} + +function formatComment(text) { + return "(" + filterText(String(text).toUpperCase(), permittedCommentChars).replace(/[()]/g, "") + ")"; +} + +/** + Output a comment. +*/ +function writeComment(text) { + writeln(formatComment(text)); +} + +function onOpen() { + if (properties.useRadius) { + maximumCircularSweep = toRad(90); // avoid potential center calculation errors for CNC + } + gRotationModal.format(69); // Default to G69 Rotation Off + + if (false) { // note: setup your machine here + var aAxis = createAxis({coordinate:0, table:false, axis:[1, 0, 0], range:[-360, 360], preference:1}); + var cAxis = createAxis({coordinate:2, table:false, axis:[0, 0, 1], range:[-360, 360], preference:1}); + machineConfiguration = new MachineConfiguration(aAxis, cAxis); + + setMachineConfiguration(machineConfiguration); + optimizeMachineAngles2(0); // TCP mode + } + + if (!machineConfiguration.isMachineCoordinate(0)) { + aOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(1)) { + bOutput.disable(); + } + if (!machineConfiguration.isMachineCoordinate(2)) { + cOutput.disable(); + } + + if (!properties.separateWordsWithSpace) { + setWordSeparator(""); + } + + if (properties.forceIJK) { + iOutput = createReferenceVariable({prefix:"I", force:true}, xyzFormat); + jOutput = createReferenceVariable({prefix:"J", force:true}, xyzFormat); + kOutput = createReferenceVariable({prefix:"K", force:true}, xyzFormat); + } + + sequenceNumber = properties.sequenceNumberStart; + writeln("%"); + + if (programName) { + var programId; + try { + programId = getAsInt(programName); + } catch (e) { + error(localize("Program name must be a number.")); + return; + } + if (properties.o8) { + if (!((programId >= 1) && (programId <= 99999999))) { + error(localize("Program number is out of range.")); + return; + } + } else { + if (!((programId >= 1) && (programId <= 9999))) { + error(localize("Program number is out of range.")); + return; + } + } + if ((programId >= 8000) && (programId <= 9999)) { + warning(localize("Program number is reserved by tool builder.")); + } + oFormat = createFormat({width:(properties.o8 ? 8 : 4), zeropad:true, decimals:0}); + if (programComment) { + writeln("O" + oFormat.format(programId) + " (" + filterText(String(programComment).toUpperCase(), permittedCommentChars) + ")"); + } else { + writeln("O" + oFormat.format(programId)); + } + lastSubprogram = programId; + } else { + error(localize("Program name has not been specified.")); + return; + } + + // dump machine configuration + var vendor = machineConfiguration.getVendor(); + var model = machineConfiguration.getModel(); + var description = machineConfiguration.getDescription(); + + if (properties.writeMachine && (vendor || model || description)) { + writeComment(localize("Machine")); + if (vendor) { + writeComment(" " + localize("vendor") + ": " + vendor); + } + if (model) { + writeComment(" " + localize("model") + ": " + model); + } + if (description) { + writeComment(" " + localize("description") + ": " + description); + } + } + + //Probing Surface Inspection + if (typeof inspectionWriteVariables == "function") { + inspectionWriteVariables(); + } + + // dump tool information + if (properties.writeTools) { + var zRanges = {}; + if (is3D()) { + var numberOfSections = getNumberOfSections(); + for (var i = 0; i < numberOfSections; ++i) { + var section = getSection(i); + var zRange = section.getGlobalZRange(); + var tool = section.getTool(); + if (zRanges[tool.number]) { + zRanges[tool.number].expandToRange(zRange); + } else { + zRanges[tool.number] = zRange; + } + } + } + + var tools = getToolTable(); + if (tools.getNumberOfTools() > 0) { + for (var i = 0; i < tools.getNumberOfTools(); ++i) { + var tool = tools.getTool(i); + var comment = "T" + toolFormat.format(tool.number) + " " + + "D=" + xyzFormat.format(tool.diameter) + " " + + localize("CR") + "=" + xyzFormat.format(tool.cornerRadius); + if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) { + comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg"); + } + if (zRanges[tool.number]) { + comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum()); + } + comment += " - " + getToolTypeName(tool.type); + writeComment(comment); + } + } + } + + if (false) { + // check for duplicate tool number + for (var i = 0; i < getNumberOfSections(); ++i) { + var sectioni = getSection(i); + var tooli = sectioni.getTool(); + for (var j = i + 1; j < getNumberOfSections(); ++j) { + var sectionj = getSection(j); + var toolj = sectionj.getTool(); + if (tooli.number == toolj.number) { + if (xyzFormat.areDifferent(tooli.diameter, toolj.diameter) || + xyzFormat.areDifferent(tooli.cornerRadius, toolj.cornerRadius) || + abcFormat.areDifferent(tooli.taperAngle, toolj.taperAngle) || + (tooli.numberOfFlutes != toolj.numberOfFlutes)) { + error( + subst( + localize("Using the same tool number for different cutter geometry for operation '%1' and '%2'."), + sectioni.hasParameter("operation-comment") ? sectioni.getParameter("operation-comment") : ("#" + (i + 1)), + sectionj.hasParameter("operation-comment") ? sectionj.getParameter("operation-comment") : ("#" + (j + 1)) + ) + ); + return; + } + } + } + } + } + + if ((getNumberOfSections() > 0) && (getSection(0).workOffset == 0)) { + for (var i = 0; i < getNumberOfSections(); ++i) { + if (getSection(i).workOffset > 0) { + error(localize("Using multiple work offsets is not possible if the initial work offset is 0.")); + return; + } + } + } + + // absolute coordinates and feed per min + writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(properties.useG95 ? 95 : 94), gPlaneModal.format(17), gFormat.format(49), gFormat.format(40), gFormat.format(80)); + + switch (unit) { + case IN: + writeBlock(gUnitModal.format(20)); + break; + case MM: + writeBlock(gUnitModal.format(21)); + break; + } + + if (properties.useG95 && properties.useParametricFeed) { + error(localize("Parametric feed is not supported when using G95.")); + return; + } + + if (properties.useG95) { + feedFormat = createFormat({decimals:(unit == MM ? 4 : 5), forceDecimal:true}); + feedOutput = createVariable({prefix:"F"}, feedFormat); + } +} + +function onComment(message) { + var comments = String(message).split(";"); + for (comment in comments) { + writeComment(comments[comment]); + } +} + +/** Force output of X, Y, and Z. */ +function forceXYZ() { + xOutput.reset(); + yOutput.reset(); + zOutput.reset(); +} + +/** Force output of A, B, and C. */ +function forceABC() { + aOutput.reset(); + bOutput.reset(); + cOutput.reset(); +} + +function forceFeed() { + currentFeedId = undefined; + feedOutput.reset(); +} + +/** Force output of X, Y, Z, A, B, C, and F on next output. */ +function forceAny() { + forceXYZ(); + forceABC(); + forceFeed(); +} + +var lengthCompensationActive = false; +var retracted = false; // specifies that the tool has been retracted to the safe plane + +/** Disables length compensation if currently active or if forced. */ +function disableLengthCompensation(force) { + if (lengthCompensationActive || force) { + validate(retracted, "Cannot cancel length compensation if the machine is not fully retracted."); + writeBlock(gFormat.format(49)); + lengthCompensationActive = false; + } +} + +var currentSmoothing = false; + +function setSmoothing(mode) { + if (mode == currentSmoothing) { + return false; + } + + // 1) Make sure G49 is called before the execution of G05.1 Q1 Rx + // 2) G05.1 Q1 Rx must be engaged BEFORE G43-Tool Length Comp + // 3) AICC and AIAPC need to be turned on and off for each tool + // 4) AICC and AIAPC does not apply to canned drilling cycles + validate(!lengthCompensationActive, "Length compensation is active while trying to update smoothing."); + + currentSmoothing = mode; + writeBlock(gFormat.format(5.1), mode ? "Q1" : "Q0"); + return true; +} + +function FeedContext(id, description, feed) { + this.id = id; + this.description = description; + this.feed = feed; +} + +function getFeed(f) { + if (properties.useG95) { + return feedOutput.format(f / spindleSpeed); // use feed value + } + if (activeMovements) { + var feedContext = activeMovements[movement]; + if (feedContext != undefined) { + if (!feedFormat.areDifferent(feedContext.feed, f)) { + if (feedContext.id == currentFeedId) { + return ""; // nothing has changed + } + forceFeed(); + currentFeedId = feedContext.id; + return "F#" + (firstFeedParameter + feedContext.id); + } + } + currentFeedId = undefined; // force Q feed next time + } + return feedOutput.format(f); // use feed value +} + +function initializeActiveFeeds() { + activeMovements = new Array(); + var movements = currentSection.getMovements(); + + var id = 0; + var activeFeeds = new Array(); + if (hasParameter("operation:tool_feedCutting")) { + if (movements & ((1 << MOVEMENT_CUTTING) | (1 << MOVEMENT_LINK_TRANSITION) | (1 << MOVEMENT_EXTENDED))) { + var feedContext = new FeedContext(id, localize("Cutting"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_CUTTING] = feedContext; + activeMovements[MOVEMENT_LINK_TRANSITION] = feedContext; + activeMovements[MOVEMENT_EXTENDED] = feedContext; + } + ++id; + if (movements & (1 << MOVEMENT_PREDRILL)) { + feedContext = new FeedContext(id, localize("Predrilling"), getParameter("operation:tool_feedCutting")); + activeMovements[MOVEMENT_PREDRILL] = feedContext; + activeFeeds.push(feedContext); + } + ++id; + } + + if (hasParameter("operation:finishFeedrate")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:finishFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting")) { + if (movements & (1 << MOVEMENT_FINISH_CUTTING)) { + var feedContext = new FeedContext(id, localize("Finish"), getParameter("operation:tool_feedCutting")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_FINISH_CUTTING] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedEntry")) { + if (movements & (1 << MOVEMENT_LEAD_IN)) { + var feedContext = new FeedContext(id, localize("Entry"), getParameter("operation:tool_feedEntry")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_IN] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LEAD_OUT)) { + var feedContext = new FeedContext(id, localize("Exit"), getParameter("operation:tool_feedExit")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LEAD_OUT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:noEngagementFeedrate")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), getParameter("operation:noEngagementFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } else if (hasParameter("operation:tool_feedCutting") && + hasParameter("operation:tool_feedEntry") && + hasParameter("operation:tool_feedExit")) { + if (movements & (1 << MOVEMENT_LINK_DIRECT)) { + var feedContext = new FeedContext(id, localize("Direct"), Math.max(getParameter("operation:tool_feedCutting"), getParameter("operation:tool_feedEntry"), getParameter("operation:tool_feedExit"))); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_LINK_DIRECT] = feedContext; + } + ++id; + } + + if (hasParameter("operation:reducedFeedrate")) { + if (movements & (1 << MOVEMENT_REDUCED)) { + var feedContext = new FeedContext(id, localize("Reduced"), getParameter("operation:reducedFeedrate")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_REDUCED] = feedContext; + } + ++id; + } + + if (hasParameter("operation:tool_feedRamp")) { + if (movements & ((1 << MOVEMENT_RAMP) | (1 << MOVEMENT_RAMP_HELIX) | (1 << MOVEMENT_RAMP_PROFILE) | (1 << MOVEMENT_RAMP_ZIG_ZAG))) { + var feedContext = new FeedContext(id, localize("Ramping"), getParameter("operation:tool_feedRamp")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_RAMP] = feedContext; + activeMovements[MOVEMENT_RAMP_HELIX] = feedContext; + activeMovements[MOVEMENT_RAMP_PROFILE] = feedContext; + activeMovements[MOVEMENT_RAMP_ZIG_ZAG] = feedContext; + } + ++id; + } + if (hasParameter("operation:tool_feedPlunge")) { + if (movements & (1 << MOVEMENT_PLUNGE)) { + var feedContext = new FeedContext(id, localize("Plunge"), getParameter("operation:tool_feedPlunge")); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_PLUNGE] = feedContext; + } + ++id; + } + if (true) { // high feed + if (movements & (1 << MOVEMENT_HIGH_FEED)) { + var feedContext = new FeedContext(id, localize("High Feed"), this.highFeedrate); + activeFeeds.push(feedContext); + activeMovements[MOVEMENT_HIGH_FEED] = feedContext; + } + ++id; + } + + for (var i = 0; i < activeFeeds.length; ++i) { + var feedContext = activeFeeds[i]; + writeBlock("#" + (firstFeedParameter + feedContext.id) + "=" + feedFormat.format(feedContext.feed), formatComment(feedContext.description)); + } +} + +var currentWorkPlaneABC = undefined; + +function forceWorkPlane() { + currentWorkPlaneABC = undefined; +} + +function defineWorkPlane(_section, _setWorkPlane) { + var abc = new Vector(0, 0, 0); + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { // use 5-axis indexing for multi-axis mode + // set working plane after datum shift + + if (_section.isMultiAxis()) { + cancelTransformation(); + if (_setWorkPlane) { + forceWorkPlane(); + } + if (machineConfiguration.isMultiAxisConfiguration()) { + abc = _section.getInitialToolAxisABC(); + if (_setWorkPlane) { + if (!retracted) { + writeRetract(Z); + } + onCommand(COMMAND_UNLOCK_MULTI_AXIS); + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z)) + ); + } + } else { + if (_setWorkPlane) { + var d = _section.getGlobalInitialToolAxis(); + // position + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + "I" + xyzFormat.format(d.x), "J" + xyzFormat.format(d.y), "K" + xyzFormat.format(d.z) + ); + } + } + } else { + if (useMultiAxisFeatures) { + var euler = _section.workPlane.getEuler2(EULER_ZXZ_R); + abc = new Vector(euler.x, euler.y, euler.z); + cancelTransformation(); + } else { + abc = getWorkPlaneMachineABC(_section.workPlane, _setWorkPlane, true); + } + if (_setWorkPlane) { + setWorkPlane(abc); + } + } + } else { // pure 3D + var remaining = _section.workPlane; + if (!isSameDirection(remaining.forward, new Vector(0, 0, 1))) { + error(localize("Tool orientation is not supported.")); + return abc; + } + setRotation(remaining); + } + return abc; +} + +function cancelWorkPlane() { + writeBlock(gRotationModal.format(69)); // cancel frame + forceWorkPlane(); +} + +function setWorkPlane(abc) { + if (!forceMultiAxisIndexing && is3D() && !machineConfiguration.isMultiAxisConfiguration()) { + return; // ignore + } + + if (!((currentWorkPlaneABC == undefined) || + abcFormat.areDifferent(abc.x, currentWorkPlaneABC.x) || + abcFormat.areDifferent(abc.y, currentWorkPlaneABC.y) || + abcFormat.areDifferent(abc.z, currentWorkPlaneABC.z))) { + return; // no change + } + + onCommand(COMMAND_UNLOCK_MULTI_AXIS); + if (!retracted) { + writeRetract(Z); + } + + if (useMultiAxisFeatures) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + if (machineConfiguration.isMultiAxisConfiguration() && useABCPrepositioning) { + var angles = abc.isNonZero() ? getWorkPlaneMachineABC(currentSection.workPlane, false) : abc; + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(angles.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(angles.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(angles.z)) + ); + } + if (abc.isNonZero()) { + gRotationModal.reset(); + writeBlock(gRotationModal.format(68.2), "X" + xyzFormat.format(0), "Y" + xyzFormat.format(0), "Z" + xyzFormat.format(0), "I" + abcFormat.format(abc.x), "J" + abcFormat.format(abc.y), "K" + abcFormat.format(abc.z)); // set frame + writeBlock(gFormat.format(53.1)); // turn machine + } else { + if (!cancelTiltFirst) { + cancelWorkPlane(); + } + } + } else { + gMotionModal.reset(); + writeBlock( + gMotionModal.format(0), + conditional(machineConfiguration.isMachineCoordinate(0), "A" + abcFormat.format(abc.x)), + conditional(machineConfiguration.isMachineCoordinate(1), "B" + abcFormat.format(abc.y)), + conditional(machineConfiguration.isMachineCoordinate(2), "C" + abcFormat.format(abc.z)) + ); + } + + onCommand(COMMAND_LOCK_MULTI_AXIS); + + currentWorkPlaneABC = abc; +} + +var closestABC = false; // choose closest machine angles +var currentMachineABC; + +function getWorkPlaneMachineABC(workPlane, _setWorkPlane, rotate) { + var W = workPlane; // map to global frame + + var abc = machineConfiguration.getABC(W); + if (closestABC) { + if (currentMachineABC) { + abc = machineConfiguration.remapToABC(abc, currentMachineABC); + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + } else { + abc = machineConfiguration.getPreferredABC(abc); + } + + try { + abc = machineConfiguration.remapABC(abc); + if (_setWorkPlane) { + currentMachineABC = abc; + } + } catch (e) { + error( + localize("Machine angles not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + var direction = machineConfiguration.getDirection(abc); + if (!isSameDirection(direction, W.forward)) { + error(localize("Orientation not supported.")); + } + + if (!machineConfiguration.isABCSupported(abc)) { + error( + localize("Work plane is not supported") + ":" + + conditional(machineConfiguration.isMachineCoordinate(0), " A" + abcFormat.format(abc.x)) + + conditional(machineConfiguration.isMachineCoordinate(1), " B" + abcFormat.format(abc.y)) + + conditional(machineConfiguration.isMachineCoordinate(2), " C" + abcFormat.format(abc.z)) + ); + } + + if (rotate) { + var tcp = false; + if (tcp) { + setRotation(W); // TCP mode + } else { + var O = machineConfiguration.getOrientation(abc); + var R = machineConfiguration.getRemainingOrientation(abc, W); + setRotation(R); + } + } + + return abc; +} + +function isProbeOperation() { + return hasParameter("operation-strategy") && ((getParameter("operation-strategy") == "probe" || getParameter("operation-strategy") == "probe_geometry")); +} + +function isInspectionOperation(section) { + return section.hasParameter("operation-strategy") && (section.getParameter("operation-strategy") == "inspectSurface"); +} + +var probeOutputWorkOffset = 1; + +function onParameter(name, value) { + if (name == "probe-output-work-offset") { + probeOutputWorkOffset = (value > 0) ? value : 1; + } +} + +/** Returns true if the spatial vectors are significantly different. */ +function areSpatialVectorsDifferent(_vector1, _vector2) { + return (xyzFormat.getResultingValue(_vector1.x) != xyzFormat.getResultingValue(_vector2.x)) || + (xyzFormat.getResultingValue(_vector1.y) != xyzFormat.getResultingValue(_vector2.y)) || + (xyzFormat.getResultingValue(_vector1.z) != xyzFormat.getResultingValue(_vector2.z)); +} + +/** Returns true if the spatial boxes are a pure translation. */ +function areSpatialBoxesTranslated(_box1, _box2) { + return !areSpatialVectorsDifferent(Vector.diff(_box1[1], _box1[0]), Vector.diff(_box2[1], _box2[0])) && + !areSpatialVectorsDifferent(Vector.diff(_box2[0], _box1[0]), Vector.diff(_box2[1], _box1[1])); +} + +/** Returns true if the spatial boxes are same. */ +function areSpatialBoxesSame(_box1, _box2) { + return !areSpatialVectorsDifferent(_box1[0], _box2[0]) && !areSpatialVectorsDifferent(_box1[1], _box2[1]); +} + +function subprogramDefine(_initialPosition, _abc, _retracted, _zIsOutput) { + // convert patterns into subprograms + var usePattern = false; + patternIsActive = false; + if (currentSection.isPatterned && currentSection.isPatterned() && properties.useSubroutinePatterns) { + currentPattern = currentSection.getPatternId(); + firstPattern = true; + for (var i = 0; i < definedPatterns.length; ++i) { + if ((definedPatterns[i].patternType == SUB_PATTERN) && (currentPattern == definedPatterns[i].patternId)) { + currentSubprogram = definedPatterns[i].subProgram; + usePattern = definedPatterns[i].validPattern; + firstPattern = false; + break; + } + } + + if (firstPattern) { + // determine if this is a valid pattern for creating a subprogram + usePattern = subprogramIsValid(currentSection, currentPattern, SUB_PATTERN); + if (usePattern) { + currentSubprogram = ++lastSubprogram; + } + definedPatterns.push({ + patternType: SUB_PATTERN, + patternId: currentPattern, + subProgram: currentSubprogram, + validPattern: usePattern, + initialPosition: _initialPosition, + finalPosition: _initialPosition + }); + } + + if (usePattern) { + // make sure Z-position is output prior to subprogram call + if (!_retracted && !_zIsOutput) { + writeBlock(gMotionModal.format(0), zOutput.format(_initialPosition.z)); + } + + // call subprogram + writeBlock(mFormat.format(98), "P" + oFormat.format(currentSubprogram)); + patternIsActive = true; + + if (firstPattern) { + subprogramStart(_initialPosition, _abc, incrementalSubprogram); + } else { + skipRemainingSection(); + setCurrentPosition(getFramePosition(currentSection.getFinalPosition())); + } + } + } + + // Output cycle operation as subprogram + if (!usePattern && properties.useSubroutineCycles && currentSection.doesStrictCycle && + (currentSection.getNumberOfCycles() == 1) && currentSection.getNumberOfCyclePoints() >= minimumCyclePoints) { + var finalPosition = getFramePosition(currentSection.getFinalPosition()); + currentPattern = currentSection.getNumberOfCyclePoints(); + firstPattern = true; + for (var i = 0; i < definedPatterns.length; ++i) { + if ((definedPatterns[i].patternType == SUB_CYCLE) && (currentPattern == definedPatterns[i].patternId) && + !areSpatialVectorsDifferent(_initialPosition, definedPatterns[i].initialPosition) && + !areSpatialVectorsDifferent(finalPosition, definedPatterns[i].finalPosition)) { + currentSubprogram = definedPatterns[i].subProgram; + usePattern = definedPatterns[i].validPattern; + firstPattern = false; + break; + } + } + + if (firstPattern) { + // determine if this is a valid pattern for creating a subprogram + usePattern = subprogramIsValid(currentSection, currentPattern, SUB_CYCLE); + if (usePattern) { + currentSubprogram = ++lastSubprogram; + } + definedPatterns.push({ + patternType: SUB_CYCLE, + patternId: currentPattern, + subProgram: currentSubprogram, + validPattern: usePattern, + initialPosition: _initialPosition, + finalPosition: finalPosition + }); + } + cycleSubprogramIsActive = usePattern; + } + + // Output each operation as a subprogram + if (!usePattern && properties.useSubroutines) { + currentSubprogram = ++lastSubprogram; + writeBlock(mFormat.format(98), "P" + oFormat.format(currentSubprogram)); + firstPattern = true; + subprogramStart(_initialPosition, _abc, false); + } +} + +function subprogramStart(_initialPosition, _abc, _incremental) { + redirectToBuffer(); + var comment = ""; + if (hasParameter("operation-comment")) { + comment = getParameter("operation-comment"); + } + writeln( + "O" + oFormat.format(currentSubprogram) + + conditional(comment, formatComment(comment.substr(0, maximumLineLength - 2 - 6 - 1))) + ); + saveShowSequenceNumbers = properties.showSequenceNumbers; + properties.showSequenceNumbers = false; + if (_incremental) { + setIncrementalMode(_initialPosition, _abc); + } + gPlaneModal.reset(); + gMotionModal.reset(); +} + +function subprogramEnd() { + if (firstPattern) { + writeBlock(mFormat.format(99)); + writeln(""); + subprograms += getRedirectionBuffer(); + } + forceAny(); + firstPattern = false; + properties.showSequenceNumbers = saveShowSequenceNumbers; + closeRedirection(); +} + +function subprogramIsValid(_section, _patternId, _patternType) { + var sectionId = _section.getId(); + var numberOfSections = getNumberOfSections(); + var validSubprogram = _patternType != SUB_CYCLE; + + var masterPosition = new Array(); + masterPosition[0] = getFramePosition(_section.getInitialPosition()); + masterPosition[1] = getFramePosition(_section.getFinalPosition()); + var tempBox = _section.getBoundingBox(); + var masterBox = new Array(); + masterBox[0] = getFramePosition(tempBox[0]); + masterBox[1] = getFramePosition(tempBox[1]); + + var rotation = getRotation(); + var translation = getTranslation(); + incrementalSubprogram = undefined; + + for (var i = 0; i < numberOfSections; ++i) { + var section = getSection(i); + if (section.getId() != sectionId) { + defineWorkPlane(section, false); + // check for valid pattern + if (_patternType == SUB_PATTERN) { + if (section.getPatternId() == _patternId) { + var patternPosition = new Array(); + patternPosition[0] = getFramePosition(section.getInitialPosition()); + patternPosition[1] = getFramePosition(section.getFinalPosition()); + tempBox = section.getBoundingBox(); + var patternBox = new Array(); + patternBox[0] = getFramePosition(tempBox[0]); + patternBox[1] = getFramePosition(tempBox[1]); + + if (areSpatialBoxesSame(masterPosition, patternPosition) && areSpatialBoxesSame(masterBox, patternBox)) { + incrementalSubprogram = incrementalSubprogram ? incrementalSubprogram : false; + } else if (!areSpatialBoxesTranslated(masterPosition, patternPosition) || !areSpatialBoxesTranslated(masterBox, patternBox)) { + validSubprogram = false; + break; + } else { + incrementalSubprogram = true; + } + } + + // check for valid cycle operation + } else if (_patternType == SUB_CYCLE) { + if ((section.getNumberOfCyclePoints() == _patternId) && (section.getNumberOfCycles() == 1)) { + var patternInitial = getFramePosition(section.getInitialPosition()); + var patternFinal = getFramePosition(section.getFinalPosition()); + if (!areSpatialVectorsDifferent(patternInitial, masterPosition[0]) && !areSpatialVectorsDifferent(patternFinal, masterPosition[1])) { + validSubprogram = true; + break; + } + } + } + } + } + setRotation(rotation); + setTranslation(translation); + return (validSubprogram); +} + +function setAxisMode(_format, _output, _prefix, _value, _incr) { + var i = _output.isEnabled(); + _output = _incr ? createIncrementalVariable({prefix: _prefix}, _format) : createVariable({prefix: _prefix}, _format); + _output.format(_value); + _output.format(_value); + i = i ? _output.enable() : _output.disable(); + return _output; +} + +function setIncrementalMode(xyz, abc) { + xOutput = setAxisMode(xyzFormat, xOutput, "X", xyz.x, true); + yOutput = setAxisMode(xyzFormat, yOutput, "Y", xyz.y, true); + zOutput = setAxisMode(xyzFormat, zOutput, "Z", xyz.z, true); + aOutput = setAxisMode(abcFormat, aOutput, "A", abc.x, true); + bOutput = setAxisMode(abcFormat, bOutput, "B", abc.y, true); + cOutput = setAxisMode(abcFormat, cOutput, "C", abc.z, true); + gAbsIncModal.reset(); + writeBlock(gAbsIncModal.format(91)); + incrementalMode = true; +} + +function setAbsoluteMode(xyz, abc) { + if (incrementalMode) { + xOutput = setAxisMode(xyzFormat, xOutput, "X", xyz.x, false); + yOutput = setAxisMode(xyzFormat, yOutput, "Y", xyz.y, false); + zOutput = setAxisMode(xyzFormat, zOutput, "Z", xyz.z, false); + aOutput = setAxisMode(abcFormat, aOutput, "A", abc.x, false); + bOutput = setAxisMode(abcFormat, bOutput, "B", abc.y, false); + cOutput = setAxisMode(abcFormat, cOutput, "C", abc.z, false); + gAbsIncModal.reset(); + writeBlock(gAbsIncModal.format(90)); + incrementalMode = false; + } +} + +function onSection() { + var forceToolAndRetract = optionalSection && !currentSection.isOptional(); + optionalSection = currentSection.isOptional(); + + var insertToolCall = forceToolAndRetract || isFirstSection() || + currentSection.getForceToolChange && currentSection.getForceToolChange() || + (tool.number != getPreviousSection().getTool().number); + + var zIsOutput = false; // true if the Z-position has been output, used for patterns + + var newWorkOffset = isFirstSection() || + (getPreviousSection().workOffset != currentSection.workOffset); // work offset changes + var newWorkPlane = isFirstSection() || + !isSameDirection(getPreviousSection().getGlobalFinalToolAxis(), currentSection.getGlobalInitialToolAxis()) || + (currentSection.isOptimizedForMachine() && getPreviousSection().isOptimizedForMachine() && + Vector.diff(getPreviousSection().getFinalToolAxisABC(), currentSection.getInitialToolAxisABC()).length > 1e-4) || + (!machineConfiguration.isMultiAxisConfiguration() && currentSection.isMultiAxis()) || + (!getPreviousSection().isMultiAxis() && currentSection.isMultiAxis()); // force newWorkPlane between indexing and simultaneous operations + var forceSmoothing = properties.useSmoothing && + (hasParameter("operation-strategy") && (getParameter("operation-strategy") == "drill") || + !isFirstSection() && getPreviousSection().hasParameter("operation-strategy") && (getPreviousSection().getParameter("operation-strategy") == "drill")); // force smoothing in case !insertToolCall (2d chamfer) + if (insertToolCall || newWorkOffset || newWorkPlane || forceSmoothing) { + + // stop spindle before retract during tool change + if (insertToolCall && !isFirstSection()) { + onCommand(COMMAND_STOP_SPINDLE); + } + + // retract to safe plane + writeRetract(Z); // retract + forceXYZ(); + if ((insertToolCall && !isFirstSection()) || forceSmoothing) { + disableLengthCompensation(); + setSmoothing(false); + } + } + + if (hasParameter("operation-comment")) { + var comment = getParameter("operation-comment"); + if (comment && ((comment !== lastOperationComment) || !patternIsActive || insertToolCall)) { + writeln(""); + writeComment(comment); + lastOperationComment = comment; + } else if (!patternIsActive || insertToolCall) { + writeln(""); + } + } else { + writeln(""); + } + + if (properties.showNotes && hasParameter("notes")) { + var notes = getParameter("notes"); + if (notes) { + var lines = String(notes).split("\n"); + var r1 = new RegExp("^[\\s]+", "g"); + var r2 = new RegExp("[\\s]+$", "g"); + for (line in lines) { + var comment = lines[line].replace(r1, "").replace(r2, ""); + if (comment) { + writeComment(comment); + } + } + } + } + + if (insertToolCall) { + forceWorkPlane(); + + onCommand(COMMAND_COOLANT_OFF); + + if (!isFirstSection() && properties.optionalStop) { + onCommand(COMMAND_OPTIONAL_STOP); + } + + if (tool.number > 99) { + warning(localize("Tool number exceeds maximum value.")); + } + + disableLengthCompensation(); + writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6)); + if (tool.comment) { + writeComment(tool.comment); + } + var showToolZMin = false; + if (showToolZMin) { + if (is3D()) { + var numberOfSections = getNumberOfSections(); + var zRange = currentSection.getGlobalZRange(); + var number = tool.number; + for (var i = currentSection.getId() + 1; i < numberOfSections; ++i) { + var section = getSection(i); + if (section.getTool().number != number) { + break; + } + zRange.expandToRange(section.getGlobalZRange()); + } + writeComment(localize("ZMIN") + "=" + zRange.getMinimum()); + } + } + + if (properties.preloadTool) { + var nextTool = getNextTool(tool.number); + if (nextTool) { + writeBlock("T" + toolFormat.format(nextTool.number)); + } else { + // preload first tool + var section = getSection(0); + var firstToolNumber = section.getTool().number; + if (tool.number != firstToolNumber) { + writeBlock("T" + toolFormat.format(firstToolNumber)); + } + } + } + } + + if (!isProbeOperation() && + !isInspectionOperation(currentSection) && + (insertToolCall || + forceSpindleSpeed || + isFirstSection() || + (rpmFormat.areDifferent(spindleSpeed, sOutput.getCurrent())) || + (tool.clockwise != getPreviousSection().getTool().clockwise))) { + forceSpindleSpeed = false; + + if (spindleSpeed < 1) { + error(localize("Spindle speed out of range.")); + return; + } + if (spindleSpeed > 99999) { + warning(localize("Spindle speed exceeds maximum value.")); + } + var tapping = hasParameter("operation:cycleType") && + ((getParameter("operation:cycleType") == "tapping") || + (getParameter("operation:cycleType") == "right-tapping") || + (getParameter("operation:cycleType") == "left-tapping") || + (getParameter("operation:cycleType") == "tapping-with-chip-breaking")); + if (!tapping || (tapping && !(properties.useRigidTapping == "without"))) { + writeBlock( + sOutput.format(spindleSpeed), mFormat.format(tool.clockwise ? 3 : 4) + ); + } + + onCommand(COMMAND_START_CHIP_TRANSPORT); + if (forceMultiAxisIndexing || !is3D() || machineConfiguration.isMultiAxisConfiguration()) { + // writeBlock(mFormat.format(xxx)); // shortest path traverse + } + } + + // wcs + if (insertToolCall) { // force work offset when changing tool + currentWorkOffset = undefined; + } + var workOffset = currentSection.workOffset; + if (workOffset == 0) { + warningOnce(localize("Work offset has not been specified. Using G54 as WCS."), WARNING_WORK_OFFSET); + workOffset = 1; + } + if (workOffset != currentWorkOffset) { + if (cancelTiltFirst) { + cancelWorkPlane(); + } + forceWorkPlane(); + } + if (workOffset > 0) { + if (workOffset > 6) { + var p = workOffset - 6; // 1->... + if (p > 300) { + error(localize("Work offset out of range.")); + return; + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(54.1), "P" + p); // G54.1P + currentWorkOffset = workOffset; + } + } + } else { + if (workOffset != currentWorkOffset) { + writeBlock(gFormat.format(53 + workOffset)); // G54->G59 + currentWorkOffset = workOffset; + } + } + } + + forceXYZ(); + + var abc = defineWorkPlane(currentSection, true); + + // set coolant after we have positioned at Z + setCoolant(tool.coolant); + + if (properties.useSmoothing) { + if (hasParameter("operation-strategy") && (getParameter("operation-strategy") != "drill")) { + if (setSmoothing(true)) { + // we force G43 using lengthCompensationActive + } + } else { + if (setSmoothing(false)) { + // we force G43 using lengthCompensationActive + } + } + } + + forceAny(); + gMotionModal.reset(); + + var initialPosition = getFramePosition(currentSection.getInitialPosition()); + if (!retracted && !insertToolCall) { + if (getCurrentPosition().z < initialPosition.z) { + writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z)); + zIsOutput = true; + } + } + + if (insertToolCall || !lengthCompensationActive || retracted || (!isFirstSection() && getPreviousSection().isMultiAxis())) { + var lengthOffset = tool.lengthOffset; + if (lengthOffset > 99) { + error(localize("Length offset out of range.")); + return; + } + + gMotionModal.reset(); + writeBlock(gPlaneModal.format(17)); + + // cancel compensation prior to enabling it, required when switching G43/G43.4 modes + disableLengthCompensation(false); + + // assumes a Head configuration uses TCP on a Fanuc controller + var offsetCode = 43; + if (currentSection.isMultiAxis()) { + if (machineConfiguration.isMultiAxisConfiguration() && (currentSection.getOptimizedTCPMode() == 0)) { + offsetCode = 43.4; + } else if (!machineConfiguration.isMultiAxisConfiguration()) { + offsetCode = 43.5; + } + } + + if (!machineConfiguration.isHeadConfiguration()) { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), xOutput.format(initialPosition.x), yOutput.format(initialPosition.y) + ); + writeBlock( + gMotionModal.format(0), + gFormat.format(offsetCode), + zOutput.format(initialPosition.z), + hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + gFormat.format(offsetCode), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y), + zOutput.format(initialPosition.z), hFormat.format(lengthOffset) + ); + lengthCompensationActive = true; + } + zIsOutput = true; + + gMotionModal.reset(); + } else { + writeBlock( + gAbsIncModal.format(90), + gMotionModal.format(0), + xOutput.format(initialPosition.x), + yOutput.format(initialPosition.y) + ); + } + + validate(lengthCompensationActive, "Length compensation is not active."); + + if (properties.useParametricFeed && + hasParameter("operation-strategy") && + (getParameter("operation-strategy") != "drill") && // legacy + !(currentSection.hasAnyCycle && currentSection.hasAnyCycle())) { + if (!insertToolCall && + activeMovements && + (getCurrentSectionId() > 0) && + ((getPreviousSection().getPatternId() == currentSection.getPatternId()) && (currentSection.getPatternId() != 0))) { + // use the current feeds + } else { + initializeActiveFeeds(); + } + } else { + activeMovements = undefined; + } + + if (isProbeOperation()) { + if (g68RotationMode != 0) { + error(localize("You cannot probe while G68 Rotation is in effect.")); + return; + } + angularProbingMode = getAngularProbingMode(); + writeBlock(gFormat.format(65), "P" + 9832); // spin the probe on + } + + // surface Inspection + if (isInspectionOperation(currentSection) && (typeof inspectionProcessSectionStart == "function")) { + inspectionProcessSectionStart(); + } + + // define subprogram + subprogramDefine(initialPosition, abc, retracted, zIsOutput); + + retracted = false; +} + +function onDwell(seconds) { + if (seconds > 99999.999) { + warning(localize("Dwelling time is out of range.")); + } + milliseconds = clamp(1, seconds * 1000, 99999999); + writeBlock(gFeedModeModal.format(94), gFormat.format(4), "P" + milliFormat.format(milliseconds)); + writeBlock(gFeedModeModal.format(properties.useG95 ? 95 : 94)); // back to G95 +} + +function onSpindleSpeed(spindleSpeed) { + writeBlock(sOutput.format(spindleSpeed)); +} + +function onCycle() { + writeBlock(gPlaneModal.format(17)); +} + +function getCommonCycle(x, y, z, r, c) { + forceXYZ(); // force xyz on first drill hole of any cycle + if (incrementalMode) { + zOutput.format(c); + return [xOutput.format(x), yOutput.format(y), + "Z" + xyzFormat.format(z - r), + "R" + xyzFormat.format(r - c)]; + } else { + return [xOutput.format(x), yOutput.format(y), + zOutput.format(z), + "R" + xyzFormat.format(r)]; + } +} + +function setCyclePosition(_position) { + switch (gPlaneModal.getCurrent()) { + case 17: // XY + zOutput.format(_position); + break; + case 18: // ZX + yOutput.format(_position); + break; + case 19: // YZ + xOutput.format(_position); + break; + } +} + +/** Convert approach to sign. */ +function approach(value) { + validate((value == "positive") || (value == "negative"), "Invalid approach."); + return (value == "positive") ? 1 : -1; +} + +/** + Determine if angular probing is supported +*/ +function getAngularProbingMode() { + if (machineConfiguration.isMultiAxisConfiguration()) { + if (machineConfiguration.isMachineCoordinate(2)) { + return ANGLE_PROBE_USE_CAXIS; + } else { + return ANGLE_PROBE_NOT_SUPPORTED; + } + } else { + return ANGLE_PROBE_USE_ROTATION; + } +} + +/** + Output rotation offset based on angular probing cycle. +*/ +function setProbingAngle() { + if ((g68RotationMode == 1) || (g68RotationMode == 2)) { // Rotate coordinate system for Angle Probing + if (!properties.useG54x4) { + gRotationModal.reset(); + gAbsIncModal.reset(); + writeBlock( + gRotationModal.format(68), gAbsIncModal.format(90), + (g68RotationMode == 1) ? "X0" : "X[#135]", + (g68RotationMode == 1) ? "Y0" : "Y[#136]", + "Z0", "I0.0", "J0.0", "K1.0", "R[#139]" + ); + g68RotationMode = 3; + } else if (angularProbingMode != ANGLE_PROBE_NOT_SUPPORTED) { + writeBlock("#26010=#135"); + writeBlock("#26011=#136"); + writeBlock("#26012=#137"); + writeBlock("#26015=#139"); + writeBlock(gFormat.format(54.4), "P1"); + g68RotationMode = 0; + } else { + error(localize("Angular probing is not supported for this machine configuration.")); + return; + } + } +} + +function protectedProbeMove(_cycle, x, y, z) { + var _x = xOutput.format(x); + var _y = yOutput.format(y); + var _z = zOutput.format(z); + if (_z && z >= getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } + if (_x || _y) { + writeBlock(gFormat.format(65), "P" + 9810, _x, _y, getFeed(highFeedrate)); // protected positioning move + } + if (_z && z < getCurrentPosition().z) { + writeBlock(gFormat.format(65), "P" + 9810, _z, getFeed(cycle.feedrate)); // protected positioning move + } +} + +function onCyclePoint(x, y, z) { + if (cycleType == "inspect") { + if (typeof inspectionCycleInspect == "function") { + inspectionCycleInspect(cycle, x, y, z); + return; + } else { + cycleNotSupported(); + } + } + if (!isSameDirection(getRotation().forward, new Vector(0, 0, 1))) { + expandCyclePoint(x, y, z); + return; + } + var probeWorkOffsetCode; + if (isProbeOperation()) { + if (!useMultiAxisFeatures && !isSameDirection(currentSection.workPlane.forward, new Vector(0, 0, 1)) && (!cycle.probeMode || (cycle.probeMode == 0))) { + error(localize("Updating WCS / work offset using probing is only supported by the CNC in the WCS frame.")); + return; + } + protectedProbeMove(cycle, x, y, z); + + var workOffset = probeOutputWorkOffset ? probeOutputWorkOffset : currentWorkOffset; + if (workOffset > 99) { + error(localize("Work offset is out of range.")); + return; + } else if (workOffset > 6) { + probeWorkOffsetCode = probe100Format.format(workOffset - 6 + 100); + } else { + probeWorkOffsetCode = workOffset + "."; // G54->G59 + } + } + + if (isFirstCyclePoint() || isProbeOperation()) { + if (!isProbeOperation()) { + // return to initial Z which is clearance plane and set absolute mode + repositionToCycleClearance(cycle, x, y, z); + } + + var F = cycle.feedrate; + if (properties.useG95) { + F /= spindleSpeed; + } + var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds + + var forceCycle = false; + switch (cycleType) { + case "drilling": + writeBlock( + gRetractModal.format(98), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + feedOutput.format(F) + ); + break; + case "counter-boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gCycleModal.format(82), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(81), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + feedOutput.format(F) + ); + } + break; + case "chip-breaking": + if ((cycle.accumulatedDepth < cycle.depth) || (P > 0)) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(73), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + break; + case "deep-drilling": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(83), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + peckOutput.format(cycle.incrementalDepth), + // conditional(P > 0, "P" + milliFormat.format(P)), + feedOutput.format(F) + ); + } + break; + case "tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND) ? 74 : 84), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "left-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gCycleModal.format(74), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "right-tapping": + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gCycleModal.format(84), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } + break; + case "tapping-with-chip-breaking": + case "left-tapping-with-chip-breaking": + case "right-tapping-with-chip-breaking": + if (cycle.accumulatedDepth < cycle.depth) { + error(localize("Accumulated pecking depth is not supported for tapping cycles with chip breaking.")); + return; + } else { + if (properties.useRigidTapping != "no") { + writeBlock(mFormat.format(29), sOutput.format(spindleSpeed)); + } + if (properties.usePitchForTapping) { + writeBlock( + gRetractModal.format(98), gFeedModeModal.format(95), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + pitchOutput.format(tool.threadPitch) + ); + forceFeed(); + } else { + var tappingFPM = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed); + F = (properties.useG95 ? tool.getThreadPitch() : tappingFPM); + writeBlock( + gRetractModal.format(98), gCycleModal.format((tool.type == TOOL_TAP_LEFT_HAND ? 74 : 84)), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + peckOutput.format(cycle.incrementalDepth), + feedOutput.format(F) + ); + } + } + break; + case "fine-boring": + writeBlock( + gRetractModal.format(98), gCycleModal.format(76), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), // not optional + "Q" + xyzFormat.format(cycle.shift), + feedOutput.format(F) + ); + break; + case "back-boring": + var dx = (gPlaneModal.getCurrent() == 19) ? cycle.backBoreDistance : 0; + var dy = (gPlaneModal.getCurrent() == 18) ? cycle.backBoreDistance : 0; + var dz = (gPlaneModal.getCurrent() == 17) ? cycle.backBoreDistance : 0; + writeBlock( + gRetractModal.format(98), gCycleModal.format(87), + getCommonCycle(x - dx, y - dy, z - dz, cycle.bottom, cycle.clearance), + "Q" + xyzFormat.format(cycle.shift), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "reaming": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + feedOutput.format(F) + ); + } + break; + case "stop-boring": + if (P > 0) { + expandCyclePoint(x, y, z); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(86), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + feedOutput.format(F) + ); + } + break; + case "manual-boring": + writeBlock( + gRetractModal.format(98), gCycleModal.format(88), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + break; + case "boring": + if (P > 0) { + writeBlock( + gRetractModal.format(98), gCycleModal.format(89), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + "P" + milliFormat.format(P), // not optional + feedOutput.format(F) + ); + } else { + writeBlock( + gRetractModal.format(98), gCycleModal.format(85), + getCommonCycle(x, y, z, cycle.retract, cycle.clearance), + feedOutput.format(F) + ); + } + break; + + case "probing-x": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + "X" + xyzFormat.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9811, + "Y" + xyzFormat.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-z": + protectedProbeMove(cycle, x, y, Math.min(z - cycle.depth + cycle.probeClearance, cycle.retract)); + writeBlock( + gFormat.format(65), "P" + 9811, + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-wall": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-x-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-y-channel-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width1), + zOutput.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Z" + xyzFormat.format(z - cycle.depth), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9814, + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-circular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9814, + "Z" + xyzFormat.format(z - cycle.depth), + "D" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9812, + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + // not required "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-boss": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "R" + xyzFormat.format(cycle.probeClearance), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + case "probing-xy-rectangular-hole-with-island": + protectedProbeMove(cycle, x, y, z); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "X" + xyzFormat.format(cycle.width1), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + writeBlock( + gFormat.format(65), "P" + 9812, + "Z" + xyzFormat.format(z - cycle.depth), + "Y" + xyzFormat.format(cycle.width2), + "Q" + xyzFormat.format(cycle.probeOvertravel), + "R" + xyzFormat.format(-cycle.probeClearance), + getProbingArguments(cycle, probeWorkOffsetCode) + ); + break; + + case "probing-xy-inner-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9815, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-xy-outer-corner": + var cornerX = x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2); + var cornerY = y + approach(cycle.approach2) * (cycle.probeClearance + tool.diameter / 2); + var cornerI = 0; + var cornerJ = 0; + if (cycle.probeSpacing !== undefined) { + cornerI = cycle.probeSpacing; + cornerJ = cycle.probeSpacing; + } + if ((cornerI != 0) && (cornerJ != 0)) { + g68RotationMode = 2; + } + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9816, xOutput.format(cornerX), yOutput.format(cornerY), + conditional(cornerI != 0, "I" + xyzFormat.format(cornerI)), + conditional(cornerJ != 0, "J" + xyzFormat.format(cornerJ)), + "Q" + xyzFormat.format(cycle.probeOvertravel), + conditional((g68RotationMode == 0) || (angularProbingMode == ANGLE_PROBE_USE_CAXIS), getProbingArguments(cycle, probeWorkOffsetCode)) + ); + break; + case "probing-x-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + "X" + xyzFormat.format(x + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + case "probing-y-plane-angle": + protectedProbeMove(cycle, x, y, z - cycle.depth); + writeBlock( + gFormat.format(65), "P" + 9843, + "Y" + xyzFormat.format(y + approach(cycle.approach1) * (cycle.probeClearance + tool.diameter / 2)), + "D" + xyzFormat.format(cycle.probeSpacing), + "Q" + xyzFormat.format(cycle.probeOvertravel), + getProbingArguments(cycle, false) + ); + g68RotationMode = 1; + break; + default: + expandCyclePoint(x, y, z); + } + + // place cycle operation in subprogram + if (cycleSubprogramIsActive) { + if (forceCycle || cycleExpanded || isProbeOperation()) { + cycleSubprogramIsActive = false; + } else { + // call subprogram + writeBlock(mFormat.format(98), "P" + oFormat.format(currentSubprogram)); + subprogramStart(new Vector(x, y, z), new Vector(0, 0, 0), false); + } + } + if (incrementalMode) { // set current position to clearance height + setCyclePosition(cycle.clearance); + } + + // 2nd through nth cycle point + } else { + if (cycleExpanded) { + expandCyclePoint(x, y, z); + } else { + if (!xyzFormat.areDifferent(x, xOutput.getCurrent()) && + !xyzFormat.areDifferent(y, yOutput.getCurrent()) && + !xyzFormat.areDifferent(z, zOutput.getCurrent())) { + switch (gPlaneModal.getCurrent()) { + case 17: // XY + xOutput.reset(); // at least one axis is required + break; + case 18: // ZX + zOutput.reset(); // at least one axis is required + break; + case 19: // YZ + yOutput.reset(); // at least one axis is required + break; + } + } + if (incrementalMode) { // set current position to retract height + setCyclePosition(cycle.retract); + } + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + if (incrementalMode) { // set current position to clearance height + setCyclePosition(cycle.clearance); + } + } + } +} + +function getProbingArguments(cycle, probeWorkOffsetCode) { + var probeWCS = hasParameter("operation-strategy") && (getParameter("operation-strategy") == "probe"); + return [ + (cycle.angleAskewAction == "stop-message" ? "B" + xyzFormat.format(cycle.toleranceAngle ? cycle.toleranceAngle : 0) : undefined), + ((cycle.updateToolWear && cycle.toolWearErrorCorrection < 100) ? "F" + xyzFormat.format(cycle.toolWearErrorCorrection ? cycle.toolWearErrorCorrection / 100 : 100) : undefined), + (cycle.wrongSizeAction == "stop-message" ? "H" + xyzFormat.format(cycle.toleranceSize ? cycle.toleranceSize : 0) : undefined), + (cycle.outOfPositionAction == "stop-message" ? "M" + xyzFormat.format(cycle.tolerancePosition ? cycle.tolerancePosition : 0) : undefined), + ((cycle.updateToolWear && cycleType == "probing-z") ? "T" + xyzFormat.format(cycle.toolLengthOffset) : undefined), + ((cycle.updateToolWear && cycleType !== "probing-z") ? "T" + xyzFormat.format(cycle.toolDiameterOffset) : undefined), + (cycle.updateToolWear ? "V" + xyzFormat.format(cycle.toolWearUpdateThreshold ? cycle.toolWearUpdateThreshold : 0) : undefined), + (cycle.printResults ? "W" + xyzFormat.format(1 + cycle.incrementComponent) : undefined), // 1 for advance feature, 2 for reset feature count and advance component number. first reported result in a program should use W2. + conditional(probeWorkOffsetCode && probeWCS, "S" + probeWorkOffsetCode) + ]; +} + +function onCycleEnd() { + if (isProbeOperation()) { + zOutput.reset(); + gMotionModal.reset(); + writeBlock(gFormat.format(65), "P" + 9810, zOutput.format(cycle.retract)); // protected retract move + } else { + if (cycleSubprogramIsActive) { + subprogramEnd(); + cycleSubprogramIsActive = false; + } + if (!cycleExpanded) { + writeBlock(conditional(!properties.useG95, gFeedModeModal.format(94)), gCycleModal.format(80)); + zOutput.reset(); + } + } +} + +var pendingRadiusCompensation = -1; + +function onRadiusCompensation() { + pendingRadiusCompensation = radiusCompensation; +} + +function onRapid(_x, _y, _z) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + writeBlock(gMotionModal.format(0), x, y, z); + forceFeed(); + } +} + +function onLinear(_x, _y, _z, feed) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var f = getFeed(feed); + if (x || y || z) { + if (pendingRadiusCompensation >= 0) { + pendingRadiusCompensation = -1; + var d = tool.diameterOffset; + if (d > 99) { + warning(localize("The diameter offset exceeds the maximum value.")); + } + writeBlock(gPlaneModal.format(17)); + switch (radiusCompensation) { + case RADIUS_COMPENSATION_LEFT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, dOutput.format(d), f); + break; + case RADIUS_COMPENSATION_RIGHT: + dOutput.reset(); + writeBlock(gMotionModal.format(1), gFormat.format(42), x, y, z, dOutput.format(d), f); + break; + default: + writeBlock(gMotionModal.format(1), gFormat.format(40), x, y, z, f); + } + } else { + writeBlock(gMotionModal.format(1), x, y, z, f); + } + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } +} + +function onRapid5D(_x, _y, _z, _a, _b, _c) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation mode cannot be changed at rapid traversal.")); + return; + } + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, a, b, c); + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + writeBlock(gMotionModal.format(0), x, y, z, "I" + i, "J" + j, "K" + k); + } + forceFeed(); +} + +function onLinear5D(_x, _y, _z, _a, _b, _c, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for 5-axis move.")); + return; + } + + if (currentSection.isOptimizedForMachine()) { + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var a = aOutput.format(_a); + var b = bOutput.format(_b); + var c = cOutput.format(_c); + var f = getFeed(feed); + if (x || y || z || a || b || c) { + writeBlock(gMotionModal.format(1), x, y, z, a, b, c, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } else { + forceXYZ(); + var x = xOutput.format(_x); + var y = yOutput.format(_y); + var z = zOutput.format(_z); + var i = ijkFormat.format(_a); + var j = ijkFormat.format(_b); + var k = ijkFormat.format(_c); + var f = getFeed(feed); + if (x || y || z || i || j || k) { + writeBlock(gMotionModal.format(1), x, y, z, "I" + i, "J" + j, "K" + k, f); + } else if (f) { + if (getNextRecord().isMotion()) { // try not to output feed without motion + forceFeed(); // force feed on next line + } else { + writeBlock(gMotionModal.format(1), f); + } + } + } +} + +function onCircular(clockwise, cx, cy, cz, x, y, z, feed) { + if (pendingRadiusCompensation >= 0) { + error(localize("Radius compensation cannot be activated/deactivated for a circular move.")); + return; + } + + var start = getCurrentPosition(); + + if (isFullCircle()) { + if (properties.useRadius || isHelical()) { // radius mode does not support full arcs + linearize(tolerance); + return; + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + linearize(tolerance); + } + } else if (!properties.useRadius) { + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } else { // use radius mode + var r = getCircularRadius(); + if (toDeg(getCircularSweep()) > (180 + 1e-9)) { + r = -r; // allow up to <360 deg arcs + } + switch (getCircularPlane()) { + case PLANE_XY: + writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_ZX: + writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + case PLANE_YZ: + writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), getFeed(feed)); + break; + default: + if (properties.allow3DArcs) { + // make sure maximumCircularSweep is well below 360deg + // we could use G02.4 or G03.4 - direction is calculated + var ip = getPositionU(0.5); + writeBlock(gMotionModal.format(clockwise ? 2.4 : 3.4), xOutput.format(ip.x), yOutput.format(ip.y), zOutput.format(ip.z), getFeed(feed)); + writeBlock(xOutput.format(x), yOutput.format(y), zOutput.format(z)); + } else { + linearize(tolerance); + } + } + } +} + +var currentCoolantMode = COOLANT_OFF; +var coolantOff = undefined; + +function setCoolant(coolant) { + var coolantCodes = getCoolantCodes(coolant); + if (Array.isArray(coolantCodes)) { + if (singleLineCoolant) { + writeBlock(coolantCodes.join(getWordSeparator())); + } else { + for (var c in coolantCodes) { + writeBlock(coolantCodes[c]); + } + } + return undefined; + } + return coolantCodes; +} + +function getCoolantCodes(coolant) { + var multipleCoolantBlocks = new Array(); // create a formatted array to be passed into the outputted line + if (!coolants) { + error(localize("Coolants have not been defined.")); + } + if (isProbeOperation()) { // avoid coolant output for probing + coolant = COOLANT_OFF; + } + if (coolant == currentCoolantMode) { + return undefined; // coolant is already active + } + if ((coolant != COOLANT_OFF) && (currentCoolantMode != COOLANT_OFF) && (coolantOff != undefined)) { + if (Array.isArray(coolantOff)) { + for (var i in coolantOff) { + multipleCoolantBlocks.push(mFormat.format(coolantOff[i])); + } + } else { + multipleCoolantBlocks.push(mFormat.format(coolantOff)); + } + } + + var m; + var coolantCodes = {}; + for (var c in coolants) { // find required coolant codes into the coolants array + if (coolants[c].id == coolant) { + coolantCodes.on = coolants[c].on; + if (coolants[c].off != undefined) { + coolantCodes.off = coolants[c].off; + break; + } else { + for (var i in coolants) { + if (coolants[i].id == COOLANT_OFF) { + coolantCodes.off = coolants[i].off; + break; + } + } + } + } + } + if (coolant == COOLANT_OFF) { + m = !coolantOff ? coolantCodes.off : coolantOff; // use the default coolant off command when an 'off' value is not specified + } else { + coolantOff = coolantCodes.off; + m = coolantCodes.on; + } + + if (!m) { + onUnsupportedCoolant(coolant); + m = 9; + } else { + if (Array.isArray(m)) { + for (var i in m) { + multipleCoolantBlocks.push(mFormat.format(m[i])); + } + } else { + multipleCoolantBlocks.push(mFormat.format(m)); + } + currentCoolantMode = coolant; + return multipleCoolantBlocks; // return the single formatted coolant value + } + return undefined; +} + +var mapCommand = { + COMMAND_STOP:0, + COMMAND_OPTIONAL_STOP:1, + COMMAND_END:2, + COMMAND_SPINDLE_CLOCKWISE:3, + COMMAND_SPINDLE_COUNTERCLOCKWISE:4, + COMMAND_STOP_SPINDLE:5, + COMMAND_ORIENTATE_SPINDLE:19 +}; + +function onCommand(command) { + switch (command) { + case COMMAND_COOLANT_OFF: + setCoolant(COOLANT_OFF); + return; + case COMMAND_COOLANT_ON: + setCoolant(COOLANT_FLOOD); + return; + case COMMAND_STOP: + writeBlock(mFormat.format(0)); + forceSpindleSpeed = true; + return; + case COMMAND_START_SPINDLE: + onCommand(tool.clockwise ? COMMAND_SPINDLE_CLOCKWISE : COMMAND_SPINDLE_COUNTERCLOCKWISE); + return; + case COMMAND_LOCK_MULTI_AXIS: + return; + case COMMAND_UNLOCK_MULTI_AXIS: + return; + case COMMAND_START_CHIP_TRANSPORT: + return; + case COMMAND_STOP_CHIP_TRANSPORT: + return; + case COMMAND_BREAK_CONTROL: + return; + case COMMAND_TOOL_MEASURE: + return; + case COMMAND_PROBE_ON: + return; + case COMMAND_PROBE_OFF: + return; + } + + var stringId = getCommandStringId(command); + var mcode = mapCommand[stringId]; + if (mcode != undefined) { + writeBlock(mFormat.format(mcode)); + } else { + onUnsupportedCommand(command); + } +} + +function onSectionEnd() { + if (typeof inspectionProcessSectionEnd == "function") { + inspectionProcessSectionEnd(); + } + writeBlock(gPlaneModal.format(17)); + + if (((getCurrentSectionId() + 1) >= getNumberOfSections()) || + (tool.number != getNextSection().getTool().number)) { + onCommand(COMMAND_BREAK_CONTROL); + } + if (!isLastSection() && (getNextSection().getTool().coolant != tool.coolant)) { + setCoolant(COOLANT_OFF); + } + + if (true) { + if (isRedirecting()) { + if (firstPattern) { + var finalPosition = getFramePosition(currentSection.getFinalPosition()); + var abc; + if (currentSection.isMultiAxis() && machineConfiguration.isMultiAxisConfiguration()) { + abc = currentSection.getFinalToolAxisABC(); + } else { + abc = currentWorkPlaneABC; + } + if (abc == undefined) { + abc = new Vector(0, 0, 0); + } + setAbsoluteMode(finalPosition, abc); + subprogramEnd(); + } + } + } + if (isProbeOperation()) { + writeBlock(gFormat.format(65), "P" + 9833); // spin the probe off + setProbingAngle(); // define rotation of part + } + forceAny(); +} + +/** Output block to do safe retract and/or move to home position. */ +function writeRetract() { + // initialize routine + var _xyzMoved = new Array(false, false, false); + var _useG28 = properties.useG28; // can be either true or false + + // check syntax of call + if (arguments.length == 0) { + error(localize("No axis specified for writeRetract().")); + return; + } + for (var i = 0; i < arguments.length; ++i) { + if ((arguments[i] < 0) || (arguments[i] > 2)) { + error(localize("Bad axis specified for writeRetract().")); + return; + } + if (_xyzMoved[arguments[i]]) { + error(localize("Cannot retract the same axis twice in one line")); + return; + } + _xyzMoved[arguments[i]] = true; + } + + // special conditions + + // define home positions + var _xHome; + var _yHome; + var _zHome; + if (_useG28) { + _xHome = 0; + _yHome = 0; + _zHome = 0; + } else { + _xHome = machineConfiguration.hasHomePositionX() ? machineConfiguration.getHomePositionX() : 0; + _yHome = machineConfiguration.hasHomePositionY() ? machineConfiguration.getHomePositionY() : 0; + _zHome = machineConfiguration.getRetractPlane(); + } + + // format home positions + var words = []; // store all retracted axes in an array + for (var i = 0; i < arguments.length; ++i) { + // define the axes to move + switch (arguments[i]) { + case X: + if (!machineConfiguration.hasHomePositionX()) { + _useG28 = true; + } + words.push("X" + xyzFormat.format(_xHome)); + break; + case Y: + if (!machineConfiguration.hasHomePositionY()) { + _useG28 = true; + } + words.push("Y" + xyzFormat.format(_yHome)); + break; + case Z: + words.push("Z" + xyzFormat.format(_zHome)); + retracted = true; + break; + } + } + + // output move to home + if (words.length > 0) { + if (_useG28) { + gAbsIncModal.reset(); + writeBlock(gFormat.format(28), gAbsIncModal.format(91), words); + writeBlock(gAbsIncModal.format(90)); + } else { + gMotionModal.reset(); + writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), words); + } + + // force any axes that move to home on next block + if (_xyzMoved[0]) { + xOutput.reset(); + } + if (_xyzMoved[1]) { + yOutput.reset(); + } + if (_xyzMoved[2]) { + zOutput.reset(); + } + } +} + +function onClose() { + writeln(""); + optionalSection = false; + + onCommand(COMMAND_COOLANT_OFF); + + writeRetract(Z); // retract + + disableLengthCompensation(true); + setSmoothing(false); + zOutput.reset(); + + setWorkPlane(new Vector(0, 0, 0)); // reset working plane + + if (properties.useG54x4) { + writeBlock(gFormat.format(54.4), "P0"); + } + + writeRetract(X, Y); // return to home + + onImpliedCommand(COMMAND_END); + onImpliedCommand(COMMAND_STOP_SPINDLE); + writeBlock(mFormat.format(30)); // stop program, spindle stop, coolant off + if (subprograms.length > 0) { + writeln(""); + write(subprograms); + } + writeln("%"); +} diff --git a/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-2007-template.xlsx b/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-2007-template.xlsx new file mode 100644 index 000000000..151919727 Binary files /dev/null and b/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-2007-template.xlsx differ diff --git a/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-template.xls b/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-template.xls new file mode 100644 index 000000000..bff71e433 --- /dev/null +++ b/resources/workshop/.inc/saturn/mc/meta/setup-sheet-excel-template.xls @@ -0,0 +1,1484 @@ + + + + + Autodesk CAM - Setup Sheet + Autodesk, Inc. + autodesk cam post processor + 2010-05-28T13:23:03Z + 2010-05-28T12:41:38Z + Autodesk, Inc. + 11.9999 + + + 10005 + 10005 + 120 + 135 + 2 + False + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Program + Setup Sheet + Date + + + $program.name + $program.generationTime + + + Comment + Overview + Part + + + $program.comment + $program.partName + + + + + + + Reference + Job + $program.jobDescription + + + Programmer + $program.user + + + Part + DX + $program.partDX + + + DY + $program.partDY + + + DZ + $program.partDZ + + + Stock + DX + #VALUE! + + + DY + #VALUE! + + + DZ + #VALUE! + + + X min + $program.stockLowerX + + + Y min + $program.stockLowerY + + + Z min + $program.stockLowerZ + + + X max + $program.stockUpperX + + + Y max + $program.stockUpperY + + + Z max + $program.stockUpperZ + + + Toolpath + WCS # + $program.workOffset + + + + # Operations + $program.numberOfSections + + + # Tools + $program.numberOfTools + + + Machining Time + $program.cycleTime + + + Feed Distance + $program.cuttingDistance + + + Rapid Distance + $program.rapidDistance + +
    + + + +