sch-rnd size conventions

Librnd uses nanometer as coordinate units when drawing to screen, so sch-rnd needs to convert every coord to nanometer. Since sch-rnd is not naturally tied to the physical world, this conversion could be anything, e.g a cschem integer unit could be 1 nanometer or 1 mm or 1 cm. To keep things simple and code fast, I decidedrationale to use the following conversion:

    1 cschem unit  = 1024 nm = 1.024 um
 1000 cschem units = 1.024mm

Note: mm and mil values below assume the matching drawing area size was and print page size is used. (Sch-rnd scales automatically.) Sch-rnd UI and user always uses the integer cschem unit, never mm or mil or inch; mm and mil values in the table below is only to predict approximate size of objects on typical printouts.

name size in cschem coord expected approx. size in print
pin distancerationale 4000 4.096 mm (~161 mil)
font height: pin labelrationale 3000 3.072 mm (~121 mil)
font height: name ("refdes") labelrationale 4000 4.096 mm (~161 mil)
wire line thickness 250 0.256 mm (~6.5 mil)
wire junction thickness 1000 1.024 mm (~40 mil)
terminal line thickness 250 0.256 mm (~6.5 mil)
decoration line thickness 125 0.128 mm (~3.25 mil)
lib: resistor body/zigzag box 12000 * 4000 12.228 mm * 4.096 mm (~481 mil * 161 mil)
lib: resistor/capacitor/coil total length (pin ends) 20000 20.480 mm (~806 mil)
lib: diode triangle base:height 8000:4000 8.192 mm : 4.096mm (~322 mil : 161 mil)
lib: opamp triangle base:height 16000:16000 16.384 mm : 16.384 mm (~645 mil : 645 mil)
lib: transistor circle diameter 11000 11.264 mm (~443 mil)


1024 multiplier

We need to choose a base grid size first. A good reference for starting that is looking at "default pin pitch". The considerations:

Considerations for the physical world conversion:

I took printed schematics in a local HAM radio magazine as reference. The target audience of such magazines include veteran users, which often means not perfect eye sight; the size that works in this context is probably the smallest safe size. I found research that their pin pitch is about 4mm. Thus the choice of approx. 4mm pin pitch in sch-rnd.

This led to defining default pin pitch convention to 4000 grid units, which results in:

1024 vs. 1000: it's a conflict of interest between screen-only and print usage. On screen, the multiplier doesn't matter at all, since the user can zoom in and out arbitrarily; 1024 is faster for the computer. On paper this value matters because it determines the final sizes in mm, which will not be round: for 1000 units, we will have 1.024mm (assuming the right border is set up). This means sch-rnd can not be used easily for accurate 1:1 mm drawing.

My decision as to prefer screen over paper. Rationale: devices such as tablets and portable computers are very accessible so as years pass the total number of hours spent on looking at printed schematics decreases in favor of looking at the screen. Accurate mm scale drawing is not in the scope of sch-rnd (use a mechanical CAD or pcb-rnd for that).

Values in mil/inch system is even less round: this design has a preference of metric over imperial units. This is because the metric system is simpler in general and is used in a smaller part of the world.

Font size

Font is a complex topic. After some research my oversimplified model for figuring optimal font size convention in this research is:

I've measured different text labelsresearch in (HAM magazine) printed schematics to get an approximate font height. I concluded smallest font, typically used for pin labels, is about 3mm high. So I choose 3000 for sch-rnd default pin font height.

Then looked at gschem's ratioresearch between pin and refdes font and found their refdes font is 25% larger than pin font. To keep things round, I decided to go for 33% larger and use 4000 for names.


Print: HAM magazine

From a 2005 issue of Radiotechnika:


With A/4 titleblock.