CNC machining housings & enclosures: design once, seal right
CNC machining housings and enclosures: pocketing, wall thickness, sealing grooves, EMI and thermal design.
Guide · Housings & Enclosures CNC machining housings & enclosures: design once, seal right A machined enclosure is a heat sink, an EMI shield, an IP seal and a mounting chassis in a single 6061 billet. This guide covers the three ways to make a box, the DFM rules that control cost, and the sealing, finish and thermal decisions that decide whether the part survives the field — plus how Nex-G machines the housing and builds the electronics inside it. Three ways to make an enclosure For a hardware architect. You have three realistic routes to a housing, and they optimize for different things. Machining from billet pockets a solid block and returns tight tolerances, real structural strength and full design freedom, with no tooling and a minimum order of one. Sheet metal folds and fastens panels into a box; it is the cheapest at volume and the lightest, but corners leak, tolerances stack, and flat panels do not act as heat sinks. Die casting injects molten alloy into a steel mold for near-net shape at high volume, but it needs draft, a tool that costs weeks of capital, and it carries porosity that fights sealing and welding. The crossover is a volume and geometry question, not a preference. We map the full crossover here. For a prototype, a pilot run, a bridge build or any design still moving, machining from billet is the default — and it is the only one of the three that gives you a housing you can pressure-test, anodize cleanly and revise overnight. Quick pickPrototype or under ~1,000/yr → machine from billet. Stable design above ~10,000/yr → die cast the body, machine the sealing faces. Lightest, cheapest, no thermal duty → sheet metal. Sealed, anodized, heatsinking → billet. Machining a pocket from billet: what you actually pay for An enclosure machined from solid is a subtractive job: you remove everything that is not the box. The dominant cost driver is material removal rate — how much metal the spindle must eat and how many setups it takes to reach every wall. A deep, narrow pocket forces a long, small-diameter tool that runs slow and clears chips carefully; a shallow, open pocket clears in minutes. The practical rule is that the deeper the pocket relative to its width, and the smaller the corner radius you demand, the more you pay. Setups matter as much as cutting. A simple two-piece enclosure (lid and base) is typically two setups per part, machining the outside and the inside of each half. A five-sided box with connectors on every face can need a fourth or fifth axis. Design so features group onto as few faces as possible and the cost drops. Billet also buys you something the other two processes cannot: the wall, the bosses and the heatsink fins are one continuous piece of metal, so there is nothing to leak, loosen or misalign. Most enclosures are two pieces — a base that carries the board and a lid that closes it — but a one-piece tube with machined end caps, or a deep pocket with a gasketed lid, is just as common. Decide the split early, because it sets the sealing plane, the fastener pattern and the number of setups. A lid that is simply a flat plate with a groove is the cheapest thing in the assembly; a lid that carries fins, bosses and connector reliefs adds setup but turns the cover into part of the thermal and structural solution. Enclosure materials: 6061, stainless and plastic 6061-T6 aluminum is the default for a reason. It machines fast, is light, conducts heat well, anodizes to a clean cosmetic or hardcoat finish and costs little. 6061 covers the overwhelming majority of machined electronics housings. 7075 is stronger and pricier; 5052 and 5083 serve corrosion-heavy marine duty. The full aluminum grade guide. Stainless (303 and 304/316) is the choice when the enclosure lives outdoors, in washdown or in a medical or food environment. It resists corrosion and cleans easily, but it machines slowly, costs more per part and is heavy — so you pay a premium and carry more mass. Stainless grades here. Engineering plastics (POM/acetal, PEEK, ABS, PC) win when you need electrical isolation, RF transparency, chemical resistance or minimum weight. POM is the machinable workhorse; PEEK handles temperature and chemicals at a price. The plastics guide. Plastics do not shield EMI and do not sink heat, so plan those functions separately. Property data lives in the ASM Handbook. MaterialBest forMachinabilityThermalRelative cost 6061-T6 aluminumGeneral electronics housingsExcellentGoodLow 7075-T6 aluminumHigh-strength, structuralVery goodModerateMedium 303 / 304 / 316 stainlessOutdoor, washdown, medicalFairPoorHigh POM (acetal)Isolation, RF-transparentExcellentPoorLow PEEKHigh temperature, chemicalFairPoorHigh DFM: wall thickness and corner radii For a manufacturing engineer. Two numbers drive most of the cost of a machined enclosure: minimum wall thickness and inside corner radius. Walls thinner than about 1.0–1.5 mm in aluminum vibrate and deflect under the cutter, which forces slower feeds, chatter and hand-finishing. A comfortable design floor is 2–3 mm for a rigid box; go thinner only where weight genuinely pays for the extra machining care. Inside corners are set by the round cutter. A standard end mill cuts a radius equal to half its diameter, so a sharp-looking 90° corner on the print is actually a small radius in metal. Specifying an inside radius of at least one-third to one-half the pocket depth lets a rigid tool reach the floor in one pass; asking for a radius near zero forces either a tiny, fragile tool or a secondary EDM step. Our full DFM guide. DFM: deep pockets, bosses and threaded features Deep pockets are the single biggest cost lever in enclosure machining. A pocket deeper than about 4× the tool diameter becomes a slow, chip-evacuation problem: the cutter must be relieved, run shallow and kept clear of recut chips that dull edges and mar the floor. Where the print allows, radius the pocket corners generously and step the depth in stages rather than one plunge. Bosses carry your PCB standoffs and cover screws. Give each boss enough surrounding wall — roughly 2× the thread major diameter — and keep bosses short and near an outer wall so they stay rigid. Threads are cut, not molded: cut threads in aluminum hold well, but a repeated-cycle thread (battery lids, service covers) wants a stainless helicoil or threaded insert so you never strip the soft parent metal. Call out the insert spec on the drawing and the shop installs it before finishing. Sealing grooves, o-ring channels and EMI gaskets An enclosure that must seal needs a groove machined into the mating face — and that groove is where the IP rating is won or lost. An o-ring groove needs controlled depth and width with a smooth floor, because the ring compresses a known percentage of its diameter to seal. Standard practice sizes the groove to the cord diameter for a fixed squeeze (commonly 20–30%), with the floor finish held smooth so the seal seats evenly. Gasket channels for flat die-cut gaskets follow the same logic with a rectangular cross-section. EMI gaskets add one more requirement: the groove must compress a conductive knit or fingerstock against a bare, conductive surface, so keep that channel free of anodize or paint. Call out a mask or a secondary machining pass on the contact face — an anodized surface is an insulator, and it will defeat the gasket you just paid for. Choose the seal material with the environment in mind, not just the geometry. Silicone tolerates heat and UV but takes a permanent set under long compression; EPDM resists weather and water but not oil; fluorocarbon (FKM) handles chemicals and wide temperature swings at a cost. A groove machined for one cord diameter will not seal a different material correctly, so fix the gasket and the groove together in the same design review. Tolerances that matter for enclosures For a quality lead. Not every feature earns a tight tolerance, and over-tolerancing a housing is the fastest way to inflate its price. Hold tight where function lives: the sealing groove, the PCB mounting bosses and standoff heights, the connector cutouts and any bearing or shaft bores. Let the cosmetic exterior and the pocket walls run open. As a rule, ±0.1 mm is generous and cheap, ±0.05 mm is a normal machining tolerance, and ±0.005 mm is achievable where a sealing face or a press fit demands it. On our floor the standard is ±0.005 mm, with ±0.002 mm on precision grinding, and the processes run under SPC control to Cpk ≥ 1.67 (key) and Cpk ≥ 1.33 (general) — which is what turns a tolerance callout into repeatable parts. GD&T in plain terms. Finishes: anodize, powder coat and bead blast Finish is functional, not cosmetic. Anodize (Type II) grows a controlled oxide layer that hardens the surface, resists corrosion and takes dye for a consistent color; it is the default for a machined 6061 enclosure because it also masks cleanly so the EMI contact stays bare and conductive. Hard anodize (Type III) builds a thicker, harder layer for wear surfaces but is harder to color-match. Powder coat sprays and bakes a thick polymer film — the best impact and scratch resistance and the widest color range, but it insulates thermally and electrically, so mask any grounding or thermal faces. Bead blast is a mechanical prep that gives a uniform matte texture before anodize or powder; it hides tool marks but does not seal the part on its own. The full finishing guide. FinishWhat it doesWatch forBest for Anodize Type IIHardens, colors, resists corrosionMask EMI and ground facesDefault 6061 housing Hard anodize Type IIIThick, wear-resistant layerHarder to color-matchWear and sliding faces Powder coatThick, impact-resistant filmInsulates, so mask contactsRugged, cosmetic exteriors Bead blastUniform matte texturePrep only, not a sealPre-finish, cosmetic IP rating: what the machining has to get right An IP rating is a test result, not a sticker — and it is decided at the machine. IP54 and IP65 (splash and water jets) are within reach of a well-machined groove with a foam or silicone gasket. IP67 and IP68 (temporary or continuous immersion) demand a compression seal with a controlled squeeze, flat mating faces and fasteners spaced closely enough that the lid cannot bow between screws. The machining has to deliver a flat, smooth sealing face, a groove of consistent depth and a rigid lid that does not flex under fastener torque. Two details catch most teams. First, every pass-through — connectors, cable glands, indicator lenses — needs its own seal, and the machining must hold the cutout to size so that seal seats. Second, the mating faces must be masked during finish; anodize build-up in a groove changes the squeeze and can break the seal. State the target IP rating on the drawing and let the DFM review pick the groove and gasket that actually achieve it. Thermal management: make the housing the heat sink A machined aluminum enclosure is already a heat sink — the question is whether you design it as one. Fins are free geometry in billet: a pocket that leaves raised fins on the outside turns the lid or the base into a passive cooler with no extra part. Keep fin spacing wide enough for a rigid cutter (the same corner-radius rule applies between fins) and you get real surface area without a separate extrusion. Conduction beats convection inside a sealed box. Mount the hot component — a regulator, power stage or LED — directly to a machined boss or a thermal pad against the wall, so heat reaches the metal instead of trapped air. If the enclosure is sealed, the wall is the only path out, so machined-in bosses and flat thermal pads are the difference between a 20°C rise and a 60°C rise. Add a pocket for a thermal interface material and the part cools itself for the price of a few extra grams of aluminum. Two fin rules keep the geometry cheap to machine and effective to cool. Keep the gap between fins at least as wide as the tool that cuts them — the same corner-radius logic as a pocket — and keep the fin height reasonable relative to its thickness, because a tall, thin fin sings during cutting and adds cycle time without adding much surface area. A short, dense field of fins with a clear air path beats a tall sparse one for passive cooling, and both are free geometry in billet. EMI shielding and grounding: machining the path A metal enclosure is already a Faraday cage — but only if the seams conduct and the shield is grounded. Machining decides both. The seam between the lid and the base must close to a continuous conductive contact, which is why EMI-critical boxes specify a gasket groove on one half and a bare, conductive mating face on the other. The groove is machined for a specific conductive gasket — knit wire mesh, fingerstock or a conductive elastomer — and the mating face is left free of anodize, paint or powder so the gasket seats on metal, not on an insulator. Grounding needs its own machined features. A dedicated grounding boss with a masked, conductive pad gives the board or the cable shield a low-impedance path to the enclosure, and a self-clinching stud or standoff pressed into a machined hole gives it a repeatable termination point. Remember the finish rule from above: anodize is an insulator, so every grounding and gasket contact face is masked during finish or machined clean after it. The cheapest EMI enclosure is the one whose conductive paths were designed at the same time as the grooves, not added as a rework step. Cost levers: what moves the enclosure quote Five levers move the price of a machined housing more than any others, and you control all of them. Material removal: open up deep pockets and the cycle time falls. Setups: fewer faces touched means fewer operations. Corner radius: a generous radius lets a rigid tool run flat out. Wall thickness: too thin forces delicate cutting; too thick wastes metal. Finish and masking: every masked face and every secondary op adds a line to the quote. The cheapest enclosure is the one that is easy to machine, not the one drawn tightest. This is where a shop that also builds electronics pays off: a DFM review that understands the board inside the box can relax the features that do not matter and hold the ones that do, instead of blanket-tolerancing everything. How enclosure cost is actually computed. The enclosure DFM checklist Run this list against your drawing before you send it, and the quote comes back tighter and the first part comes back right. CheckAskWhy it moves cost Wall thicknessAre walls below ~1.5 mm where they need not be?Thin walls chatter, slow feeds and add hand-finishing Corner radiusIs the inside radius at least a third of pocket depth?A generous radius lets a rigid tool run flat out Pocket depthIs any pocket deeper than ~4x the tool diameter?Deep pockets force slow, relieved cuts and chip-clearing SetupsDo features group onto the fewest faces?Fewer faces touched means fewer operations Finishes and maskingAre EMI and ground faces masked?Every masked face and secondary op adds a line to the quote The two that matter most are corner radius and pocket depth — together they decide most of the cycle time on a billet box. Loosen them where the design allows and the part drops in price without dropping in function. The Nex-G anchor: machine the enclosure, build the electronics The enclosure is only half the product. The reason to run housing and electronics with one partner is that the two halves share tolerances: the PCB mounts, the connector cutouts, the standoff heights and the thermal pads all have to line up with a board someone else assembles. When one supplier machines the housing and builds the PCBA inside it, those interfaces stop being a hand-off and become a single process. Nex-G does exactly that from our Dongguan Hengli plant — 6,800 m², 100+ staff, operating since 2006. We machine housings in-house on 80+ CNC machines (Mazak, Brother, TSUGAMI, Sodick) at ±0.005 mm (and ±0.002 mm on precision grinding), then assemble the electronics — SMT, component sourcing, wiring and final test — under the same roof and the same quality system. Certifications cover ISO 9001, IATF 16949 (design excluded, clause 8.3) and ISO 14001, audited by URS through 2027. MOQ is one enclosure, with lead tiers of roughly 3 / 7 / 30 days by complexity. Send the housing model and the BOM together, and the enclosure and the board come back as one tested, sealed product. On the floor the checks are concrete rather than aspirational. Every BOM line is cross-checked against the drawing and the purchase spec before release, so a 6061 callout cannot silently become 5052. Critical stock is bought through a cross-checked second source with a matching mill test certificate, and each incoming lot is confirmed by XRF / PMI before it reaches a machine. For aerospace programs we run FAI per AS9102 so the first article is dimensionally signed off before the run begins. Frequently asked questions What tolerance can a machined enclosure hold?±0.05 mm is routine, and ±0.005 mm is achievable on sealing faces and bores. We hold ±0.005 mm as standard and ±0.002 mm on precision grinding, verified under SPC at Cpk above 1.67. How thin can the walls be?Around 1.0–1.5 mm is the practical floor in aluminum, but 2–3 mm is more rigid and cheaper to machine. Thinner walls chatter, add cycle time and need hand-finishing. Can a CNC enclosure be waterproof?Yes. IP67/IP68 needs a machined o-ring or gasket groove with controlled squeeze, flat mating faces and close fastener spacing — all things machining delivers. Pass-throughs need their own seals. Is 6061 the right material for my housing?For most electronics, yes — it machines fast, is light, conducts heat and anodizes well. Choose stainless for washdown or outdoor duty, plastic for isolation or RF transparency. What finish should I pick?Anodize Type II is the default; hard anodize for wear faces, powder coat for rugged cosmetics. Mask EMI and ground faces during finish so they stay conductive. Do you machine the enclosure and assemble the electronics?Yes — that is the point. The housing is machined in-house and the PCBA plus final assembly are built in-house, under one quality system. What is the minimum order for a machined enclosure?One. There is no tooling and the MOQ is a single enclosure, so prototypes and bridge builds cost the same per part as production. How fast can I get a first enclosure?Lead tiers run roughly 3 / 7 / 30 days by complexity. A simple two-piece 6061 housing lands in days; a multi-axis, finished and sealed build takes longer. Can a machined enclosure shield EMI?Yes — but the seams must conduct. We machine a gasket groove for a conductive gasket and leave the mating face bare and masked during finish, plus a grounding boss for the board or shield. State the EMI requirement and we design the conductive path in. Do you install threaded inserts and standoffs?Yes — helicoils and self-clinching inserts and standoffs are installed in-house before finishing, so a repeated-cycle thread never strips the soft parent metal. Call out the insert spec on the drawing. Need the housing and the electronics from one partner?Send the enclosure model and the BOM to [email protected] — we will quote machining and assembly together, with DFM feedback on sealing, finish and thermals.Request a quote Related articlesThe Complete Guide to DFMSurface Finishing GuideCNC Machining Cost in China