-
Notifications
You must be signed in to change notification settings - Fork 227
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
[feature] Improved auto-generated connectors and cables #184
Comments
Another idea is that now, when you consider a new syntax for auto-generation of connectors that specifies the resulting designator: Maybe also consider a variation of the same syntax for any auto-generation to release the current single designator syntax for other usage, e.g. a few alternatives:
There might come other needs for the single designator syntax, e.g. as you complain about in #134 (comment). |
Let me see if I understand you correctly, by implementing the example I recently used in #185 with your proposed syntax, using connectors:
S:
style: simple
# autogenerate: true # perhaps no longer needed in @kvid's proposed syntax?
type: splice
show_name: false
cables:
W1:
wirecount: 3
color_code: DIN
W2:
wirecount: 4
color_code: IEC
connections:
-
- W1: [1-3]
- [S., S., S.S1] # wires 1+2 use autogenerated splice connectors with unknown autogenerated designator
# wire 3 uses autogenerated splice connector with user-specified designator
- W2: [1-3]
-
- S1 # reuse S1 for the three-way splice (no need to use S.S1 again since it is already instantiated)
- W2: 4 |
I have re-read your post and now understand what you mean. I have moved my comment originally posted in 134: I think instead of This places the "burden" on the user to make sure |
General note:
|
Closed in #186. |
From the syntax description:
An idea to remove the restriction of not knowing the designator of auto-generated connectors and not being able to reference them at a later point, would be to add a new syntax feature to allow the user to assign designators to auto-generated connectors.
Proposed syntax:
X.X1
[Edit 2020-10-22: changed from
->
to.
to distinguish from arrows proposed in #134]This would generate a new instance of component
X
and assign it theX1
designator.This is just an idea, an other possible alternatives come to mind:
X.X1
X->X1
(possible confusion with arrow notation discussed in [feature] Connector-Connector & Connector-Ferrule mating #134)X:X1
(seems to be legal YAML, even when used as dict keyX:X1: [1-4]
but probably risky/confusing)X$X1
X1(X)
X1@X
The following example takes this a step further, and proposes auto-generating cables as well.
Example for a Y-splice, reusing connectors, ferrules and cables through auto-generation:
The idea is to make the new syntax work in additon to the current one, which generates unknown, auto-incremented designators not exposed to the user, since that should be good enough for simple cases.
The text was updated successfully, but these errors were encountered: