Commit Graph

755 Commits

Author SHA1 Message Date
Mikolaj Wielgus f2569c5167 layout: alias `Node` to not require generic parameters 2024-04-17 21:06:55 +02:00
Mikolaj Wielgus 4c8f7cb804 overlay: toggle only one node at a time, prioritize active layer 2024-04-17 03:36:15 +00:00
Mikolaj Wielgus 87f5f4e8c0 overlay: toggle selection only if clicked inside the shape 2024-04-16 13:38:19 +00:00
Mikolaj Wielgus 4a9322d694 overlay: new module, impl. basic mouse selection of primitives
Only check for intersection of the AABB as a starter.
2024-04-16 00:21:18 +00:00
Mikolaj Wielgus df23ea8398 router: move top-level files to own `router` module 2024-04-14 20:25:01 +00:00
Mikolaj Wielgus bad487f6af geometry,drawing: rename grouping to compound, node to node weight 2024-04-13 18:51:34 +00:00
Mikolaj Wielgus 13dd000dba geometry,layout,drawing: add accessor for node's groupings 2024-04-12 23:50:47 +00:00
Mikolaj Wielgus 9feb32955c drawing,layout: move zones upwards, from drawing to layout
This generally largely drawings from groupings. We need this because it
will be easier to handle all groupings on the level of layout as
continents and bands, which are groupings too, are to be tracked there.

There's a lot of rough edges when it comes to typing and contracts.
2024-04-11 18:07:08 +00:00
Mikolaj Wielgus 5cef59227a geometry: expose grouping management via new trait 2024-04-10 22:13:45 +00:00
Mikolaj Wielgus f2d0de6607 geometry: implement checking if point is contained in shape 2024-04-10 03:01:16 +00:00
Mikolaj Wielgus 6932a698f6 geometry: rename `Shape*` to `PrimitiveShape*` 2024-04-10 01:34:18 +00:00
Mikolaj Wielgus 2d5998547a egui: paint zones (only convex ones work for now) 2024-04-08 21:52:15 +00:00
Mikolaj Wielgus c141dfc735 dsn: implement importing solid polygons 2024-04-06 01:58:51 +00:00
Mikolaj Wielgus b04950cafc drawing: implement adding dots and segs assigned to a zone 2024-04-06 01:57:39 +00:00
Mikolaj Wielgus 1362058db5 sdl2-demo: fix painting of zones
The Y coordinate was not inverted, and the zone polygon would not get
closed.
2024-04-06 01:55:58 +00:00
Mikolaj Wielgus 9bf18db4d1 geometry: fix getting grouping members
The assumed grouping edge direction was wrong.
2024-04-06 01:53:58 +00:00
Mikolaj Wielgus 36e029012f sdl2-demo: implement painting of zones (untested) 2024-04-04 13:58:29 +00:00
Mikolaj Wielgus 1a624b83b1 drawing: implement getting zones and teir members 2024-04-04 13:54:47 +00:00
Mikolaj Wielgus 8f9abae921 drawing: rename remnants of the s/layout/drawing rename 2024-04-04 13:50:39 +00:00
Mikolaj Wielgus 0e553fd0ba drawing: implement getting zone's polygon 2024-04-03 12:33:04 +00:00
Mikolaj Wielgus 1f9b04215a drawing: rename drawing groupings to zones
A zone is a narrower concept than a grouping, as it cannot hold any
bends.
2024-04-03 12:31:51 +00:00
Mikolaj Wielgus 31189a9f5e geometry: create bboxes for groupings 2024-03-28 01:31:12 +00:00
Mikolaj Wielgus 3a812d5621 geometry: implement incomplete interface for manipulation of groupings 2024-03-26 20:24:15 +00:00
Mikolaj Wielgus 888a4ecbad geometry: provide basic internals for storing groupings
Will develop an interface in subsequent commits.
2024-03-25 12:49:19 +00:00
Mikolaj Wielgus e23f7de07e drawing: use `None` instead of negative values to denote no net 2024-03-24 16:34:50 +00:00
Mikolaj Wielgus 6a5be3c368 dsn,drawing: remove mistakenly committed incomplete files 2024-03-23 18:50:00 +00:00
Mikolaj Wielgus ef823c1c27 board,layout: rename "layout" to "drawing", "board" to "layout" 2024-03-22 23:23:31 +00:00
Mikolaj Wielgus 4cb429ca6d dsn: handle instance and pin rotations and offsets 2024-03-17 20:16:53 +00:00
Mikolaj Wielgus d58bff85fe dsn: don't flip y coord on import, do so when rendering 2024-03-17 13:58:29 +00:00
Mikolaj Wielgus cc7b3ac875 dsn: flip pads of components placed on the back side 2024-03-17 13:58:29 +00:00
Mikolaj Wielgus 14f3234b7b dsn: implement crude polygon importing
sdl2-demo now stack-overflows when zooming-in too much, probably for a
reason related to pathfinder.
2024-03-17 13:58:29 +00:00
Mikolaj Wielgus fe89226072 dsn: implement basic import of paths in pads 2024-03-17 13:58:29 +00:00
Mikolaj Wielgus 451d4da7a6 dsn: crudely import rect outlines 2024-03-17 13:58:26 +00:00
Mikolaj Wielgus 5a3ed6adab layout: don't fail on infringement when adding fixed primitives 2024-03-15 21:21:29 +00:00
Mikolaj Wielgus 74d10f4a9e layout,sdl2-demo,egui: basic support for displaying two layers 2024-03-14 21:51:29 +00:00
Mikolaj Wielgus 5a0ea94a87 geometry: make shape bboxes occupy only one layer instead of all 2024-03-14 19:17:38 +00:00
Mikolaj Wielgus cf01cdaea5 geometry: store the bbox in the rtree instead of caching the shape 2024-03-14 17:01:00 +00:00
Mikolaj Wielgus 6965177e78 layout: access shape via layout instead of getting it from a cache 2024-03-14 13:59:22 +00:00
Mikolaj Wielgus 93381f39fb geometry: store some layer data in `GeometryWithRtree` 2024-03-14 13:27:31 +00:00
Mikolaj Wielgus 9730ff215e layout: inherit `GetLayer` via enum_dispatch macro 2024-03-14 00:52:57 +00:00
Mikolaj Wielgus 45593c9e7a dsn,layout: store layer in weights 2024-03-11 22:34:14 +00:00
Mikolaj Wielgus d8e128e81a egui: actually load and display the layout 2024-03-09 17:03:05 +00:00
Mikolaj Wielgus f8892f64a7 dsn: make `DsnDesign` don't own the constructed `DsnRules` object 2024-03-09 13:12:58 +00:00
Tomasz Cichoń b661047ca8 sdl2-demo: fix envelope/mesh sizes 2024-03-08 13:07:46 +01:00
Tomasz Cichoń 164a2230ee dsn: encapsulate de::Deserializer, reorganize error types 2024-03-08 12:40:06 +01:00
Tomasz Cichoń 12574712a4 dsn: remove temporary scaling factor
The binary targets have zooming and no longer need it for display.
2024-03-08 10:12:31 +01:00
Tomasz Cichoń 23fe001647 tests: add export of prerouted_lm317_breakout
The file can now be parsed and partially loaded into Layout.
2024-03-08 09:09:38 +01:00
Tomasz Cichoń fb6922a5e5 sdl2-demo: add zooming/panning 2024-03-08 08:55:30 +01:00
Tomasz Cichoń ada12b32fd dsn: fix import bug misplacing shapes 2024-03-08 06:56:17 +01:00
Tomasz Cichoń 137026301c dsn: make import skip rather than panic on unsupported shapes
This should help debug the infringements happening when trying to load prerouted_lm317_breakout.
2024-03-08 06:00:17 +01:00