An enclosure earns its IP rating at the machine tool, not on the label. A waterproof aluminum enclosure fails sealing not because the gasket was chosen wrongly, but because the sealing surface, the O-ring groove and the screw-hole pattern were machined to a tolerance that lets water in. This guide explains which CNC parameters actually control sealing, how much accuracy each one needs, and how YONGU builds IP68 enclosures that pass immersion tests consistently — unit after unit, batch after batch.
What IEC 60529 Actually Tests
IEC 60529 — IEC 60529:1989+AMD1:1999+AMD2:2013 CSV, the IP Code standard managed by TC 70 — does not specify a machining tolerance. It only tests the result: an IPX5/IPX6 enclosure survives high-pressure water jets, an IPX7 enclosure survives 30 minutes at 1 m immersion, and an IPX8 enclosure survives continuous immersion agreed between user and manufacturer. Every failure mode in those tests traces back to the same place — a seam that was not compressed evenly enough.
In practice, water enters through joints: the lid-to-body flange, the cover plate, cable entries, display windows and connectors. The gasket is the seal, but the machined groove and flange are what make the gasket work. Get either one wrong, and the IP rating on the drawing never survives the test tank.
Why Sealing Needs CNC, Not Just Extrusion
An extruded aluminum body gives you straight walls, but it does not give you a sealing surface. Extrusion tolerances land around ±0.2–0.5 mm, and the cut ends, flange faces and O-ring grooves all need to be milled. CNC machining is where the flange becomes flat, the groove becomes repeatable, and the screw holes land where the gasket expects pressure.
- Flatness: a flange that is warped or faceted presses the gasket unevenly — tight in one spot, a hair open in another.
- Groove dimensions: an O-ring needs a designed squeeze. The groove width and depth define it, and both are CNC cuts.
- Hole pattern: screws at the wrong pitch leave long stretches of gasket where no clamping force exists.
- Repeatability: sealing is a batch-level promise. Unit one and unit 5,000 must machine to the same numbers.
The Five CNC Parameters That Control Sealing
From thousands of sealed-enclosure programs, the sealing outcome is controlled by five machined features. Each has a tolerance range where sealing is reliable, and a range where testing becomes a lottery.
| Machined feature | What it controls | Failure when out of tolerance | Typical sealed design range |
|---|---|---|---|
| Flange flatness | Even gasket contact across the whole joint | Localized leaks at the low corners | ≤ 0.05 mm over the flange face |
| O-ring groove depth | Compression ratio of the seal | Too deep — seal extrudes; too shallow — no contact | Compression 15–30% for static O-rings |
| Groove width | Space for the compressed seal + clearance | Groove too narrow — seal shears on assembly | Calculated from seal cord size |
| Sealing-surface roughness | Microscopic contact with the gasket | Tool marks hold micro-channels for water | Ra ≤ 3.2 µm on flange faces |
| Screw-hole pitch & position | Uniform clamping force along the joint | Gaps between screws bow the flange open | Pitch ≤ 60–80 mm; holes ±0.05 mm |
These are engineering targets, not clauses of IEC 60529 — the standard validates the result. The tolerance numbers above come from gasket and sealing-design practice, refined on our own sealed-enclosure lines.

Worked Example: What a 0.1 mm Groove Error Does
Take a static O-ring with a 2.0 mm cord diameter. A typical design aims for 25% compression: the squeezed seal height is 2.0 × 0.75 = 1.5 mm, so the groove is machined to a 1.50 mm depth.
| Groove depth (as machined) | Actual compression | Sealing behavior |
|---|---|---|
| 1.50 mm (nominal) | 25% | Designed squeeze — reliable seal |
| 1.60 mm (+0.1 mm shallow) | 20% | Margin thins — vulnerable under pressure jets |
| 1.40 mm (−0.1 mm deep) | 30% | Upper limit — risk of seal extrusion |
A tenth of a millimeter sounds trivial on a drawing. On a 2 mm seal it moves the compression ratio by 5 percentage points in either direction — the difference between an IP68 enclosure that passes immersion and one that passes on a good day. That is exactly the range where CNC repeatability earns its place: our sealing faces and grooves are held to ±0.05 mm, so the compression ratio stays inside the designed window every time.

How YONGU Holds Sealing Tolerances in Production
Sealing accuracy is a process, not a setup. On our IP68 lines, it is built the same way for every enclosure — from the first prototype to a 5,000-piece order:
- ±0.05 mm CNC accuracy on sealing faces, grooves and hole patterns, across our 160+ CNC machines and 14 production lines.
- Dedicated sealing-face operations: flange faces and grooves are machined as a controlled step, inspected against the drawing before assembly.
- First-article CMM and batch sampling: the first unit of every setup is measured on a coordinate measuring machine, and groove depths are sampled through the run.
- Third-party verification: our L-series and M-series enclosures are tested by Bureau Veritas to IEC 60529 at 1.5 m immersion, and the IP68 test reports are available for download.
- Material consistency: 6061/6063 aluminum profiles with stable flatness after machining, and anodized finishes that do not build uneven layers on sealing surfaces.
That process is why our custom CNC machined enclosures ship with sealing designed in — not guessed at after assembly. If you are comparing how different shops handle sealing, the questions worth asking are simple: what tolerance do you hold on the flange face, how do you verify the groove depth in batch, and do you have an IP68 test report I can read?
Choosing a CNC-Machined, Sealed Enclosure
Start from what the environment demands. Our IP68 waterproof aluminum enclosures range covers continuous outdoor and submerged use, and the M01 unibody enclosure is the example of a CNC-finished sealed part where body, flange and groove come from one machined shell. For non-standard sizes, cutouts or connector layouts, the customization and machining service starts from your drawing — tell us the sealing class and the gasket you intend to use, and we confirm the groove and flange design before quoting. Common questions on tolerance, testing and gasket selection are collected in the FAQ page.
CNC Machining and IP Rating FAQ
Does CNC machining itself improve the IP rating?
CNC machining enables the rating — it controls flatness, groove depth and hole position that decide whether the gasket seals. The rating still has to be verified by IEC 60529 testing.
What tolerance does a sealed aluminum enclosure need?
Sealing faces are typically held to ±0.05 mm, with flange flatness under 0.05 mm and O-ring grooves designed for 15–30% compression. Looser tolerances raise the risk of localized leaks.
Is a good gasket enough to reach IP68?
No. A gasket only seals where the groove depth, flange flatness and screw pattern actually compress it. The gasket is the material; the CNC machined dimensions are the mechanism.
Can I add sealing to a standard enclosure after purchase?
Not reliably. Retrofitting a gasket to an enclosure without a designed groove leaves the sealing surfaces unflatness-checked and the screw pitch uncontrolled. Sealing has to be designed and machined in from the start.
Further Reading
For the underlying classification, see IEC 60529:1989+AMD1:1999+AMD2:2013 CSV on the IEC Webstore. Edition 3 of the standard is in its committee-draft stage, with publication forecast for 2027; the current consolidated edition remains the valid reference for new designs today. For choosing the right rating by environment, our guide Understanding IP Ratings for Industrial Enclosures: From IP54 to IP68 walks through what each rating means in service.
