Abstract
The assembly interference matrix (AIM) is a foundational information model for assembly process planning, supporting digital assembly simulations, intelligent manufacturing, and digital twin frameworks. An AIM represents whether two parts collide when moving along specific directions. Traditional construction methods rely on geometric collision detection using approximate swept volumes, a process that is computationally intensive and prone to errors such as misjudging contact as collision or missing collisions due to discrete spatial steps. This paper presents an image-assisted calculation method that treats collision detection as a visibility judgment problem. By leveraging GPU-accelerated rendering in OpenGL, the method processes collisions between part swept volumes as image occlusions. Depth and stencil testing are employed to perform implicit calculations during the rendering process, while image erosion operations distinguish between physical interference and simple surface contact. Validation using a 16-part gear box assembly demonstrates the method's effectiveness and efficiency.
Introduction
In the era of Industry 4.0, digital assembly simulation and intelligent assembly sequence planning are critical for reducing time-to-market and manufacturing costs. Central to these processes is the Assembly Interference Matrix (AIM), which maps the spatial relationships and potential collisions between components during the assembly sequence. Traditionally, calculating the AIM involves complex 3D geometric kernels that move part models step-by-step along a path, checking for intersections at each increment.
This conventional approach suffers from two primary drawbacks. First, the "Discrete Step Problem" means that if the movement increments are too large, the algorithm may skip over a collision entirely. Conversely, very small steps lead to prohibitive computational loads. Second, "Contact Ambiguity" makes it difficult for standard geometric algorithms to differentiate between two parts that are perfectly flush (contact) and those that are physically overlapping (interference). To address these challenges, this research proposes a shift from 3D geometric space to 2D image space, utilizing the high-speed parallel processing capabilities of modern Graphics Processing Units (GPUs).
Methodology
The proposed method transforms the 3D collision detection problem into a 2D visibility task, implemented using the OpenGL graphics library to ensure cross-platform compatibility.
Multi-Stage Filtering
To optimize performance, the system employs a hierarchical approach. Initially, an Axis-Aligned Bounding Box (AABB) check is performed. By calculating simple boxes around each part, the system can immediately rule out interference between parts that are spatially distant, focusing computational resources only on potential collision candidates.
Image-Space Projection and Occlusion
For the remaining parts, the "swept volume"—the total space a part occupies as it moves from its start to its end position—is treated as an "occlusion room." By setting the camera perspective to align with the assembly direction, the entire movement path is projected into a single 2D frame.
GPU-Accelerated Testing
The core calculation is performed implicitly during the rendering process using the GPU’s built-in depth and stencil buffers. The stencil buffer is used to mark the pixels occupied by the moving part's swept volume. The depth buffer then determines if any other part "pokes into" this reserved space. This hardware-level processing allows for thousands of checks to be performed in parallel, significantly outperforming CPU-based geometric calculations.
Distinguishing Contact from Collision
To solve the contact vs. collision problem, the method treats the resulting stencil buffer as a 2D image and applies a morphological "erosion" operation. Surface contacts typically result in very thin lines or single-pixel overlaps in the image space. By applying erosion, these minor artifacts are removed. If pixels remain after the erosion process, it indicates a substantial overlap, confirming a "hard" collision.
Results and Validation
The effectiveness of the image-assisted method was validated using CAD models in STL format, specifically a shaft-hole assembly for contact testing and a 16-part worm gear box for full matrix calculation.
The system was tested on a laptop equipped with an NVIDIA GTX 1050Ti GPU. For the gear box assembly, which required 720 individual collision checks across six primary axes (+X, -X, +Y, -Y, +Z, -Z), the average time per check ranged from 28.8ms to 39.5ms. The algorithm successfully identified 228 cases of interference or contact and 492 interference-free cases, generating a complete and accurate AIM.
Conclusion
By reducing 3D spatial problems to 2D visibility tasks and leveraging GPU hardware, this method provides a high-speed, reliable alternative to traditional geometric collision detection. While the current implementation faces limitations with complex threaded geometries and potential rasterization artifacts at low resolutions, it represents a significant step forward for real-time digital twin simulations and automated assembly planning. Future work will explore dynamic resolution scaling to further enhance precision for micro-scale components.
Summary updated