part-rnd - design

part-rnd keeps two type of databases:

The schematics contain rnd part names. An rnd part is specific in the sense of "what kind of part can be used here" but generic in the sense of "where the actual part is sourced from". An rnd part name normally looks something like "R-4.7k-1206". The rnd part ID is an attribute of the sch-rnd (abstract) component, typically coming from a symbol attribute or from a devmap.

At the end of all annotations and exports, there is a BoM file that is used for two purposes: purchasing parts and assembling to board. This BoM file would still contain the rnd part names which are not useful for either purpose. This is where part-rnd joins the workflow and translates rnd into sourced part numbers. This translation is possible because:

The translation, the extra indirection, the fact that the design contains rnd part names and not hardwired part numbers of a specific shop solves multiple problems, because R-4.7k-1206 in the rnd database is a generic concept of a 4.7k ohm resistor in 1206 package. Most notably:

Thus hardwiring shop part numbers in the design is suboptimal because it breaks as shops change their inventory or as you change which shop you buy from.

The part-rnd indirection solves some of these by letting the user make cross referencing between the generic rnd and the "state today" sourced databases separately from the design. Once the cross reference is done, it will work for multiple designs automatically and will need only minimal maintenance as shop inventories change in time. For example whenever an update needs to be done to the rnd 4.7k 1206 resistor, all matching parts from all potential shops can be linked to it. It's basically done by doing a search (in external databases) for something like "resistor 4.7k 1206"; this will result in a list of hits; then the user simply marks all items on this list that can be used for the given generic rnd part.

Once cross references are available, part-rnd can now or in the future go and figure which parts are available at the moment and which are the cheapest at the quantity needed for the given batch.

The rnd database, including part names, is designed by the user. The actual part names and the specific concepts they represent are all up to the user.

Example

A hypothetical example board has 4.7k resistors and 2n7002 fets and a 8 pin connector.

What the best choice for a part is depends on many factor: price at the given quantity, availability, other constraints like "using jlcpcb's assembly service works best when parts are sourced from lcsc". These heuristics are scripted and can be reconfigured or new scripts can be written by the user.