Ellen Emilia Anna Zscheile
92e8600452
chore(autorouter): remove unnecessary mutability
2025-04-25 21:37:37 +02:00
Mikolaj Wielgus
b736aa2d7d
refactor(layout::poly): use `MakeRef<...>` to obtain poly's ref-struct
2025-04-22 21:59:45 +02:00
Ellen Emilia Anna Zscheile
122ff0122f
fix(board): make Poly' apex generation non-lazy
...
- insert polygon parts before polygon compound
2025-04-17 15:03:14 +02:00
Ellen Emilia Anna Zscheile
670ddbe1f7
chore: apply clippy fixes
2025-03-25 00:17:57 +01:00
Ellen Emilia Anna Zscheile
6eb941a137
feat: merge planar-brute-embed into the topola monorepo
...
- feat: use OrderedPair instead of custon BandName/BandUid (note: changes ordering of BandUid)
- fix(crates): rename planar-brute-embed to planar-incr-embed
2025-02-16 18:31:31 +01:00
Ellen Emilia Anna Zscheile
0fde34204f
refactor(drawing,geometry): move GetLayer from drawing::graph to geometry
2025-02-10 11:30:54 +01:00
Ellen Emilia Anna Zscheile
1e690ace11
refactor(drawing): factor out common {Bend,Dot,Seg}Weight fields
2025-02-10 11:29:08 +01:00
Ellen Emilia Anna Zscheile
e1d875ae72
chore: fix most warnings
2025-02-10 11:25:55 +01: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
bcb0c4ad5c
refactor(drawing::collect): turn Collect into a trait
2025-02-02 22:03:12 +00:00
Ellen Emilia Anna Zscheile
ea6df23b95
feat(selection): BBox selection should span all currently visible layers
...
In Via, is_in_layer, `from_layer` and `to_layer` were swapped,
this has been also fixed here.
2025-01-09 18:59:07 +00:00
Alain Emilia Anna Zscheile
0cbd3c398a
refactor(drawing,layout): move 'is_node_in_layer' from Layout to Drawing
2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile
59154c380f
fix(BboxSelection): make intersection calculations against Polygons more accurate
2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile
c7d50fd79f
refactor(geometry::poly): PolyShape should be equal to Polygon
2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile
fae1f4d7bc
refactor(layout,geometry): Layout::node_bbox(...) → AccessShape::bbox(Layout::node_shape(...), 0.0)
2025-01-05 22:14:00 +00:00
Alain Emilia Anna Zscheile
740019e2e5
feat(selection): BboxSelectionKind (completely inside vs. merely intersects)
2025-01-05 22:14:00 +00:00
Mikolaj Wielgus
9664f1a31a
fix: get rid of some indeterminism by using B-trees instead of hash maps
...
I have replaced all instances of `HashMap<...>` with `BTreeMap<...>`,
of `HashSet<...>` with `BTreeSet<...>`, and all the uses of the `Hash`
trait with `Ord`.
I have done a few manual tests and found the behavior to be
deterministic between the GUI application launches. However, undoing an
autoroute command and then manually executing it once again continues to
produce variable results. I suppose this is because of some bug in the
code where edits are applied. Hence, the issue
https://codeberg.org/topola/topola/issues/46
is only partially resolved.
2025-01-04 01:56:00 +01:00
Alain Emilia Anna Zscheile
53b964b865
feat: implement bounding box selection ( #139 )
...
Fixes #138
Reviewed-on: https://codeberg.org/topola/topola/pulls/139
Co-authored-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-01-02 22:12:11 +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
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
9e0bdb5bc7
refactor: various further refactorings ( #128 )
...
These optimize out unnecessary code duplication, reserve vector capacity beforehand by leveraging `Iterator`s and avoid unnecessary double-lookups into HashMaps.
Reviewed-on: https://codeberg.org/topola/topola/pulls/128
Co-authored-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Alain Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2024-12-11 14:13:21 +00:00
Alain Emilia Anna Zscheile
1fd61f773c
feat: improve Selection API (BREAKS HISTORY)
...
Test command files were rewritten using:
```
for f in tests/**/*.cmd; do jq ".done?.[].Autoroute[0] |= .selectors" "$f" | sponge "$f"; done
```
(compatible with bash/zsh/...)
2024-12-08 16:20:05 +00:00
Alain Emilia Anna Zscheile
5a26c02b4e
refactor(ApplyGeometryEdit): make 'apply' take 'GeometryEdit' by reference
2024-12-08 16:20:05 +00:00
Mikolaj Wielgus
2703f662ac
fix(autorouter): have band removal and via placement in undo/redo
2024-12-03 23:54:18 +01:00
Mikolaj Wielgus
c2daf9fbfe
feat(autorouter): use recorded edit applying for undo/redo
2024-12-03 08:35:11 +01:00
Mikolaj Wielgus
d17a34c0f6
fix(geometry,router,autorouter): some more fixes for edit recording
2024-12-03 00:39:02 +01: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
db9d897315
refactor(autorouter): store edits in history entries
2024-11-29 03:45:48 +01:00
Alain Emilia Anna Zscheile
98d237270d
chore: fix cargo fmt
2024-11-16 16:10:54 +01:00
hakki
566ce37a6b
invoker: resolves ' https://codeberg.org/topola/topola/pulls/101#issuecomment-2438542 '
2024-11-15 21:55:08 +00:00
hakki
63804a0297
invoker: added trait description
2024-11-15 21:55:08 +00:00
hakki
7a01a76738
docs: resolved https://codeberg.org/fogti notes
2024-11-15 21:55:08 +00:00
hakki
aae99a9656
docs: Invoker initial docs
2024-11-15 21:55:08 +00:00
Mikolaj Wielgus
d6fe67a373
feat(board,layout,drawing): implement edit recording
...
Not stored in the undo/redo objects yet.
2024-11-13 00:00:56 +00:00
hakki
c1271e570e
docs: navigation mesh documented
2024-10-29 19:53:47 +01:00
Mikolaj Wielgus
7d75f918e7
feat(autorouter): add pointroute execution, which routes to a point
...
Not available as a command (for now?). Hasn't been tested yet.
2024-10-22 00:40:40 +02: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
a9e42eef17
refactor: make `Step`'s error an associated type
...
This was suggested in https://codeberg.org/topola/topola/pulls/79 .
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
bdc021cb6e
refactor: destruct with `.dissolve()` autogenerated with `derive-getters` crate
...
Introduces `derive-getters` as a dependency.
2024-10-11 16:54:53 +02:00
Alain Emilia Anna Zscheile
5c377e805b
general refactor: omit unnecessary clones
2024-10-10 12:21:54 +00:00
Alain Emilia Anna Zscheile
4f40c26bac
chore(autorouter): let ExecutionStepper::step_catch_err take Autorouter as context
2024-10-10 12:21:54 +00: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
01deaa4b12
build(contracts): use contracts-try v0.7 from crates.io
...
`contracts-try` is now developed at
https://codeberg.org/topola/contracts-try and was extracted
from this repo, and rebased upon the original
crate sources to ensure proper attribution.
This removes the `vendored` directory.
2024-10-06 00:18:56 +02:00
Mikolaj Wielgus
74ef5e356f
refactor(egui): add empty skeleton for interactions
2024-10-05 03:56:21 +02:00
Mikolaj Wielgus
8b9d4074e4
chore: perform forgotten rename of `command.rs` to `execution.rs`
2024-10-04 22:00:40 +02:00
Alain Emilia Anna Zscheile
5319e1f976
chore: run cargo fmt to fix lint errors
2024-10-03 16:56:09 +02:00
hakki
2f672d41c2
Autorouter: general modules descriptions ( #65 )
...
This PR consists of general modules descriptions as well as initial `autoroute.rs` docs
Reviewed-on: https://codeberg.org/topola/topola/pulls/65
Co-authored-by: hakki <hakki@noreply.codeberg.org>
Co-committed-by: hakki <hakki@noreply.codeberg.org>
2024-10-02 22:46:32 +00:00
Alain Emilia Anna Zscheile
5e3ccf2560
chore: cargo fmt
2024-10-01 20:50:38 +00: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
5448474857
terminology: distinguish between "command" and its "execution"
2024-10-01 16:01:11 +02:00
Mikolaj Wielgus
cc0bf1845a
terminology: suffix some single-verb object type names with "Stepper"
2024-10-01 14:27:57 +02:00
Alain Emilia Anna Zscheile
1a6340c6f1
chore: remove unused imports
2024-10-01 09:54:46 +02:00
Mikolaj Wielgus
169e843736
egui: further make an `Activity` enum with error and status types
2024-09-30 03:40:53 +02:00
Mikolaj Wielgus
c8a40860af
egui: s/ExecuteWithStatus/ActivityWithStatus, move it to own file
2024-09-30 01:36:22 +02:00
Mikolaj Wielgus
1c7042c8c3
autorouter: move `Execute` and `ExecuteWithStatus` to own file
2024-09-29 03:17:07 +02:00
Alain Emilia Anna Zscheile
c42eab0126
vendored/contracts: fix overly verbose type annotations for enum results
...
This fixes issue #15 .
2024-09-28 00:38:16 +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
4d0c38664e
router: have a binavvertex on each bend
2024-08-31 01:37:27 +02:00
Mikolaj Wielgus
a52515f6d3
autorouter: add option to disable presorting by pairwise detours
2024-08-30 23:11:25 +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
72e630543d
autorouter: if unable to route to compare detours, assume equal
2024-08-26 01:33:18 +02:00
Mikolaj Wielgus
63d3e345aa
egui,autorouter: add action and command to measure length of bands
2024-08-23 04:14:06 +02:00
Mikolaj Wielgus
41bd60ea59
cli: fix compile errors
2024-08-08 11:28:44 +02:00
Mikolaj Wielgus
deb2fffbf1
autorouter: show whole detour compare animation
2024-08-06 21:29:23 +02:00
Mikolaj Wielgus
c9d99c2c1f
autorouter: sort by pairwise total detour lengths before autorouting
2024-08-06 15:43:25 +02:00
Mikolaj Wielgus
33206567e3
egui,autorouter: display message once command completes
2024-08-06 02:34:54 +02:00
Mikolaj Wielgus
c12eea5b4d
autorouter: don't crash after comparing detours
2024-08-05 23:05:10 +02:00
Mikolaj Wielgus
47d8e82344
egui,autorouter: make detour comparison invokable from GUI
2024-08-05 13:14:56 +02:00
Mikolaj Wielgus
b2c9305cea
autorouter: add new compare command to be used for sorting later
2024-08-05 04:33:51 +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
1305487c7f
autorouter: use new `Step` trait for stepping
2024-08-03 16:40:04 +02:00
Mikolaj Wielgus
5b32797022
autorouter: return a different status every time routing a band finishes
2024-08-01 12:56:24 +02:00
Mikolaj Wielgus
fcffb76de4
autorouter: create new command: Remove Selected Bands
2024-07-25 01:46:54 +02:00
Mikolaj Wielgus
b568f2d790
autorouter: split selection into pin selection and band selection
2024-07-24 14:59:28 +02:00
Mikolaj Wielgus
3bf4d2cdb1
autorouter,board: use both band uids and band termsegs
2024-07-24 02:27:11 +02:00
Mikolaj Wielgus
f7126dfa33
egui,autorouter: implement selecting bands
2024-07-23 13:36:57 +02:00
Mikolaj Wielgus
5da6ec4463
drawing: create methods for obtaining UIDs for bands
2024-07-23 02:03:55 +02:00
Mikolaj Wielgus
c17c004aae
cli: hard-code routing only the first layer by default
...
A temporary measure before we provide better layer control and prevent
duplication of routes.
2024-07-16 20:39:19 +02:00
Mikolaj Wielgus
87fd5d5d05
cli: make command file argument named and optional
2024-07-16 15:45:42 +02:00
Mikolaj Wielgus
be9ff3a85a
layout: rename "zone" to "poly"
...
We'll keep the term "zone" for higher-level concepts.
2024-07-09 23:09:39 +02:00
Mikolaj Wielgus
c36ccc287a
autorouter: improve error handling by removing some unwraps
2024-07-08 13:25:58 +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
806742736a
cleanup: get rid of `*Trait` names for traits, use verbs and sentences
2024-07-03 13:40:37 +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
ea991314b2
board: remove `.remove_band()` method
2024-06-28 19:35:25 +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
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
c24d748bea
autorouter: don't save in history until command is successfully finished
2024-06-20 12:14:51 +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