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
60c494a171
draw: Clean up some commented-out code and make types narrower
2023-11-15 01:08:28 +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
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
fae2ada334
graph: Remove width from loose seg weights, add it to fixed bend weights
2023-10-27 08:41:03 +00:00
Mikolaj Wielgus
21ed14ae3d
primitive: Implement appropriate `GetEnds` for primitives
...
Earlier I put a common implementation as a placeholder, now replaced it
with a correct implementation.
2023-10-25 15:29:13 +00:00
Mikolaj Wielgus
6f5a73759a
guide: Take unqualified `{Dot,Seg,Bend}Index` unions as arguments
2023-10-25 15:29:13 +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
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
4d20362e00
primitive: Move `.weight()` method to a new `GetWeight` trait
2023-10-20 01:08:58 +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
b7ff507302
shape: Use `enum_dispatch` for `Shape`
2023-10-18 02:33:03 +00:00
Mikolaj Wielgus
26778e7d47
draw: Comment out bend-flipping code for now
...
Was causing panics, so let's keep this out of the way for now.
2023-10-17 22:40:47 +00:00
Mikolaj Wielgus
177b8cb231
guide: Return Err(...) instead of panicking
2023-10-17 05:17:07 +00:00
Mikolaj Wielgus
c9d0b2178e
tracer: Add some initial code for squeezing/tucking
...
Not functional yet.
2023-10-17 03:16:02 +00:00
Mikolaj Wielgus
0695b1deab
draw: Implement flipping the bend if a shorter one is available
2023-09-19 20:56:40 +02:00
Mikolaj Wielgus
efea917cb1
draw: Use `enum_dispatch` to dynamically dispatch `Head`
2023-09-17 16:54:23 +02:00
Mikolaj Wielgus
c94a4c716a
draw: Add contracts for node counts
2023-09-15 22:10:29 +02:00
Mikolaj Wielgus
1a271cd89c
Add `node_count == size` invariant for `Layout`
2023-09-15 01:30:23 +02:00
Mikolaj Wielgus
23311122b4
draw: Fix on-fail cleanup when drawing segbend
2023-09-05 07:51:27 +02:00
Mikolaj Wielgus
05fc42aa38
draw: Change direction depending on chosen guide tangent
2023-09-05 06:02:11 +02:00
Mikolaj Wielgus
f88636057f
draw: Choose the shortest guide tangent
2023-09-05 05:51:21 +02:00
Mikolaj Wielgus
5f37ff7616
Unroute path whose routing failed in the middle
2023-09-05 02:03:32 +02:00
Mikolaj Wielgus
53c24b1a14
Remove created dot if drawing new seg or bend fails
2023-09-04 05:46:58 +02:00
Mikolaj Wielgus
b5f9a5957a
Route with A* step by step instead of only after A*
2023-09-01 01:35:48 +02: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
1d5b428bf9
Split out drawing routines from `Router` into `Draw`
2023-08-30 06:34:56 +02:00