Mikolaj Wielgus
7f69ffddf9
geometry: move geometry module to from layout to root
...
As we'll be creating a deeper hierarchy of modules subordinate to
layout, we need to keep the module full paths short to prevent tem from
growing uncontrollably.
2024-02-26 19:16:40 +00:00
Mikolaj Wielgus
850941715e
router,layout,draw: remove hardcoded widths
2024-02-07 00:00:57 +00:00
Mikolaj Wielgus
fd73531687
layout: store rotation direction as joint order instead of in weights
2024-02-06 05:30:53 +00:00
Mikolaj Wielgus
17209c2a65
draw,layout: create an interface for accessing conditions
2024-02-05 02:53:31 +00:00
Mikolaj Wielgus
e5ddf47eb3
draw,guide: construct guides from rules
2024-02-03 23:19:47 +00:00
Mikolaj Wielgus
d2ff1826a0
layout: attach `Rules` storing design rules to `Layout`
2024-02-02 23:58:23 +00:00
Mikolaj Wielgus
01d285efb0
layout: move guide, segbend files to layout module
2024-02-01 22:23:04 +00:00
Mikolaj Wielgus
8b1d95491d
layout: move `GeometryIndex` and `GeometryWeight` to own file
2024-01-30 01:51:19 +00:00
Mikolaj Wielgus
684d0be641
geometry,primitive: move more code and narrow typing further
...
We replace all instances of `NodeIndex<usize>` in public interfaces of
`Geometry` except for `.first_rail()`, for which we make a dirty
exception.
We also improve terminology a bit:
- "joint" is renamed to "connection",
- "end" is renamed to "joint",
- "leg" is renamed to "limb".
2024-01-29 01:34:06 +00:00
Mikolaj Wielgus
c855853a79
primitive,geometry: move dot, seg shape-making code to `Geometry`
...
We still need to move the code for bends -- but that's for tomorrow.
2024-01-28 00:35:16 +00:00
Mikolaj Wielgus
3fe54290c6
geometry: rename geometry submodule to layout, small typing changes
2024-01-27 16:20:04 +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
35d713b5e6
layout: allow moving fixed dots
2024-01-22 23:59:36 +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
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
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
92834c66c8
graph: Store the offset from the bend immediately below in bend weight
2023-12-16 00:06:13 +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
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