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
b8f6b32341
graph,layout,primitive: Rename "layers" to "rails"
...
By "layer" we should be referring to the PCB layers. A "rail" shall be
one in a spatial sequence of parallel and topologically linked tracks,
which together shall be called a "railing".
2023-12-13 17:10:57 +00:00
Mikolaj Wielgus
9fe591d4dc
mesh: Make bends vertices, too
2023-11-06 23:22:00 +00:00
Mikolaj Wielgus
d6163d3d44
triangulation: Parameterize to make independent from `Mesh`
2023-11-05 20:19:18 +00:00
Mikolaj Wielgus
961fc02678
primitive: Move `.core()` to a trait only implemented by bends
2023-11-05 13:25:28 +00:00
Mikolaj Wielgus
8379470bb1
mesh: Split out `Mesh` into a new `Triangulation` struct
...
It will be possible for the mesh to contain additional vertices that
aren't part of the Delaunay triangulation. `Mesh` is now a wrapper over
`Triangulation` that implements the same traits, and will be later
adding its own vertices in addition to the ones from triangulation.
2023-11-04 22:49:20 +00:00
Mikolaj Wielgus
66d5b3e605
mesh: Remove `Visitable`, `VisitMap` trait impls
...
I don't know why the original A* implementation needed tem.
2023-11-04 18:33:14 +00:00
Mikolaj Wielgus
13e38c6889
mesh: Use a tagged graph index as vertex index instead of a Spade handle
2023-11-04 18:33:14 +00:00
Mikolaj Wielgus
a6481cb839
band,bow: Remove unused band, bow modules, add new traverser module
...
Implement a traverser for wrapped bends.
2023-11-04 18:28:12 +00:00
Mikolaj Wielgus
9a5b046724
mesh: Use a `.map()` instead of custom iterator `struct`s
2023-10-31 23:35:33 +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
c46d8c7434
tracer: Starting and finishing is always on a fixed dot
2023-10-30 15:50:35 +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
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
Mikolaj Wielgus
b7ff507302
shape: Use `enum_dispatch` for `Shape`
2023-10-18 02:33:03 +00:00
Mikolaj Wielgus
cc3b537b5c
debug: Visualize A* running during interactive routing
2023-10-10 21:09:21 +00:00
Mikolaj Wielgus
e5ba7401c1
Move routing methods to the `Route` struct
...
Commented out shove/squeeze features for now.
2023-08-31 20:33:34 +02:00
Mikolaj Wielgus
f2346eedb8
Run `cargo fix`
...
This hasn't cleaned up all the unused import, but it's a good start.
2023-08-29 05:02:45 +02:00
Mikolaj Wielgus
14f6b9f870
Implement basic A* routing
2023-08-27 21:14:42 +02:00
Mikolaj Wielgus
270a7e857c
Provide means of converting dot index to vertex index
2023-08-27 05:00:15 +02:00
Mikolaj Wielgus
d1571c99f6
Wrap `FixedVertexHandle` in a `VertexIndex` struct
2023-08-27 04:03:04 +02:00
Mikolaj Wielgus
a1afd19fcb
Implement Petgraph's graph traits on a Spade's triangulation
2023-08-25 23:39:44 +02:00
Mikolaj Wielgus
658bb112c2
Move Delaunay triangulation to a new `Mesh` struct
2023-08-24 21:23:37 +02:00
Mikolaj Wielgus
8456259b38
Rename `Layout` to `Router`, `Mesh` to `Layout`
2023-08-24 03:32:50 +02:00
Mikolaj Wielgus
bbbd2f57fe
Add `Guide` struct to generate guide curves
2023-08-23 05:15:16 +02:00
Mikolaj Wielgus
356154c914
Make inner and outer circle obtainable from `Shape`
2023-08-22 21:40:10 +02:00
Mikolaj Wielgus
c7f89c9fb9
Delaunay triangulation using Spade library
2023-08-19 05:55:28 +02:00
Mikolaj Wielgus
c480111624
Display mesh edges
2023-08-18 22:37:21 +02:00
Mikolaj Wielgus
a077dfbca2
Don't collide with the same net
2023-08-18 02:39:11 +02:00
Mikolaj Wielgus
4f473bacec
Exclude mesh neighbors from collision detection
2023-08-16 19:55:12 +02:00
Mikolaj Wielgus
1a599951cd
Implement basic failure for moving dot to obstructed place
...
Intersection with bends isn't working yet.
2023-08-15 04:10:55 +02:00
Mikolaj Wielgus
bdf3930894
Reinsert all bends into R-tree when moving a dot
...
This was causing a crash. Added some code that was used to debug this.
2023-08-02 00:28:52 +02:00
Mikolaj Wielgus
f9ec5a0ef7
Implement basic interactive dragging and stretching
2023-07-29 22:29:08 +02:00
Mikolaj Wielgus
e5a1c52655
Rename `Stretch` to `Bow`
...
I wanted to name it `String` (as in bowstring), but it's taken in Rust,
and `Bowstring` is longer than just `Bow`, and the thing in question is
very much bow-shaped, so I went with `Bow`.
2023-07-26 02:29:54 +02:00
Mikolaj Wielgus
68c2863784
Implement basic shoving
2023-07-25 04:08:06 +02:00
Mikolaj Wielgus
7c86b902aa
Add `Stretch` object to hold bend together withs neighboring segs, bends
2023-07-23 03:45:16 +02:00
Mikolaj Wielgus
9c75151d3a
Implement .next() and .prev() methods to traverse along traces
2023-07-23 01:36:22 +02:00
Mikolaj Wielgus
925448802a
Create a new `Set` trait for collections of node indices
2023-07-22 20:55:25 +02:00
Mikolaj Wielgus
f1772ca0be
Store width and points instead of weights in `Shape`
2023-07-22 03:48:56 +02:00
Mikolaj Wielgus
dea65a3b43
Add `untag!` macro, move `.shape()` to `Primitive`
2023-07-21 23:31:26 +02:00
Mikolaj Wielgus
8b5cfb3686
Rename `Primitive` to `Shape`, introduce new `Primitive`
...
Move some `Mesh` methods into `Primitive`.
2023-07-21 23:31:20 +02:00
Mikolaj Wielgus
69317384dd
Separate dot and bend arounds. Keep an edge to the core from each bend
2023-07-21 05:40:04 +02:00
Mikolaj Wielgus
16990517b2
Make segs nodes instead of edges
...
This simplifies logic. Nodes store data as weights, while edges now only
describe relations between nodes with dataless enums -- labels.
2023-07-19 19:47:56 +02:00
Mikolaj Wielgus
b5f85068df
Store all relevant indexes as neighbors instead of in weights
2023-07-15 16:39:46 +02:00
Mikolaj Wielgus
26112724c7
Make bends nodes
...
This is necessary because bends may have more than two neighbors: apart
from the ends, there's also the node around which the bend is wrapped
(not yet made a neighbor, will be done in subsequent commits).
2023-07-14 12:40:30 +02:00
Mikolaj Wielgus
bedd7c744a
Add some utility functions for working with `Index`es and `Weight`s
2023-07-14 00:17:46 +02:00
Mikolaj Wielgus
dabe364420
Pass around routing state with a new `Head` struct
2023-07-13 18:18:46 +02:00