Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] BOM quantities and units #343

Closed
scottbouch opened this issue May 13, 2024 · 6 comments
Closed

[request] BOM quantities and units #343

scottbouch opened this issue May 13, 2024 · 6 comments

Comments

@scottbouch
Copy link

scottbouch commented May 13, 2024

Hi, one further request...

I came across a little frustration: quantities in the BOM for connector parts is limited to integers, ie, for counting items. but cables can have measurements.

There are some circumstances where a measurement is needed for connector parts, such as length or volume where a quantity of a material resource is cut for use.

For example:

Lengths:

  • A cut length of heat-shrink sleeving to be applied over the end of a cable where a connector cable clamp or gland is applied, there is a need to specify the length. This may be to tidy up trimmed screen/shield, or to make up the thickness of the outer jacket for more effective strain-relief clamping, and sometimes to provide a cable bend-radius strain relief.
  • Cut lengths of sleeves to cover the soldered joints to connector contacts.
  • Where a short wire is soldered to the cut off screen/shield of a cable for termination, it would be useful to add the length of this short wire to the connector BoM.
  • I also have some connectors requiring turns of lashing cord/thread to provide strain-relief around the wires, it would be good to specify the length of lashing cord/thread to cut for use.

Volumes:

  • Some connectors and glands are "potted" in resin or an RTV compound, so a volume quantity would be helpful too.
  • Glues and thread-lock also are sometimes used, but maybe the quantity here could be "AR" for As Required.
  • Liquid volumes could be measured by weight, too, such as the resin and activator to use.

Units

  • It would be great if the unit can be custom specified by the user for the given quantity.

Hope all of this makes sense! :)

Maybe its easiest to just allow the quantity to be a float instead of an integer. Or maybe add a little logic to and change the quantity variable to a float if a unit is specified. Without a unit we can probably assume its just a count, and an integer will be fine.

Additional total column
This could allow for easier calculation of total quantities required of a certain material... such as eg: 25 heat-shrink sleeves to be applied to the soldered joints of a connector, each sleeve is 12mm long, so the BOM could present a total column showing 300 mm of this item is required.

Cheers, Scott;

@kvid
Copy link
Collaborator

kvid commented May 13, 2024

Hi Scott,

What version of WireViz are you using?

Quantities in the BOM are NOT limited to integers. Several examples use decimal numbers as lengths.

Maybe its easiest to add a text variable for unit, and allow the quantity to be a float instead of an integer.

This is exactly how it is implemented (and documented in syntax.md).

The cable.length has a simplified syntax accepting unit as a string after the number, separated by a space (even though it's currently implemented with an internal non-documented length_unit attribute behind the scene). For other quantities, an extra unit attribute must be used, but maybe these also will be simplified in future versions.

Default unit for cable.length is m when not specified. For other quantities, an empty unit is default (i.e. a count).

You can use any text string as unit, but note that only entries with exact same units are added up in the BOM. No unit conversion is currently implemented.

Try including something like this in your harness:

cables:
  Long cable:
    colors: [BK, WH]
    length: 0.1 km
  Test cable:
    colors: [RD, BK]
    length: 2.5 yard
    additional_components:
      - type: Heat-shrink
        qty: 1.5
        unit: inch
      - type: Resin
        qty: 0.2
        unit: dl
additional_bom_items:
  - description: Item not in diagram
    qty: 11.5
    unit: mm
connections:
  - - Test cable
  - - Long cable

@scottbouch
Copy link
Author

scottbouch commented May 13, 2024

I'm sorry, as you were posting this I just updated my original post as I realised exactly what you had stated.

My question is in relation to connector parts, my edit was to make it specific to the connectors. I see that cables can have a length specified, but for connectors where a cut length of something is needed, I can only set an integer and no unit. This approach makes sense for back-shells, screws, cable ties, and so on; but for lashing cord, potting compound etc.. it would help if there was a float and a unit allowed for connector-oriented parts.

Eg, see item #13 for lashing thread used on the two connectors on the right, I had to specify 0.5m in the description text: https://scottbouch.com/tmp/UHF2.html (same for item #14 too, with length TBD though at this stage).

Thanks, Scott

@kvid
Copy link
Collaborator

kvid commented May 13, 2024

Have you tried adding my additional_components section above to a connector?

Please provide a simple example YAML input, the output you get, and explain what you expect instead.

@scottbouch
Copy link
Author

Hi, no I hadn't - thank you, I shall give it a go, it may be the answer to my problem!!

@scottbouch
Copy link
Author

Thank you again for this support, I have edited the yaml and now have a corrected BOM, please ignore this request! You already have an ace system! Just user trouble...

Many thanks again, Scott

@scottbouch
Copy link
Author

Closed, not an issue, just was user incompetence on my part!

Thanks for the tech support and guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants