Commit Graph

98 Commits

Author SHA1 Message Date
Mikolaj Wielgus 3fe54290c6 geometry: rename geometry submodule to layout, small typing changes 2024-01-27 16:20:04 +00:00
Mikolaj Wielgus 9f42991032 layout,geometry: move some code from `Layout` to new `Geometry` struct 2024-01-27 15:33:17 +00:00
Mikolaj Wielgus 8c1b7d1e7e geometry: move into own module, move dot, seg, bend to separate files 2024-01-27 13:42:33 +00:00
Mikolaj Wielgus 5d1b3dff9a primitive: rename "dependents" to "legs" 2024-01-25 21:57:32 +00:00
Mikolaj Wielgus bc72aa62d0 router: reimplement interactive routing 2024-01-23 18:06:41 +00:00
Mikolaj Wielgus 35d713b5e6 layout: allow moving fixed dots 2024-01-22 23:59:36 +00:00
Mikolaj Wielgus 8bd0f20ee0 primitive: create trait for getting primitives with dependent bbox
I'm calling these "dependents" for now, but there may be a better word.
2024-01-20 00:40:56 +00:00
Mikolaj Wielgus 37fa62a4c2 layout,connectivity: add band edges when adding terminating segs 2024-01-18 22:02:02 +00:00
Mikolaj Wielgus 644d648f71 layout: use `.update_edge()` instead of `.add_edge()`
We never want to end up with a parallel edge. Lack of edge creation is
likely to trigger an assertion, so a bug is more likely to be
immediately caught this way.
2024-01-18 21:06:06 +00:00
Mikolaj Wielgus 16e6162b74 layout: hide band weights, split out to new band module 2024-01-18 19:14:08 +00:00
Mikolaj Wielgus afe4c586b5 layout: implement removal of bands 2024-01-18 00:48:04 +00:00
Mikolaj Wielgus 3978802512 geometry: create new module, "loose", for traversal of loose nodes 2024-01-16 22:30:28 +00:00
Mikolaj Wielgus 46b50439c8 geometry: move wraparoundables to new module 2024-01-16 12:32:51 +00:00
Mikolaj Wielgus 9007b850c4 geometry: rename `Index` to `GeometryIndex` 2024-01-16 01:31:36 +00:00
Mikolaj Wielgus d9b94742e4 geometry: split loose segs into lone and sequential (seq) types 2024-01-15 15:56:37 +00:00
Mikolaj Wielgus 8f8f47a41d layout: store component instead of net in weight of each fixed primitive 2024-01-14 14:08:17 +00:00
Mikolaj Wielgus 0c6190e235 cleanup,layout: make connectivity and geometry private and clean up 2024-01-13 22:55:54 +00:00
Mikolaj Wielgus 1af5b96768 deps,graph: split out to new geometry and connectivity graph modules
The geometry graph is where the layout's dots, segs, and bends are
stored. The connectivity graph is where information about connected
components and relations between tem (e.g. which ones are connected with
bands) and information common to all band primitives are stored.

This removes dependency on the Slab library. We may go back to it
sometime in the future if we decide to phase out usage of Petgraph's
`StableDiGraph`.
2024-01-13 20:36:25 +00:00
Tomasz Cichoń 9a4e8357e7 deps: add thiserror and anyhow, reduce boilerplate
This adds rudimentary error messages and unsilences some errors.
2024-01-13 18:58:20 +01:00
Mikolaj Wielgus 0b3fe216db layout: restore infringability in `.move_dot()`
It was temporarily disabled earlier.
2023-12-27 21:56:55 +00:00
Mikolaj Wielgus 90972136da layout: create `.remove_segbend()`, new and now only way to remove
`.remove()` is now private. The dot that terminates a segbend is renamed to "face".
2023-12-27 20:39:04 +00:00
Mikolaj Wielgus 81e316397f layout,main: display attempted shapes that caused probe to fail 2023-12-23 02:32:43 +00:00
Mikolaj Wielgus da8af817bf main: highlight nodes that made the probe fail 2023-12-23 01:03:43 +00:00
Mikolaj Wielgus b24578ff35 draw: create new error type, `DrawException` 2023-12-22 17:53:38 +00:00
Mikolaj Wielgus 59024d5e74 layout,math: create some error types
We need this for debugging, as we need some better way to display what
intersects what at what moment. Otherwise it takes a lot of effort to
figure out what is going on.

I had to create some type annotations that appear superfluous. Might be
interference from the `contracts` library. This should be investigated.
2023-12-22 05:39:46 +00:00
Mikolaj Wielgus 84d5f9c49e layout: implement almost working reworked squeezing-under
I've temporarily removed collision/infringement detection in
`.move_dot()` because it was a lot of effort to get it right. We'll deal
with this later.

There's a panic due to mesh edges not being generated properly from
loose bends. But this commit is already very large, so I'm going to fix
this in the next one.

There's also some nomenclature changes.
2023-12-19 02:22:55 +00:00
Mikolaj Wielgus 5e3248014c graph: create `WraparoundableIndex` enum for wraparoundables 2023-12-17 01:44:00 +00:00
Mikolaj Wielgus 0706a8c258 primitive: Remove traverser objects
Tey were a bad idea. As such objects immutably borrow the layout, one
cannot use tem in a for loop that mutates it.
2023-12-16 13:24:47 +00:00
Mikolaj Wielgus 294e6c4f72 graph,layout,primitive: store band index instead of net in loose weights 2023-12-15 01:42:09 +00:00
Mikolaj Wielgus f2991af721 Remove dependency on `enum-as-inner` crate
Fixes https://codeberg.org/mikolaj/topola/issues/13
2023-12-13 14:29:07 +00:00
Mikolaj Wielgus 36710b7a51 tracer: Implement rudimentary wrapping around loose bends
Temporarily disabled bend-seg intersection to make it rudimentarily
work.
2023-11-15 15:42:58 +00:00
Mikolaj Wielgus a3cedff577 mesh: Make it possible for fixed and loose bends to be vertices
But not adding tem to the mesh yet, as it's going to take some effort.
2023-10-30 18:28:03 +00:00
Mikolaj Wielgus b84dab9d09 layout: Return an iterator over nodes instead of dots
It's more general. Needed because mesh will be also generated from fixed
and loose bends.
2023-10-30 16:05:36 +00:00
Mikolaj Wielgus 700ffb0096 draw,layout: Move segbend construction to `Layout`
The method to add loose dots is now private.
2023-10-29 16:07:43 +00:00
Mikolaj Wielgus 0cf7c718f3 primitive: Remove Option<...> as loose dot is always adjacent to a seg 2023-10-29 06:54:46 +00:00
Mikolaj Wielgus c163716a6a graph,layout,primitive: Use loose primitive variants for traces 2023-10-28 13:18:55 +00:00
Mikolaj Wielgus 4b46b2174b graph,primitive: Remove half-loose seg objects
It was complicating things too much. We would have needed a new `Head`
implementation.
2023-10-27 15:44:36 +00:00
Mikolaj Wielgus 3619c5eab4 layout: Combine primitive creation methods into generics 2023-10-26 14:32:44 +00:00
Mikolaj Wielgus cedc2253ca primitive,layout: Remove methods that assume order
There's should be no previous or next primitive, only this end and the
other end.
2023-10-25 15:29:13 +00:00
Mikolaj Wielgus aaad590870 primitive: Remove `.tagged_prev()`, `.tagged_next()` methods
Temporarily commented out band code which relied on tem.
2023-10-25 15:29:13 +00:00
Mikolaj Wielgus 62579d98ba graph: Merge `FixedEnd` and `LooseEnd` into one `Adjacent` 2023-10-25 15:29:13 +00:00
Mikolaj Wielgus 0dac23f018 graph,layout: Add creation methods for new primitives and a new label 2023-10-22 05:07:53 +00:00
Mikolaj Wielgus a2531b078d graph,primitive: Split the 3 primitives into 7
`Dot` becomes `FixedDot` and `LooseDot`.
`Seg` becomes `FixedSeg`, `HalfLooseSeg`, and `FullyLooseSeg`.
`Bend` becomes `FixedBend` and `LooseBend`.

The fixed variants differ from the loose variants by being unchangeable
for the router (though probably will be pushable in some cases, but
that's for later). So typically tey're going to be the initial
conditions.

For now only the fixed variants are used even if actually loose, to
split this change into several commits.
2023-10-22 02:05:22 +00:00
Mikolaj Wielgus 403e3e4f98 graph: Remove the `untag` macro
To accomplish this, some more methods are moved to traits.
2023-10-21 04:37:18 +00:00
Mikolaj Wielgus 4549de098c primitive: Move `tagged_{prev,next}` to a trait
First step towards getting rid of the `untag` macro.
2023-10-20 23:44:20 +00:00
Mikolaj Wielgus 4d20362e00 primitive: Move `.weight()` method to a new `GetWeight` trait 2023-10-20 01:08:58 +00:00
Mikolaj Wielgus e271c82b7e graph: Remove `Tag` trait
Name `Index` enum variants explicitly instead.
2023-10-19 22:41:53 +00:00
Mikolaj Wielgus b52eefb1a3 cleanup: Remove unused imports, formatting 2023-10-19 20:29:31 +00:00
Mikolaj Wielgus 708fbb98f1 graph,primitive: Use enum_dispatch, rely on generics less 2023-10-19 20:07:26 +00:00
Mikolaj Wielgus 4e21ff754d primitive: Move `.shape()` to a new trait `MakeShape` 2023-10-19 06:38:57 +00:00