Commit Graph

1224 Commits

Author SHA1 Message Date
Mikolaj Wielgus 9bfd035ed7 Add "upwrapping bends" animation to the readme 2023-08-03 02:28:29 +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 b7e00828cf Add gallery to readme 2023-08-01 00:49:30 +02:00
Mikolaj Wielgus 409cea61c0 Add macro to debug graph 2023-07-31 15:44:18 +02:00
Mikolaj Wielgus 0c32ea7e41 Partial implementation of releasing bends
There's a panic when releasing (unbending) any of the inner bends in the
demo (the outer one works for some reason).
2023-07-31 05:06:09 +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 f563bc2c5a Set up shoving demo 2023-07-25 22:49:45 +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
Mikolaj Wielgus 0770917a41 Implement bending on bends
There's some ugly constants added here and there, will clean this up
later.
2023-07-12 11:15:54 +02:00
Mikolaj Wielgus dfcfc99413 Implement routing *into* dots 2023-07-12 01:01:59 +02:00
Mikolaj Wielgus cf6460a3db Initial commit
Very basic routing routines and data model. No pathfinding implemented
yet.
2023-07-12 01:01:25 +02:00