Commit Graph

87 Commits

Author SHA1 Message Date
Mikolaj Wielgus 437e2f96d1 fix(router/navcord): Correctly take into account length of final termseg 2025-06-12 16:45:07 +02:00
Mikolaj Wielgus d0c304adbd feat(router/thetastar): Implement Theta* search algorithm
Closes https://codeberg.org/topola/topola/issues/121
2025-06-12 16:45:07 +02:00
Mikolaj Wielgus e92864d58b fix(router/astar): Do not panic if navnode visit fails, just skip it
I have renamed some trait functions to make it clearer what they do, and
clarified some comments.
2025-05-25 18:04:18 +02:00
Mikolaj Wielgus 24d119ad04 refactor(router/navmesh): Rename "navvertex" to "navnode"
Easier to pronounce.
2025-05-25 18:01:26 +02:00
Mikolaj Wielgus e79078e971 fix(router/router): Calculate A* navedge cost correctly
The length of the past head depends on what was previously in the same
scan, so it can't be relied on. Instead, we just add the length of the
bend that is immediately before the probe.
2025-05-21 00:29:13 +02:00
Mikolaj Wielgus b75101cb83 fix(router/router): Replace LoS-based A* termination with correctly searched one 2025-05-21 00:29:13 +02:00
Ellen Emilia Anna Zscheile d553fd6ba7 fix(router): attempt to fix autorouter 2025-05-17 16:32:15 +02:00
Mikolaj Wielgus 47371fdf3f refactor(router/navcord): Make it clear that navcord is not a stepper
Rename `NavcordStepper<...>` to `Navcord<...>. Since the navcord is not
actually considered a true stepper, having the word "stepper" in its
identifier would confuse anyone new to source-diving Topola's code.

Rename Navcord's `.step(...)` to `.step_to(...)` to make it clear
that this is not just a step like in a stepper, but a step to a some
specified position.
2025-05-12 00:45:51 +02:00
Ellen Emilia Anna Zscheile 22460c75f7 refactor(DrawingException): factor out extraction of ghost+obstacle 2025-03-31 02:27:56 +02:00
Ellen Emilia Anna Zscheile c01c8046bb chore: cargo fmt 2025-03-25 23:06:04 +01:00
Ellen Emilia Anna Zscheile 670ddbe1f7 chore: apply clippy fixes 2025-03-25 00:17:57 +01:00
Ellen Emilia Anna Zscheile a836189086 refactor: simplify interface of NavcordStepper 2025-03-22 04:06:27 +00:00
Ellen Emilia Anna Zscheile ba8aa2fe5a refactor(NavcordStepper): struct already stores 'width', don't pass it as argument 2025-02-02 22:03:12 +00:00
Ellen Emilia Anna Zscheile cf36177097 refactor: don't export modules only containing a single item 2025-02-02 22:03:12 +00:00
Ellen Emilia Anna Zscheile 2087e76dfe refactor(drawing::guide): turn Guide into a trait 2025-02-02 22:03:12 +00:00
Ellen Emilia Anna Zscheile 90544c12ed refactor(router::navcorder): turn Navcorder into a trait 2025-02-02 22:03:12 +00:00
Mikolaj Wielgus 44c30caafe chore(licensing): add REUSE license headers to `**.{rs,md,toml}` files
I ran the following command in Fish shell:

```
reuse annotate --skip-unrecognised --copyright="Topola contributors" --license="MIT" **.{rs,md,toml}
```

The choice of year 2024 in the copyright statements is intentional.
2024-12-29 22:47:00 +01:00
Mikolaj Wielgus 1567a9a83e style: rename "squeeze through under bands" to "(...) bends"
Everywhere except in translatable strings. I'm not changing these
because I prefer this to be done via Weblate.
2024-12-29 01:43:36 +01:00
Alain Emilia Anna Zscheile ba41ff6837 refactor: get rid of unnecessary bounds on struct generics 2024-12-12 16:38:26 +01:00
Alain Emilia Anna Zscheile 8a724dc5d2 chore: fix deprecation warnings about geo::EuclideanDistance 2024-12-12 06:54:37 +00:00
Mikolaj Wielgus fe8fd3909f fix(autorouter,router): actually propagate the edit out of route steppers
I forgot to do this earlier, and didn't notice because I didn't test
it. There are still a few changes to be done before recording and edit
applying is functional.
2024-12-02 05:56:37 +01:00
Mikolaj Wielgus dc11b5d8ff feat(egui,autorouter): make it possible to set routed band width 2024-10-21 02:48:04 +02:00
Mikolaj Wielgus 23d1eaa722 refactor: make `Step::step(...)` return `ControlFlow<...>`
This is an iteration on what was suggested in
https://codeberg.org/topola/topola/pulls/79 .

This removes the need to create a new status type for steppers that
have only one intermediate state, and removes unidiomatic `TryInto<...>`
usage to determine if a stepper has finished.
2024-10-12 05:38:57 +02:00
Mikolaj Wielgus 6104e761d2 refactor: autogenerate getters with `derive-getters` crate 2024-10-11 18:43:15 +02:00
Mikolaj Wielgus 8559734336 refactor: rename "trace" to "navcord", "tracer" to "navcorder"
Navcord stands for "navigation cord". I try to prefix anything that is
specific to the navmesh with the "nav-" prefix. I chose the word "cord"
as analogy to the terms "umbilical cord" (and by extension, umbilical
cable), and "power cord".

Calling this "trace" was misleading, as this term has other meanings
that are relevant to Topola: "trace" may refer to a debugging trace, and
more importantly, to a PCB track.

I've also shortened two comments that I found to mention the navcord as
"traces" during substitution.
2024-10-10 03:00:27 +02:00
Alain Emilia Anna Zscheile d0058ef5fd router: get rid of unnecessary RouterError 2024-10-06 00:22:32 +02:00
Alain Emilia Anna Zscheile 04ab1ce69b router: TraceStepper is not a real stepper
Contributes towards solving #82 properly later.
2024-10-05 23:14:17 +02:00
Mikolaj Wielgus bfcae7f308 egui: change "squeeze under" to "squeeze through under"
It's about pushing through a constrained space, not about squeezing
per se. I'm not using the word "push" because this term will probably be
restricted to a mechanism that is very different internally.
2024-10-02 01:12:46 +02:00
Alain Emilia Anna Zscheile f653a96eb0 chore: trivial fixes of clippy warnings 2024-10-01 20:50:38 +00:00
Mikolaj Wielgus e08a59cd74 stepper: add `Abort` trait to abort steppers 2024-10-01 19:07:40 +02:00
Mikolaj Wielgus cc0bf1845a terminology: suffix some single-verb object type names with "Stepper" 2024-10-01 14:27:57 +02:00
Mikolaj Wielgus 8c671e5a2c egui: allocate whole available height for canvas 2024-09-10 22:54:44 +02:00
Mikolaj Wielgus 4b6e3e0a5c egui,router: add option to toggle squeezing 2024-09-01 01:24:52 +02:00
Mikolaj Wielgus 0b7e5f1b9b egui,autorouter,router: add option to toggle wrapping around bands 2024-08-31 14:12:38 +02:00
Mikolaj Wielgus f7f2e8ea49 autorouter: if band removal fails, propagate error instead of panicking 2024-08-30 16:32:37 +02:00
Mikolaj Wielgus 43b48e78e3 router: use `Step` trait for `Astar` too 2024-08-04 18:50:58 +02:00
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 2259a75d92 egui,autorouter: restore displaying navmesh 2024-07-01 00:50:24 +02:00