Programs built on someone else's part
Customer drawings under NDA: whose are the programs cut from them?
Updated
A program written to cut a customer's part carries that part's geometry. Whether it can ever leave the shop depends on the confidentiality terms the drawing arrived under and on who wrote the program.
What the on-demand platforms tell their machine shops
Xometry's terms for its manufacturing partners say the models, drawings, information and specifications provided within a work order are the confidential information and exclusive property of Xometry or the customer, licensed to the partner only to perform the order, and to be returned or destroyed within 18 months of finishing it or on request.
Source: Xometry, Partner Terms and Conditions
Protolabs' ProtoQuote terms leave the buyer sole ownership of the copyright in the files it provides and in any deliverables or designs produced for it, and its manufacturing partner network's sale terms say the same of derivative works made in the course of the job.
Who owns the program itself
Under 17 U.S.C. 201 a work made for hire belongs to the employer or other person for whom it was prepared unless both sides agree otherwise in a signed writing, and in the UK section 11 of the Copyright, Designs and Patents Act makes the employer the first owner of work an employee makes in the course of employment. A program written by your own programmers is in that sense the shop's; the customer's geometry inside it is not.
Source: The law a CNC program and a customer drawing turn on
Confidential information is a trade secret claim too
The UK's Trade Secrets Regulations make acquiring, using or disclosing a trade secret unlawful where it is a breach of confidence, and the US Defend Trade Secrets Act gives the owner of a misappropriated trade secret a civil action. A customer's drawing shared under a confidentiality agreement stays out of anything licensed until that customer agrees in writing.
Source: The Trade Secrets (Enforcement, etc.) Regulations 2018, regulation 3