## 2 Materials and Methods  
This work set out to analyze the effect of the variable machining parameters of milling and brushing on selected indicators of the surface geometry and energy. These analyses concerned the machinability of two types of magnesium alloys: AZ31 (for sheet and plate uses) and AZ91D (a die casting alloy). The milling was carried out using the vertical milling center AVIA VMC800 HS (Warsaw, Poland) with the Heidenhain iTNC 530 control system. The model and the machining procedure were implemented by means of NX 10.0 - SIEMENS (Munich, Germany) software. The cutting tool in the tests was a VHM end mill from Fenes (Siedlce, Poland). It was a TiAlN-coated double-edge carbide milling cutter of a diameter, d = 16 mm. The milling cutter was mounted in a SECO shrink-fit holder (Fagersta, Sweden) HSK 63A SFD 16 \(\times\) 120 mm. A CIMAT RT 610 balancer (Bydgoszcz, Poland) was used to balance the tool and holder in a grade \"G2.5\", in accordance with the International Standard, ISO 21940-11: 2016. The residual unbalance value was 0.77 gmm. Based on former research and a review of the literature, the following ranges of milling parameters were used: The cutting speed \(\mathrm{v_{c}}\) = 400-1200 m/min, the trochoidal step \(\mathrm{s_{tr}}\) = 5-30% of the tool diameter, \(\mathrm{f_{z}}\) = 0.15 mm/tooth, and \(\mathrm{a_{p}}\) = 6 mm. The tests were specifically designed to determine the impact of the trochoidal step, \(\mathrm{s_{tr}}\), and the cutting speed, \(\mathrm{v_{c}}\), on selected 2D and 3D roughness parameters. The 2D surface roughness parameters were measured in two variants, at the end face and the lateral face, while the 3D area roughness was measured solely at the end face. In the case of the 2D roughness parameters' analysis, the following measurements were made:  
1. At the end face of the specimen: Rz, Rku, Rsk, RSm, Ra; and
2. At the lateral face of the specimen: Rz, RSm, Rku, Rsk. The 3D roughness parameters measurements were based on the following parameters: Sa, Sz, Sku, and Ssk. 2D roughness measurements were carried in five repetitions on each surface, with the use of a Hommel Tester T1000 contact profilometer (Jena, Germany). The following measurement parameters were used for 2D roughness measurements: Traverse length \(\mathrm{lt}\) = 15 mm and sampling length \(\mathrm{lr}\) = 2.5 mm, scan rate \(\mathrm{v_{t}}\) = 0.5 mm/s, and measuring ranges/resolution \(\mathrm{M}\) = \(\pm\)320 \(\mathrm{\SIUnitSymbolMicro m}\)/0.04 \(\mathrm{\SIUnitSymbolMicro m}\)). T8000 RC120-400 combined roughness and contour measurement system by Hommel-Etamic Jenooptik (Jena, Germany) was the tool for the 3D area roughness profile measurements. The 3D area roughness measurement specifications were the following: \(\mathrm{lt}\) = 4.8 mm, \(\mathrm{lr}\) = 0.8 mm, and \(\mathrm{v_{t}}\) = 0.5 mm/s. The \(4.8\times 4.8\) mm surface area was scanned in approximately 200 scanning steps. Figure 1 shows an example of a 2D surface profile obtained from the extracted profile analysis, according to the International Standards ISO: ISO 11562, ISO 135651, and ISO 4287. Figure 2 presents a schematic diagram of the conducted experiment (Figure 2a) and test set-up (Figure 2b) along with the object of the study. Figure 1: An example of a 2D surface profile, including the surface roughness parameters (v\({}_{\rm c}\) = 1200 m/min, str = 15%, AZ31, after trochoidal milling). Figure 2: Cont. Milling was followed by brushing, which was carried out at constant parameters with a ceramic brush from Xebec (Tokyo, Japan), with a shank diameter of 6 mm. The brush fibers offer different grinding power properties, represented by the pink, red, white, and blue colors. In our tests, red fibers, dedicated for light alloys, were employed. The brushing parameters were constant: n = 5000 rev/min, v\({}_{\text{f}}\) = 300 mm/min, and the distance between the fibers and the work surface, a\({}_{\text{p}}\) = 0.5 mm.