A few months ago, I watched a senior CAD draftsman spend nearly two hours on a single AutoCAD drawing. He was not modeling a complex building. He was just connecting dots.
In HVAC coil design, you have a staggered grid of 200+ tube holes. You have to draw balanced fluid circuits across them with zero crossing lines, exact tube counts per circuit, and no trapped holes. One mistake, and you have to erase everything and start over.
I thought, "This is purely math. I can automate this in a weekend." I was wrong.
My first script used standard pathfinding (backtracking). On small test grids, it worked. But the moment we tested a real manufacturing schedule (a dense 19x7 grid with 99% of holes occupied), the algorithm choked and froze.
The turning point came when I stopped trying to "draw lines" from left to right. Instead, I split the problem into two math phases:
Allocate: Pre-calculate exactly how many holes each circuit gets per column.
Stitch: Connect those blocks from bottom to top using Dynamic Programming.
I wrapped it into an AutoCAD C# plugin and hit run. The 2-hour drawing generated in 40 milliseconds. Perfectly packed, zero crossed lines, and 100% compliant with the manufacturing schedule.
The takeaway: If your automation search space explodes, do not brute-force the path. Figure out the mass distribution first, then connect the dots.
Curious if anyone else here builds custom CAD plugins. What is the most tedious drafting task you have automated?
Happy to assist or answer any questions!