A manufacturing process that uses computer-controlled machines to precisely cut, shape, and drill materials like metal, plastic, and wood.It allows for complex designs that would be difficult or impossible to achieve manually.
We used the Haas Desktop Mill, which is a compact CNC machine for training and prototyping soft materials. The system is the same as all the larger HASS mills, so the skill set is fully transferable. Parts are held down using the 7" Desktop Mill Vise and parrelles if needed. We used a variety of endmills, ball mills, and drills.
Learning G-code has a steep learning curve, and we started by writing programs by hand before transitioning to using SolidWorks HSM. Writing code manually and checking it in FreshCut helped us grasp the fundamentals of G-code, making it easier to spot errors in the automatically generated code from the software. This hands-on experience gave us a deeper understanding of how the code drives the CNC machine and allowed us to troubleshoot more effectively.
When setting up parts in SolidWorks HSMWorks, defining the Work Coordinate System (WCS) is crucial for accurate machining. The WCS establishes the machine’s zero point, ensuring proper tool alignment and movement. It is typically set at the top-left corner of the stock to align with the CNC machine setup. Toolpaths are generated by selecting features on the 3D model, and all settings are verified through stock simulation to ensure the part is cut correctly before transferring it to the Haas Mill.
Worked with handwritten G-Code and HSM programing
I specified the tools, speeds, feeds, cut depths, and tool paths in Solidwork's HSM. Using HSM to generate the G-code, I selected the pocket, hole, excursion, and facing. This G-code was then moved over to the HASS CNC machine, run in graphics, checked, and then milled out.
FlashCut CNC was used for real-time CNC visualization and G-code generating.
I learned how to make two parts fit tight using face offsets in HSM. First, I made the pocket too small, then measured the parts and adjusted the offset in HSM until they fit just right.
If you notice, the pocket is not a full square. This is because we used a round endmill, and you can't get 90-degree angles routing out the inside of this part.
G-Code is checked in FlashCut!
2D and 3-D milling using roughing passes facing and finishing spiral passes, all in SolidWorks HSM and the HASS desktop mill.
We had a time restraint of machining the part in under 10 minutes, so I had to balance the resolution of the spiral move with the time of machining.
In HSM I used stock-simulaiton to visualise the tool paths to check the G-Code before running on the real parts.
%
O00005
(Using high feed G1 F100. instead of G0.)
(Multiple tools allowed. Setting 15 must be enabled in the controller.)
(Machine)
( vendor: Haas Automation)
( model: Desktop Mill)
(T1 D=0.1875 CR=0. - ZMIN=-0.21 - flat end mill)
(T2 D=0.14 CR=0. TAPER=118deg - ZMIN=-0.2029 - drill)
N10 G90 G94 G17
N15 G20
N20 G53 G0 Z0.
(Face7)
N25 T1 M0
(MANUAL TOOL CHANGE TO T1)
N30 S2500 M3
N35 G17 G90 G94
N40 G54
N45 M8
N50 G1 X2.1219 Y-0.9251 F100.
N55 G0 G43 Z0.6 H1
N60 G0 Z0.2
N65 G1 Z-0.0312 F5.
N70 G18 G3 X2.1031 Z-0.05 I-0.0187 K0. F15.
N75 G1 X2.
N80 X0.
N85 G17 G2 Y-0.7583 I0. J0.0834
N90 G1 X2.
N95 G3 Y-0.5914 I0. J0.0834
N100 G1 X0.
N105 G2 Y-0.4246 I0. J0.0834
N110 G1 X2.
N115 G3 Y-0.2577 I0. J0.0834
N120 G1 X0.
N125 G2 Y-0.0908 I0. J0.0834
N130 G1 X2.
N135 G18 G2 X2.0187 Z-0.0312 I0. K0.0187
N140 G0 Z0.6
(2D Contour4)
N145 G17
N150 G1 X0.7636 Y-1.3565 F100.
N155 G0 Z0.6
N160 Z0.2
N165 G1 Z0.08 F5.
N170 Z-0.1113
N175 G19 G3 Y-1.3378 Z-0.13 J0.0187 K0. F15.
N180 G1 Y-1.319
N185 G17 G3 X0.7449 Y-1.3002 I-0.0188 J0.
N190 G1 X0.6131 Y-1.3001
N195 X0.4813 Y-1.2997
N200 X0.3495 Y-1.299
N205 G2 X-0.0063 Y-1.1265 I0.003 J0.4593
N210 X-0.0456 Y-1.0689 I0.3614 J0.289
N215 G1 X-0.2405 Y-0.7314
N220 G2 Y-0.2686 I0.4008 J0.2314
N225 G1 X-0.0456 Y0.0689
N230 G2 X0.3551 Y0.3002 I0.4008 J-0.2314
N235 G1 X0.4869 Y0.3001
N240 X0.6187 Y0.2997
N245 X0.7505 Y0.299
N250 G2 X1.1063 Y0.1265 I-0.003 J-0.4593
N255 X1.1456 Y0.0689 I-0.3614 J-0.289
N260 G1 X1.3405 Y-0.2686
N265 G2 Y-0.7314 I-0.4008 J-0.2314
N270 G1 X1.1456 Y-1.0689
N275 G2 X0.7449 Y-1.3002 I-0.4008 J0.2314
N280 X0.6143 Y-1.2132 I0. J0.1415
N285 G3 X0.4837 Y-1.1261 I-0.1306 J-0.0544
N290 G1 X0.3551
N295 G2 X0.1052 Y-0.9818 I0. J0.2886
N300 G1 X-0.0897 Y-0.6443
N305 G2 Y-0.3557 I0.25 J0.1443
N310 G1 X0.1052 Y-0.0182
N315 G2 X0.3551 Y0.1261 I0.25 J-0.1443
N320 G1 X0.7449
N325 G2 X0.9948 Y-0.0182 I0. J-0.2886
N330 G1 X1.1897 Y-0.3557
N335 G2 Y-0.6443 I-0.25 J-0.1443
N340 G1 X0.9948 Y-0.9818
N345 G2 X0.7449 Y-1.1261 I-0.25 J0.1443
N350 G1 X0.4837
N355 G2 X0.333 Y-1.0337 I0. J0.169
N360 G3 X0.2488 Y-0.8783 I-2.9363 J-1.4913
N365 G1 X0.0629 Y-0.5562
N370 G2 Y-0.4437 I0.0974 J0.0563
N375 G1 X0.2577 Y-0.1063
N380 G2 X0.3551 Y-0.05 I0.0974 J-0.0563
N385 G1 X0.7449
N390 G2 X0.8423 Y-0.1063 I0. J-0.1125
N395 G1 X1.0371 Y-0.4437
N400 G2 Y-0.5562 I-0.0974 J-0.0563
N405 G1 X0.8423 Y-0.8938
N410 G2 X0.7449 Y-0.95 I-0.0974 J0.0563
N415 G1 X0.3551
N420 G2 X0.2577 Y-0.8938 I0. J0.1125
N425 G1 X0.2488 Y-0.8783
N430 G2 X0.2499 Y-0.8614 I0.0132 J0.0076
N435 G3 X0.251 Y-0.8446 I-0.0121 J0.0092
N440 G1 X0.0791 Y-0.5469
N445 G2 Y-0.4531 I0.0812 J0.0469
N450 G1 X0.274 Y-0.1156
N455 G2 X0.3551 Y-0.0688 I0.0812 J-0.0469
N460 G1 X0.7449
N465 G2 X0.826 Y-0.1156 I0. J-0.0938
N470 G1 X1.0209 Y-0.4531
N475 G2 Y-0.5469 I-0.0812 J-0.0469
N480 G1 X0.826 Y-0.8844
N485 G2 X0.7449 Y-0.9312 I-0.0812 J0.0469
N490 G1 X0.3551
N495 G2 X0.274 Y-0.8844 I0. J0.0938
N500 G1 X0.251 Y-0.8446
N505 G3 X0.2254 Y-0.8377 I-0.0162 J-0.0094
N510 G1 X0.2091 Y-0.8471
N515 X0.2063 Y-0.8487 Z-0.1297
N520 X0.2036 Y-0.8503 Z-0.1289
N525 X0.201 Y-0.8518 Z-0.1275
N530 X0.1987 Y-0.8531 Z-0.1256
N535 X0.1967 Y-0.8542 Z-0.1233
N540 X0.1951 Y-0.8552 Z-0.1206
N545 X0.1939 Y-0.8559 Z-0.1177
N550 X0.1931 Y-0.8563 Z-0.1145
N555 X0.1929 Y-0.8564 Z-0.1113
N560 G0 Z0.6
(Face1)
N565 G1 X1.9251 Y0.1219 F100.
N570 G0 Z0.6
N575 Z0.2
N580 G1 Z-0.1113 F5.
N585 G19 G2 Y0.1031 Z-0.13 J-0.0187 K0. F15.
N590 G1 Y0.
N595 Y-1.
N600 G17 G2 X1.7583 I-0.0834 J0.
N605 G1 Y0.
N610 G3 X1.5914 I-0.0834 J0.
N615 G1 Y-1.
N620 G2 X1.4246 I-0.0834 J0.
N625 G1 Y0.
N630 G3 X1.2577 I-0.0834 J0.
N635 G1 Y-1.
N640 G2 X1.0908 I-0.0834 J0.
N645 G1 Y0.
N650 G19 G3 Y0.0187 Z-0.1113 J0. K0.0187
N655 G0 Z0.6
(2D Pocket4)
N660 G17
N665 G1 X1.4959 Y-0.4642 F100.
N670 G0 Z0.6
N675 Z0.2
N680 G1 Z0.1187 F5.
N685 X1.4948 Y-0.465 Z0.1117
N690 X1.4918 Y-0.4675 Z0.1057
N695 X1.4875 Y-0.4715 Z0.1016
N700 X1.4827 Y-0.4765 Z0.1
N705 G3 X1.488 Y-0.4709 Z0.0807 I0.0673 J-0.0583
N710 X1.4938 Y-0.4657 Z0.0615 I0.062 J-0.064
N715 X1.5001 Y-0.4611 Z0.0422 I0.0562 J-0.0691
N720 X1.5067 Y-0.457 Z0.0229 I0.0499 J-0.0738
N725 X1.5137 Y-0.4536 Z0.0036 I0.0433 J-0.0778
N730 X1.5209 Y-0.4507 Z-0.0156 I0.0363 J-0.0813
N735 X1.5283 Y-0.4485 Z-0.0349 I0.0291 J-0.0842
N740 X1.5359 Y-0.4469 Z-0.0542 I0.0217 J-0.0864
N745 X1.5437 Y-0.446 Z-0.0734 I0.0141 J-0.0879
N750 X1.5514 Y-0.4458 Z-0.0927 I0.0063 J-0.0888
N755 X1.5592 Y-0.4463 Z-0.112 I-0.0014 J-0.0891
N760 X1.5669 Y-0.4474 Z-0.1312 I-0.0092 J-0.0886
N765 X1.5744 Y-0.4492 Z-0.1505 I-0.0169 J-0.0875
N770 X1.5818 Y-0.4517 Z-0.1698 I-0.0244 J-0.0856
N775 X1.5889 Y-0.4548 Z-0.1891 I-0.0318 J-0.0832
N780 X1.53 Y-0.6217 Z-0.1995 I-0.0389 J-0.0801
N785 X1.55 Y-0.4458 Z-0.21 I0.02 J0.0868
N790 G1 X1.4216 F15.
N795 G3 X1.4152 Y-0.4569 I0. J-0.0074
N800 G1 X1.4632 Y-0.5401
N805 G3 X1.4876 Y-0.5542 I0.0244 J0.0141
N810 G1 X1.5914
N815 G3 X1.6042 Y-0.5414 I0. J0.0128
N820 G1 Y-0.4586
N825 G3 X1.5914 Y-0.4458 I-0.0128 J0.
N830 G1 X1.55
N835 G2 X1.45 Y-0.3792 I0. J0.1083
N840 G3 X1.35 Y-0.3125 I-0.1 J-0.0417
N845 G1 X1.2775
N850 G3 X1.2277 Y-0.3988 I0. J-0.0575
N855 G1 X1.3778 Y-0.6588
N860 G3 X1.4276 Y-0.6875 I0.0498 J0.0287
N865 G1 X1.68
N870 G3 X1.7375 Y-0.63 I0. J0.0575
N875 G1 Y-0.37
N880 G3 X1.68 Y-0.3125 I-0.0575 J0.
N885 G1 X1.35
N890 G2 X1.336 Y-0.3031 I0. J0.0152
N895 G3 X1.3219 Y-0.2937 I-0.0141 J-0.0059
N900 G1 X1.2775
N905 G3 X1.2114 Y-0.4081 I0. J-0.0762
N910 G1 X1.3615 Y-0.6681
N915 G3 X1.4276 Y-0.7062 I0.066 J0.0381
N920 G1 X1.68
N925 G3 X1.7562 Y-0.63 I0. J0.0762
N930 G1 Y-0.37
N935 G3 X1.68 Y-0.2937 I-0.0762 J0.
N940 G1 X1.3219
N945 X1.3195 Y-0.2939 Z-0.2095
N950 X1.3172 Y-0.2944 Z-0.209
N955 X1.3149 Y-0.2951 Z-0.2086
N960 X1.3122 Y-0.2965 Z-0.2065
N965 X1.3097 Y-0.2982 Z-0.2045
N970 X1.3083 Y-0.2996 Z-0.2015
N975 X1.3069 Y-0.3012 Z-0.1984
N980 X1.3061 Y-0.3024 Z-0.1913
N985 G0 Z0.6
N990 M9
N995 M5
N1000 G53 G0 Z0.
M02
(0.14063in Drill)
N1005 T2 M0
(MANUAL TOOL CHANGE TO T2)
N1010 S2500 M3
N1015 G17 G90 G94
N1020 G54
N1025 M8
N1030 G1 X0.55 Y-0.5 F100.
N1035 G0 G43 Z0.6 H2
N1040 G0 Z0.2
N1045 G98 G81 X0.55 Y-0.5 Z-0.2029 R0.15 F5.
N1050 G80
N1055 G0 Z0.6
N1060 M5
N1065 M9
N1070 G53 G0 Z0.
N1075 G53 G0 X0. Y0.
N1080 M30
%
Facing, 2D Pocket, and Drilling