In addition to filter diameter, you need to specify the thread pitch, the linear (axial) distance the filter, screw, etc. travels for one (or more) full rotations of the thread. For SAE (or SAE-derived) threads, the pitch is usually specified in number of threads per inch. For example, the 1/4"–20 tripod mount and screw have a 20 thread-per-inch (TPI) pitch. Equivalently, you could say the pitch is 1/20" per thread turn.
Metric threads are always specified per thread turn. Today, retail filter diameters between about 30 mm and 86 mm have a 0.75 mm thread pitch. Below 30 mm filter diameter, the thread pitch is 0.5 mm; above 86 mm diameter, the thread pitch is 1 mm. Note that these upper and lower bounds of filter diameters are not hard; there are some filter threads with a diameter larger than 30 mm that have a 0.5 mm thread pitch, and some filter threads smaller than 30 mm that have a 0.75 mm thread pitch. But generally speaking, most lenses readily available in this range will have 0.75 mm thread pitch.
Lens filter thread profiles are cut according to the ISO metric screw thread standard. This standard determines the depth of interior and exterior threads, thread angle (60°), etc. Given nominal diameter and thread pitch, all of the other dimensions are specified by the standard.
Thread cutting machines use so-called change gears to link the thread cutter's (a tap if cutting female threads; a die if cutting male threads) rotation to the linear advancement required by the thread pitch. The change gear sets can be changed out to accommodate different thread pitches.
If a machinist doesn't specifically have thread-cutting experience and tooling, find another machinist. Also, if a machinist doesn't explicitly support ISO metric screw thread cutting, I would find another machinist. With a few exceptions, SAE thread pitches and metric thread pitches cannot be interchanged. If the thread engagement (number of threads mating two parts) is low, sometimes certain SAE and metric threads can be intermixed, but it is very situation-dependent.
For instance, even with correctly-sized filter threads, filter mounts made from aluminum can become stuck to each other fairly easily. If a 0.75 mm pitch aluminum thread on the end of a lens is mated to the nearest-equivalent SAE pitch custom or DIY filter also cut from aluminum, they will probably become stuck to each other. Unless you also machined knurling or grip reliefs on the outside of the filter, you might have a hard time separating them without resorting to cutting the filter out of the lens.
The list of mounts available for Schnieder Kreuznach filters shows a fairly complete list of different filter sizes, along with thread pitch, thread length, total filter dimensions, etc. Typical retail filters probably use their "SH Mount".
If you are making custom accessories for your own use, then there is no risk with custom-machined filter thread accessories. However, if you are ramping up to sell your accessories, even in low volume, I would recommend against cutting the threads yourself. The risk of damaging the threads on customers' lenses is quite high, and depending on your location and/or customer location, you might run into product liability issues for damaging their equipment.
As mentioned above, a competent machinist will know about ISO metric screw thread cutting.