1 Introduction

The benefits of computer-assisted preoperative simulation for the reduction of comminuted bone fractures are well known. Typically, a 3D model of fractured bone is built by extracting the boundary pixels of the bone structure onto each computed tomography (CT) image slice. Then, the triangular model referring to this bone structure is constructed using these boundary pixels, resulting in a collection of many triangular meshes to describe the surface geometry of the target bone structure (called bone model hereafter). To model the non-fractured bones where soft tissues exist between different bone structures, the geometry of each bone model can be controlled as the boundary of the bone structure on CT images can easily be recognized. However, for the modeling of fractured bones, the situation becomes more complex as the boundary of a fractured bone is irregular and the fracture line on the images may not be clear. The irregular shape and inaccurate boundary on each digitized model may lead to difficulties in performing accurate simulations of bone reduction, which is one of the key factors in surgical treatment.

Different tools may be implemented to verify the results of simulated bone reduction, such as a 3D display environment for visual verification or an error comparison test for detecting the matching sections of broken bones. However, it is still difficult to determine the real situation when two broken parts are assembled. 3D printing technology has been well developed and used in many applications. This technology can also be used in bone reduction to physically generate the repositioned parts and evaluate the results of bone reduction. Several studies have reported that 3D-printed models can be held, examined, and manipulated by clinicians, much like the actual patient anatomy, to improve the safety and efficiency of surgery training and education [1,2,3,4]. Orthopedic 3D-printed models have been demonstrated to enhance the communication between the clinician and patient and improve the understanding of anatomy and pathology [5,6,7].

To precisely assemble the separate printed fractured bone pieces like a puzzle, the surface fractures between two adjacent fragments must be perfectly attached to each other. Several studies addressing the issue of meshes overlapping for various purposes have been reported, but none of them were directly related to the fabrication of fractured bone using 3D printing technology. Winkelbach et al. [8] introduced an efficient surface matching method to reassemble fractured solid parts, which could be applied for the reconstruction of archeologic artifacts and the reduction of digitized bone models. The overlapping surface regions and the absence of surface penetration determine the quality of the assembled fragments. The overlapping relations between two fragments were employed to estimate the 3D position of the object and to match surfaces that partially overlapped. Papaioannou et al. [9] employed a combination of curve and surface matching algorithms to improve the matching of arbitrary 3D fragments. The penetration percentage between two aligned fragments was used as an indicator to check the surface intersection. Funkhouser et al. [10] investigated a machine learning approach towards solving the correct registration from many matching candidate fragments. The correct matching combination of many features was found by considering the overlapping contour in measurements and their matching properties. Üçoluk et al. [11] investigated the matching of non-overlapping closed curves. This method can also be used to find matching pieces even when some brittle pieces are missing. Okada et al. [12] and Furnstahl et al. [13] used the overlapping of fragments as an additional criterion for improving the assembly quality. In normal cases, two fragments were merged identically without any overlapping fragments. However, with deformed fragments, the difference in size and geometry could significantly affect the result of registration.

Friedman et al. [14] reviewed various practical methods of 3D printing based on medical and engineering literature. They indicated that during the segmentation and mesh generation processes, errors on the bone model may affect the assembly of broken fragments. The intersected meshes between two models assembled must be removed so that they can fit together precisely. The Boolean operation was implemented to check and solve the mesh intersection problem. Garcia et al. [2] focused on the review of 3D printing with different types of materials (rigid or flexible) to mimic biological tissue. To transform the 3D model saved in a file ready for printing, the removal of unnecessary points that may lead to mesh errors is required. The Boolean operation was employed to eliminate the overlapping volume, and hence to remove printing errors from the assembled parts. Livesu et al. [15] and Attene [16] described a comprehensive procedure required for 3D printing. They indicated that robustness and precision were the major issues in 3D printing. Erroneous meshes may be induced during the conversion of 3D meshes into an implicit representation. In particular, self-intersection must be removed in repairing meshes. Zhang et al. [17] presented an algorithm to match 3D fractured fragments with fewer overlapping meshes and less accumulation of matching errors. The Hausdorff distance was employed to check the overlapping of adjacent regions. Irwansyah et al. [18] evaluated the reduction of fractured bones by assembling and disassembling 3D-printed acetabular fractures. They pointed out that the surface contacts between two adjacent fragments were not properly attached. Misaligned surface contact regions may result in either the overlapping of fragments or the formation of gaps. Irwansyah et al. [19] extended their study by introducing a mesh overlapping detection and removal algorithm to achieve a precise joining of two 3D-printed parts. This study offered the possibility to remove interferences on the corresponding surface fragments by evaluating the surface contact region after repositioning bone fragments. Tarte et al. [20], Domokos et al. [21], and Scheuering et al. [22] also addressed the importance of detecting overlapped fragments in bone reduction and proposed different methods for evaluating the displacement and orientation of broken fragments.

According to our previous studies [18, 19], several issues must be addressed in order to yield appropriate assembly of 3D-printed fractured bones. First, the quality of each bone model should be maximized. As the digitized bone model is extracted from CT images, some issues on the digitized model should be investigated, such as existing internal meshes due to cancellous bone [1, 14], surface roughness due to image noise [23, 24], and the accuracy of the STL model [25, 26]. Second, in bone reduction, overlapping meshes may occur between two assembled bones [2, 15, 27]. Overlapping meshes, or so-called self-intersection defects, are a common geometrical drawback encountered in the fractured regions after bone reduction. They exist when the surface meshes of two assembled fragments intersect with each other. As bone reduction is not perfectly accurate and two bone fragments may still intersect each other, overlapping meshes may thus appear on reassembled fractured bones. The problem of overlapping meshes may not be clear in the virtual simulation environment but may significantly affect the final assembly of 3D-printed bones. This is unacceptable in 3D printing as any overlapping of the parts may result in failure of the assembly. Finally, different levels and types of bone fracture may present different characteristics. Extensive experiments should be performed to evaluate the results of 3D printing. For assembling broken parts, it is necessary to design methods so that the fabricated parts can be assembled and properly fixed together.

The present study intends to improve mesh quality by detecting and removing overlapped regions in order to precisely allow the assembly and disassembly of 3D-printed fractured bones. An integrated procedure was proposed to simultaneously detect and remove the overlapped meshes existing on two assembled bone fragments. We emphasize the algorithm for identifying overlapping meshes, isolating and subtracting the overlapped mesh regions, and smoothing the surface fracture zone. Assembling and disassembling tests were performed to check whether adjacent printed fragments were well-assembled and fit together precisely. The result of the assembly was checked by evaluating the gap error between fragments. The main contribution of the proposed method is an integrated procedure for generating physical models of comminuted bone fractures. 3D mesh repair software may deal with deleting and repairing mesh errors, but it is a tedious and repetitive task. With the proposed method for detecting and removing overlapping meshes, we are certain that the 3D bone fragment models after bone reduction can be fabricated and assembled appropriately, which makes it possible to practice bone reduction and implant fixation with real physical models in preoperative planning.

2 Materials and Methods

Three-dimensional surface reconstruction from a set of CT images has been extensively studied to generate 3D models of skeletal structures. To construct the bone model, the image data was first converted into volume data for easier processing. Then, 3D image segmentation was implemented to determine the surface boundary from the volume data. A multi-region segmentation was then employed to segment the bone model from other tissues [28]. Next, a modified Marching cube algorithm was employed to generate a mesh model. Several techniques were then performed to eliminate erroneous facets caused by imprecise image data. The final bone model was then used in the computer-aided simulation and printing of fractured bone fragments. Figure 1 depicts the procedural flow, from 3D preoperative planning to improving the assembly of 3D-printed fractured parts.

Fig. 1
figure 1

Framework of the proposed process to remove overlapping meshes

2.1 Materials

A digitized 3D model was reconstructed from a series of CT images using a PC-based system of computer-aided preoperative planning tools. We developed the system using the C++ language and the DICOM ToolKit (DCMTK) library [29]. The system operates in a PC environment integrating virtual surgery simulation tools into a single computer program package (PhysiGuide v2.72.). The virtual preoperative planning and 3D simulation were performed on a consumer-grade PC (Intel® Core™ i5-4440 CPU, 3.1 GHz processor, 4 GB RAM, Windows 7 operating system). The system accepts both X-ray and CT images saved in digital imaging and communications in medicine (DICOM) format files (.dcm). In this study, clinical fracture data from three patients were employed, comprised of: a pelvic acetabulum with partial articular transverse fracture (62-B1); a complete articular fracture on both low columns (62-C2); and a femur proximal multi-fragmentary fracture (31-A2.2) [30]. All subjects were scanned using clinical CT (Siemens) with 1.5 mm slice intervals between two cross-sectional images (512 × 512 pixels per image). Thin-slice CT images of all subjects were saved in DICOM 3.0 format, and then input into a computer-assisted preoperative planning system for 3D model reconstruction.

2.2 Methods

2.2.1 Repositioning of 3D Bone Fragments

A semi-automatic reduction was performed in this study. The multi-pairs registration algorithm was employed to align the bone fragments by considering the fracture boundary and a number of paired points corresponding to the two mesh fragments. However, for tiny fragments or complex cases, manual adjustment was still necessary to overcome limitations of the semi-automatic approach. To find the coordinate transformation to optimize paired points correspondence between adjacent bone fragments, three-point registration was applied as a default method [31]. Figure 2 shows the illustration of multi-point registration or repositioning of fractured bones using the proposed algorithm. A pelvic acetabulum with partial articular transverse fracture (62-B1) was exported to the bone reduction window (Fig. 2a and b). The user was required to sequentially click on the anatomical landmark (the paired candidate points) with respect to two 3D segmented fragments (Fig. 2c and d). They were then aligned corresponding to their counterparts (Fig. 2e and f).

Fig. 2
figure 2

GPU window interface for multi-points registration of fractured fragments, where the left column a, c, e represent the steps of bone reduction and the right column b, d, f display the results of manipulation: a uploaded displaced hip bone into the interface; b displayed bone view manipulation; c assigned candidate points to counterparts; d coordinate transformation to match the fragments; e increased number of points along the fracture boundary to improve the alignment; and f result of bone reduction

In multi-points registration, two 3D point sets were extracted from the two fragments along the fracture zone contours and used as the input in the singular-value decomposition (SVD) algorithm [32]. This algorithm uses a 3 × 3 matrix to find the rotational and translation matrices between two sets of points. A coordinate transformation algorithm was then used to align one fragment with respect to its counterpart [33]. The accuracy of the alignment depends mainly on the accuracy of the point pairs. A registration algorithm was then used to align each of the broken fragments with respect to the reference bone. After transformation, all broken fragments were relocated to their original positions in space.

After bone reduction, some fragments may not precisely fit together, resulting in either misalignment or over-penetration with fragment collision. This makes the surface fragments intersect or overlap with each other. Such mesh defects can cause interference of the 3D-printed bone fragments when they are assembled. Two algorithms are thus proposed to detect and remove overlapping meshes.

2.2.2 Detection of Overlapping Meshes

The overlapping mesh defects on the assembled fragments can be recognized by detecting the existence of intersecting meshes. A simple bone fracture, as shown in Fig. 3, is employed to illustrate the process of detecting overlapping meshes. Assume, for example, that fragment 1 (F1) is joined with fragment 2 (F2) after bone reduction (F1 ∪ F2). The fracture surfaces on the contact regions are not properly attached due to imperfect bone reduction; empty space (gap) exists in some regions, whereas mesh overlapping exists in other regions. Therefore, the fracture surface is first isolated, and then the gap and overlapping meshes are detected and calculated. Either the gap or overlapping mesh region boundaries may form a closed curvature spread on the fracture surface.

Fig. 3
figure 3

Illustration of recovered bone and mesh defects on the surface contact regions

To improve the computational efficiency, the axis alignment bounding box (AABB) method is employed for the rough detection of meshes. When the intersection bounding box (IBB) is computed, the overlapping meshes may exist on the intersected boundary boxes. For those that do not intersect, no computation is required to check the possibility of mesh intersection. In addition, an algorithm for the subdivision of boundary boxes is also performed to confirm that a few triangular meshes from both models exist in each IBB. Figure 4 depicts a cell subdivision method, used to divide an initial boundary box, that covers the entire set of the triangular model and iteratively performs the subdivision. This is an effective approach to subdivide boundary boxes and evaluate the intersecting meshes from two triangular models. For simplification, the overlapping detection concept is presented in Fig. 5.

Fig. 4
figure 4

Overlapping meshes detection for the pelvic 62-B1 fracture using, a the axis alignment bounding box (AABB), and b cell subdivision at intersection bounding box (IBB)

Fig. 5
figure 5

Illustration of two sets of overlapped triangular facets from two fractured fragments after bone reduction

The overlapping meshes are illustrated by two sets of data from STL models, the reference facet (Fref) and test facet (Ftest), that represent the two fractured fragments after bone reduction. The normal vectors of both triangular facets are calculated by the cross product of two vectors in order to find the plane position for both triangular facets. The three vertices of a triangular facet are P1, P2, and P3, which are defined in a Cartesian coordinate system as x, y, and z, respectively. The vectors of P1 to P2 and P1 to P3 are referred to as \( \vec{\varvec{v}} \) and \( \vec{\varvec{w}} \), respectively. The normal vector of the triangular facet is denoted by \( \vec{\varvec{n}} \). The relationships of the above-mentioned terms can be expressed as follows:

$$ \vec{\varvec{v}} = \varvec{P}_{2} - \varvec{P}_{1} $$
(1)
$$ \vec{\varvec{w}} = \varvec{P}_{3} - \varvec{P}_{1} $$
(2)
$$ \vec{\varvec{n}}_{x} = (\vec{\varvec{v}}_{y} \times \vec{\varvec{w}}_{z} ) - (\vec{\varvec{v}}_{z} \times \vec{\varvec{w}}_{y} ) $$
(3)
$$ \vec{\varvec{n}}_{y} = (\vec{\varvec{v}}_{z} \times \vec{\varvec{w}}_{x} ) - (\vec{\varvec{v}}_{x} \times \vec{\varvec{w}}_{z} ) $$
(4)
$$ \vec{\varvec{n}}_{z} = (\vec{\varvec{v}}_{x} \times \vec{\varvec{w}}_{y} ) - (\vec{\varvec{v}}_{y} \times \vec{\varvec{w}}_{x} ) $$
(5)

The shifted point distance is calculated by multiplying the normal vector \( \vec{\varvec{n}} \) of the reference facet with the vector \( \vec{\varvec{a}} \), which can be expressed as follows:

$$ \vec{\varvec{a}} = \varvec{F}_{test} - \varvec{F}_{ref} $$
(6)
$$ \varvec{\vec{n} \vec{a}} = \left( { \vec{\varvec{n}} _{x} \vec{\varvec{a}} _{x} } \right) + \left( { \vec{\varvec{n}} _{y} \vec{\varvec{a}} _{y} } \right) + \left( { \vec{\varvec{n}} _{z} \vec{\varvec{a}} _{z} } \right) $$
(7)

where \( \overrightarrow {{\varvec{a} }} \) indicates the vector from a point on Ftest to a point on Fref. The intersection point is an initial condition, which indicates that both planes of triangular facets are intersected with their counterparts. The intersection point (Pint) of two lines in the 3D environment is defined by evaluating two points on the test facets P1 and P2, and two corresponding shifted point distances d1 and d2. The ratio t of d1 and d2 is calculated initially:

$$ t = {\raise0.7ex\hbox{${d_{1} }$} \!\mathord{\left/ {\vphantom {{d_{1} } {d_{2} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${d_{2} }$}} $$
(8)
$$ \varvec{P}_{int x} = P_{1x} - t\left( {P_{1x} - P_{2x} } \right) $$
(9)
$$ \varvec{P}_{int y} = P_{1y} - t\left( {P_{1y} - P_{2y} } \right) $$
(10)
$$ \varvec{P}_{int z} = P_{1z} - t\left( {P_{1z} - P_{2z} } \right) $$
(11)

The method for evaluating the intersection point is presented in Fig. 6. The triangular facet of the fracture region is calculated by the cross product of two vectors and compared with the reference facet area (Aref), as shown in Fig. 6a. The relationship is presented in the equation below:

Fig. 6
figure 6

Evaluation of the point intersection approach, a determination of the reference area, b three areas with intersection point inside, and c three areas with intersection point outside

$$ \frac{{\left| {\vec{\varvec{v}} \times \vec{\varvec{w}}} \right|}}{2} = \frac{{\sqrt {\left( {\vec{n}_{x} } \right)^{2} + \left( {\vec{n}_{y} } \right)^{2} + \left( {\vec{n}_{z} } \right)^{2} } }}{2} $$
(12)

Mesh overlapping zones are classified by inside or outside the triangular facet. If the total area of A1, A2, and A3 are equal to Aref, then the intersection point is inside the reference facet (Fig. 6b). If the total area of A1, A2, and A3 are not equal to Aref, then it is outside the reference facet (Fig. 6c). The indices of both triangular facets from the two models are then stored in an array when an intersection point exists inside the reference facet. The intersection of the mesh region is recognized by a closed-loop region for identifying whether the region is overlapping or non-overlapping. Figure 7 presents the repairing approach of the open-loop region by extending the mesh intersection. The intersection meshes may also be defined by an open-loop boundary due to the complex shape of the fractured bone model, as depicted in Fig. 7a. However, the isolation process cannot be performed for these kinds of regions. Hence, extension of the mesh intersection layer (inner and outer) is performed to obtain a closed boundary mesh region, as shown in Fig. 7b.

Fig. 7
figure 7

Isolating overlapped mesh regions by, a extending the mesh inter-section for open-loop regions, and b repairing open-loop mesh regions

The isolation process is conducted in an iterative manner since the normal region has many triangular facets. The diminishing process was performed to generate overlapping mesh at the fragment boundary. The region of overlapping mesh is surrounded by a single layer extended into the outer fragment boundary. This extended the fracture zone and terminated the flattening steps in the smoothing process. The result of detecting overlapping meshes is obtained by dividing the fracture zone into four regions: fragment surface region, fracture surface region, meshes intersecting the boundary layer, and mesh extension of outer boundary layer.

2.2.3 Removal of Overlapping Meshes

The removal of overlapping meshes is performed like a surface flattening process, which smooths both sets of meshes near the interference region until the overlapping meshes are removed. The mesh smoothing algorithm is essentially based on Laplacian mesh optimization [34]. Assuming that the mesh vertices are V = {V1, V2Vn}, and that vi = (vix, viy, viz) represents the coordinates with respect to the Cartesian coordinate system (x, y, z), then vj = {vj1, vj2vjm} are the neighboring vertices of vi and \( \varvec{\delta}_{i} \) is the Laplacian of vi. The Laplacian mesh optimization can be expressed as follows:

$$ \varvec{\delta}_{i} = \frac{{\mathop \sum \nolimits_{j}^{m} v_{j} - v_{i} }}{m} $$
(13)

The new position (\( \varvec{v}_{inew} \)) of vi is calculated as follows:

$$ \varvec{v}_{{i_{new} }} = \mathop \sum \limits_{i}^{n} \varvec{v}_{i} +\varvec{\delta}_{i} $$
(14)

Since the fracture zone is an irregular shape, the smoothing process is performed iteratively to yield a satisfying smoothing of the broken regions. The model after mesh smoothing is suitable for fabrication through 3D printing technology.

2.2.4 3D-Printing of Bone Fragments

Fused deposition material (FDM), a solid-based material for 3D printing, was employed in this study due to its well-known and effective use in rapid prototyping (RP) machines. The general concept of FDM 3D printing is that thermoplastic material is melted and extruded through an extrusion head that adds material layer by layer, much like a computerized glue gun [14]. 3D printing for medical applications starts by defining a 3D bone model format reconstructed from CT images (DICOM file) into a standard 3D printing file format [standard tessellation language, (STL)]. Then, 3D model slicing software, Aurora 3D printer-F1 2014.10.03 (AURORA, Taiwan), was used to generate the deposition paths with specific printing parameters: layer height 0.1 mm, infill 20%, printing speed 70 mm/s, and 200°C. Next, the built-up model was generated from a series of sliced-layers of cross sections from the 3D model. The 3D printed layers were bonded or fused automatically due to the polymer properties at high temperature to recreate the final shape. All bone fracture models were printed through a low-cost adopted FDM 3D printer (Aurora 3D printer-F1, AURORA, Taiwan) with a nozzle diameter of 0.4 mm (± 0.05 mm). A full-scale model replication of bone fracture was fabricated with Polylactic Acid (PLA), with 1.75 mm in diameter and 0.1 mm in accuracy for the layer height.

2.2.5 Evaluation of Assembled Bone Fragments

The performance of the proposed algorithm for detecting and removing mesh defects on assembled bone models was evaluated. Three patients’ clinical cases before and after removing overlapping meshes were analyzed and compared. The discrepancy errors between two assembled fragments, such as the gap error (empty space between two fragments) and overlap error (intersection of mesh surface between two fragments) along the fracture boundaries were calculated. Four locations at the boundary fragment were arbitrarily selected and the gap errors measured. Each gap error was measured three times and the average of them was used as the gap error in that location. Following Okada et al. [12], the gap distance error is the maximum or minimum distance from a point on a surface fragment to that of the counterpart fragment. The overlap distance error is the distance from a point on a surface fragment inside the surface region of the counterpart fragment. In this study, the gap and overlap distance errors were measured between two points at the edges of two mesh surfaces in a CAD system. The distance for each measurement was recorded three times. In order to achieve an optimized assembly of 3D-printed bones, the measurement of gap and overlap distance errors for the 3D-printed parts after removing overlapping meshes was also implemented. The measurement positions were similar to those on 3D bone models. A digital Vernier caliper was utilized for these measurements (Mitutoyo absolute 500-196-20 digital caliper, 0–6″ range, Mitutoyo Corp., Japan) with an accuracy of ± 0.001″, and a resolution of 0.0005″. Percent differences were analyzed to evaluate gap errors from 3D bone models and 3D-printed parts to validate our proposed method.

3 Results and Discussion

3.1 Results

In this study, a series of multi-fragmentary bone fractures were reconstructed and recovered to their original anatomical position. Figure 8 shows 3D models of displaced bone fractures that were built from CT images and their recovered fragments. Clinical data from three patients with different fracture types, as specified by the AO classification, were employed: pelvic 62-B1 segmented into two pieces (Fig. 8a), pelvic 62-C2 segmented into three pieces (Fig. 8b), and femur 31-A2.2 segmented into four pieces (Fig. 8c). We measured the computational time for bone segmentation and reduction, as shown in Table 1. After bone reduction was achieved, we also encountered polygonal mesh defects, particularly on the surface contact regions of the bone fracture.

Fig. 8
figure 8

3D bone fracture models from patient clinical data, a pelvic, acetabulum transverse fracture 62-B1, b pelvic, acetabulum, posterior column multi-fragment 62-C2, and c femur 31-A2.2 fractures

Table 1 Time required on each step in virtual surgery simulation for three cases (unit: s)

In virtual 3D space, the two assembled parts can maintain their connection without any problem. Several geometrical defects such as image noise, mesh intersection, holes, and internal meshes may frequently occur during reconstruction of the bone models, but they may not affect the assembled digital models. In contrast, 3D model defects are a critical issue in fabricating 3D-printed fractured bones, specifically when two parts must fit together in order to assist surgeons in communication and preoperative planning. Figure 9 presents the virtual assembly of two bone models and the mesh errors on the assembled part. The fractured bone models initially contain millions of mesh defects on both fragments (Fig. 9a). The internal geometrical mesh error exists as the representation of cancellous bone and tissues. A region filling algorithm was applied to remove internal mesh errors, as presented in Fig. 9b. After noise removal and smoothing, the bone fragment may slightly be deformed in shape and size, as depicted in Fig. 9c and d.

Fig. 9
figure 9

The assembly of 3D bone fragments, a the original model containing mesh defects, b the exploded-model displaying where internal meshes have been removed, c rough part of surface owing to noise on original images, and d the result after surface smoothing

To remove overlapping meshes, the proposed method was performed to detect and isolate the fracture zone, as shown in Fig. 10. The boundary region of the fracture surface was identified from the fracture zone, which is the outer layer boundary of the fracture region, also known as the fracture line (Fig. 10a). Then, the fracture region was segmented into the fragment surface and the fracture surface. By referring to mesh defects in the fracture zone region, the overlapping mesh on the fragment surface can be detected and isolated (Fig. 10b). The fracture surface was surrounded by the boundary of fracture fragments, which creates a new mesh layer called “the intersecting mesh component,” which represents the intersecting facet volume of two overlapping meshes that should be removed (Fig. 10c).

Fig. 10
figure 10

Overlapped mesh errors on two joined surface fragments, a detection of the fracture boundary zone, b extraction and segmentation of the fracture regions into the fragment surface, fracture surface, and fracture line, and c identification of the overlapped meshes as a new unwanted mesh layer to be removed and repaired

Once the overlapping meshes were detected and isolated, the removal algorithm was performed. The removal process is essentially based on the concept of mesh flattening performed by an iterative mesh smoothing algorithm, as depicted in Fig. 11. The isolated fracture surface of two meshes was composed of non-manifold meshes, a hole with an island, topological noise, and mesh-inconsistent orientation (Fig. 11a). The Laplacian mesh optimization method was performed for repairing the mesh error in the fracture region. Mesh reparation was conducted iteratively due to complexity in the mesh to yield a smooth surface in the fracture zone for fitting together properly. The fracture surfaces after the removal of overlapping meshes and noise and the implementation of mesh smoothing on both sides are depicted in Fig. 11b and c, denoted by fragment 1 (F1) and fragment 2 (F2), respectively. The 3D models of bone fractures were then ready for manufacturing using 3D printing technology (Fig. 11d and e). To ensure 3D-printed fragments can physically connect to each other properly, a cylindrical bar was created in the computer program. Boolean subtraction was performed to create the cylindrical hole on both sides of adjacent bone fragments. The cylinder pins act as a bridge to firmly fix two assembled fragments.

Fig. 11
figure 11

Removing intersection meshes on two fragments, a isolated fracture surface of two mesh regions F1 and F2, bc removal of mesh error and repairing of fracture surface, d 3D model after correcting mesh defect, and e the assembled bone, connected by a pin of 3 mm in diameter and 20 mm in length

The 3D bone model may be deformed when removing the mesh defect and the smoothing algorithm is implemented. The distance errors between each of the bone fragments with respect to their original configuration before mesh correction are then calculated. Figure 12 compares the bone model of pelvic 62-B1 before and after the removal of overlapping meshes and smoothing. For fragment 1 (Fig. 12a), the number of facets before and after overlapping mesh removal and smoothing were 259,884 and 255,397, respectively. The maximum and RMS errors between these two models were 1.307 and 0.128 mm, respectively. Meanwhile, for fragment 2 (Fig. 12b), the number of facets before and after overlapping mesh removal and smoothing were 189,664 and 184,536, respectively. Hence, the maximum and RMS errors between these two models were 1.253 and 0.169 mm, respectively. The histograms of the distance errors for both fragments showed that most of the errors are concentrated on the mean value. Also, the final model was deformed by less than 2 mm from the original model. Favier et al. [35] reported that a global error between non-smoothed meshes and smoothed meshes ranged between 0.083 and 0.203 mm. Table 2 summarizes the number of faces and maximum and RMS errors for all bone fragments before and after the implementation of the above-mentioned algorithm. The percentage of overlapping meshes on each bone model is also provided.

Fig. 12
figure 12

Error comparison of the fragment models before and after removing overlapped meshes and smoothing, a fragment 1 and, b fragment 2

Table 2 Comparison of gap errors before and after mesh-defect removing and smoothing

Discrepancy errors along the fracture boundaries have to be reduced as small as possible to facilitate bone adhesion. The measurement results of gap and overlapping distance errors for 3D bone models after overlapping mesh removal are shown in Table 3, where the percentage of the overlapping meshes for each bone model is also calculated. Based on the measurement results for Pelvic 62-B1 in four arbitrary locations, the average distance error is 1.212 mm. Similarly, the average distance errors were 1.643 mm for Pelvic 62-C2 and 1.663 mm for Femur 31-A2.2. Okada et al. [12] described that the distance error along the boundaries of adjacent fragments should be less than 3 mm for each point measurement to facilitate bone adhesion. Thomas et al. [36] also reported that for a tibia case, the alignment error of the reconstructed bone fragments was in the range of 0.03–0.4 mm. Gap errors around the boundary of the fractured surface before overlapping mesh removal cannot be measured because most of the fractured surfaces collide and penetrate their counterparts, creating overlapped mesh errors. This result clearly shows that applying the overlapping mesh removal and smoothing algorithm can practically improve the assembly of 3D-printed bone fragments.

Table 3 Comparison of distance gap error 3D-model bone reduction before and after mesh-defect removing (unit: mm)

For 3D printing the objects, the triangular model should be watertight in that only surface meshes exist and no holes exist in the model. When irregular meshes and sharp edges exist on the boundary of broken fragments, two bone fragments after bone reduction may not match each other perfectly. Therefore, it was necessary to develop and improve the algorithms to modify both bone models and overcome this interference problem. The assembly of pelvic fragments was performed in a similar manner to the 3D model. The printed fragments were attached through pins and holes. Each bone fragment was assembled by hand in an articulated motion. One hand holds the reference fragment and one hand positions the other fragment using the attachment pins. Figure 13 shows an illustration of the assembled fragments for each case. Next, the gap error between two assembled fragments was measured using a Vernier caliper, as shown in Fig. 14.

Fig. 13
figure 13

Bone fragments assembled for (I) pelvic 62-B1, (II) pelvic 62-C2, and (III) femur 31-A2.2 fractures, a initial position, b fragment positioning relative to each other, c alignment of the pin and holes, and d final positioning

Fig. 14
figure 14

Measurement of gap errors for 3D-printed bone fragments after removing overlapped meshes

Table 4 shows the results of comparing gap errors in assembled 3D-printed bone fractures before and after the removal of mesh defects. The average gap errors of the 3D-printed fragments for the pelvic 62-B1, pelvic 62-C2, and femur 31-A2.2 fractures were 1.21, 1.64, and 1.66 mm, respectively. Figure 15 presents the comparison of the clinical data derived from the bone reduction results, including the 3D bone models, bone reduction, 3D-printed parts before removing overlapped meshes, smoothed 3D model, and 3D-printed parts after removing overlapped meshes. The gap errors for each measurement position of the 3D model and 3D-printed fragments after removing and smoothing polygonal mesh defects are shown in Figs. 16 and 17. We calculated the gap distance errors in four different locations for each clinical case. For simple cases, the gap error measurements were performed along the boundary of contact between two fragments, such as pelvic case 62-B1, with an approximate gap error of 1.2 mm. For complex cases, the gap distance errors may increase due to the fragment sharing its contact surface of the fracture zone with more than one fragment. This also increases the empty space between two adjacent fragments and may increase the difficulty in assembling physical parts. For the pelvic 62-C2 with three fragments and the femur 31-A2.2 with four fragments, the gap error ranged 1.2–1.9 mm.

Table 4 Comparison of distance gap error 3D-printed bone fragments before and after mesh-defect removing
Fig. 15
figure 15

3D bone models and 3D-printed parts from clinical data of three patients before and after removing overlapped meshes and smoothing, ae pelvic 62-B1, fj pelvic 62-C2, and ko femur 31-A2.2 fractures

Fig. 16
figure 16

Measurement of gap errors for 3D bone models before and after removing overlapped meshes and smoothing, a pelvic 62-B1, b pelvic 62-C2, and c femur 31-A2.2 fractures

Fig. 17
figure 17

Measurement of gap errors for 3D-printed parts before and after removing overlapped meshes and smoothing, a pelvic 62-B1, b pelvic 62-C2, and c femur 31-A2.2

3.2 Discussion

In order to precisely assemble 3D-printed bone fractures like a jigsaw puzzle, two separated bone fragments have to be perfectly connected to each other. Fabricating 3D-printed bone fragments directly from raw digitized images often leads to unsatisfactory results. Several issues should be considered such as image noise, existing internal meshes due to cancellous bone, and imperfect triangulated mesh model formation. The complexity of the architecture of internal meshes and rough surface fractures may increase the complexity of numerical control (NC) paths for the 3D printing machine, which in turn may significantly influence the printing time and difficulties in plugging in and taking off the assembled fragments. In addition, performing virtual bone reduction may result in intersection errors between two mesh models after bone reduction that do not practically exist but are unavoidable in reduction simulation. In the process of visualizing 3D bone models, the surface quality may not be a critical issue because it can be reduced by rendering or shading techniques. Therefore, when physically printing the bone models, those geometric interferences should be removed.

For physically fabricating a 3D bone model, it is necessary to improve the surface roughness at the final stage by remeshing and smoothing during model reconstruction. It was noticed that increasing the number of iterations in mesh modification will deform the geometry of the fragment from its original shape. When comparing bone fragments before and after mesh smoothing processes, RMS errors less than 1 mm indicated that the fragments deform to within the acceptable range for the 3D printing process.

Furthermore, the internal mesh component, as a result of the cancellous bone, may still exist and need to be removed. Removing the mesh errors is difficult and time-consuming, especially when done manually. Hence, automatic region filling algorithms were utilized to discover the internal mesh defects. The triangulated mesh models for 3D printing purposes need to be stored in a watertight format to ensure that no holes exist in the model. Therefore, a high-quality surface after smoothing will lead to more desirable 3D-printed fragments.

During the 3D reconstruction process, we found that the geometry of the digitized 3D model was slightly deformed from the actual bone due to poor CT images. In bone reduction, we also noted that the fractured bone contour was not clear enough to determine the paired-points correspondence. Moreover, in particular regions of the surface fracture, it was found that the surface fragment overlapped with its counterpart and created empty space. This will lead to inaccuracy during the restoring process of bone fragments. The final repositioning of bone fragments with respect to the gold standard is necessary before continuing further processing. Next, the overlapping mesh algorithm was performed to detect and remove mesh defects. This algorithm detected mesh defects in a single mesh layer for each part of the assembled model, isolated the mesh region of intersection, and removed the overlapping meshes using the Laplacian mesh optimization method. Briefly, overlapping meshes were removed by flattening the sharp and conical vertex similar to a mesh smoothing procedure. In the case of 3D bone models without performing the removal of overlapping meshes, empty space errors between two adjacent fragments may only exist in the surrounding joint components. In contrast, after removing the overlapping meshes, empty space between two broken fragments was present, indicating that the overlapped meshes had been successfully removed.

The gap error distance between four arbitrary locations was measured both for the 3D bone model and 3D-printed bone. For the 3D model case of pelvic 62-B1 after the removal of overlapping meshes, the approximated gap distance for each different location was 1.2 mm, while for the pelvic 62-C2 and femur 31-A2.2, the fractures were 2.00 mm and 1.9 mm, respectively. For cases with a gap distance larger than 1.00 mm, we found that the fragment was missed due to small size. On the other hand, the 3D-printed bone fractures before and after mesh defect removal and smoothing (un-modified parts) were also calculated. We found that the approximate gap distance for the pelvic 62-B1 was 2.6 mm before mesh removal, and 0.9 mm after. In this case, a lower number of fragments may have made it easier to manipulate and improve the quality of 3D printing. In contrast to cases with numerous fragments dispersed in small pieces, the gap distance error may increase compared to the original anatomy of the bone fracture. For the pelvic 62-C2 and femur 31-A2.2 fractures, the gap distance was larger than 1 mm. In these cases, gap distances were calculated for more than one position due to the fracture surface being shared by its counterparts. For instance, the gap distance along the boundary of parts 1 and 2 was first calculated, followed by the distance for parts 1 and 3. This procedure may increase visibility errors in order to evaluate the fragment discrepancy and is time-consuming. Low gap distance errors indicate the possibility that the original shape and geometry of anatomical bone was restored. For bone fracture assembly and disassembly, the sequential order of fragment assembly also has to be considered. A large size and regular shape of fragments is recommended as a reference in bone reduction. During assembly and disassembly, it is necessary to notice the alignment and orientation of the pin and holes with respect to the fracture surface for both sides of fragments.

In general, the proposed technique shows high potential for removing mesh defects and reducing gap errors, as well as for providing a 3D-printed bone fracture model that may easily be assembled and disassembled. Several limitations still remain to be addressed. According to expert surgeons and the literature, some drawbacks are still acceptable as long as the main geometry of the bone fracture is kept within the gold standard and the discrepancy errors of virtual reduction are less than 2 or 3 mm [12, 37]. Even though mesh defects can be removed by using the proposed method, future work needs to be implemented to reduce the computing time for detecting and removing overlapping meshes. In addition, for fragment cases with irregular geometries on the contour surface regions, such as twisted shapes, the overlapping meshes cannot be effectively removed using the current method.

4 Conclusion

This study focused on developing an algorithm for the detection and removal of overlapping meshes to improve 3D bone models to support the assembly and disassembly of 3D-printed bones. The proposed algorithm for the removal of overlapping meshes and smoothing was used to fabricate well-assembled 3D-printed bone, where the overlapping meshes could be removed especially at the joint contact surface of a fractured zone. After removing the overlapping meshes in models generated from real clinical data, 3D-printed bones could be reassembled successfully. The gap error of 3D printed and reassembled bones after removing overlapping meshes was significantly improved. For example, in the case of the pelvic 62-B1 fracture, before applying the algorithm, the average gap error was 2.6 mm, but after applying the algorithm, reduced to 0.9 mm. All modified fragment models displayed RMS errors of less than 0.33 mm that could easily be assembled and only small gap errors were noted on the fracture surface regions within an acceptable range of deviation. In addition, the average gap error between two 3D-printed fragments was less than 3 mm, which was significantly reduced compared to that of 3D-printed bones before the removal of overlapping meshes. Thus, the proposed technique showed high potential for solving mesh defects and providing a 3D-printed bone fracture model that is easier to assemble and disassemble compared to models made from previously reported methods.