mexaio · 2026-11-13 · 11 min

Why Text-to-CAD Fails on Linkages and Bearing Bores

Prompting a mechanism into existence sounds great until you check the bore runout or mate a four-bar linkage. Here is why generative meshes break dynamic assemblies.

Machined aluminum mechanism linkage on a granite surface plate compared with a faceted digital mesh

Engineering teams testing the current crop of text-to-CAD generators keep running into the same brick wall. You can prompt a model to give you a mounting bracket, a crank arm, or a robotic gripper knuckle, and within ten seconds a sleek 3D shape appears on screen. But the moment you drop that geometry into an assembly to verify a kinematic sweep or cut an H7 bore for a standard 608 ball bearing, the model disintegrates into unusable data.

Recent evaluations of commercial and open-source generative geometry engines, including tests run by manufacturing platforms like Xometry on tools such as Zoo, alongside open-source code-generation tools like build123d, highlight an uncomfortable truth. Generating a 3D volume that looks like a mechanical component is trivial. Generating a parametric kinematic link with true cylindrical datums, perpendicular pivot axes, and editable center-to-center distances is an entirely different problem.

For mechanical engineers, machine builders, and robotics startups carrying tight delivery schedules, this distinction is the difference between saving two hours of modeling time and wasting three days troubleshooting bound joints on a CNC bed. When an AI tool outputs a dead mesh or a baked boundary representation without feature history, fixing a 0.015 mm bore clearance requires deleting the entire feature and redrawing it from scratch.

The Surface Lie: Why Visual Geometry Destroys Kinematics

Most generative 3D models were built for rendering engines, game development, and digital visualization. They optimize for visual plausibility. If a surface looks smooth under ambient lighting, the algorithm considers the job done.

In mechanism design, visual plausibility is meaningless. A mechanism operates on strict geometric relationships. A four-bar linkage requires two ground pivots, an input crank, a coupler, and a follower. For this system to rotate through a complete 360-degree cycle without binding, several absolute geometric truths must hold simultaneously:

  1. Pivot centerlines must be parallel within fractions of a degree across the entire operating width.
  2. Center-to-center pitch lengths between pin joints must match the kinematic synthesis calculations down to the hundredth of a millimeter.
  3. Bearing pockets must be circular cylinders with zero conical taper, defined about a single unambiguous axis.
  4. Mounting faces must be planar surfaces that establish a true primary datum, not an approximation made of dozens of microscopic facets.

When a generative model produces an unconstrained polygon mesh (such as an STL, OBJ, or GLB file), it represents a cylindrical hole as a collection of flat triangular facets. Even if you export that file as a STEP solid through automated surface wrapping, you do not get a cylinder. You get a non-uniform rational B-spline (NURBS) surface that drapes over those facets like wet shrink-wrap.

When your CAD system tries to compute a revolute joint on that draped face, it fails. There is no centerline axis. There is no cylindrical face entity to select for a concentric mate. The assembly solver cannot find a vector normal to the bore because the surface normal drifts across every square millimeter of the face.

The Anatomy of an H7 Bearing Bore Failure

To understand why non-parametric generative output fails on the shop floor, follow what happens when you attempt to manufacture a basic 22 mm outer-diameter bearing bore.

A standard 608 bearing requires an H7 tolerance fit in an aluminum housing for a light press fit. For a 22 mm bore, an H7 tolerance window allows a deviation between +0.000 mm and +0.021 mm. If the bore is 21.980 mm, the bearing race will deform during pressing, pinching the internal balls and dramatically increasing rotational friction. If the bore is 22.030 mm, the outer race will spin inside the housing under load, galling the aluminum and ruining the mechanism.

Here is what happens when you feed generative outputs into a modern manufacturing workflow:

Faceted Meshes

The generative engine outputs an STL or high-density mesh. The bore is represented by 64 or 128 flat polygons. If your CAM programmer attempts to generate a helical boring toolpath, the software cannot detect a circular arc. The post-processor outputs thousands of tiny point-to-point G1 linear moves instead of smooth G2 or G3 circular interpolation. The machine tool chatters, the surface finish exceeds 3.2 Ra, and the bearing seat is ruined before it leaves the vise.

Dead STEP B-Rep Dumps

The tool converts the mesh into a boundary representation (B-Rep) STEP file. The bore opens in SolidWorks or Inventor as a solid body, but the hole is split into four irregular spline faces. The hole diameter varies from 21.84 mm at the top lip to 22.12 mm near the center. Because there is no hole feature in the model tree, you cannot double-click the bore to change the diameter or add an ISO fit callout. To make the part machinable, the engineer must create a sketch, project the irregular opening, find an approximate center, extrude-cut a solid plug to fill the cavity, and cut a fresh parametric hole. The AI tool saved zero minutes.

Pitch Runout on Pin Linkages

In a precision scotch yoke or parallel linkage, a 0.05 mm error in hole spacing across a 150 mm span changes the angular transmission ratio and introduces side-loading on linear guides. Generative systems without explicit dimensional constraint solvers place features by visual probability rather than geometric determinism. The resulting link looks proportional, but the pin-to-pin distance measures 149.73 mm instead of 150.00 mm. In a rigid mechanical assembly, that 0.27 mm error causes instant mechanical binding.

+--------------------------------------------------------------------------------+
|                    THE BREAKDOWN OF GENERATIVE BORE GEOMETRY                  |
+--------------------------------------------------------------------------------+
| Feature Requirement    | Parametric Native CAD    | Generative Mesh / Auto-STEP|
+------------------------+--------------------------+----------------------------+
| Hole Geometry          | Single Analytic Cylinder | Faceted Shell or Splines   |
| Centerline Axis        | Exact Vector (0,0,1)     | Indeterminate or Segmented |
| Concentric Assembly    | Native Mate Constraint   | Mate Solver Rejection      |
| Machining Toolpath     | Smooth G2/G3 Circular    | Chattered G1 Linear Points |
| Dimension Edits        | Direct Parameter Input   | Redraw / Extrude-Cut Plug  |
+------------------------+--------------------------+----------------------------+

The Code Generation Alternative: build123d and OpenCASCADE

Recognizing the failure of direct mesh generation, the generative AI sector has splintered. One branch continues chasing neural implicit representations and diffusion models that output meshes. The other branch, exemplified by tools building on programmatic CAD kernels like build123d, CadQuery, and Python-OpenCASCADE, uses Large Language Models (LLMs) to write code that calls geometric modeling kernels.

This code-generation approach solves the analytic surface problem. When an LLM writes a Python script using build123d, it explicitly invokes:

import build123d as bd

with bd.BuildPart() as crank_arm:
    with bd.BuildSketch() as profile:
        bd.SlotOverall(width=150, height=35)
    bd.extrude(amount=12)
    with bd.Locations(crank_arm.faces().sort_by(bd.Axis.Z)[-1]):
        with bd.Locations((-60, 0), (60, 0)):
            bd.Hole(radius=11.0)  # 22mm Bearing Bore Seat

Because this pipeline compiles through an actual geometric modeling kernel, the resulting STEP file contains true analytical cylinders, true flat planes, and exact mathematical centerlines. You can mate it in any standard CAD package. You can apply a circular toolpath in CAM without polygon chatter.

However, programmatic CAD generation introduces a different class of mechanical failures that become obvious once you move from individual parts to multi-body dynamic mechanisms.

1. Fragile Topological Naming

When an agent edits or iterates on a scripted mechanism, it references faces and edges by index or directional filtering (such as selecting the topmost face along the Z-axis). If a secondary prompt asks the model to add a weight-reduction pocket or a stiffening rib, the underlying face indexing shifts. The subsequent hole feature attaches to the wrong face, cuts backward through the part, or fails to compile entirely.

2. Blindness to Dynamic Kinematic Envelopes

An LLM writing geometry code does not understand dynamic interference. It can place two links at a specified resting angle, but it cannot calculate whether the coupler will collide with the motor housing at 140 degrees of crank rotation. Traditional mechanical design requires sweeping the linkage through its full range of motion, plotting velocity and acceleration profiles, and shaping the linkage arms around clearance boundaries. A prompt-based code script creates a static snapshot, leaving kinematic validation entirely to manual post-processing.

3. Missing Tolerance and Fit Intelligence

Code generators write nominal dimensions. If you prompt an LLM for a "bearing pocket for an R8 bearing," it looks up the nominal outer diameter (1.125 inches / 28.575 mm) and cuts a 28.575 mm hole. On the shop floor, nominal is a scrap part. A bearing pocket needs specific tolerance callouts depending on whether the shaft or the housing rotates, what the thermal operating window is, and whether the housing is 6061-T6 aluminum or 3D-printed PETG. LLM code generators do not possess the manufacturing rule bases required to select an M6 clearance hole versus a tapped 1/4-20 thread with proper thread relief.

Kinematic Performance Comparison

To demonstrate where current AI geometry workflows fail in real mechanical assemblies, consider the following performance comparison. The metrics below represent an illustrative composite comparing typical outputs from visual mesh-to-STEP tools, scripted CAD-code generation engines, and traditional manual parametric modeling when tasked with producing a functional four-bar crank-rocker mechanism.

+---------------------------------------------------------------------------------+
|    ILLUSTRATIVE COMPOSITE: CRANK-ROCKER MECHANISM GENERATION BENCHMARK          |
|    Task: 4-Bar Linkage, 120 RPM, Dual 608 Bearing Bores, 150mm Center Distance  |
+-----------------------------------+-----------------+-------------+-------------+
| Metric                            | Mesh-to-STEP AI | Code-Gen AI | Manual CAD  |
+-----------------------------------+-----------------+-------------+-------------+
| True Analytic Cylindrical Bores   | 0% (Faceted)    | 100%        | 100%        |
| Bore Diameter Error vs Nominal    | +0.180 mm       | +0.000 mm   | User Def.   |
| Center-to-Center Pitch Error      | +0.340 mm       | +0.000 mm   | User Def.   |
| Concentric Assembly Mate Success  | Failed (0/4)    | Passed (4/4)| Passed (4/4)|
| Dynamic Clearance Verification    | None (Static)   | None (Static| Dynamic Swee|
| Downstream Feature Edit Time      | Complete Redraw | Code Debug  | Instant Edit|
| CAM Toolpath Generation Ready     | No (Manual Fix) | Yes (Nominal| Yes (Toleran|
+-----------------------------------+-----------------+-------------+-------------+
*Note: Illustrative composite derived from standard geometry kernel behaviors and 
manufacturing test protocols across OpenCASCADE, build123d, and mesh conversion tools.*

Visual mesh generators fail every functional criteria required for kinematic assemblies. Code-generation tools pass basic geometric integrity checks, but they still drop the burden of tolerance assignment, clearance sweeping, and kinematic validation squarely back onto the engineer.

The Mechanism Designer's Evaluation Checklist

If your engineering group is evaluating generative AI tools for mechanical systems, mechanisms, or dynamic robotics, do not let vendors demo simple static brackets, artistic vases, or organic heat sinks. Those parts hide geometric flaws because they have no mating constraints.

Test any candidate AI design tool against this five-point mechanism validation checklist:

1. The Concentric Mate Test

Generate a two-link hinge. Export the model directly to your production CAD software (SolidWorks, Inventor, Creo, or NX) as a STEP or native part file. Attempt to apply a standard concentric mate between the pin and the hole, followed by a coincident mate on the thrust faces. If the software requires you to generate synthetic axes or refuses the mate due to non-cylindrical geometry, disqualify the tool from production workflows.

2. The Pitch-Length Tolerance Audit

Prompt the tool to create a connecting link with two pivot points separated by an exact dimension (for example, 187.50 mm). Measure the distance between the resolved axes using your CAD inspection tool. If the distance deviates by even 0.05 mm without explicit instruction, the tool lacks internal geometric determinism.

3. The Feature Tree Regeneration Test

Open the generated part and locate the bore feature. Attempt to change the diameter from 22.00 mm to 21.98 mm to account for a press-fit tolerance. If the model does not have an exposed, editable sketch or feature parameter, or if changing that dimension causes downstream fillets and chamfers to explode, the tool is outputting dead geometry.

4. Dynamic Interference Verification

Ask the system to generate a mechanism assembly across multiple operational states (such as an over-center clamp at 0 degrees, 45 degrees, and 90 degrees). Check whether the tool provides interference detection throughout the motion path or simply generates static components that collide when rotated.

5. Standard Hardware Integration

Verify whether the system understands standard hardware datums. When you specify a counterbore for a standard M4 socket head cap screw, does the tool output the correct 7.5 mm counterbore diameter and 4.4 mm depth with proper clearance, or does it guess a generic hole that forces manual correction before manufacturing?

What this means for Mexaio AI

Real mechanical engineering is not about generating pretty shapes. It is about controlling the flow of forces through rigid bodies while maintaining precise relative motion between moving parts.

The generative mechanical engine built at Mexaio AI bypasses the mesh trap entirely. Instead of generating unconstrained surface volumes and hoping they convert cleanly, Mexaio AI operates directly within parametric kinematic spaces, calculating mechanism synthesis, link lengths, pivot parallelism, and dynamic swept volumes before outputting native, fully editable parametric features.

When a mechanism is generated, bearing bores are produced as true mathematical cylinders with user-defined tolerance classes, mounting faces serve as exact kinematic datums, and linkage geometry is validated across the full operational sweep to guarantee zero interference during cycle runs. The output is not a dead picture of a part. It is a live, production-ready parametric model that drops directly into your CAD assembly and CAM toolpathing pipelines.

Moving Past Dead Geometry

The industry is moving past the phase where generating an STL from a text prompt is considered impressive. In a commercial manufacturing environment, dead geometry is a liability. Every faceted bore, every skewed axis, and every unconstrained sketch represents friction, scraped parts, and wasted engineering hours.

As AI tools for mechanical engineering mature, the separation between toy demos and serious production software will come down to mathematical rigor. Watch how candidate tools handle geometry under the hood. If a tool cannot hand you a parametric feature tree with true analytical datums and verified kinematic clearances, leave it in the rendering studio. Your CNC mill and your assembly technicians will thank you.


Frequently Asked Questions

Why can't engineers simply machine parts directly from AI-generated mesh files?

Mesh files represent 3D surfaces using thousands of flat triangular polygons rather than mathematically exact curves and cylinders. When CAM software generates toolpaths from a mesh, it creates faceted, chattered cuts instead of smooth circular arcs, making it impossible to hold precision bearing tolerances like ISO H7. Meshes also lack feature trees, centerlines, and parametric dimensions, forcing engineers to completely redraw parts before manufacturing.


Sources

More Mexaio AI Insight

kinematicscadlinkagesmachiningrobotics