-
Notifications
You must be signed in to change notification settings - Fork 226
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
[internal] Proposal: restructuring data structure for more flexibility #127
Comments
Closing, to keep the discussion in #56. |
I'm not sure I agree that the scope of this issue is fully within the scope of #56. My impression is that #56 is more a discussion about how to structure wires, bundles, and cables. The scope of this issue also cover the more general structure of any component in the harness. One suggestion that is developing in my mind, is to create a generic |
Your impression is not entirely wrong. |
Currently, the
cable
dataclass stores the information on how many wires the cable/bundle has inside thewirecount
field, but iterating over all the wires happens using thecolors
List, which is not too elegant, or necessarily intuitive.For v0.3, perhaps it makes sense to revamp
DataClasses.py
to more closely and accurately represent the physical makeup of the components. This could [at least partly] address #29, #31 and #56.Here are some ideas, in no particular order, on how the code could be cleaned up.
wire
class that lists the properties (gauge, color, length, etc.) of a single wire within the cable.wire
, a name likeconductor
or similar might allow more future flexibility, to define pneumatic or hydraulic lines in a similar fashion to cables.cable
could then contain a list ofwires
/conductors
.bundle
could work the same way, but additionally, allow otherbundle
andcable
elements as children. This grouping would allow things like sheathing/heatshrink around multiple elements of the different classes.cable
could also contain a kind of sub-bundles for shielded groups, and maybe twisted pairs.cable
could have gauge and length properties that all children inherit by default. But child elements (e.g. individual wires) could override the default, thus allowing different gauges within a cable or bundle, for example.A similar thing could be undertaken for the
connector
type. It might contain a collection ofpin
elements, each with its own properties and manufacturer info. However, I don't see the same level of benefit here, compared to cables.This issue is intended as a starting point for discussion, there is no sense in starting to code and submit PRs before a new standard is settled... also, it is not top priority at the moment, just something to keep in mind and to think about a little bit :)
The text was updated successfully, but these errors were encountered: