Mikolaj Wielgus
ece9c4aa5a
autorouter,router: put stepper finishing in `Step` trait too
2024-08-04 16:36:11 +02:00
Mikolaj Wielgus
7830806834
router: use `Step` and new `StepBack` traits in `Route` and `Trace`
2024-08-03 19:17:00 +02:00
Mikolaj Wielgus
3bf4d2cdb1
autorouter,board: use both band uids and band termsegs
2024-07-24 02:27:11 +02:00
Mikolaj Wielgus
5da6ec4463
drawing: create methods for obtaining UIDs for bands
2024-07-23 02:03:55 +02:00
Mikolaj Wielgus
57c970e22e
drawing: obtain `HeadRef` via new trait for abstract reference objects
2024-07-21 14:49:43 +02:00
Mikolaj Wielgus
ace5709e5d
cleanup: `cargo fix`, `cargo fmt` to reduce number of error messages
2024-07-15 13:14:17 +02:00
Mikolaj Wielgus
fd23be7a8a
router: step on successful probes
2024-07-04 13:52:26 +02:00
Mikolaj Wielgus
def3f84d6a
egui,autorouter,router: highlight current obstacle
2024-07-04 00:39:08 +02:00
Mikolaj Wielgus
b6cb89c017
egui,autorouter,router: display infringement shapes (aka. "ghosts")
2024-07-03 21:00:50 +02:00
Mikolaj Wielgus
727eb37c6e
router: have probing and visiting as separate states
...
This feels overengineered, but I need something like this for better
debuginfo.
2024-07-03 18:12:07 +02:00
Mikolaj Wielgus
806742736a
cleanup: get rid of `*Trait` names for traits, use verbs and sentences
2024-07-03 13:40:37 +02:00
Mikolaj Wielgus
b1f60847b3
drawing: move head length measurement methods to new refstruct
2024-07-03 03:37:14 +02:00
Mikolaj Wielgus
3c03b2dfa1
geometry: create `MeasureLength` trait to measure lengths
2024-07-02 23:33:29 +02:00
Mikolaj Wielgus
27d1c9e712
router: step on every probe, not only navvertices
2024-07-02 02:36:42 +02:00
Mikolaj Wielgus
47c888d21b
egui,autorouter,router: restore highlighting active navmesh edges
2024-07-01 18:56:41 +02:00
Mikolaj Wielgus
2259a75d92
egui,autorouter: restore displaying navmesh
2024-07-01 00:50:24 +02:00
Mikolaj Wielgus
fd5a95103d
autorouter: step through every band routing step, not merely over bands
2024-06-29 03:07:20 +02:00
Mikolaj Wielgus
da1438195a
router: create new `Router` object, a wrapper over `Layout`
2024-06-28 14:46:15 +02:00
Mikolaj Wielgus
244367c4d7
router: rename `Router` to `Route`
...
`Router`, soon to be written, will be a wrapper over `Board`.
2024-06-28 01:12:37 +02:00
Mikolaj Wielgus
4fa97509e4
router: split out `Trace` to its own file and give it its own methods
...
We'll be following this pattern:
* `Autorouter` - `Autoroute`,
* `Router` - `Route` (not yet done),
* `Tracer` - `Trace`.
Agent nouns (ending with -er) denote the object that holds large and
"unportable" parts of the state (such as `Board`, `Layout`, `Drawing`,
`Geometry`), while verbs (ending with -e) denote holders of other, more
"portable" parts of the state.
2024-06-27 23:58:02 +02:00
Mikolaj Wielgus
664bbee0b9
router: make `Astar` own the navmesh
2024-06-27 21:24:49 +02:00
Mikolaj Wielgus
0b3ebdbe3c
router: make it possible for `Astar` to own its graph
...
We aren't using this yet however because it requires a substantial
rearrangement of `Router`'s code.
2024-06-27 15:07:58 +02:00
Mikolaj Wielgus
0419904b3f
router: re-encapsulate graph in `Navmesh` and vertices in `VertexIndex`
...
As in previous commit, this was done in the past, but I removed it when
improving `Navmesh` to hold each navvertex instead of calculating tem
during access.
2024-06-26 22:34:59 +02:00
Mikolaj Wielgus
5254f768e5
router: implement (again) graph traversal traits for `Navmesh`
...
These were implemented in the past, but I removed it when I made
`Navmesh` store each navvertex instead of calculating tem on the fly.
2024-06-26 20:27:29 +02:00
Mikolaj Wielgus
114329a1ef
router: don't store `&'a mut Layout` in `Router`
...
First step towards removing multithreading in code in favor of stepping
over the routing process.
2024-06-26 13:39:57 +02:00
Mikolaj Wielgus
43d84dc29e
router: restore calculation of probe length (was temp. hardcoded to 0.0)
2024-06-26 00:47:16 +02:00
Mikolaj Wielgus
b6cfcc8518
router: don't panic if wraparound navvertex has no cw
...
This may happen if target's guidecircle is in line of sight but its
center is not.
2024-06-25 15:00:15 +02:00
Mikolaj Wielgus
3ce8cfcabc
autorouter: fix redo operation
...
Redone operation was only dispatched, not truly executed.
2024-06-25 11:20:59 +02:00
Mikolaj Wielgus
0777b781f4
router: have two navvertices, CW and CCW, for each trianvertex
2024-06-22 17:33:11 +02:00
Mikolaj Wielgus
169ddf7d80
egui: add button to toggle showing navmesh
2024-06-20 19:33:18 +02:00
Mikolaj Wielgus
4540f5c96b
router: impl. forgotten addition of edges to navmesh
2024-06-20 18:50:50 +02:00
Mikolaj Wielgus
ae2a862e0e
router: store every vertex (fails tests but almost functional)
...
Previously, rail vertices were not stored but generated on demand from
data stored in a `Triangulation<...>`. This functionality is removed in
favor of storing every vertex in `Navmesh`'s own graph built from the
`Triangulation<...>`, which is now afterwards discarded.
Tests still fail and rails aren't added yet, but this is close enough to
completion for me to commit so that I can now go to sleep without
worrying.
2024-06-20 01:32:27 +02:00
Mikolaj Wielgus
d4a310a5c0
graph: disambiguate naming of different kinds of indices
...
Disambiguate between node indices and (teir inner) petgraph indices.
Rename "band index" to "band first seg index", as we identify bands by
teir first segs. Rename "trianvertex index" and "navvertex index"
respectively to "trianvertex node index" and "navvertex node index", as
these point to nodes on the geometry graph and only indirectly to
vertices on the vertex graph.
2024-06-18 15:30:33 +02:00
Mikolaj Wielgus
e15e1efe5e
router: remove observers
...
The observer "pattern", arguably, is an anti-pattern that managed to get
into textbooks. It causes a lot of problems, it was a bad idea to use
it.
2024-06-18 01:37:45 +02:00
Mikolaj Wielgus
d193ea6565
drawing: rename "segbends" to "canes"
...
In addition to a seg and a bend, a segbend actually also contains a dot,
so let's rename it to "cane", which is also easier to translate.
2024-06-18 01:16:12 +02:00
Mikolaj Wielgus
cff6b5aaf6
cleanup: cargo fix, cargo fmt
2024-06-13 13:38:12 +02:00
Mikolaj Wielgus
a02bf1541e
autorouter: implement measurement of band length
2024-06-05 23:20:55 +02:00
Mikolaj Wielgus
86d2555b36
autorouter: accessibly store pin-pairs between which routed bands are
2024-06-05 20:26:23 +02:00
Mikolaj Wielgus
a80dfc10be
autorouter,router: shorten and clarify terminology
...
Rename "triangulation vertex" to just "trianvertex".
Rename "navigation vertex" to just "navvertex".
The standalone word "vertex" was overused and in some cases confusing.
2024-06-03 12:46:27 +02:00
Mikolaj Wielgus
de17adb01c
layout: move pin information to a new parent object, `Board`
2024-05-31 01:47:51 +02:00
Mikolaj Wielgus
b22e3dce1a
router,autorouter: stop hiding layout behind an arc-mutex
...
This was preventing us from creating a new abstraction layer over
layout.
2024-05-30 22:57:20 +02:00
Mikolaj Wielgus
dcbc5be5f3
router,autorouter: improve error handling
...
Avoid unwrapping and use `Result<...>` instead as well-written code
should.
2024-05-30 19:54:14 +02:00
Mikolaj Wielgus
a4503a42c6
router: improve error handling -- more error types, remove some unwraps
2024-05-29 23:49:24 +02:00
Mikolaj Wielgus
af9cbeba61
router: don't assume start dot to have a net
2024-05-29 16:52:30 +02:00
Mikolaj Wielgus
499564e6cf
router: make A* a walker, i.e. make it runnable in a while loop
2024-05-27 23:50:12 +02:00
Mikolaj Wielgus
4a4f18f558
egui,autorouter: implement undo/redo in GUI
2024-05-15 03:40:48 +02:00
Mikolaj Wielgus
114fb747c8
router: return band index once the routing finishes
2024-05-15 01:45:36 +02:00
Mikolaj Wielgus
1c09483873
autorouter: implement simple undo (untested, not in GUI yet)
2024-05-14 14:22:47 +02:00
Mikolaj Wielgus
4c6fa0e5d3
layout: remove concepts of connectivity, bands, and continents for now
...
We'll use `UnionFind` where needed for now.
2024-05-13 18:43:42 +02:00
Mikolaj Wielgus
a6fb1157e3
egui,tests: fix compilation errors
2024-05-12 01:57:40 +02:00