Development of Internal Gear Shaping Simulation System

As an internal gear manufacturer, we frequently encounter challenges in designing and processing non-standard tooth profiles, particularly with tool interference during the shaping process. This interference, often referred to as tool retraction interference, can lead to reduced tool life, poor surface finish, and even damage to the workpiece. To address this, we have developed a simulation system that predicts interference in advance, enabling optimization of tooth profiles and tool design for internal gears. This system, implemented in C++Builder, utilizes advanced algorithms for 2D contour Boolean subtraction and interference calculation, providing a graphical simulation of the shaping process and quantitative interference analysis. The approach has been validated in practical production, demonstrating its effectiveness for internal gear manufacturers.

The shaping process for internal gears involves complex motions between the tool and the workpiece, including rotational and radial feed movements. Traditional methods rely on empirical knowledge or trial-and-error, which can be time-consuming and costly. Our simulation system models these motions precisely, allowing us to visualize the material removal process and identify potential interference zones. For internal gears with non-standard profiles, such as those with conjugate curves or modified geometries, this simulation becomes indispensable. By integrating mathematical models of tool and workpiece contours, we can simulate each stroke of the shaping process and compute the maximum interference during tool retraction.

In this paper, we present the algorithmic foundation of our simulation system, focusing on the data structures, Boolean operations, and interference detection mechanisms. We also discuss the implementation in C++Builder, which enables standalone execution without dependencies on external CAD software. Furthermore, we provide a detailed application example involving an NB-type internal gear pump, showcasing how the system aids in tool selection and process optimization for internal gears. Throughout, we emphasize the relevance to internal gear manufacturers, highlighting how such simulations can enhance production efficiency and product quality.

Algorithmic Framework for Shaping Simulation

The core of our simulation system lies in the representation of tool and workpiece contours as sequences of linear and circular segments. We use linked lists to store these contours, facilitating efficient traversal and modification during simulation. For the tool, typically a shaping cutter, the contour is defined relative to its center, with one tooth profile symmetric about the X-axis. This allows us to generate the full tool contour by mirroring and rotating a half-tooth profile. The workpiece contour, representing the internal gear blank, is stored as a closed loop of segments in counter-clockwise order. This data structure supports the dynamic updates required during the shaping process.

The simulation proceeds through a series of steps that mimic the actual machining process: tool and workpiece are transformed based on their relative motions, and at each step, the Boolean subtraction between the tool and workpiece contours is computed. This involves intersection detection, segment splitting, and re-linking of contours. The key algorithms are described below, with mathematical formulations to illustrate the computations.

Contour Data Storage and Transformation

We represent each contour segment as either a line or an arc, with endpoints and geometric parameters stored in a linked list node. For the tool, the initial contour is generated from a half-tooth profile. Let the tool have $N_t$ teeth, and let the half-tooth profile consist of $m$ segments. The full tool contour is constructed by mirroring this profile and adding connecting segments, such as the tip circle. The total number of segments in the tool contour is $2m + 1$ per tooth, but only the active cutting segments are considered. Similarly, the workpiece contour for internal gears is the inner boundary, represented as a list of $n$ segments.

During simulation, the tool contour is copied and transformed through translation and rotation to reflect its current position. The workpiece contour is rotated according to the gear ratio. The transformation equations are as follows. For a point $P = (x, y)$ on the tool contour, the transformed point $P’$ after rotation by angle $\theta$ and translation by vector $(dx, dy)$ is given by:

$$ P’ = \begin{pmatrix} x \cos \theta – y \sin \theta + dx \\ x \sin \theta + y \cos \theta + dy \end{pmatrix} $$

For the workpiece, a rotation by angle $\phi$ about its center is applied. These transformations ensure that the relative positions of tool and workpiece are accurate at each simulation step.

Boolean Subtraction via Intersection Detection

The Boolean subtraction operation is performed by detecting intersections between the transformed tool contour and the workpiece contour. We iterate through each segment of the tool contour and check for intersections with all segments of the workpiece contour. The intersection types include line-line, line-arc, and arc-arc. For each pair of segments, we compute potential intersection points and determine their validity based on parametric ranges.

For two line segments, $L1$ from $P_0$ to $P_1$ and $L2$ from $Q_0$ to $Q_1$, the intersection point $I$ can be found by solving the system:

$$ I = P_0 + s (P_1 – P_0) = Q_0 + t (Q_1 – Q_0) $$

where $s$ and $t$ are parameters in $[0,1]$. If both $s$ and $t$ lie within this range, $I$ is a valid intersection. For a line and an arc, we consider the line equation and the circle equation of the arc. Let the line be $P + s \vec{v}$, and the arc have center $O$ and radius $R$. The intersection points satisfy:

$$ \| (P + s \vec{v}) – O \|^2 = R^2 $$

Solving this quadratic equation for $s$ and checking against the segment bounds yields valid intersections. Similarly, for two arcs, we solve the system of circle equations. The number of intersections can be up to two, and we retain only those lying on both arcs.

When an intersection point is found, the involved segments are split at that point. For example, if a tool segment $AB$ and a workpiece segment $CD$ intersect at $I$, we split $AB$ into $AI$ and $IB$, and $CD$ into $CI$ and $ID$. The linked lists are updated to include these new segments. Then, we perform a re-linking operation: the tool segment before $I$ is connected to the workpiece segment after $I$, and vice versa. This effectively subtracts the tool volume from the workpiece, updating the workpiece contour for the next simulation step.

The following table summarizes the intersection types and their handling:

Intersection Type Equations Used Validation Criteria
Line-Line Linear system solving $s, t \in [0,1]$
Line-Arc Quadratic equation $s \in [0,1]$, point on arc
Arc-Arc Circle intersection Points on both arcs

After processing all tool segments, the retained workpiece contour represents the in-process geometry. The tool contour is discarded, and a fresh copy is used for the next step to maintain visualization integrity.

Interference Calculation during Tool Retraction

In the retraction phase, the tool moves away from the workpiece, and any overlap indicates interference. To compute the interference, we again transform the tool and workpiece contours to their retraction positions and detect intersections. The interference regions are identified as closed loops between consecutive pairs of intersection points on the tool contour. For each such region, we calculate the maximum interference distance by evaluating the distances from transition points on one contour to the other contour.

Consider an interference region $G$ bounded by intersection points $I_1$ and $I_2$ on the tool contour. Let $P_1, P_2, \ldots, P_k$ be the transition points (segment endpoints) within $G$ on the tool contour, and $Q_1, Q_2, \ldots, Q_l$ on the workpiece contour. For each point $P_i$, we compute its distance to the workpiece contour segments adjacent to $G$. The distance to a line segment $QR$ is given by the formula for point-to-line distance, with validation that the foot of the perpendicular lies on the segment. For a point $P$ and a line segment from $Q$ to $R$, let $\vec{v}$ be the unit vector from $Q$ to $R$. The projection point $P’$ is:

$$ P’ = Q + ((P – Q) \cdot \vec{v}) \vec{v} $$

The distance $d$ is $|P – P’|$, and it is valid if:

$$ 0 \leq (P’ – Q) \cdot \vec{v} \leq |R – Q| $$

For an arc segment with center $O$ and radius $R$, the distance from $P$ to the arc is computed by finding the closest point on the arc to $P$. This involves solving for the point on the arc that minimizes distance, typically along the line from $O$ to $P$. The valid distance is the minimum over all segments in the region. The maximum of these valid distances across all transition points in $G$ is the interference量 for that region. The overall maximum interference during retraction is the largest among all regions.

The interference calculation algorithm ensures that we quantify the severity of interference, which is critical for tool design and process parameter adjustment. For internal gear manufacturers, this data helps in selecting appropriate tool geometries and retraction strategies to minimize damage.

Implementation in C++Builder

We implemented the above algorithms in C++Builder to create a standalone simulation system. The choice of C++Builder allows for efficient memory management and rapid graphical updates, essential for real-time simulation. The system consists of modules for contour input, motion simulation, Boolean operations, and interference analysis. The graphical user interface (GUI) enables users to input tool and workpiece parameters, set shaping conditions, and visualize the process step-by-step.

The core classes include Contour for storing segment lists, Segment for individual elements (with derived classes LineSegment and ArcSegment), and Simulator for coordinating the simulation. The Boolean subtraction and interference calculation are implemented as methods of the Simulator class. We use dynamic memory allocation for linked lists, ensuring that contours can handle complex profiles typical in internal gears.

One challenge was optimizing the intersection detection, which has a theoretical complexity of $O(m \times n)$ for tool and workpiece segments. We employed spatial partitioning techniques to reduce the number of checks, improving performance for large contours. The system outputs the simulated workpiece contour after each stroke and logs the interference values for analysis. This implementation demonstrates that a dedicated simulation tool can effectively support internal gear manufacturers in process planning.

Application Example: NB Internal Gear Pump

To validate our system, we applied it to the shaping of an NB-63 internal gear pump ring. This component features a non-standard tooth profile with conjugate curves, making it susceptible to interference during shaping. As an internal gear manufacturer, we tested three different tool designs: 9-tooth, 8-tooth, and 7-tooth cutters. The shaping parameters were set as follows:

Cycle Stroke Speed (strokes/min) Radial Feed (mm/stroke) Circumferential Feed (mm/stroke) Infeed (mm)
First 400 0.05 0.6 5
Second 400 0.05 0.6 3
Third 400 0.01 0.2 0.5

The retraction amount was fixed at 0.4 mm. We simulated each tool across these cycles, recording the maximum interference during retraction. The results showed that the 7-tooth tool had significantly lower interference in the first two cycles, while the 9-tooth tool performed better in the final cycle. This insight led us to adopt a hybrid approach: using the 7-tooth tool for roughing and the 9-tooth tool for finishing. This strategy reduced tool wear and improved accuracy in production.

The simulation output included graphical views of the shaping process, allowing us to visually verify the material removal and interference zones. The quantitative interference data confirmed that the 7-tooth tool minimized engagement in critical phases, which is beneficial for internal gears with complex profiles. This case underscores the value of simulation for internal gear manufacturers in optimizing tool selection and machining sequences.

Conclusion

We have developed a comprehensive simulation system for internal gear shaping that addresses the critical issue of tool interference. By leveraging algorithms for Boolean subtraction and interference calculation, implemented in C++Builder, the system provides both graphical and quantitative insights into the shaping process. The application to an NB internal gear pump demonstrates its practicality in real-world scenarios, enabling internal gear manufacturers to enhance tool design and process parameters. Future work will extend the system to 3D simulations and incorporate more advanced material models, further supporting the production of high-quality internal gears.

The ability to predict and quantify interference early in the design phase reduces reliance on physical prototypes, saving time and costs. For internal gear manufacturers, this simulation tool represents a step toward digital transformation, aligning with industry 4.0 trends. We believe that such systems will become integral to advanced manufacturing, particularly for custom internal gears with non-standard profiles.

Scroll to Top