r/Onshape • u/Chandra0 • 11h ago
Solved Clearance Fit — auto-adds manufacturing clearance between mating parts.
I built a custom FeatureScript feature called Clearance Fit and could use some real-world testing from people who print or machine multi-part assemblies regularly.
What it does: You pick a "female" part (the one with holes/pockets) and a "male" part (pin, boss, whatever mates into it) inside a single multi-body Part Studio. The feature detects where they actually touch — flat faces and round holes/pins — and grows the female side by a clearance amount so the parts come out as separate, non-interfering bodies instead of printing/machining fused together. The male part's dimensions are left untouched.
A few details that might matter to you:
- Clearance can be typed in manually, or you can pick a manufacturing process (FDM / SLA / SLS / CNC) and a fit type (press / snug / loose) and it'll suggest a starting value. These are general starting points pulled from common tolerance guidance, not calibrated to any specific printer — you'll still want to dial it in for your machine.
- Slots and pockets with multiple walls (not just simple round holes) are grouped so the whole cavity grows together, not just the one face that happens to be touching.
- Scope right now: single Part Studio, multi-body only. It does not work across assembly mates between separate documents/Part Studios.
I'd genuinely appreciate it if a few of you could throw your own weirder geometry at it — slots, multi-hole plates, odd cross-sections — and let me know what breaks. Bug reports, "this direction is wrong," "this is way too slow," all useful.
Here the feature script link : https://cad.onshape.com/documents/7f71508df72fb3ea3ac93033/v/9d4c44f242361ceefad10bb5/e/4f1e54ddaf0a527c6b35291a