WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

[feature] Tolerance in cable lengths

Open ct2irw opened this issue 2 years ago • 7 comments

Hi there,

My name is Diogo. So often manufacturers ask to include tolerances in the cable lengths. I think it would make sense to have a key/value for that. The way I've implemented that was by mostly cloning the length key... The only change I did in that was to inherit the units from the length if none is provided instead of assuming 'm' like length does. Ideally, it would process different tolerances like -10mm and +15mm, but I did not have time to mess with that.

Let me know if you want any help implementing that.

Best regards, DIogo

ct2irw avatar Feb 03 '23 11:02 ct2irw

It would be nice if this didn't require an additional key/value in the YAML, but if it could be parsed within the length attribute itself. Internally, it probably makes sense to have it as a separate variable for sure.

Some suggestions for YAML input:

length: 100  # assume default unit
length: 200 mm  # explicit unit
length: 300 ±5 mm   # place unit before or after tolerance? allow both?
length: 400 +-5 mm  # allow +- instead of ± for easier input
length: 500 +5 -0  # allow asymmetric tolerance
length: 600 ±10%  # allow percentages?
                  # show as percentage in output or do the math?
                  # maybe as a second step later on
length: 700~750  # allow length range?

17o2 avatar May 15 '23 21:05 17o2

How should similar entries with such lengths be summed up in the BOM?

  • Sum nominal lengths only?
  • Sum nominal lengths, positive tolerances, negative tolerances (all in the same length unit) and present as {sum_nominals} +{sum_positives} -{sum_negatives} {unit}
  • Sum minimum and maximum lengths of each length range and present as {sum_minimums}~{sum_maximums} {unit}

If specifying length range is allowed as input - hence no nominal specified, then only the latter alternative above might be possible.

If different lengths in #268 also will be implemented, then care must be taken how to present that combined with different length tolerances for each length.

kvid avatar Aug 27 '23 23:08 kvid

BOM should probably show a sum of nominal lengths.

The last possibility (specifying a length range without a singular nominal length, e.g. length: 700~750) should be discarded so that there always is a nominal length available.

Tolerances (sum of positives, sum of negatives) could become their own column in the BOM, but it might be overkill to actually display them?

17o2 avatar Sep 16 '23 10:09 17o2

BOM should probably show a sum of nominal lengths.

Yes, I guess that's what most users would expect.

The last possibility (specifying a length range without a singular nominal length, e.g. length: 700~750) should be discarded so that there always is a nominal length available.

It's also possible to define a length range input to be regarded as equal to a nominal length = range middle and ±tolerance = half range length - e.g. 700~750 equals 725 ±25.

Tolerances (sum of positives, sum of negatives) could become their own column in the BOM, but it might be overkill to actually display them?

I guess tolerance columns in BOM could be optional, e.g. like this:

  • None when no BOM entries have a tolerance or options.bom_tolerance_cols=0
  • One when all BOM entries have equal positive and negative tolerances or no tolerances and options.bom_tolerance_cols=1
  • Two when any BOM entriy has different positive and negative tolerances or options.bom_tolerance_cols=2

kvid avatar Sep 26 '23 23:09 kvid