Design for Manufacturability for CNC Machining — Automatic Manufacturability Assessment
The definition of design for manufacturability (DFM) goes as follow: “The general engineering practice of designing products in such a way that they are easy to manufacture” . Doing so will invariably improve the return on investment by reducing cost and avoiding problems during the manufacturing process. DFM allows problems to be caught when the cost of error is the smallest (i.e. when the part isn’t being made yet). Even if a part is manufacturable, one should always consider whether it could be manufactured faster and/or cheaper using DFM principles.
For computer numerical control machining (CNC machining) the cost is mostly driven by the machines time. This encompass the time the machine is being used, the setup time and the time to program the machine for the task. The time is also heavily affected by the material being used, the tolerances that are acceptable and the complexity of the part. If the part is to be designed for manufacturability, the designer needs to keep all these concepts in mind and balance them properly.
In this blog post, we will look at a few examples of DFM in action along with a review of tools and technique to programmatically automate the review process. If you want to learn more about different ways of saving up on cost in CNC machining, take a look at one of our previous blog post “10 méthodes pour économiser sur l’usinage CNC”. Here are a few examples of application of DFM.
An obvious change that one can make to a design to make it easier to machine is avoiding sharp corner. If we look at a turning process  for two parts presented in figure 1, the panel 1A makes more aesthetic sense. However, since a turning process is a single point cutting tool removing material from a rotating workpiece to form a cylindrical shape, it is impossible to get this type of right angle with only the tool as every tool has some radius. Therefore, to have a sharp corner, one need to manually remove the rounded corner. Leaving this slight curvature that fits with the piece used for the turning process as seen in the panel 1B greatly simplifies the machining process and therefore reduces the machining time.
Drilling Hole Ratio
Another simple example of a mistake that can be made is long thin hole during the drilling process . Standard drills are usually used to produce holes with a depth to diameter ratio of 3:1. If we look at figure 2, the red hole doesn’t respect this ratio and would require special tooling to avoid the drift that reduce the hole straightness which is difficult to correct and it is still an heavily studied topic . This is problematic because special tooling will invariably increase the price of a quotation from a supplier.
Drilling Holes Shapes
Also, the designer needs to take into consideration how the tool will interact with the surface during a drilling process. If we look at figure 3A, this part is aesthetically more pleasing than the one at panel B. However, if we think about a drill coming from the top it will make contact on the upper left section before the upper right. Similarly, it will exit unevenly at the bottom. Holes are easier and cheaper to drill if they are done on a flat surface and perpendicular to the drill motion as in panel B.
Special Blind Holes Finish
One final example that is obvious once we understand the why behind the modification is blind holes that finish in non-standard way. Even though through holes are preferred over blind ones, the finish surface should match standard drill endings. If we look at figure 4, the left hole has a very pointy finish surface. However, to produce such an ending, a good deal of fixture needs to be applied. In contrast, the right hole matches standard drill ending and doesn’t require costly extra steps.
Automatic Manufacturability Assessment
Those were only few examples among many variables that can influence the machines time and the final cost of a part. So, having a specialist well versed into DFM in each and every design project would be ideal. However, even when a specialist is onboard human error can still happen, which can slow down the process of getting the part manufactured. Automatic manufacturability assessment is a competitive edge for business that want to optimize their production. For instance, the DFMPro software makes use of a rule-based checker system that identifies manufacturing issues such as thin walls and deep holes which has been shown to reduce the amount of work for the designers .
There are four main characteristics that influence the time a part spends in machining: visibility, reachability, accessibility and setup complexity . Visibility depicts the view from the machine tool to the part. A part has high visibility if the surface area of the entire model can be seen from the view of the machine tool. Reachability stands for the lengths required for the machine tools to reach the surface of the model. The shorter length of the machine tool is preferred. Accessibility measures the ability of a model to be machined without tool collisions. Accessibility is found to be dependent on both the surface geometry and the tool size. Setup complexity measures the number of setups required to fabricate a part. When machining a complex geometry, the tool may need to be rotated in order to access certain features.
There are two main routes one can go to build a system that is aware of these constraints and that can detect and optimize a part geometry: Feature based and analytical feature-less based system. We will also discuss deep learning approach that are showing potential, however these are still quite new.
Feature Based Systems
These systems require the data scientist to define a set of features that the model will take into consideration in its analysis of a given part . Features that characterize holes (amount, depth, width) or total machinable surface would be example of input into such a model. One caveat with this type of methodology is that it requires deep knowledge about what can influence the price of a part and require to develop the feature extraction modules that will generate a feature data frame. This module is usually coded in Python, MATLAB or R depending on the background of the data scientist with heavy help from battle-tested numerical computing library. Often time if the data scientist is dealing with complex input files, he will need to either parallelize his code for increased throughput or go closer to the metal with entire submodule built on C++ with library like LAPACK  or Armadillo . This feature engineering step is costly and requires a lot of efforts. However, once done correctly, the tree-based models that one can use are both powerful and reliable (i.e. Random Forest or XGBoost, see  and  for an overview of these methods)
Feature-less Based Systems
These types of system work directly with the generic model of the design instead of pre-calculated features. These systems work by analyzing the surface representation of the model and can work with any geometry . Many such system have been built do deal with single process and more recently with multiple process like ANA . They work mainly by calculating manufacturability metrics across the surface or in aggregate which can then be color coded back onto the generic model to provide direct feedbacks to the designer (Figure 5).
There are many different variants on this type of system. One of them work with an octotree decomposition of the generic model  which has been shown to be useful in decomposing one complex model into multiple submodules. Another direction for such system is to work with the configuration space of a generic model, which means aggregating valid spatial configurations for a moving mechanism in an environment with obstacles around it , and optimizing for manufacturability within that space.
The implementation of such systems is varied, but they are usually developed in a similar way than the feature-based system, with MATLAB or C++, as they can benefit from numerical optimization provided by heavily optimized linear algebra library.
Deep Learning Systems
Finally, deep learning method that has proven to yield great performance in computer vision have started to be used for DFM. There is no feature engineering steps as the model analyzes the surface representation of the model to determine the manufacturability. The model itself is doing the feature extraction as it learns to optimize for a set of desired outcomes. The type of deep neural network architecture best suited for this type of task are 3D convolutional neural network  which are models specifically well suited for computer vision in 3D space (See figure 6 for an example architecture applied to fMRI brain images which are 3D structure). These are extension of the classical convolutional neural network which excel at image recognition.
There is no free lunch however, these types of models are notoriously finicky  and require a great deal of expertise to train and optimize properly. Furthermore, they require a massive amount of data in order to generalize well to unseen instance. If, however, one such model is trained properly, the performance usually far outperforms the feature-based system and can even attain superhuman performance in some tasks [14, 15, 16]. In DFM however, analytical methods still outperform geometric deep learning algorithm , although there is hope that these models will scale well with enough data provided.
The tools that are usually used to build such models are less varied than the non-deep learning feature-less system, they almost always fall within the realm of Python with library like Tensorflow or Pytorch being the frontrunner of deep learning packages.
Manufacturability assessment system doesn’t stop at only the model being used. Once the model is deployed and being actively used by users, there is intense monitoring that needs to happen in order to avoid the model becoming stale. DFM is a very dynamic subject. What was very difficult to produce 2 years ago might be common practice today. Therefore, keeping track of what is costly and what is not is an ongoing process. A tool that keeps itself up to date to the current trend and that can automatically detect potential costly features is a must for CNC part designer.
Likewise, the optimization also doesn’t stop at DFM. Once you design for manufacturability, the next logical step is to design for assembly (DFA) , which means to design single parts to make the whole easily assemblable. However, like most technological advances, it is easy to get overwhelmed by every potential optimization possible. Taking incremental steps toward a more streamlined production is cautioned, starting at the most glaring pain point in the industry which is currently the outsourcing process and making your way up to tap your designers directly into DFM and DFA best practices.
The type of system discussed in this blog post is currently being developed at GRAD4 through a partnership with McGill university and Mitacs. GRAD4 is currently developing it closely with their suppliers in order to detect the most common problematic features in a CNC part. This system will be available on their platform in the next few months!
GRAD4 is an innovative technology company that standardizes and automates the outsourcing process for buyers and suppliers in the manufacturing sector. It has developed the best technological solution for all companies that have needs or manufacturing capabilities in CNC, sheet metal and welded assembly. Incubated at Centech and accelerated by Ecofuel and NextAI, GRAD4 is financially supported by Front Row Ventures, the Ecofuel Funds and PME MTL. GRAD4 has won several competitions and recognitions, including the “Elevator Pitch” competition presented by National Bank, the Startupfest pitch competition by PME MTL, and the Centech’s Unicorn award as the most promising company in its cohort.
About the authors
Yacine Mahdid is the Chief Technology Officer at GRAD4. He is leading the technical development of the platform and the R&D division along his marvelous team of talented developers and scientists. He is also a graduate student at McGill University trained in computational neuroscience (B.A.Sc.) with a specialization in machine learning. Currently working at the Biosignal Interaction and Personhood Technology Lab, his area of research is focused on creating predictive and diagnostic models to detect consciousness in individuals who are not able to speak or move.
Ying Zhang is a Mitacs Research Intern at GRAD4. Her main responsibility is to develop an automated manufacturability assessment for the GRAD4 platform. Currently, she is a Ph.D. candidate in mechanical engineering at McGill University and holds a bachelor’s and master’s degree in mechanical engineering at Georgia Tech. Her research focuses on the manufacturability analysis for the LPBF process, which is one of the AM techniques. Before starting her Ph.D. degree, she worked as a process and software engineer. She has more than six years’ experience in design, manufacturing, research, and lab.
 DFM Retrieved July 20, 2020, from https://en.wikipedia.org/wiki/Design_for_manufacturability
 Turning Retrieved July 20, 2020, from https://en.wikipedia.org/wiki/Turning
 Drilling Retrieved July 20, 2020, from https://en.wikipedia.org/wiki/Drilling
 R. C. B. Raj, B. Anand Ronald, A. Velayudham, and P. K. Nayak, “Hole Accuracy during Deep Hole Drilling for Hydraulic Cylinder Application,” Advanced Materials Research, 2014. https://www.scientific.net/AMR.984-985.67 (accessed Jul. 22, 2020).
 Best-in-Class, CAD Integrated DFM Software. (n.d.). Retrieved July 20, 2020, from https://dfmpro.com/about-dfmpro/
 Hoefer, M., N. Chen, and M. Frank. Automated Manufacturability Analysis for Conceptual Design in New Product Development. in IIE Annual Conference. Proceedings. 2017. Institute of Industrial and Systems Engineers (IISE).
 Gupta, S.K. and D.S. Nau, Systematic approach to analysing the manufacturability of machined parts. Computer-Aided Design, 1995. 27(5): p. 323–342.
 Li, Y. and M.C. Frank, Machinability analysis for 3-axis flat end milling. 2006.
 LAPACK Retrieved July 20, 2020 http://www.netlib.org/lapack/
 Armadillo Retrieved July 20, 2020 http://arma.sourceforge.net/
 Random forests Retrieved July 20, 2020 https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm
 Introduction to Boosted Trees Retrieved July 20, 2020 https://xgboost.readthedocs.io/en/latest/tutorials/model.html
 Jing Huang and Suya You, “Point cloud labeling using 3D Convolutional Neural Network,” in 2016 23rd International Conference on Pattern Recognition (ICPR), Dec. 2016, pp. 2670–2675, doi: 10.1109/ICPR.2016.7900038.
 “[2003.00898] The importance of transparency and reproducibility in artificial intelligence research.” https://arxiv.org/abs/2003.00898 (accessed Jul. 22, 2020).
 K. Lee, J. Zung, P. Li, V. Jain, and H. S. Seung, “Superhuman Accuracy on the SNEMI3D Connectomics Challenge,” arXiv:1706.00120 [cs], May 2017, Accessed: Jul. 22, 2020. [Online]. Available: http://arxiv.org/abs/1706.00120.
 A. Tulbure and B. Bäuml, “Superhuman Performance in Tactile Material Classification and Differentiation with a Flexible Pressure-Sensitive Skin,” in 2018 IEEE-RAS 18th International Conference on Humanoid Robots (Humanoids), Nov. 2018, pp. 1–9, doi: 10.1109/HUMANOIDS.2018.8624987.
 N. Brown and T. Sandholm, “Superhuman AI for multiplayer poker,” Science, vol. 365, no. 6456, pp. 885–890, Aug. 2019, doi: 10.1126/science.aay2400.
 S. Koch et al., “ABC: A Big CAD Model Dataset For Geometric Deep Learning,” arXiv:1812.06216 [cs], Apr. 2019, Accessed: Jul. 22, 2020. [Online]. Available: http://arxiv.org/abs/1812.06216
 DFA Retrived July 20, 2020 from https://en.wikipedia.org/wiki/Design_for_assembly