miner_tom , 07-11-2021, 02:20 PM
qdrives
Thank you for responding and contributing to this discussion.
I have a one word answer to the question that you asked: "but why would you want a script to place components?" The answer is ALGORITHMS. Your second question: "How should the script determine where to place that components?". Well, same answer.
We both know that it is very difficult to place components such as decoupling capacitors underneath dense packages such as a BGA. There are such algorithms that deal with "rectangle packing" and "bin packing", and I have worked with both in the past although not in the sense that has anything to do with PCB layout. So, let us make an assumption that it would be possible to specify a two dimensional area, of a specific grid density, that would hold the specified capacitors of a specific dimension. With that assumption satisfied, one could also add the constraint that would minimize the length of the tracks from the via (vias would be pre placed) to the component. That is the idea, anyway.
Now, I have not spent a lot of brain power thinking of the specific way to do this. But, in order for me to start, I would need to know how to pick a specific component (already in the netlist) and place it somewhere else at a specific coordinate on the PCB.
Yes, you are correct about the utility of "cross probing" (although it does not work as well in Altium 21 as it did in 18 because the line showing the connection between the component and its respective net is not as visible as it used to be no matter the settings. I have verified this with Robert.).
You are also correct in that "Scripts seem a bit dead in Altium. You do not read much about it.". I have a feeling that this would change or could change when Altium is finally ported to C# from whatever language it is now written in (Delphi, I think). In fact, from what I read, the change over of 2M lines of code is so herculean a task that they do it in stages, and that is part of the reason why capabilities change somewhat from version to version.
So, yes, I have not seen a "simple" script that says works like "take C247 and place it at x=something and y=something". An algorithm like such as the one that I propose could be worked out completely outside of Altium, in software, but eventually, one needs to be able to script in Altium.
Regards
Tom