Commit Graph

852 Commits

Author SHA1 Message Date
Alain Emilia Anna Zscheile 7737aaf0cc refactor(specctra-core/read): inline expect_leaf into only callsite 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile ca012a8c13 refactor(specctra-core/read): inline expect_* functions from ListToken into InputToken 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 81c0de1f91 refactor(specctra-core/read): implement read_named via read_optional 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 50ef279286 refactor(specctra-core/read): reuse String::read_dsn where possible 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 5e54453433 refactor(specctra-core/read): accept multiple possible names anywhere
Previously, some methods handled items/lists with multiple allowed names,
and some only allowed a single name. As the overhead of always handling
multiple names isn't that large, do that everywhere and make the overall
API more streamlined in the process.
2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile e90449b75e refactor(specctra-core/read): use macro to produce repetitive impl ReadDsn via FromStr 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 5f4496ffce refactor(specctra-core/read): align read_optional to be like read_array_with_alias 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 8fb9bfc0e6 feat(specctra-core/error): separate errors for expected leaf / end-of-list 2024-12-12 06:59:03 +00:00
Alain Emilia Anna Zscheile 8a724dc5d2 chore: fix deprecation warnings about geo::EuclideanDistance 2024-12-12 06:54:37 +00:00
Alain Emilia Anna Zscheile 35b2958c8d chore(geometry): run cargo fmt 2024-12-11 23:31:08 +01:00
Alain Emilia Anna Zscheile 41aeb97c16 fix(geometry/rwr): Fix missing pads due to buggy `add_to_compound`
The origin of this bug was found via git-bisect, commit
d6fe67a373
is buggy, which switches from GeometryWithRtree to RecordingGeometryWithRtree.

In PR #128, it was discovered that `add_to_compound` appears to
be missing the part that actually invokes the function that performs
the underlying action that is supposed to be diffed.

Fixes #127
2024-12-11 23:11:35 +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
Mikolaj Wielgus ba0d441513 docs(contributing): add information about contributing by labeling 2024-12-10 05:09:11 +01:00
Mikolaj Wielgus 1c30cd253a docs(contributing): copyedit and clarify 2024-12-10 04:27:49 +01:00
Mikolaj Wielgus 0184a6537e feat(egui): have a separate layout color theme for light mode 2024-12-09 14:22:38 +01:00
Mikolaj Wielgus a5503de0a2 feat(egui): use smaller color theme toggle like in Egui's demo 2024-12-09 14:22:38 +01:00
Mikolaj Wielgus 4b16285143 refactor(egui): move layer colors to `Config` 2024-12-09 14:22:38 +01: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
Alain Emilia Anna Zscheile 27a4b61c4d refactor(topola): get rid of unnecessary clones and lookups 2024-12-08 16:20:05 +00:00
hakki 5425ac2d3a egui: fixed typo in build 2024-12-08 13:56:59 +01:00
Mikolaj Wielgus 2337576245 refactor(egui): rename "layers" to "appearance panel" 2024-12-08 02:22:12 +01:00
Mikolaj Wielgus c87224e99a docs(router): add and rewrite some navmesh and navcord docstrings 2024-12-07 05:53:39 +01:00
Mikolaj Wielgus df1578a094 test: test the number of navmesh vertices 2024-12-07 05:41:00 +01:00
Alain Emilia Anna Zscheile ac2b664901 chore: remove fp-info-cache files from repo 2024-12-06 20:52:37 +01:00
Alain Emilia Anna Zscheile cbf99e0a6e feat(specctra-core-fuzz): actually test roundtrip through serialization+parsing 2024-12-06 14:38:09 +01:00
Alain Emilia Anna Zscheile e381731475 feat(specctra-core/write): get rid of unnecessary restrictions on method args 2024-12-06 14:38:09 +01:00
Alain Emilia Anna Zscheile acab24d7d4 feat(specctra-core-fuzz): add another fuzz target (for 'Structure') 2024-12-06 14:38:09 +01:00
Alain Emilia Anna Zscheile c1101b4304 doc(specctra-core-fuzz): provide README.md with invocation example 2024-12-06 14:38:09 +01:00
Alain Emilia Anna Zscheile 0b37bb2dbc feat: add rudimentary fuzzer for specctra-core DSN parser
Fixes #110
2024-12-06 14:38:09 +01:00
Alain Emilia Anna Zscheile 0fe23c9c71 build: put `specctra` module into separate crate 2024-12-06 14:38:00 +01:00
Alain Emilia Anna Zscheile e77a034634 chore: bump dependencies (mostly geo, thiserror) 2024-12-05 19:17:43 +01:00
Mikolaj Wielgus 848a497991 fix(egui): show ratsnest by default
Closes https://codeberg.org/topola/topola/issues/118
2024-12-05 07:47:21 +01:00
Mikolaj Wielgus 577e1a5b11 chore(gitignore): ignore KiCad lockfiles and `fp-info-cache` 2024-12-04 23:49:45 +01:00
Alain Emilia Anna Zscheile 3bd6a927b9 refactor(specctra/mesadata): more idiomatic Option handling 2024-12-04 15:39:41 +00:00
Alain Emilia Anna Zscheile 5b7f4588a0 feat(specctra/mesadata): deduplicate net names 2024-12-04 15:39:41 +00:00
Alain Emilia Anna Zscheile 0b9d3c0a00 fix(specctra/design): invalid references shouldn't panic during serialization 2024-12-04 15:39:41 +00:00
Alain Emilia Anna Zscheile 0a862a7e5f refactor(specctra/structure): get rid of code duplication in Vec<Point> 2024-12-04 15:39:41 +00:00
Alain Emilia Anna Zscheile da72118255 fix(specctra): return error when point fails to parse first f64 2024-12-04 15:39:41 +00:00
Mikolaj Wielgus b8adfec817 fix(geometry): fix bend joint order and correct tangent clockwiseness
Now bends should cease to seemingly randomly invert their order.
2024-12-04 04:45:39 +01:00
Mikolaj Wielgus 2703f662ac fix(autorouter): have band removal and via placement in undo/redo 2024-12-03 23:54:18 +01:00
hakki 75aa4ea443 Docs: fixed minor typo in installation guide 2024-12-03 16:08:27 +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
Alain Emilia Anna Zscheile 5aae676fb8 refactor(specctra/read): put read_quoted into a separate function again 2024-12-02 22:45:32 +01:00
Alain Emilia Anna Zscheile e493c16053 fix(specctra/read): panic when return_token would override cached token 2024-12-02 22:41:23 +01:00
Alain Emilia Anna Zscheile 9ddc83e72a feat(specctra/read): separate function to discard peeked char
This is useful to get rid of the pattern "self.next_char().unwrap();",
which makes it harder to assess panic safety of parsing code
(which should never panic via its public interface)
2024-12-02 22:41:23 +01:00
Alain Emilia Anna Zscheile 1d0c2cf953 fix(specctra): less (possible) panic!s in read_string 2024-12-02 22:41:23 +01:00
Mikolaj Wielgus 0cac186aa4 fix(cargo): remove accidentally added unused cargo dependency 2024-12-02 06:06:41 +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