Andreas Nordin 08e53bcd48
Feature: bidirectional AWG/mm2 unit conversion (#41)
* Fix AWG<-> mm2 conversions

Add an inverted dictionary and a lookup function from awg -> mm2. Also
do some minor refactoring. Both sides of the conversion table were
converted to strings, since '0000' and '2/0' are perfectly valid AWG
values.

* Update example ex02 with awg -> mm2 conversion

Show conversions for ex02, and make sure it displays conversions in both
directions. Rebuild the example files.

* Fix faulty conversion of non-(mm2,AWG) units

The parsing allows arbitrary units to be used for cable dimensions --
this might be valid units, e.g. square inches, or invalid, e.g. bananas.
We only allow conversion between mm2 and AWG, so check that the
gauge_unit is either of those before conversion. If not, pass through as
is.

* Fix AWG string casing in output

Convert e.g. 'awg, 'AwG' to upper case for consistent rendering. Leave
any other input gauge units as they were.

Co-authored-by: Daniel Rojas <github@danielrojas.net>
2020-06-29 14:41:45 +02:00
..
2020-06-27 23:46:22 +02:00
2020-06-04 21:29:40 +02:00
2020-06-27 23:46:22 +02:00
2020-06-04 21:29:40 +02:00
2020-06-04 21:29:40 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-04 21:29:40 +02:00
2020-06-27 23:46:22 +02:00
2020-06-04 21:29:40 +02:00
2020-06-04 21:29:40 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-14 21:56:06 +02:00
2020-06-14 21:56:06 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00
2020-06-27 23:46:22 +02:00

Example gallery

Example 01

Source - Bill of Materials

Example 02

Source - Bill of Materials

Example 03

Source - Bill of Materials

Example 04

Source - Bill of Materials

Example 05

Source - Bill of Materials

Example 06

Source - Bill of Materials

Example 07

Source - Bill of Materials

Example 08

Source - Bill of Materials

Example 09

Source - Bill of Materials