Geometry-Aware Hatching Toolpath Selection and Parameter Optimization for Laser Marking of Complex Two-Dimensional Contours
Abstract
1. Introduction
- 1.
- A geometry-aware comparison framework is established for zigzag parallel hatching and contour-parallel hatching over single-layer, nested multi-layer, and irregular two-dimensional contours.
- 2.
- A shape complexity descriptor is introduced to support the distinction between regular and complex contours using compactness, hole number, concavity, and curvature variation.
- 3.
- The roles of the Hough transform, curve fitting, and particle swarm optimization are clarified. In particular, Hough-based line fitting is treated as an optional raster-contour preprocessing step, while scanline-polygon intersection is recommended for vector contours.
- 4.
- The numerical results are reported as toolpath-generation results rather than physical machine-processing results, and repeated runs are summarized using mean, standard deviation, maximum absolute deviation, and maximum relative deviation.
- 5.
- A physical laser-marking validation protocol is outlined to support future experimental verification using real execution time, dimensional error, mark contrast, line width uniformity, and sample photographs.
2. Materials and Methods
2.1. Benchmark Contours and Hatching Task
2.2. Toolpath Modeling and Optimization Framework
3. Experimental Design and Results
3.1. Software Environment and Scope of Numerical Evaluation
3.2. Symbols and Definitions
3.3. Shape Complexity Descriptor and Strategy Selection Criterion
3.4. PSO-Based Parameter Optimization Objective
3.5. Benchmark Contour Description
3.6. Hatching Path Generation Procedures
3.6.1. Single-Layer Contours
3.6.2. Nested Multi-Layer Contours
3.6.3. Irregular Contours
3.7. Toolpath Visualization and Numerical Results
3.7.1. Bezier Curve Method
3.7.2. MATLAB Fitting Curve
3.7.3. Experimental Results
3.8. Performance and Uncertainty Analysis
3.9. External Baseline and Visual Comparison Protocol
3.10. Physical Marking Validation Protocol and Data Reporting
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Moskal, D.; Martan, J.; Honner, M. Scanning Strategies in Laser Surface Texturing: A Review. Micromachines 2023, 14, 1241. [Google Scholar] [CrossRef] [PubMed]
- Martan, J.; Moskal, D.; Honner, M. Performance and Accuracy of the Shifted Laser Surface Texturing Method. Micromachines 2020, 11, 520. [Google Scholar] [CrossRef]
- Dondieu, S.D.; Wlodarczyk, K.L.; Harrison, P.; Hand, D.P. Process Optimization for 100 W Nanosecond Pulsed Fiber Laser Engraving of 316 L Grade Stainless Steel. J. Manuf. Mater. Process. 2020, 4, 110. [Google Scholar] [CrossRef]
- Wang, D.; Yu, Q.; Zhang, Y. Research on Laser Marking Speed Optimization by Using Genetic Algorithm. PLoS ONE 2015, 10, e0126141. [Google Scholar] [CrossRef] [PubMed]
- Wang, Z.; Bai, Y.; Luo, X. Creation and Optimization of Laser Marking Hatch Contour Generation Algorithm. In Proceedings of the 2021 International Conference on Information Technology, Education and Development (ICITED 2021); Francis Academic Press: London, UK, 2021; pp. 519–523. [Google Scholar] [CrossRef]
- Luo, X.; Wang, Z.; Bai, Y. Optimization Algorithm Design of Laser Marking Contour Extraction and Graphics Hatching Based on Image Processing Technology. J. Phys. Conf. Ser. 2022, 2173, 012078. [Google Scholar] [CrossRef]
- Luo, J.; Duan, C. Optimization Algorithm Design Based on Laser Marking Contour Extraction and Graphic Filling. In Proceedings of the 2025 IEEE 3rd International Conference on Image Processing and Computer Applications (ICIPCA); IEEE: Piscataway, NJ, USA, 2025; pp. 878–882. [Google Scholar] [CrossRef]
- Lu, G.; Liu, Y.; Yao, X.; Yang, J.; Jia, C. Exploration of Laser Marking Path and Algorithm Based on Intelligent Computing and Internet of Things. Comput. Intell. Neurosci. 2022, 2022, 7443410. [Google Scholar] [CrossRef] [PubMed]
- Jiang, J.; Ma, Y. Path Planning Strategies to Optimize Accuracy, Quality, Build Time and Material Use in Additive Manufacturing: A Review. Micromachines 2020, 11, 633. [Google Scholar] [CrossRef] [PubMed]
- Bi, M.; Xia, L.; Tran, P.; Li, Z.; Wan, Q.; Wang, L.; Shen, W.; Ma, G.; Xie, Y.M. Continuous Contour-Zigzag Hybrid Toolpath for Large Format Additive Manufacturing. Addit. Manuf. 2022, 55, 102822. [Google Scholar] [CrossRef]
- Zeng, J.-X.; Zhang, G.-M.; Chu, J.; Lu, Y.-M. Fit Line Using a Method Combined Hough Transform with Least Square. J. Nanchang Hangkong Univ. Nat. Sci. Ed. 2003, 17, 9–13. [Google Scholar]
- Jing, H.; Wang, Z. On Calculations of First Type Curvilinear Integrals; Department of Basic Courses, Rocket Force University of Engineering: Xi’an, China, 2020; Volume 23, pp. 16–19+36. [Google Scholar]
- Zhang, X.-Y.; Lei, Y.-F.; Liu, P.-P.; Bao, F.-X.; Zhang, Y.-F. Curve Modeling Using Rational Fractal Interpolation with Variable Parameters. J. Graph. 2021, 42, 245–255. [Google Scholar] [CrossRef]
- Yang, W.; Li, Q. Summary of Particle Swarm Optimization Algorithm. Eng. Sci. 2004, 6, 87–94. [Google Scholar]
- Wei, W.; Guo, Y. Dynamic Particle Swarm Algorithm for Multi-Objective Optimization Based on Crowding Distance. Comput. Eng. Des. 2011, 32, 1422–1425+145. [Google Scholar]
- Sheng, L.; Zeng, Z. Research on Curve Fitting Principle and Its Application. Master’s Thesis, Changsha University of Science and Technology, Changsha, China, 2015. [Google Scholar]
- Chen, M. Research on Improved Particle Swarm Optimization Algorithm for Optimization Problems. Master’s Thesis, Jilin University, Changchun, China, 2015. [Google Scholar]
- Li, M.; Zhang, L.-C.; Mo, J.-H.; Zhao, Z.-Y. Smoothing Technique for 2D Contour in Numerical Control Plasma Cutting. Comput. Integr. Manuf. Syst. 2011, 17, 2623–2628. [Google Scholar]
- Cao, R.; Qiu, H.; Li, J.; Wang, A.; Lu, C. Quality Assessment and Technical Parameter Optimization of Laser Direct Part Marking. Appl. Laser 2011, 31, 151–156. [Google Scholar] [CrossRef]
- Li, Y.; Zhang, B. Research on path optimization algorithm for Complex contour laser Cutting. J. Tianjin Univ. Technol. Eng. Version 2007, 23, 6–79. [Google Scholar]
- Tao, X.; Li, Z.; Wang, H. Optimal solution of matrix layout based on filling algorithm. China Mech. Eng. 2003, 14, 1104–1107. [Google Scholar]
- Shi, H.; Chen, X.; Lai, Z.; Ouyang, P.; Ou, L. Contour Line Drawing Based on Discrete Data. Chin. J. Eng. Geophys. 2006, 3, 484–487. [Google Scholar]
- Shen, Z.; Liu, X.; Fei, X.; Kang, K. Laser galvanometer processing algorithm based on point set Bezier curve optimization. Laser Technol. 2021, 45, 548–553. [Google Scholar]
- Yang, Y.; Wang, Y. Research and implementation of hand-drawn Line Vectorization Technology. Comput. Eng. Sci. 2011, 33, 128–131. [Google Scholar]
- Liu, b.; Huang, S. Optimization of laser marking noozzle path in layered solid manufacturing technology. J. Comput. Aided Des. Graph. 2004, 16, 660–665. [Google Scholar]
- Situ, J.-M.; Liu, Y.; Yan, M.-X.; Zhang, X.-Y. Research of a New Method for Marking Laser-Induced Gray Images. Laser Technol. 2010, 34, 389–391. [Google Scholar]











| Symbols | Definitions |
|---|---|
| J | Least-square index of curve |
| The hatch spacing is D-round’s hatching time | |
| The total length of contour | |
| The total length of horizontal lines | |
| I | The number of the drawing area |
| The number of contour | |
| The total length of horizontal lines |
| Center of the Circle X | Center Ordinate Y | Radius R |
|---|---|---|
| 15.66162 | 0.974086 | 1 |
| 15.48854 | 0.912793 | 1 |
| 15.30922 | 0.850808 | 1 |
| 15.21720 | 0.819546 | 1 |
| 15.03235 | 0.757615 | 1 |
| 14.66724 | 0.638357 | 1 |
| 14.30833 | 0.525069 | 1 |
| Single-Layer Curves | Multi-Layer Curves | |||
|---|---|---|---|---|
| Internal contraction of boundary distance/mm | 1 | 0.1 | 1 | 0.1 |
| Hatch line spacing/mm | 1 | 0.1 | 1 | 0.1 |
| /mm | 896.82 | 10,017.094 | 773.0452 | 9060.1234 |
| /mm | 196.4336 | 989.5264 | 189.0599 | 1306.32959 |
| 8 | 85 | 5 | 59 | |
| 85 | 908 | 50 | 525 | |
| /ms | 709.62 | 5839 | 606.622 | 4088 |
| /ms | 249.88 | 600.2 | 228.224 | 780 |
| 0.3521 | 0.103 | 0.29259 | 0.148 | |
| Zigzag Parallel Hatch | Contour-Parallel Hatch |
|---|---|
| High precision (Error < 0.001 mm) | High precision (Error in 0.001∼0.01 mm) |
| Short use time | Long use time |
| Suitable for regular graphics | Strong applicability |
| Hatch Line Spacing | Tc(d)/s | Th(d)/s |
|---|---|---|
| 0.01 mm | 12.929412 | 1.341666 |
| 0.02 mm | 6.08709 | 0.81583 |
| 0.03 mm | 3.630082 | 0.644071 |
| 0.04 mm | 3.144293 | 0.541725 |
| 0.05 mm | 2.333383 | 0.460358 |
| 0.06 mm | 2.080737 | 0.461272 |
| 0.07 mm | 1.684617 | 0.377026 |
| 0.08 mm | 1.638558 | 0.372791 |
| 0.09 mm | 1.404593 | 0.356446 |
| 0.10 mm | 1.277646 | 0.333292 |
| Type | Time1 | Time2 | Time3 | Time4 | Time5 | Avg | |
|---|---|---|---|---|---|---|---|
| Single-layer contour | 0.709153 | 0.709183 | 0.709166 | 0.70917 | 0.709168 | 0.709168 | |
| 5.839271 | 5.839272 | 5.839279 | 5.839261 | 5.839287 | 5.839274 | ||
| 0.249872 | 0.249873 | 0.24988 | 0.249877 | 0.249875 | 0.249875 | ||
| 0.600203 | 0.600204 | 0.6002 | 0.600199 | 0.600195 | 0.600201 |
| Type | Time1 | Time2 | Time3 | Time4 | Time5 | Avg | |
|---|---|---|---|---|---|---|---|
| Multi-layer contour | 0.606628 | 0.60662 | 0.606621 | 0.60664 | 0.606617 | 0.606622 | |
| 4.088126 | 4.088126 | 4.088125 | 4.088127 | 4.088126 | 4.088126 | ||
| 0.228222 | 0.228226 | 0.228228 | 0.228224 | 0.22822 | 0.228224 | ||
| 0.779984 | 0.779992 | 0.779998 | 0.779998 | 0.780008 | 0.779996 |
| Condition | Mean (s) | SD (s) | Max. Abs. Dev. (s) | Max. Rel. Dev. (%) |
|---|---|---|---|---|
| Single-layer | 0.709168 | 0.000011 | 0.000015 | 0.0021 |
| Single-layer | 5.839274 | 0.000010 | 0.000013 | 0.0002 |
| Single-layer | 0.249875 | 0.000003 | 0.000005 | 0.0018 |
| Single-layer | 0.600201 | 0.000004 | 0.000006 | 0.0010 |
| Nested | 0.606625 | 0.000009 | 0.000015 | 0.0024 |
| Nested | 4.088126 | 0.000001 | 0.000001 | 0.0000 |
| Nested | 0.228224 | 0.000003 | 0.000004 | 0.0018 |
| Nested | 0.779996 | 0.000009 | 0.000012 | 0.0015 |
| Contour | Method | d (mm) | (s) | (mm) | (mm) | Starts/Stops |
|---|---|---|---|---|---|---|
| Regular | Zigzag | 0.10 | 0.600 | 989.526 | 82.430 | 908 |
| Regular | Contour-parallel | 0.10 | 5.839 | 10,017.094 | 146.280 | 85 |
| Regular | Baseline | 0.10 | 0.742 | 1125.684 | 238.510 | 946 |
| Nested | Zigzag | 0.10 | 0.780 | 1306.330 | 126.750 | 525 |
| Nested | Contour-parallel | 0.10 | 4.088 | 9060.123 | 194.630 | 59 |
| Nested | Baseline | 0.10 | 0.914 | 1498.270 | 362.840 | 584 |
| Irregular | Zigzag | 0.10 | 0.333 | 684.920 | 158.740 | 312 |
| Irregular | Contour-parallel | 0.10 | 1.278 | 3826.450 | 221.530 | 47 |
| Irregular | Baseline | 0.10 | 0.486 | 812.360 | 428.190 | 365 |
| Item | Value |
|---|---|
| Material | Polished SS304 plate |
| Laser source | Pulsed fiber laser, 1064 nm |
| Average power | 20 W |
| Pulse frequency/width | 50 kHz/100 ns |
| Scanning speed | 800 mm/s |
| F-theta lens/spot size | 160 mm/∼30 m |
| Hatch spacing | 0.10 mm, 0.20 mm |
| Galvo setting | 8000 mm/s2, 100 s jump delay |
| Repeated markings | 5 per condition |
| Imaging device | Digital microscope, 2448 × 2048 pixels |
| Contour Type | Strategy | d (mm) | (s) | Dim. Error (mm) | Contrast | Line-Width CV (%) |
|---|---|---|---|---|---|---|
| Regular | Zigzag | 0.10 | ||||
| Regular | Zigzag | 0.20 | ||||
| Regular | Contour-parallel | 0.10 | ||||
| Regular | Contour-parallel | 0.20 | ||||
| Nested | Zigzag | 0.10 | ||||
| Nested | Zigzag | 0.20 | ||||
| Nested | Contour-parallel | 0.10 | ||||
| Nested | Contour-parallel | 0.20 | ||||
| Irregular | Zigzag | 0.10 | ||||
| Irregular | Zigzag | 0.20 | ||||
| Irregular | Contour-parallel | 0.10 | ||||
| Irregular | Contour-parallel | 0.20 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Xu, Z.; Cui, Y.; Wang, J.-C.; Yang, J. Geometry-Aware Hatching Toolpath Selection and Parameter Optimization for Laser Marking of Complex Two-Dimensional Contours. Appl. Sci. 2026, 16, 6744. https://doi.org/10.3390/app16136744
Xu Z, Cui Y, Wang J-C, Yang J. Geometry-Aware Hatching Toolpath Selection and Parameter Optimization for Laser Marking of Complex Two-Dimensional Contours. Applied Sciences. 2026; 16(13):6744. https://doi.org/10.3390/app16136744
Chicago/Turabian StyleXu, Zuoping, Yifeng Cui, Jen-Chieh Wang, and Jinxiao Yang. 2026. "Geometry-Aware Hatching Toolpath Selection and Parameter Optimization for Laser Marking of Complex Two-Dimensional Contours" Applied Sciences 16, no. 13: 6744. https://doi.org/10.3390/app16136744
APA StyleXu, Z., Cui, Y., Wang, J.-C., & Yang, J. (2026). Geometry-Aware Hatching Toolpath Selection and Parameter Optimization for Laser Marking of Complex Two-Dimensional Contours. Applied Sciences, 16(13), 6744. https://doi.org/10.3390/app16136744

