NX Automations · NX Open Python journals + Menu > Multi-Detail Turned

Multi-Detail Turned Parts

Download 1.0.0

Builds every detail of a multi-detail sheet of turned parts as its own NX part (threads, tapped cross hole, slot, bevel, seat, chamfers), plus the multi-detail drawing, from one spec. Then it measures every saved file against hand-worked numbers.

Verification passing on NX v2606.0.0.5001 · 2026-10-29 · repo 451c8de

What it does, step by step. Click to zoom.

One spec, every detail. A multi-detail sheet of turned parts lists, for each detail, a few diameters and lengths plus features. The spec (mdt/spec/length_gauge_details.json) writes each detail as stacked cylinders on Z (steps) plus chamfers, threads, tapped_holes, slots, end_bevel, end_seat and a knurl flag, with its material, treatment and the callout lines for the drawing. mdt_math.read_spec checks the whole spec before NX builds anything. Holes and slots are cut from the part's +X side, and the bevel from -X.

DetailPartBuilt
(2) Pin, drill rodNXA-610-2Ø.311 × 1.5625, 45° end bevel, #5-40 UNC tapped cross hole .250 deep (#38 tap drill .1015), 1/32 chamfer
(3) Stop, drill rodNXA-610-3Ø.125 × .500, concave R.125 end seat, 1/32 chamfer
(4) Thumb screw, 1020NXA-610-4Ø.500 × .625 knurled head, Ø.250 shank with a 1/4-20 UNC-2A thread .594 long, three 1/32 chamfers
(5) Lever, 1020NXA-610-5Ø.125 × 1.125, #5-40 UNC-2A thread .250 long, .005 edge breaks
(6) Plug, drill rodNXA-610-6Ø.875 × 1.750, slot 3/16 wide × 3/32 deep from .375 to .750, 1/32 chamfer

Threads headless. NX's Thread builder never reads the picked cylinder in batch, so the table input fails. The tool enters every size by hand, including the shaft size, which NX checks against the minor and major diameters; without it NX refuses ("Invalid shaft size"). This recipe is now the create_external_thread helper in the nx-design-features skill. The tapped cross hole is NX's Hole feature, Inch UNC #5-40, with a custom #38 tap drill.

The drawing is an assembly of the five parts side by side, each turned so its hole or slot faces the front view. It has one B sheet, third angle: front and top views at 2:1 and an isometric view. Each detail's length and largest diameter are dimensioned to points in the assembly (the markers are blanked afterwards). Under each detail is a note with its number, name, quantity, material, treatment and callouts, and the general notes sit in the corner. It is exported to PDF.

Verification reopens every saved file and checks it against numbers worked out apart from NX in mdt_math: - Overall length and largest diameter. - Volume. The chamfers use Pappus. The bevel, seat, slot and drilled hole use closed-form integrals, which are unit tested against their limiting cases. NX agrees to 1e-6 in³ on all five parts. - One cylindrical face per step, and the number of conical faces. - Each thread's stored major diameter, minor diameter, pitch and length, and the tapped hole's size, tap drill and depth. - Point probes inside and beside every hole, slot, bevel and seat. - The attributes, and the STEP solids and units. - The drawing's components, views, the ten dimension values NX computed, the notes and the PDF text.

Controls: two bad specs must be refused, NX must refuse the thread when the shaft size is left out, a plug expected .010 longer must fail the length check, and the pin's volume without its tapped hole must fail the volume check. The hole is 90 times the tolerance.