Research on Lightweight Method of MBD Model for Additive Manufacturing

In order to solve the problems of difficult storage and slow transmission of large data in remote transmission of 3D model for additive manufacturing, a lightweight method on MBD model is proposed. A lossless compression algorithm is applied and improved in this paper to simplified the product data model and minimize data exchange file. At the same time, a detailed geometric information model is retained to realize the rapid transmission of lightweight model, which provides a convenient method for remote transmission and acquisition of 3D model in additive manufacturing process. A case study on the MBD model of a packaging machine has verified is taken as an example to verify the feasibility of the method.


Introduction
With the guidance of "Made in China 2025" strategy, "additive manufacturing" has developed rapidly in different fields, together with relative technologies. Model-based Definition (MBD) model technology is one of them. As the only carrier of data, MBD model can fully express all kinds of detailed information in product manufacturing [1], but its three-dimensional model is relatively complex, and the file takes up a lot of memory space, usually more than 100 MB or even several GB [2][3]. In 3D printing, if remote transmission of information is required, it will cause slow transmission because of the large scale of the 3D model file. This problem results in delay of data and information acquisition as well as the online viewing of the 3D model [4][5]. In order to meet the needs of manufacturing, many scholars at home and abroad have done a lot of research on data lightweight techniques for MBD model.
For the research on MBD model data compression processing, the earliest method is by Taubin and Ouma who have proposed a geometric lossless compression coding algorithm based on grid processing [6][7], which is an efficient coding algorithm to decompose complex mesh model into simple topological structure information compression coding, vertex prediction estimation and compression. In reference [8], Li has proposed an improvement method on the shortcomings of EPRT and EASM file formats, combined the advantages of XML and VRML, as well as exposing shortcomings. From his study, it takes 10 seconds to view some simple models, while longer time for some large and complex models. In reference [5], Wang has proposed a multi-level model lightweight method, which can compress, filter and optimize the original model data through reducing the amount of model data and memory consumption, with a result in speeding up browsing and display. This compression algorithm used is based on Huffman compression algorithm, which has shortcomings on low compression rate and speed. Wang et al. proposed a lossless compression algorithm for complex product model data [9]. The algorithm uses non-geometric information filtering, curve and surface simplification, coding compression and other operations to process the original product model data. Under the condition of ensuring a certain model accuracy, it has a higher compression ratio and meets the requirements of engineering application.
At home and abroad, most of the data lightweight methods for 3D MBD model aim at the lightweight processing of ontology solid model, while few amount of research on its transmission and storage. However, in the era of big data, the research on the problems of remote transmission of model and large storage space in additive manufacturing technology needs to be solved urgently to accelerate complex manufacturing. To fill this gap, this paper has proposed a data lightweight method based lossless compression algorithm for the remote data transmission for additive Manufacturing.

2.Method
The lightweight of 3D model is mainly divided into two parts, one is the solid lightweight of 3D model, the other is the data lightweight of 3D model. In this paper, we choose lossless compression algorithm to process the data of 3D model, which can meet the requirements of fast transmission, high precision, model without loss.
Compared the advantages and disadvantages of lossless compression algorithm, such as Huffman compression algorithm, Xiangnong van Nuel algorithm [10], adaptive Huffman compression algorithm and LZSS algorithm [11][12]. In this paper, we choose the adaptive Huffman compression algorithm, which uses compression and Huffman tree construction to perform compression encoding and decoding at the same time. And the running time of this algorithm is linear with the length of the input source string, while the storage space will not be determined by the length of the input string. [11,13]. However, this algorithm is the repeated encoding of repeated strings, which leads to the problem of low compression rate, when the data lightweight of MBD model. Therefore, this paper improves the adaptive Huffman compression algorithm by adding a string repeat finder to improve the compression rate. The improved adaptive Huffman compression algorithm is shown in Figure 1.

2.1.String repeat finder
As for how to quickly find duplicate strings, the principle is: set the sequence of input MBD model data as: , output as code sequence: ,the relationship between and meets the following requirements: , its corresponding string forms a repeating pattern of +1 δ .
In order to increase the matching length of one time, we can set , according to the principle of string repeat finder, t x does not belong to the repeating pattern; for , t x belong to repeat mode, t x and -1 t x have the same output value, a longer string can be obtained. Add a letter to the letter set to represent the repeated pattern. The prefix code is used to encode the repeating pattern, so that the length of variable length encoding is the shortest and the compression effect is improved. On the contrary, the adaptive Huffman optimal tree is built according to the adaptive Huffman compression algorithm, and the coding is carried out according to the principle of Huffman variable length coding.

2.2.Constructing an improved adaptive Huffman optimal tree
Therefore: On the other hand, Therefore: x f y f z d z It is concluded that: When equation (7) is satisfied, it shows that the constructed tree is the optimal substructure.

2.3.The improved adaptive Huffman optimal tree is coded with variable length
There are two forms of encoding: one is that the string belongs to the normal mode, which is encoded in the form of "0" and "1", according to the principle of adaptive Huffman compression algorithm of the left and right subtrees. The other is that the string belongs to repetition pattern, which is encoded For source characters, the m set is: The probability model is as follows: The average length of the code is expressed as: The upper bound is: for a given source character, its weight and the probability of character occurrence, define A1, and then make: Therefore, the length of the improved adaptive Huffman variable length coding is as follows: Given the word length m , MBD model data sequence Cum count x l l Total count Cum count x u l Total count By converting u and l into binary numbers, the node code of the tree can be obtained. The left subtree is coded as "0" and the right subtree is coded as "1". When encountering a node that stores characters, output the code of the character, and encode the nodes of the tree in turn until all nodes are encoded to achieve the purpose of data compression.

3.Result
In this paper, MBD model of automatic packing machine is used as the experimental object, to obtain the data information of the model and the MBD model is tested with different compression algorithms. The results are shown in table 1. The analysis and comparison results from the above table is as follows: in the same data of MBD model, the compression rate from large to small is: improved adaptive Huffman compression algorithm, greedy-Huffman compression algorithm, Huffman compression algorithm, adaptive Huffman compression algorithm; the compression time of the four algorithms is from fast to slow: the improved adaptive Huffman compression algorithm, adaptive Huffman compression algorithm, greedy-Huffman compression algorithm, Huffman compression algorithm. By the results, the improved adaptive Huffman compression algorithm is better for data lightweight of the MBD model. In the relatively strong computer hardware equipment, the improved adaptive Huffman compression algorithm has higher transmission efficiency and compression rate, while can better solve the problem of large memory space occupied. The feasibility and correctness of the lightweight method are verified.

Conclusion
Additive manufacturing has become the research focus in the field of manufacturing industry, which can quickly realize digital model entity manufacturing. The products produced by additive manufacturing technology have good performance and mechanical properties. In order to solve the problem of slow remote transmission of 3D model used in additive manufacturing, a data lightweight method for MBD model is proposed in this paper, which makes the data file smaller and faster, without losing the model information. Since this method solves the problem on the data transmission and acquisition, it provides a solution on the 3D model remote transmission for online additive manufacturing.