The design and manufacturing of mechanical power transmission components have been fundamentally transformed by the integration of Computer-Aided Design (CAD), Computer-Aided Engineering (CAE), and Computer-Aided Manufacturing (CAM). Within this paradigm, the **spur and pinion** gear, a cornerstone of motion transfer, demands particular attention. Its efficiency and reliability hinge on the precise geometry of the involute tooth profile. This article details a robust methodology for the fully parametric design of standard involute **spur and pinion** gears using native CAD functionalities, followed by a seamless transition into virtual NC machining simulation to generate verified toolpaths and post-processed code.
Traditional parametric approaches often rely on secondary development through programming or on implementing the involute equations in a converted, less intuitive form. The method described herein leverages the core expression and curve-generation tools within a high-end CAD system (exemplified by UG NX) to create a driver parameter-driven model. This model intelligently adapts to different tooth counts, specifically addressing the geometric distinction between **spur and pinion** gears with fewer than 41 teeth and those with more. The subsequent CAM simulation validates the manufacturability of the designed **spur and pinion**, ensuring the digital model’s integrity carries through to the machine tool.
Philosophy of Parametric Gear Design
Parametric design is the creation of a geometry where dimensions are defined not by static numbers but by algebraic relationships and driving parameters. For a **spur and pinion** gear, key driving parameters are:
- Number of teeth, $z$
- Module, $m$ (or diametral pitch, $P_d$)
- Pressure angle, $\alpha$
From these, all other critical dimensions are derived. The core idea is to use the CAD software’s expression editor to establish these formulas. By changing the value of a driving parameter (e.g., module $m$), every dependent feature—the diameters, the involute curve, the solid body—updates automatically. This is the essence of a data-driven model for any **spur and pinion** set.
The fundamental geometric dimensions for a standard **spur and pinion** are calculated as follows:
| Parameter | Symbol | Formula |
|---|---|---|
| Pitch Diameter | $d$ | $d = m \cdot z$ |
| Base Diameter | $d_b$ | $d_b = d \cdot \cos(\alpha)$ |
| Addendum Diameter | $d_a$ | $d_a = d + 2 \cdot h_a \cdot m$ where $h_a^*=1$ |
| Dedendum Diameter | $d_f$ | $d_f = d – 2 \cdot (h_a^* + c^*) \cdot m$ where $c^*=0.25$ |
These formulas must be implemented as linked expressions within the CAD environment.
Constructing the Involute Tooth Profile Parametrically
The accuracy of the **spur and pinion** model depends entirely on the correct generation of the involute tooth flank. An involute curve is defined as the trace of a point on a taut string as it is unwound from a base circle of radius $r_b$.
The parametric equations in the Cartesian coordinate system, which are suitable for CAD input, are derived from the polar involute definitions. For a given roll angle $\theta$ (in radians), the coordinates are:
$$
x(\theta) = r_b (\sin(\theta) – \theta \cos(\theta))
$$
$$
y(\theta) = r_b (\cos(\theta) + \theta \sin(\theta))
$$
$$
z(\theta) = 0
$$
Here, $\theta = \inv(\alpha_k) = \tan(\alpha_k) – \alpha_k$, where $\alpha_k$ is the pressure angle at a given radius $r_k$ on the involute, related by $r_k = r_b / \cos(\alpha_k)$.
The implementation proceeds through systematic steps:
1. Defining Expressions
All parameters are defined in the expression editor. It is crucial to maintain consistency in units (degrees vs. radians).
| Variable Name | Expression (Example) | Comment |
|---|---|---|
| m | 3 | Module (driver) |
| z | 14 | Number of teeth (driver) |
| alpha_deg | 20 | Pressure Angle in degrees (driver) |
| alpha_rad | alpha_deg*pi()/180 | Pressure Angle in radians |
| ha_star | 1 | Addendum coefficient |
| c_star | 0.25 | Clearance coefficient |
| d | m*z | Pitch Diameter |
| db | d*cos(alpha_rad) | Base Diameter |
| da | d + 2*ha_star*m | Addendum Diameter |
| df | d – 2*(ha_star + c_star)*m | Dedendum Diameter |
| rb | db/2 | Base Circle Radius |
2. Generating Base Geometry and the First Involute
Using the calculated diameters, concentric circles for the addendum $(d_a)$, pitch $(d)$, base $(d_b)$, and dedendum $(d_f)$ are sketched on the principal XY plane, constrained to the origin. The “Law Curve” feature is then used to create the first involute. The parameter ‘t’ (varying from 0 to 1) controls the evaluation of the law. We define the end parameter for the curve, typically up to the addendum circle.
$$
\alpha_{a} = \arccos(d_b / d_a)
$$
$$
\theta_{a} = \tan(\alpha_{a}) – \alpha_{a}
$$
Setting $u = \theta_{a}$, the law curve inputs become:
$$
X_t = r_b * (\sin(u*t) – (u*t) * \cos(u*t))
$$
$$
Y_t = r_b * (\cos(u*t) + (u*t) * \sin(u*t))
$$
$$
Z_t = 0
$$
This creates one flank of the tooth for the **spur and pinion**.
3. Creating the Symmetrical Involute Flank
Simply mirroring the first involute breaks parametric links. To maintain full control, a second, identical law curve is generated, but its coordinate system is rotated. The angle of rotation is the key. The angular tooth thickness on the pitch circle is $\pi / z$ radians. The corresponding involute roll angle at the pitch radius is:
$$
\alpha_{pitch} = \alpha_{rad}
$$
$$
\theta_{pitch} = \inv(\alpha_{pitch}) = \tan(\alpha_{pitch}) – \alpha_{pitch}
$$
The angular position for the mirrored flank’s coordinate system is the sum of the pitch tooth thickness angle and twice the involute roll angle from the base to pitch circle:
$$
\text{rotation\_angle} = (\pi / z) + 2 * \theta_{pitch}
$$
A new reference plane is created at this angle from the principal plane. The second law curve, using $-X_t$ for the x-coordinate, is placed relative to this new plane, creating a perfectly symmetric, fully parametric tooth space for the **spur and pinion**.

4. Completing the Tooth Profile for Different Spur and Pinion Sizes
A critical geometric distinction arises based on the number of teeth, $z$. This directly affects how the dedendum (root) region of the **spur and pinion** is constructed.
| Condition | Description | Construction Method |
|---|---|---|
| $z < 41$ ($d_f < d_b$) | The dedendum circle falls inside the base circle. The involute does not exist below the base circle. | The profile below the base point is approximated by a straight line tangent to the involute at its start (the base point), extending radially inwards until it intersects the dedendum circle. The root fillet is then created between the tangent lines of adjacent teeth. |
| $z \geq 41$ ($d_f \geq d_b$) | The dedendum circle is on or outside the base circle. The active profile extends into the root. | The tooth flank is entirely defined by the involute curve from the addendum down to its intersection with the dedendum circle. The root is formed by the arc of the dedendum circle between the end points of the involutes from adjacent teeth. |
This bifurcation means two master template files are optimal: one for fine-pitch or low-tooth-count **spur and pinion** gears ($z<41$), and another for coarse-pitch or high-tooth-count gears ($z \geq 41$). In a sketcher environment, the appropriate curves (involute, tangent line, circle arcs) are combined using trim and constraint operations to form a single, fully constrained closed profile for one tooth space.
From 2D Profile to 3D Parametric Spur and Pinion Model
With a fully defined and constrained tooth space sketch, generating the solid **spur and pinion** gear is straightforward:
- Create Gear Blank: Use the extrude feature on the dedendum circle ($d_f$) with a distance equal to the face width, $b$ (e.g., $b=10$ mm).
- Create Single Tooth Space: Perform a second extrusion using the closed tooth space profile as the section. This should be a “subtract” operation to cut the space out of the gear blank.
- Pattern the Tooth Space: Use the circular pattern feature to instance the cut tooth space around the central axis. The number of instances is equal to the number of teeth $z$, and the total angle is 360 degrees. This links the pattern count directly to the driving parameter $z$.
The model is now complete. Altering any driving parameter ($m$, $z$, $\alpha$, $b$) in the expression table and updating the model will regenerate a new, geometrically correct **spur and pinion** gear. This parametric associativity is the foundation for efficient design families and variants.
Virtual Machining Simulation for the Spur and Pinion
The power of an integrated CAD/CAM system is realized by using the precise parametric solid of the **spur and pinion** as the foundation for manufacturing simulation. The goal is to generate, verify, and post-process CNC toolpaths.
Manufacturing Process Planning
For a cylindrical **spur and pinion** gear machined from a solid blank, a 2.5 or 3-axis milling strategy is appropriate. A multi-operation approach ensures efficiency and surface quality.
| Op. Sequence | Operation Type | Objective | Tool Type | Key Parameters |
|---|---|---|---|---|
| 1 | Face Milling | Establish clean top datum surface and overall blank thickness. | Face Mill | High feed rate, large stepover. |
| 2 | Contour Roughing | Rapid removal of bulk material from tooth spaces. | End Mill (Ø10 mm) | Aggressive axial/radial depth of cut, toolpath avoids sharp corners, leaves uniform stock (~0.5 mm). |
| 3 | Contour Finishing | Achieve final dimensions and surface finish on tooth flanks. | End Mill (Ø3-6 mm) or Ball Mill | Small stepover, high spindle speed, fine tolerance (0.01-0.03 mm), zero leftover stock. |
| 4 | Profile Finishing | Finish machine the outer diameter ($d_a$) and bore (if any). | End Mill | Accurate radial finish pass. |
CAM Setup and Toolpath Generation
The process within the CAM module follows a strict workflow:
- Initialize & Set Environment: Enter the CAM environment, selecting a “mill_contour” template for 3-axis work.
- Define Geometry:
- Workpiece (Part): The parametric **spur and pinion** solid body.
- Blank: A cylindrical stock defined to be slightly larger than $d_a$ and the face width.
- Set MCS (Machine Coordinate System): Align the Z-axis with the gear axis, typically placing the origin on the top face center. Define a safe clearance plane (e.g., 20 mm above).
- Create Operations:
- Roughing (e.g., Cavity Mill): Select the gear body as the part, the stock as blank. Choose the Ø10 mm end mill. Set cutting parameters (speed, feed, stepdown). Generate the toolpath. The system calculates paths that efficiently remove material from all tooth gaps, as visible in simulation.
- Finishing (e.g., Contour Area): Select the same geometry. Choose the smaller Ø3 mm end mill. Set tolerance to 0.03 mm, stepover to 0.2 mm. Generate a toolpath that smoothly follows the involute contours of the **spur and pinion**.
- Toolpath Verification: Use integrated simulation like “3D Dynamic” or “NC Check” to visualize material removal in real-time. This critical step identifies potential collisions, gouging, or insufficient stock removal before any physical machining.
Post-Processing and G-Code Generation
The final step is translating the universal, machine-independent toolpath (CLSF – Cutter Location Source File) into specific G-code for the target CNC machine. This is done by a post-processor.
$$
\text{Internal Toolpath Data} \xrightarrow[\text{Post-Processor}]{\text{Machine-specific}} \text{G-code Program (e.g., .nc, .tap)}
$$
The post-processor configures:
- Program start/end sequences.
- Motion commands (G00, G01, G02, G03).
- Machine-specific codes for spindle control (M03, M05), coolant (M08, M09), and tool changes (Txx M06).
- Feedrate and spindle speed formatting.
- Circular interpolation plane and format (IJK or R).
A correctly configured post-processor will output clean, efficient, and safe G-code. The final program can be directly transferred to the CNC machine controller for manufacturing the **spur and pinion** gear. The entire digital thread, from parametric drive variable to machine instruction, is now closed, ensuring the designed intent is faithfully executed in metal.
Conclusion
The integration of parametric CAD and CAM provides a formidable framework for the design and manufacturing of precision components like involute **spur and pinion** gears. By utilizing native expression-based modeling, a fully associative and driver-controlled gear model is achieved, capable of automatically adapting to different sizes and tooth counts. The explicit handling of the $z<41$ and $z \geq 41$ cases ensures geometric accuracy across the spectrum of **spur and pinion** applications. Transitioning this validated model into the CAM environment allows for the simulation and optimization of the machining process, generating collision-free toolpaths and ready-to-use NC code. This end-to-end digital process significantly reduces design iteration time, minimizes prototyping costs, and enhances the overall reliability and quality of the final manufactured **spur and pinion** gear set.
