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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor net segments concept and board/schematic editors #321

Merged
merged 4 commits into from Sep 7, 2018

Conversation

Projects
None yet
2 participants
@ubruhin
Member

ubruhin commented Sep 3, 2018

Refactor concept of schematic netpoints/netlines

Changes

  • Allow netlines to be connected directly to pins. No more need to create a netpoint between each pin and their netlines. This removes many netpoints from schematics (making schematic files smaller and simpler).
  • Rename netpoints in schematic files from "netpoint" to "junction" (to be more expressive).
  • Rename netlines in schematic files from "netline" to "line" ("net" should be clear from the context anyway).
  • Rename netlabels in schematic files from "netlabel" to "label" ("net" should be clear from the context anyway).

Example file

Schematic net segment before this change:

 (netsegment 00f0ca9d-8899-49c8-98b5-f3bdfcc48940
  (net 1ebc4991-e356-4ec4-9394-5448780cedee)
  (netpoint 2e824886-2fe8-45b1-bb70-33c06f53251f
   (sym 0ff02a7d-9445-42c3-9b1b-5488498c648d) (pin d2a94750-54ce-4353-a50d-bb22e13748c8)
  )
  (netpoint 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37
   (pos 111.76 119.38)
  )
  (netpoint 641fda3f-6afb-4d80-8e8b-a6eb00e1bf71
   (sym e59667a6-d14f-4639-a7c0-8752f9e412fa) (pin 2e4f8b10-ad5a-443e-b408-e183efaa4758)
  )
  (netpoint 8ace213d-273e-4ea6-8a7c-5620fcad0715
   (pos 111.76 124.46)
  )
  (netline 2c50451e-1c7c-48c2-836e-e888430f0b7b (width 0.15875)
   (p1 8ace213d-273e-4ea6-8a7c-5620fcad0715)
   (p2 641fda3f-6afb-4d80-8e8b-a6eb00e1bf71)
  )
  (netline 72b54d05-a30a-4fa9-ba35-b3a229006f64 (width 0.15875)
   (p1 2e824886-2fe8-45b1-bb70-33c06f53251f)
   (p2 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37)
  )
  (netline ae165c1e-76d8-415e-8089-e93a57a58eae (width 0.15875)
   (p1 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37)
   (p2 8ace213d-273e-4ea6-8a7c-5620fcad0715)
  )
  (netlabel 05594d13-e88d-495a-84e1-f6722fd647c2
   (pos 96.52 119.38) (rot 0.0)
  )

Same net segment after this change:

 (netsegment 00f0ca9d-8899-49c8-98b5-f3bdfcc48940
  (net 1ebc4991-e356-4ec4-9394-5448780cedee)
  (junction 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37 (pos 111.76 119.38))
  (junction 8ace213d-273e-4ea6-8a7c-5620fcad0715 (pos 111.76 124.46))
  (line 2c50451e-1c7c-48c2-836e-e888430f0b7b (width 0.15875)
   (from (junction 8ace213d-273e-4ea6-8a7c-5620fcad0715))
   (to (symbol e59667a6-d14f-4639-a7c0-8752f9e412fa) (pin 2e4f8b10-ad5a-443e-b408-e183efaa4758))
  )
  (line 72b54d05-a30a-4fa9-ba35-b3a229006f64 (width 0.15875)
   (from (symbol 0ff02a7d-9445-42c3-9b1b-5488498c648d) (pin d2a94750-54ce-4353-a50d-bb22e13748c8))
   (to (junction 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37))
  )
  (line ae165c1e-76d8-415e-8089-e93a57a58eae (width 0.15875)
   (from (junction 5b1d9c2c-c4a2-494d-a402-2d5d2533fc37))
   (to (junction 8ace213d-273e-4ea6-8a7c-5620fcad0715))
  )
  (label 05594d13-e88d-495a-84e1-f6722fd647c2
   (pos 96.52 119.38) (rot 0.0)
  )
 )

Refactor concept of board netpoints/netlines

Changes

  • Allow netlines to be connected directly to vias and pads. No more need to create a netpoint between each via/pad and their netlines. This removes many netpoints from boards (making board files smaller and simpler).
  • Define layer on netlines instead of netpoints. Netpoints, vias and pads now only check if the connected netlines are on allowed layers.
  • Rename netpoints in board files from "netpoint" to "junction" (to be more expressive).
  • Rename netlines in board files from "netline" to "trace" (to be more expressive).

Example file

Board net segment before this change:

 (netsegment 1360c343-de2b-4533-9b32-5fae3f42a7b7
  (net 2c9064ac-a99a-425b-a78d-d6ae9675553a)
  (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36
   (pos 21.11375 3.81) (size 0.7) (drill 0.3) (shape round)
  )
  (netpoint 1cbd70ed-e906-4335-9a7a-56607f19da3a (layer top_cu)
   (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36)
  )
  (netpoint 1d860612-9e84-4c21-8979-4755384993f1 (layer bot_cu)
   (pos 21.9075 3.81)
  )
  (netpoint 1f0c783c-3e82-4910-98b6-fc23987b391f (layer top_cu)
   (dev 8417e1db-8764-46a7-b5ef-2c606ecab6e1) (pad 65ab6c75-b264-4fed-b445-d3d98c956008)
  )
  (netpoint 33823978-42ae-4fd5-b80e-6771e1f687a9 (layer bot_cu)
   (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36)
  )
  (netpoint b355be67-c193-4739-8465-a8d740746248 (layer bot_cu)
   (dev 1fe7624e-269b-4fba-880d-abef3d0efa2e) (pad 08057c6a-86af-474d-955d-7a966c7f73de)
  )
  (netpoint c8640e51-ddfd-4431-bf8b-e177ef36a5da (layer bot_cu)
   (pos 22.225 3.4925)
  )
  (netline 27a42488-cbe5-47ce-ab58-db8b2b19ca66 (width 0.5)
   (p1 b355be67-c193-4739-8465-a8d740746248)
   (p2 c8640e51-ddfd-4431-bf8b-e177ef36a5da)
  )
  (netline 4ed1441d-ae37-4ad9-9710-426731c1365e (width 0.5)
   (p1 1cbd70ed-e906-4335-9a7a-56607f19da3a)
   (p2 1f0c783c-3e82-4910-98b6-fc23987b391f)
  )
  (netline a8cdea5c-e8b0-4780-acda-42d4e0a40ad6 (width 0.5)
   (p1 1d860612-9e84-4c21-8979-4755384993f1)
   (p2 c8640e51-ddfd-4431-bf8b-e177ef36a5da)
  )
  (netline f78e73bb-1c41-4e78-893a-8e3c31f5a9a9 (width 0.5)
   (p1 33823978-42ae-4fd5-b80e-6771e1f687a9)
   (p2 1d860612-9e84-4c21-8979-4755384993f1)
  )
 )

Same net segment after this change:

 (netsegment 1360c343-de2b-4533-9b32-5fae3f42a7b7
  (net 2c9064ac-a99a-425b-a78d-d6ae9675553a)
  (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36
   (pos 21.11375 3.81) (size 0.7) (drill 0.3) (shape round)
  )
  (junction 1d860612-9e84-4c21-8979-4755384993f1 (pos 21.9075 3.81))
  (junction c8640e51-ddfd-4431-bf8b-e177ef36a5da (pos 22.225 3.4925))
  (trace 27a42488-cbe5-47ce-ab58-db8b2b19ca66 (layer bot_cu) (width 0.5)
   (from (device 1fe7624e-269b-4fba-880d-abef3d0efa2e) (pad 08057c6a-86af-474d-955d-7a966c7f73de))
   (to (junction c8640e51-ddfd-4431-bf8b-e177ef36a5da))
  )
  (trace 4ed1441d-ae37-4ad9-9710-426731c1365e (layer top_cu) (width 0.5)
   (from (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36))
   (to (device 8417e1db-8764-46a7-b5ef-2c606ecab6e1) (pad 65ab6c75-b264-4fed-b445-d3d98c956008))
  )
  (trace a8cdea5c-e8b0-4780-acda-42d4e0a40ad6 (layer bot_cu) (width 0.5)
   (from (junction 1d860612-9e84-4c21-8979-4755384993f1))
   (to (junction c8640e51-ddfd-4431-bf8b-e177ef36a5da))
  )
  (trace f78e73bb-1c41-4e78-893a-8e3c31f5a9a9 (layer bot_cu) (width 0.5)
   (from (via 023c6ef1-6bb2-489c-aea2-61c7c2ab3d36))
   (to (junction 1d860612-9e84-4c21-8979-4755384993f1))
  )

Refactor/improve schematic editor and board editor

  • Update to the new concept of netpoints/netlines as described above.
  • General refactoring of many undo commands and state machines, especially in the board editor.
  • Fix many bugs, especially in the board editor. Also fixes #226.

Notes

Why so many (seemingly) unrelated changes in one pull request? The concept of netsegments heavily influences the high level undo commands used in the editors. So if the underlying concept changes, the editors also need to be adjusted accordingly.

This is a really big change in the board editor! Hopefully now it works much better than before. Of course it's still not perfect, and I did not yet test it heavily, but I guess it's really much better. Testers are very welcome 馃槂

@ubruhin ubruhin added this to the 0.1 milestone Sep 3, 2018

@ubruhin ubruhin self-assigned this Sep 3, 2018

@ubruhin

This comment has been minimized.

Show comment
Hide comment
@ubruhin

ubruhin Sep 3, 2018

Member

As you can see, I removed many bugs 馃榿
auswahl_002

Member

ubruhin commented Sep 3, 2018

As you can see, I removed many bugs 馃榿
auswahl_002

ubruhin added some commits Aug 26, 2018

Refactor concept of schematic netpoints/netlines
- Allow netlines to be connected directly to pins. No more need to
  create a netpoint between each pin and their netlines. This removes
  many netpoints from schematics (making schematic files smaller and
  simpler).
- Rename netpoints in schematic files from "netpoint" to "junction" (to
  be more expressive).
- Rename netlines in schematic files from "netline" to "line" ("net"
  should be clear from the context anyway).
- Rename netlabels in schematic files from "netlabel" to "label" ("net"
  should be clear from the context anyway).
Refactor concept of board netpoints/netlines
- Allow netlines to be connected directly to vias and pads. No more need
  to create a netpoint between each via/pad and their netlines. This
  removes many netpoints from boards (making board files smaller and
  simpler).
- Define layer on netlines instead of netpoints. Netpoints, vias and
  pads now only check if the connected netlines are on allowed layers.
- Rename netpoints in board files from "netpoint" to "junction" (to
  be more expressive).
- Rename netlines in board files from "netline" to "trace" (to be more
  expressive).
Refactor/improve schematic editor and board editor
- Update to the new concept of netpoints/netlines.
- General refactoring of many undo commands and state machines.
- Fix many bugs, especially in the board editor.

@ubruhin ubruhin merged commit 7c5821a into master Sep 7, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ubruhin ubruhin deleted the refactor-netsegments branch Sep 7, 2018

@dbrgn

This comment has been minimized.

Show comment
Hide comment
@dbrgn

dbrgn Sep 7, 2018

Contributor

馃帀

Contributor

dbrgn commented Sep 7, 2018

馃帀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment