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

Add extra open/close states for the switches #322

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 55 additions & 14 deletions common/switch/switch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<component version="1.2" xmlns="http://schemas.circuit-diagram.org/circuitDiagramDocument/2012/component/xml">
<declaration>
<meta name="name" value="Switch" />
<meta name="version" value="1.1" />
<meta name="minsize" value="30" />
<meta name="author" value="Circuit Diagram" />
<meta name="additionalinformation" value="http://www.circuit-diagram.org/" />
Expand Down Expand Up @@ -42,7 +43,7 @@
</group>
<group conditions="!horizontal,!$Type==Changeover">
<connection name="a" start="_Start" end="_Middle-16y" edge="Start" />
<connection name="a" start="_Middle+16y" end="_End" edge="End" />
<connection name="b" start="_Middle+16y" end="_End" edge="End" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was a typo so fixed it too

</group>
<group conditions="horizontal,$Type==Analogue">
<connection name="c" start="_Middle-30y" end="_Middle-14y" edge="Start" />
Expand Down Expand Up @@ -116,14 +117,13 @@
<line start="_Middle-2x-8y" end="_Middle-4x+11y" />
</group>

<!-- Analogue -->
<!-- Analogue (Common) -->
<group conditions="horizontal,$Type==Analogue">
<line start="_Start" end="_Middle-11x" />
<line start="_Middle+11x" end="_End" />
<ellipse centre="_Middle-8x" rx="3" ry="3" />
<ellipse centre="_Middle+8x" rx="3" ry="3" />
<rect x="_Middle-14" y="_Middle-14" width="28" height="28" />
<line start="_Middle-6x+8.5y" end="_Middle+6x+8.5y" thickness="3" />
<line start="_Middle-30y" end="_Middle-14y" />
</group>
<group conditions="!horizontal,$Type==Analogue">
Expand All @@ -132,40 +132,81 @@
<ellipse centre="_Middle-8y" rx="3" ry="3" />
<ellipse centre="_Middle+8y" rx="3" ry="3" />
<rect x="_Middle-14" y="_Middle-14" width="28" height="28" />
<line start="_Middle-8.5x-6y" end="_Middle-8.5x+6y" thickness="3" />
<line start="_Middle+14x" end="_Middle+30x" />
</group>

<!-- Analogue (Open) -->
<group conditions="horizontal,$Type==Analogue,!$Closed">
<line start="_Middle-6x+8.5y" end="_Middle+6x+8.5y" thickness="3" />
</group>
<group conditions="!horizontal,$Type==Analogue,!$Closed">
<line start="_Middle-8.5x-6y" end="_Middle-8.5x+6y" thickness="3" />
</group>

<!-- Analogue (Closed) -->
<group conditions="horizontal,$Type==Analogue,$Closed">
<line start="_Middle-6x+5.5y" end="_Middle+6x+5.5y" thickness="3" />
</group>
<group conditions="!horizontal,$Type==Analogue,$Closed">
<line start="_Middle-5.5x-6y" end="_Middle-5.5x+6y" thickness="3" />
</group>

<!-- Push to Break -->
<group conditions="horizontal,$Type==PushToBreak">
<!-- Push to Break (Open) -->
<group conditions="horizontal,$Type==PushToBreak,!$Closed">
<line start="_Middle-12x+8y" end="_Middle+12x+8y" />
<line start="_Middle-5x+2y" end="_Middle+5x+2y" />
<line start="_Middle+2y" end="_Middle+8y" />
</group>
<group conditions="!horizontal,$Type==PushToBreak,!$Closed">
<line start="_Middle+8x-12y" end="_Middle+8x+12y" />
<line start="_Middle+2x-5y" end="_Middle+2x+5y" />
<line start="_Middle+2x" end="_Middle+8x" />
</group>

<!-- Push to Break (Closed) -->
<group conditions="horizontal,$Type==PushToBreak,$Closed">
<line start="_Middle-12x+5y" end="_Middle+12x+5y" />
<line start="_Middle-5x-1y" end="_Middle+5x-1y" />
<line start="_Middle-1y" end="_Middle+5y" />
</group>
<group conditions="!horizontal,$Type==PushToBreak">
<group conditions="!horizontal,$Type==PushToBreak,$Closed">
<line start="_Middle+5x-12y" end="_Middle+5x+12y" />
<line start="_Middle-1x-5y" end="_Middle-1x+5y" />
<line start="_Middle-1x" end="_Middle+5x" />
</group>

<!-- Changeover -->
<!-- Changeover (Common) -->
<group conditions="horizontal,$Type==Changeover">
<line start="_Start" end="_Middle-14x" />
<line start="_Middle+14x-10y" end="_End-10y" />
<line start="_Middle+14x+10y" end="_End+10y" />
<line start="_Middle-8x-2y" end="_Middle+8x-9y" />
<line start="_Middle+14x-10y" end="_End-10y" /> <!-- b -->
<line start="_Middle+14x+10y" end="_End+10y" /> <!-- c -->
<ellipse centre="_Middle-11x" rx="3" ry="3" />
<ellipse centre="_Middle+11x-10y" rx="3" ry="3" />
<ellipse centre="_Middle+11x+10y" rx="3" ry="3" />
</group>
<group conditions="!horizontal,$Type==Changeover">
<line start="_Start" end="_Middle-14y" />
<line start="_Middle-10x+14y" end="_End-10x" />
<line start="_Middle+10x+14y" end="_End+10x" />
<line start="_Middle+2x-8y" end="_Middle+9x+8y" />
<line start="_Middle-10x+14y" end="_End-10x" /> <!-- b -->
<line start="_Middle+10x+14y" end="_End+10x" /> <!-- c -->
<ellipse centre="_Middle-11y" rx="3" ry="3" />
<ellipse centre="_Middle-10x+11y" rx="3" ry="3" />
<ellipse centre="_Middle+10x+11y" rx="3" ry="3" />
</group>

<!-- Changeover (Open/B) -->
<group conditions="horizontal,$Type==Changeover,!$Closed">
<line start="_Middle-8x-2y" end="_Middle+8x-9y" />
</group>
<group conditions="!horizontal,$Type==Changeover,!$Closed">
<line start="_Middle-2x-8y" end="_Middle-9x+8y" />
</group>

<!-- Changeover (Closed/C) -->
<group conditions="horizontal,$Type==Changeover,$Closed">
<line start="_Middle-8x+2y" end="_Middle+8x+9y" />
</group>
<group conditions="!horizontal,$Type==Changeover,$Closed">
<line start="_Middle+2x-8y" end="_Middle+9x+8y" />
</group>
</render>
</component>