Compare commits

...

2991 Commits

Author SHA1 Message Date
Hanno Braun
924078416c Prepare to support sweeps along curves 2025-04-30 12:28:42 +02:00
Hanno Braun
44fa96bcc3 Simplify parameter of sweep operation 2025-04-30 12:26:29 +02:00
Hanno Braun
c819141230 Simplify parameter of connect operation 2025-04-30 12:26:15 +02:00
Hanno Braun
3f3ecfb5e4 Prepare to sweep along curves 2025-04-30 12:17:08 +02:00
Hanno Braun
209055ada1 Prepare to sweep along curves 2025-04-30 12:16:15 +02:00
Hanno Braun
9394091574 Add FloatingCurveSegment 2025-04-30 12:14:45 +02:00
Hanno Braun
2496ac0c23 Prepare for follow-on change 2025-04-30 12:13:55 +02:00
Hanno Braun
050b9b6109 Prepare to sweep along curve 2025-04-30 12:09:14 +02:00
Hanno Braun
88230b3a12 Prepare for follow-on change 2025-04-30 12:08:40 +02:00
Hanno Braun
5a45d40b86 Prepare to sweep along curves 2025-04-30 12:06:28 +02:00
Hanno Braun
2b30291456 Update name of trait method parameter 2025-04-30 12:00:22 +02:00
Hanno Braun
d8e0f7dc4f Update name of variable 2025-04-30 11:59:45 +02:00
Hanno Braun
b9c39f04a4 Prepare for follow-on change 2025-04-30 11:59:31 +02:00
Hanno Braun
20d4c49aa4 Update name of trait method parameter 2025-04-30 11:58:56 +02:00
Hanno Braun
34918962d4 Prepare to support curved sweeps 2025-04-30 11:58:40 +02:00
Hanno Braun
84d4ca3e23 Run cargo update 2025-04-29 21:19:04 +02:00
Hanno Braun
f01b87b098 Un-pin wayland-backend 2025-04-29 21:18:14 +02:00
Hanno Braun
6e986e021d Run cargo update 2025-04-29 12:14:28 +02:00
Hanno Braun
72f29b9619 Pin wayland-backend dependency 2025-04-29 12:14:00 +02:00
Hanno Braun
cfa2a87dbe Upgrade to latest version of fj-math 2025-04-29 11:22:23 +02:00
Hanno Braun
591d12a339 Run cargo update 2025-04-28 16:59:14 +02:00
Hanno Braun
b30ff91098
Merge pull request #2522 from hannobraun/dependabot/cargo/cargo-20897ffb84
Bump the cargo group with 2 updates
2025-04-28 16:57:18 +02:00
dependabot[bot]
6d673aa711
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [parry2d-f64](https://github.com/dimforge/parry) and [parry3d-f64](https://github.com/dimforge/parry).


Updates `parry2d-f64` from 0.19.0 to 0.20.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.19.0 to 0.20.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

---
updated-dependencies:
- dependency-name: parry2d-f64
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-28 14:17:34 +00:00
Hanno Braun
22f86a9b64 Inline redundant variable 2025-04-28 14:15:43 +02:00
Hanno Braun
c5ac8a5a98 Update name of variable 2025-04-28 14:15:32 +02:00
Hanno Braun
f81cb922b9 Prepare to support curved sweeps 2025-04-28 14:12:56 +02:00
Hanno Braun
9c63f68cce Make function more convenient to call 2025-04-28 14:08:39 +02:00
Hanno Braun
196e8d41c8 Prepare for follow-on change 2025-04-28 14:06:03 +02:00
Hanno Braun
2cffb90266 Remove redundant function 2025-04-28 14:05:22 +02:00
Hanno Braun
8a83eb6ff9 Update name of struct field 2025-04-28 14:05:09 +02:00
Hanno Braun
f7237c1e28 Update name of struct field 2025-04-28 14:04:47 +02:00
Hanno Braun
1e0e9c6e62 Update name of variable 2025-04-28 14:04:16 +02:00
Hanno Braun
9116591db1 Inline redundant variable 2025-04-28 14:02:23 +02:00
Hanno Braun
f991b579d2 Inline redundant variable 2025-04-28 14:02:08 +02:00
Hanno Braun
f2fe5d42f9 Simplify 2025-04-28 14:01:35 +02:00
Hanno Braun
d4524fd507 Simplify CurveGeometry implementation for Line 2025-04-28 14:00:52 +02:00
Hanno Braun
37228e2891 Inline redundant variable 2025-04-28 13:59:19 +02:00
Hanno Braun
3763965a47 Inline redundant variable 2025-04-28 13:59:06 +02:00
Hanno Braun
cc70129141 Inline redundant variable 2025-04-28 13:58:55 +02:00
Hanno Braun
fceaf6b9c6 Simplify 2025-04-28 13:58:42 +02:00
Hanno Braun
b81c916ede Simplify CurveGeometry impl for Circle 2025-04-28 13:57:44 +02:00
Hanno Braun
b868e7d953 Simplify 2025-04-28 13:56:30 +02:00
Hanno Braun
cc8e122a39 Remove redundant variable 2025-04-28 13:55:23 +02:00
Hanno Braun
95eacf1b09 Remove redundant code 2025-04-28 13:54:15 +02:00
Hanno Braun
8dc84f3b01 Update name of trait method 2025-04-28 13:51:42 +02:00
Hanno Braun
c018345d63 Update name of trait method parameter 2025-04-28 13:50:46 +02:00
Hanno Braun
b5eb647032 Consolidate redundant code 2025-04-28 13:50:09 +02:00
Hanno Braun
bed58411e3 Update name of trait method 2025-04-28 13:47:11 +02:00
Hanno Braun
400b9e49d6 Consolidate redundant code 2025-04-28 13:45:42 +02:00
Hanno Braun
a58fac6e1b Prepare to make CurveGeometry floating 2025-04-28 13:43:12 +02:00
Hanno Braun
0738d1da98 Derive Copy for Circle 2025-04-28 13:42:46 +02:00
Hanno Braun
4aa7174992 Prepare for follow-on change 2025-04-28 13:41:51 +02:00
Hanno Braun
bf6859bb28 Prepare for follow-on change 2025-04-28 13:41:30 +02:00
Hanno Braun
1ccaf2e0e8 Add Circle::radius 2025-04-28 13:40:09 +02:00
Hanno Braun
0d44646754 Upgrade to latest fj-interop 2025-04-28 13:38:30 +02:00
Hanno Braun
2d0b57aef4 Simplify function parameter 2025-04-28 13:36:45 +02:00
Hanno Braun
3e3d6dbb1e Simplify 2025-04-28 13:29:41 +02:00
Hanno Braun
0e1c7597b2 Add Circle::project_vector 2025-04-28 13:25:34 +02:00
Hanno Braun
a40f188339 Prepare for follow-on change 2025-04-28 13:18:11 +02:00
Hanno Braun
a5326b00b4 Add geometry::Circle 2025-04-28 13:15:55 +02:00
Hanno Braun
0fbc0bf12d Prepare for follow-on change 2025-04-28 13:13:32 +02:00
Hanno Braun
f6951ca46d Prepare for follow-on change 2025-04-28 13:09:04 +02:00
Hanno Braun
0abccb3987 Prepare to make CurveGeometry floating 2025-04-28 13:05:32 +02:00
Hanno Braun
abc0cdfbe6 Prepare for follow-on change 2025-04-28 13:04:51 +02:00
Hanno Braun
81433f2de4 Prepare for follow-on change 2025-04-28 13:03:55 +02:00
Hanno Braun
f0a86bee8c Prepare for follow-on change 2025-04-28 13:02:55 +02:00
Hanno Braun
189bd7caf0 Update name of variable 2025-04-28 13:02:40 +02:00
Hanno Braun
844fd225d5 Prepare for follow-on change 2025-04-28 13:01:58 +02:00
Hanno Braun
e326173803 Fix origin used for anchored circles 2025-04-28 12:57:01 +02:00
Hanno Braun
8c00b832b6 Run cargo update 2025-04-28 12:53:36 +02:00
Hanno Braun
d232c50b29 Prepare to support swept curve with curved v 2025-04-25 12:15:41 +02:00
Hanno Braun
7dfb01485a Add line_from_origin_and_direction 2025-04-25 12:14:19 +02:00
Hanno Braun
4f8047d92e Fix projection into line 2025-04-25 12:12:18 +02:00
Hanno Braun
e8c16a5790 Prepare for follow-on change 2025-04-25 12:11:51 +02:00
Hanno Braun
f6072ab987 Update formatting 2025-04-25 12:07:59 +02:00
Hanno Braun
45f3ff74e4 Prepare to make CurveGeometry floating 2025-04-25 12:01:07 +02:00
Hanno Braun
d26adbb6dd Prepare for make CurveGeometry floating 2025-04-25 11:59:55 +02:00
Hanno Braun
4fb2364c70 Prepare for follow-on change 2025-04-25 11:59:06 +02:00
Hanno Braun
733be79ea9 Prepare for follow-on change 2025-04-25 11:58:20 +02:00
Hanno Braun
8ac60ff9a4 Update name of variable 2025-04-25 11:58:11 +02:00
Hanno Braun
9ca4043d94 Prepare for follow-on change 2025-04-25 11:57:34 +02:00
Hanno Braun
6aa2f35be2 Prepare for follow-on change 2025-04-25 11:52:47 +02:00
Hanno Braun
cd569c7c71 Prepare for follow-on change 2025-04-25 11:52:29 +02:00
Hanno Braun
b60df55fd2 Prepare for follow-on change 2025-04-25 11:51:40 +02:00
Hanno Braun
d5cb2ce685 Split expression into simpler ones 2025-04-25 11:51:15 +02:00
Hanno Braun
a5a41a77e9 Add AnchoredCurve::line_from_points 2025-04-25 11:50:32 +02:00
Hanno Braun
1fcf6fea54 Prepare for follow-on change 2025-04-25 11:46:07 +02:00
Hanno Braun
6621586bcd Simplify 2025-04-25 11:44:50 +02:00
Hanno Braun
3414743bfb Add Line::project_vector 2025-04-25 11:40:59 +02:00
Hanno Braun
de1443eed0 Add floating Line type 2025-04-25 11:37:31 +02:00
Hanno Braun
25678350b3 Remove stale implementation note 2025-04-25 11:26:08 +02:00
Hanno Braun
28099fd21d Simplify name of type alias 2025-04-25 11:20:28 +02:00
Hanno Braun
4c8ffb33bf Simplify name of struct 2025-04-25 11:19:23 +02:00
Hanno Braun
424e99e823 Run cargo update 2025-04-25 11:17:52 +02:00
Hanno Braun
accc0e1599 Update name of struct field 2025-04-24 12:00:21 +02:00
Hanno Braun
c8d1a7a50f Add FloatingCurveGeometry 2025-04-24 11:59:46 +02:00
Hanno Braun
242cc8866a Document AnchoredCurveGeometry 2025-04-24 11:58:06 +02:00
Hanno Braun
2354dc7531 Update name of struct 2025-04-24 11:40:30 +02:00
Hanno Braun
b53a1da78d Prepare to make CurveGeometry relative 2025-04-24 11:26:48 +02:00
Hanno Braun
1f3c13e5e4 Prepare for follow-on change 2025-04-24 11:24:27 +02:00
Hanno Braun
9a77e16cc0 Add AbsoluteCurveGeometry::approximate 2025-04-24 11:23:00 +02:00
Hanno Braun
e7f5eb6e04 Add AbsoluteCurveGeometr::project_point 2025-04-24 11:21:58 +02:00
Hanno Braun
43b30fb7bd Add AbsoluteCurveGeometry::point_from_local 2025-04-24 11:20:22 +02:00
Hanno Braun
dacfd8b9c4 Remove redundant variable 2025-04-24 11:16:03 +02:00
Hanno Braun
cc626c52bc Remove redundant .into() 2025-04-24 11:15:43 +02:00
Hanno Braun
0451a07b06 Add AbsoluteCurveGeometry::translate 2025-04-24 11:15:19 +02:00
Hanno Braun
c71b159712 Implement Clone for AbsoluteCurveGeometry 2025-04-24 11:12:42 +02:00
Hanno Braun
6e94945296 Add AbsoluteCurveGeometry 2025-04-24 11:11:20 +02:00
Hanno Braun
57898b87fc Run cargo update 2025-04-23 08:39:51 +02:00
Hanno Braun
a98d99fa03 Update list of sponsors 2025-04-22 20:39:38 +02:00
Hanno Braun
e6528bef3b Improve panic message
Previously, computing the `sqrt` could have resulted in `NaN`, which
would have lead to a generic panic in `Scalar` complaining about just
that.
2025-04-22 12:39:53 +02:00
Hanno Braun
161546522a Update formatting 2025-04-22 12:37:20 +02:00
Hanno Braun
c1b5ee5de4 Update name of variable 2025-04-22 12:37:12 +02:00
Hanno Braun
a692daf053 Make computation more clear 2025-04-22 12:36:11 +02:00
Hanno Braun
c0102265bc Update formatting 2025-04-22 12:35:40 +02:00
Hanno Braun
3b11cef8d5 Update name of variable 2025-04-22 12:35:32 +02:00
Hanno Braun
c5c7f76f45 Add comment 2025-04-22 12:34:58 +02:00
Hanno Braun
ce5a882793 Prepare for follow-on change 2025-04-22 12:28:14 +02:00
Hanno Braun
12d80489a0 Run cargo update 2025-04-22 12:25:48 +02:00
Hanno Braun
5f6930c082 Run cargo update 2025-04-21 21:15:23 +02:00
Hanno Braun
84904eabb9
Merge pull request #2520 from hannobraun/dependabot/cargo/cargo-6809f4d651
Bump clap from 4.5.36 to 4.5.37 in the cargo group
2025-04-21 21:11:56 +02:00
dependabot[bot]
0ad2095015
Bump clap from 4.5.36 to 4.5.37 in the cargo group
Bumps the cargo group with 1 update: [clap](https://github.com/clap-rs/clap).


Updates `clap` from 4.5.36 to 4.5.37
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.36...clap_complete-v4.5.37)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.37
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 13:26:36 +00:00
Hanno Braun
5c50d9636e Support arcs in sketches 2025-04-17 14:58:00 +02:00
Hanno Braun
bcc95c411d Fix Circle::point_to_circle_coords
The method was assuming that the circle is in the x-y plane.
2025-04-17 14:45:36 +02:00
Hanno Braun
3180351b8b Prepare for follow-on change 2025-04-17 14:43:11 +02:00
Hanno Braun
275a41dfe8 Prepare for follow-on change 2025-04-17 14:41:52 +02:00
Hanno Braun
75277d1e39 Prepare for follow-on change 2025-04-17 14:40:56 +02:00
Hanno Braun
00e8f3ed82 Update formatting 2025-04-17 14:40:26 +02:00
Hanno Braun
b5446f9a03 Derive Debug for TriangulationPoint 2025-04-17 13:01:10 +02:00
Hanno Braun
da9220668f Prepare to support arcs in sketches 2025-04-16 12:23:39 +02:00
Hanno Braun
aa86ce08c2 Prepare for follow-on change 2025-04-16 12:22:45 +02:00
Hanno Braun
94bd019099 Prepare to support arcs in sketches 2025-04-16 12:21:43 +02:00
Hanno Braun
83febdae02 Prepare for follow-on change 2025-04-16 12:19:48 +02:00
Hanno Braun
55a4e020b9 Add Vector<2>::to_perpendicular 2025-04-16 12:09:53 +02:00
Hanno Braun
fad3e95389 Add SegmentWithStartVertex 2025-04-16 11:19:51 +02:00
Hanno Braun
92cd104edf Prepare for follow-on change 2025-04-16 11:17:04 +02:00
Hanno Braun
432c6ce7b0 Update name of struct 2025-04-16 11:16:11 +02:00
Hanno Braun
a457e809b3 Make name of function parameter more explicit 2025-04-16 11:12:18 +02:00
Hanno Braun
a9feae85b0 Make name of function parameter more explicit 2025-04-16 11:11:59 +02:00
Hanno Braun
9cc25feb3a Update order of values in iterator 2025-04-16 11:11:21 +02:00
Hanno Braun
85cfac7f63 Prepare for follow-on change 2025-04-16 11:10:05 +02:00
Hanno Braun
a787b06b9d Implement CurveGeometry for Circle 2025-04-16 10:50:08 +02:00
Hanno Braun
cc6a19955f Move CircleApproxParams to fj-interop
I want to use it in the latest experiment, without adding the rather
heavy dependency on `fj-core`.
2025-04-16 10:43:23 +02:00
Hanno Braun
1cfaaeab31 Simplify function parameter 2025-04-16 10:41:38 +02:00
Hanno Braun
0a60e65468 Prepare for follow-on change 2025-04-16 10:40:24 +02:00
Hanno Braun
edb347d056 Prepare for follow-on change 2025-04-16 10:38:32 +02:00
Hanno Braun
6821495011 Update documentation of CircleApproxParams 2025-04-16 10:37:24 +02:00
Hanno Braun
ff75457f1b Simplify 2025-04-16 10:36:10 +02:00
Hanno Braun
6d2681401d Simplify function parameter 2025-04-16 10:31:11 +02:00
Hanno Braun
4974feaa4f Prepare to support curved curves 2025-04-16 10:30:18 +02:00
Hanno Braun
46ef1d2f98 Prepare to support curved curves 2025-04-16 10:29:17 +02:00
Hanno Braun
6ac741f758 Prepare to support curved curves 2025-04-16 10:28:32 +02:00
Hanno Braun
e9c6ee189b Prepare to support curved curves 2025-04-16 10:27:49 +02:00
Hanno Braun
700b93188b Prepare to support curved curves 2025-04-16 10:27:15 +02:00
Hanno Braun
241017a9d1 Update fj-interop 2025-04-16 10:22:57 +02:00
Hanno Braun
69e647206d Remove redundant re-export 2025-04-16 10:21:28 +02:00
Hanno Braun
8a0a3d1385 Move tolerance into fj-interop
I'd like to use it in the latest experiment, but don't want to add the
rather heavyweight dependency on `fj-core` there.
2025-04-16 10:18:11 +02:00
Hanno Braun
f210c6115b Prepare to move tolerance into fj-interop 2025-04-16 10:18:11 +02:00
Hanno Braun
deb4199127 Run cargo update 2025-04-16 10:11:54 +02:00
Hanno Braun
5d6ab8dd20 Run cargo update 2025-04-15 09:30:16 +02:00
Hanno Braun
236b03c76a Run cargo update 2025-04-14 15:12:12 +02:00
Hanno Braun
62559f10eb
Merge pull request #2519 from hannobraun/dependabot/cargo/cargo-9f71351d40
Bump the cargo group across 1 directory with 4 updates
2025-04-14 15:11:08 +02:00
dependabot[bot]
14c026fb6c
Bump the cargo group across 1 directory with 4 updates
Bumps the cargo group with 4 updates in the / directory: [clap](https://github.com/clap-rs/clap), [anyhow](https://github.com/dtolnay/anyhow), [parry2d-f64](https://github.com/dimforge/parry) and [parry3d-f64](https://github.com/dimforge/parry).


Updates `clap` from 4.5.35 to 4.5.36
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.35...clap_complete-v4.5.36)

Updates `anyhow` from 1.0.97 to 1.0.98
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.97...1.0.98)

Updates `parry2d-f64` from 0.18.0 to 0.19.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.18.0...v0.19.0)

Updates `parry3d-f64` from 0.18.0 to 0.19.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.36
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-version: 1.0.98
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-14 13:05:58 +00:00
Hanno Braun
8a1e1a2a75 Improve error handling 2025-04-14 15:01:47 +02:00
Hanno Braun
eadc39c03e Update formatting 2025-04-14 15:00:43 +02:00
Hanno Braun
c84d69d651 Upgrade to wgpu 25.0.0 2025-04-14 15:00:10 +02:00
Hanno Braun
db4e4388ca Update formatting 2025-04-14 14:57:48 +02:00
Hanno Braun
9f7ba46ffc Update formatting 2025-04-14 14:57:40 +02:00
Hanno Braun
22e45eff50 Prepare to support arcs in sketches 2025-04-14 14:04:44 +02:00
Hanno Braun
7415e1f4b0 Prepare to support arcs in sketches 2025-04-14 14:03:00 +02:00
Hanno Braun
b852dfd6cd Update name of variable 2025-04-14 14:00:32 +02:00
Hanno Braun
1f1b91f5d8 Update name of struct field 2025-04-14 14:00:10 +02:00
Hanno Braun
85f92c8098 Prepare to support arcs in sketches 2025-04-14 13:59:28 +02:00
Hanno Braun
12a3c597fc Update formatting 2025-04-14 13:57:27 +02:00
Hanno Braun
f8da810858 Prepare for follow-on change 2025-04-14 13:57:18 +02:00
Hanno Braun
475fc027ba Extract more code into VerticesFromSegments 2025-04-14 13:54:51 +02:00
Hanno Braun
79bbc7f38d Prepare for follow-on change 2025-04-14 13:50:56 +02:00
Hanno Braun
463b458bc1 Convert free function into constructor 2025-04-14 13:50:17 +02:00
Hanno Braun
05b53189bf Prepare for follow-on change 2025-04-14 13:49:18 +02:00
Hanno Braun
261544eec8 Extract vertex creation into dedicated function 2025-04-14 13:47:57 +02:00
Hanno Braun
e24c96fd56 Prepare for follow-on change 2025-04-14 13:42:31 +02:00
Hanno Braun
823486cc64 Add SketchSegment::Arc 2025-04-14 13:40:17 +02:00
Hanno Braun
5952f78037 Prepare to support arcs in sketches 2025-04-14 13:37:38 +02:00
Hanno Braun
3c85735a79 Run cargo update 2025-04-14 13:34:40 +02:00
Hanno Braun
9375390ccc Upgrade to Rust 1.86.0 2025-04-11 19:41:57 +02:00
Hanno Braun
989886d251 Only export external triangles 2025-04-11 14:04:44 +02:00
Hanno Braun
d34acb2128 Upgrade to latest version of fj_export 2025-04-11 14:02:59 +02:00
Hanno Braun
016608d8eb Simplify parameters of export functions 2025-04-11 14:00:25 +02:00
Hanno Braun
d6c0de415b Update to latest fj_export 2025-04-11 13:57:34 +02:00
Hanno Braun
8540ed7d74 Make fj_export::export more flexible 2025-04-11 13:55:33 +02:00
Hanno Braun
341b561e5d Make export_obj more flexible 2025-04-11 13:54:29 +02:00
Hanno Braun
0ca45076da Make export_stl more flexible 2025-04-11 13:53:52 +02:00
Hanno Braun
167eea80fe Make export_3mf more flexible 2025-04-11 13:53:09 +02:00
Hanno Braun
e9814288fc Consolidate redundant code 2025-04-11 13:47:06 +02:00
Hanno Braun
7cecbd1d83 Split expression into simpler ones 2025-04-11 13:45:40 +02:00
Hanno Braun
0e55a8f9f5 Split expression into simpler ones 2025-04-11 13:45:09 +02:00
Hanno Braun
bd1cc23707 Update formatting 2025-04-11 13:42:24 +02:00
Hanno Braun
dd272aa1eb Clarify code 2025-04-11 13:36:16 +02:00
Hanno Braun
6f434ec329 Prepare to clarify function 2025-04-11 13:34:57 +02:00
Hanno Braun
210c560929 Simplify 2025-04-11 13:33:01 +02:00
Hanno Braun
fac08b794b Prepare to support more types of segments 2025-04-11 13:32:23 +02:00
Hanno Braun
88df0cb625 Fix potential inaccuracy bug
I don't think this is an actual bug, since the conversion from local to
global point should be deterministic. Still, at the very least, this is
restoring the code to its original intention.
2025-04-11 13:30:32 +02:00
Hanno Braun
b855728116 Make name of variable more explicit 2025-04-11 13:29:21 +02:00
Hanno Braun
9b63607f61 Make name of variable more explicit 2025-04-11 13:29:04 +02:00
Hanno Braun
6aece2721f Prepare for follow-on change 2025-04-11 13:27:42 +02:00
Hanno Braun
8b9ad61452 Run cargo update 2025-04-11 13:24:04 +02:00
Hanno Braun
c962ca3ab6 Update formatting 2025-04-10 12:42:40 +02:00
Hanno Braun
c205089446 Consolidate redundant code 2025-04-10 12:42:28 +02:00
Hanno Braun
c8b4c4be96 Add SweptCurve::plane_from_coord_system 2025-04-10 12:41:29 +02:00
Hanno Braun
dcc3f47415 Consolidate redundant code 2025-04-10 12:36:56 +02:00
Hanno Braun
45fea79aa1 Consolidate redundant code 2025-04-10 12:34:52 +02:00
Hanno Braun
fc5fd0b9b8 Make plane_from_points easier to call 2025-04-10 12:34:22 +02:00
Hanno Braun
9513bc6f29 Prepare for follow-on change 2025-04-10 12:33:12 +02:00
Hanno Braun
a05fd64a93 Remove unused code 2025-04-10 12:26:33 +02:00
Hanno Braun
16ae87d39b Improve wording 2025-04-10 12:26:17 +02:00
Hanno Braun
87dbb80db9 Update formatting 2025-04-10 12:26:01 +02:00
Hanno Braun
20dfb0f11b Improve wording 2025-04-10 12:25:50 +02:00
Hanno Braun
57146819e6 Add Sketch API that can support other segments 2025-04-10 12:24:55 +02:00
Hanno Braun
e30ad41dd0 Update name of variable 2025-04-10 12:19:51 +02:00
Hanno Braun
230af0d77c Update formatting 2025-04-10 12:19:40 +02:00
Hanno Braun
304faf5871 Update name of struct field 2025-04-10 12:19:09 +02:00
Hanno Braun
6cdcbe193d Prepare to support more complex sketches 2025-04-10 12:18:13 +02:00
Hanno Braun
b11d8a5fc9 Remove redundant pub 2025-04-10 12:17:35 +02:00
Hanno Braun
7fc6bc4634 Add doc comment 2025-04-10 12:13:40 +02:00
Hanno Braun
663e8017e2 Split expression into simpler ones 2025-04-10 12:10:57 +02:00
Hanno Braun
19f9ca1c1a Update name of function parameter 2025-04-10 12:10:06 +02:00
Hanno Braun
d9aa667a0a Document CurveGeometry::approximate 2025-04-10 12:09:25 +02:00
Hanno Braun
1c694e0270 Prepare to support curved half-edges 2025-04-10 12:06:49 +02:00
Hanno Braun
5a1a7d502c Prepare for follow-on change 2025-04-10 12:02:08 +02:00
Hanno Braun
41ed3f8b80 Prepare for follow-on change 2025-04-10 12:01:45 +02:00
Hanno Braun
78ce822468 Prepare to support curved half-edges 2025-04-10 12:00:07 +02:00
Hanno Braun
d3c770e0f6 Extract dedicated approximate_half_edge function 2025-04-10 11:59:07 +02:00
Hanno Braun
2220295b16 Prepare for follow-on change 2025-04-10 11:57:38 +02:00
Hanno Braun
ccb276ed9e Prepare for follow-on change 2025-04-10 11:51:57 +02:00
Hanno Braun
9cf8c0b01d Update formatting 2025-04-10 11:49:56 +02:00
Hanno Braun
d37ca389e2 Prepare for follow-on change 2025-04-10 11:49:02 +02:00
Hanno Braun
7c39978bb5 Run cargo update 2025-04-10 11:47:17 +02:00
Hanno Braun
02a15aeb23 Add comment 2025-04-09 12:25:43 +02:00
Hanno Braun
d3a6685428 Prepare to fully support swept curves
As far as `SweptCurve` is concerned, this is already the full extent of
support that is required. However, triangulation doesn't fully support
them yet. It would need to also approximate curves, in addition to
approximating surfaces.
2025-04-09 12:24:43 +02:00
Hanno Braun
931f22f8ea Prepare to fully support swept curves 2025-04-09 11:50:18 +02:00
Hanno Braun
958e27ca10 Add CurveGeometry::project_point 2025-04-09 11:49:38 +02:00
Hanno Braun
327b393441 Simplify projection into swept curve
The new approach has the additional advantage that it's still going to
work with other curves besides lines.
2025-04-09 11:46:46 +02:00
Hanno Braun
e988b2d119 Add implementation note 2025-04-09 11:40:28 +02:00
Hanno Braun
23e760a211 Fix typo in doc comment 2025-04-09 11:20:00 +02:00
Hanno Braun
cbb1909404 Run cargo update 2025-04-09 11:08:26 +02:00
Hanno Braun
e47df86f4b Add CurveGeometry::point_from_local 2025-04-08 13:01:31 +02:00
Hanno Braun
e643be2974 Prepare for follow-on change 2025-04-08 13:01:31 +02:00
Hanno Braun
f65c731e59 Prepare to add support for swept curves 2025-04-08 13:01:31 +02:00
Hanno Braun
843e74eff6 Update name of function 2025-04-08 13:01:31 +02:00
Hanno Braun
a2e1118422 Un-derive Debug from SweptCurve
This is going to make the next step easier. It can be added back (then
probably as a manual implementation) as needed.
2025-04-08 13:01:30 +02:00
Hanno Braun
d6c6fe6085 Un-derive Clone from SweptCurve
With the required change to `curve`, the struct won't be able to support
a `Clone` implementation either.
2025-04-08 13:01:30 +02:00
Hanno Braun
6b91b3e3ce Un-derive Copy from SweptCurve
The `curve` field needs to become a `Box<dyn CurveGeometry>`, and that
can't be `Copy`.
2025-04-08 13:01:30 +02:00
Hanno Braun
bca6367a35 Make method more flexible 2025-04-08 13:01:30 +02:00
Hanno Braun
3a9128db70 Make method more flexible 2025-04-08 13:01:30 +02:00
Hanno Braun
6990bcd790 Update name of module 2025-04-08 13:01:30 +02:00
Hanno Braun
9d6c433d10 Update name of struct field 2025-04-08 13:01:30 +02:00
Hanno Braun
57649f1ece Update name of struct 2025-04-08 13:01:30 +02:00
Hanno Braun
34e911a2a3 Prepare to add support for swept curves 2025-04-08 13:01:30 +02:00
Hanno Braun
b27ae927b0 Make Line constructor more convenient to call 2025-04-08 13:01:30 +02:00
Hanno Braun
44c862fad1 Make Line constructor more convenient to call 2025-04-08 13:01:30 +02:00
Hanno Braun
9ff47b47f8 Add Plane::origin 2025-04-08 13:01:30 +02:00
Hanno Braun
7779cf99c3 Fix formatting 2025-04-08 13:01:30 +02:00
Hanno Braun
c8ec9d8b69 Prepare to add support for swept curves 2025-04-08 13:01:30 +02:00
Hanno Braun
d5ee2a3fe4 Prepare for follow-on change 2025-04-08 13:01:30 +02:00
Hanno Braun
cb3602f756 Prepare for follow-on change 2025-04-08 13:01:30 +02:00
Hanno Braun
a35c0ffad5 Remove redundant re-export 2025-04-08 13:01:30 +02:00
Hanno Braun
093562011a Move plane to geometry 2025-04-08 13:01:30 +02:00
Hanno Braun
5ade1c184f Run cargo update 2025-04-08 13:01:30 +02:00
Hanno Braun
1501b479fc
Merge pull request #2517 from hannobraun/dependabot/cargo/cargo-0ce513c0a7
Bump the cargo group with 3 updates
2025-04-07 16:08:04 +02:00
dependabot[bot]
ea2c772f05
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [clap](https://github.com/clap-rs/clap), [tokio](https://github.com/tokio-rs/tokio) and [env_logger](https://github.com/rust-cli/env_logger).


Updates `clap` from 4.5.34 to 4.5.35
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.34...clap_complete-v4.5.35)

Updates `tokio` from 1.44.1 to 1.44.2
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.1...tokio-1.44.2)

Updates `env_logger` from 0.11.7 to 0.11.8
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.7...v0.11.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.35
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-version: 1.44.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: env_logger
  dependency-version: 0.11.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 13:03:47 +00:00
Hanno Braun
6e805dd02e Remove redundant placeholder implementation 2025-04-07 13:09:03 +02:00
Hanno Braun
313d9713f0 Prepare to support other curves beside lines 2025-04-07 13:08:41 +02:00
Hanno Braun
2cb597c31e Split expression into simpler ones 2025-04-07 13:07:29 +02:00
Hanno Braun
d6bc4f1e30 Split expression into simpler ones 2025-04-07 13:07:08 +02:00
Hanno Braun
8539b8f84e Simplify 2025-04-07 13:06:50 +02:00
Hanno Braun
64045a1de7 Remove stale comment 2025-04-07 13:05:55 +02:00
Hanno Braun
113377d2e8 Support translating curve geometry 2025-04-07 13:05:22 +02:00
Hanno Braun
9f09428c66 Prepare to support other curves besides lines 2025-04-07 13:01:19 +02:00
Hanno Braun
e42a283475 Prepare for follow-on change 2025-04-07 13:01:19 +02:00
Hanno Braun
fee09bdfc1 Prepare to support other curves besides lines 2025-04-07 12:47:15 +02:00
Hanno Braun
06513f4151 Prepare for follow-on change 2025-04-07 12:36:12 +02:00
Hanno Braun
c8dccd539e Add comment 2025-04-07 12:33:08 +02:00
Hanno Braun
fd8ded565b Inline redundant variable 2025-04-07 12:26:47 +02:00
Hanno Braun
32853572d4 Update name of closure parameter 2025-04-07 12:26:29 +02:00
Hanno Braun
4291f493e1 Simplify 2025-04-07 12:26:20 +02:00
Hanno Braun
27c84404c8 Share connecting curves 2025-04-07 12:25:15 +02:00
Hanno Braun
23c3ca842e Add missing word in panic message 2025-04-07 12:04:32 +02:00
Hanno Braun
8bd700add0 Update formatting 2025-04-05 08:34:37 +02:00
Hanno Braun
11857a77b1 Update name of function 2025-04-05 08:34:08 +02:00
Hanno Braun
9037b99f64 Fix typo in function name 2025-04-05 08:34:08 +02:00
Hanno Braun
c87847cbc1 Run cargo update 2025-04-05 08:34:08 +02:00
Hanno Braun
4cc1a2ba56
Merge pull request #2516 from hannobraun/dependabot/cargo/openssl-0.10.72
Bump openssl from 0.10.71 to 0.10.72
2025-04-05 08:06:10 +02:00
dependabot[bot]
3508fa5eca
Bump openssl from 0.10.71 to 0.10.72
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.71 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 20:56:28 +00:00
Hanno Braun
385aee350d Re-use bottom and top curves when connecting faces 2025-04-04 13:08:46 +02:00
Hanno Braun
8cc33c3c97 Prepare for follow-on change 2025-04-04 13:06:59 +02:00
Hanno Braun
104e2b05b3 Update comment 2025-04-04 13:05:51 +02:00
Hanno Braun
bcdbb5fa23 Prepare for follow-on change 2025-04-04 13:05:23 +02:00
Hanno Braun
2d680e8420 Group related code 2025-04-04 13:04:06 +02:00
Hanno Braun
c425454dd6 Prepare for follow-on change 2025-04-04 13:03:50 +02:00
Hanno Braun
859ddb7ccd Simplify comment 2025-04-04 13:03:12 +02:00
Hanno Braun
cf3d1557ee Split expression into simpler ones 2025-04-04 13:01:46 +02:00
Hanno Braun
2f9f12ce0d Consolidate redundant function parameters 2025-04-04 12:56:37 +02:00
Hanno Braun
97653ec234 Add comment 2025-04-04 12:54:18 +02:00
Hanno Braun
aeed6ad401 Fix punctuation in panic message 2025-04-04 12:51:34 +02:00
Hanno Braun
79470f76b3 Update formatting 2025-04-04 12:51:26 +02:00
Hanno Braun
1ac4a73cd9 Extract building connecting face to dedicated fn 2025-04-04 12:49:20 +02:00
Hanno Braun
5fa10def8b Simplify 2025-04-04 12:47:28 +02:00
Hanno Braun
654d837c24 Simplify 2025-04-04 12:46:52 +02:00
Hanno Braun
b95b027d92 Make return type more explicit 2025-04-04 12:45:59 +02:00
Hanno Braun
83808c2262 Make name of closure parameter more explicit 2025-04-04 12:43:31 +02:00
Hanno Braun
ecf4149ba5 Prepare to clarify code 2025-04-04 12:43:16 +02:00
Hanno Braun
d7159c3ba3 Make name of closure parameter more explicit 2025-04-04 12:42:31 +02:00
Hanno Braun
2eae83ed01 Prepare to clarify code 2025-04-04 12:42:15 +02:00
Hanno Braun
3bcca381ee Make name of closure parameter more explicit 2025-04-04 12:41:18 +02:00
Hanno Braun
27b79c9740 Group related code 2025-04-04 12:40:49 +02:00
Hanno Braun
3b60d42412 Prepare to clarify code 2025-04-04 12:40:23 +02:00
Hanno Braun
b0f78c565f Make name of closure parameter more explicit 2025-04-04 12:39:46 +02:00
Hanno Braun
82f11996f3 Prepare to clarify code 2025-04-04 12:39:17 +02:00
Hanno Braun
c5426c6f7f Simplify coordinate system of connecting surfaces 2025-04-04 12:36:23 +02:00
Hanno Braun
d16d072ba1 Make ordering of vertices more explicit 2025-04-04 12:34:36 +02:00
Hanno Braun
82f6ce785a Make name of variable more explicit 2025-04-04 12:32:26 +02:00
Hanno Braun
a2acf031b0 Make name of variable more explicit 2025-04-04 12:32:12 +02:00
Hanno Braun
d6a9f6ddc2 Make name of variable more explicit 2025-04-04 12:31:53 +02:00
Hanno Braun
d112ce67ab Make name of variable more explicit 2025-04-04 12:31:36 +02:00
Hanno Braun
158694aced Update name of variable 2025-04-04 12:23:00 +02:00
Hanno Braun
cabddaecf4 Extract building side faces to dedicated function 2025-04-04 12:22:13 +02:00
Hanno Braun
9d74dd9aa8 Add comment 2025-04-04 12:20:25 +02:00
Hanno Braun
59e3f92254 Prepare to improve clarity of algorithm 2025-04-04 12:19:32 +02:00
Hanno Braun
b8ac751397 Prepare to improve clarity of algorithm 2025-04-04 12:18:48 +02:00
Hanno Braun
1611a250f2 Consolidate redundant code 2025-04-04 12:17:08 +02:00
Hanno Braun
18e98b0d0b Remove redundant code
I think this is a leftover from when we had `dyn` pointers, which need
special handling due to the metadata in the fat pointer.
2025-04-04 12:14:51 +02:00
Hanno Braun
4a47f675c0 Split expression into simpler ones 2025-04-04 12:12:56 +02:00
Hanno Braun
3cba53a577 Split expression into simpler ones 2025-04-04 12:12:30 +02:00
Hanno Braun
0dfb91dc49 Simplify names of closure parameters 2025-04-04 12:06:19 +02:00
Hanno Braun
9de2ff48aa Add placeholder impl for translating curves 2025-04-04 12:01:14 +02:00
Hanno Braun
8d933354e7 Prepare for follow-on change 2025-04-04 11:57:49 +02:00
Hanno Braun
b0fadbcedb Add Curve
This is preparation for supporting curved half-edges.
2025-04-04 11:55:55 +02:00
Hanno Braun
8e4c83c453 Run cargo update 2025-04-04 11:48:37 +02:00
Hanno Braun
a4e376d7c3 Prepare to support curved surfaces 2025-04-03 13:58:49 +02:00
Hanno Braun
63ac8708d5 Prepare for follow-on change 2025-04-03 13:55:56 +02:00
Hanno Braun
ec1cf342e3 Update formatting 2025-04-03 13:54:51 +02:00
Hanno Braun
685f6730ec Don't require allocation in function
This is also preparation for upcoming changes, which are going to become
a bit easier this way.
2025-04-03 13:53:52 +02:00
Hanno Braun
417e7c3a46 Rename function to prevent name collision 2025-04-03 13:52:15 +02:00
Hanno Braun
2af71392b3 Make name of function more explicit 2025-04-03 13:37:16 +02:00
Hanno Braun
1beaa22a48 Make name of variable more explicit 2025-04-03 13:37:02 +02:00
Hanno Braun
9ab822de9d Sort functions by order of use 2025-04-03 13:36:13 +02:00
Hanno Braun
0b8b727a4b Make name of function parameter more explicit 2025-04-03 13:35:55 +02:00
Hanno Braun
7bdb680d7e Remove errant word in comment 2025-04-03 13:32:58 +02:00
Hanno Braun
bf4c79f066 Inline redundant variable 2025-04-03 13:32:15 +02:00
Hanno Braun
f428bb9845 Group related code 2025-04-03 13:32:00 +02:00
Hanno Braun
b785773464 Make name of variable more explicit 2025-04-03 13:31:20 +02:00
Hanno Braun
e93b583e40 Inline redundant variable 2025-04-03 13:30:51 +02:00
Hanno Braun
e4c5f5aaf3 Make name of function more explicit 2025-04-03 13:29:48 +02:00
Hanno Braun
bebc92258d Consolidate redundant code 2025-04-03 13:17:08 +02:00
Hanno Braun
4e3cc51d76 Make name of struct field more general
I'm going to use it for more than just points from vertices.
2025-04-03 13:06:03 +02:00
Hanno Braun
9a473a152a Update formatting 2025-04-03 12:53:21 +02:00
Hanno Braun
27f3dc5b51 Prepare for follow-on change 2025-04-03 12:52:42 +02:00
Hanno Braun
0df0d129b2 Remove redundant re-export 2025-04-03 12:43:36 +02:00
Hanno Braun
1ccd5b1974 Remove redundant module 2025-04-03 12:42:58 +02:00
Hanno Braun
c1a8800586 Re-use fj_math::Bivector 2025-04-03 12:41:48 +02:00
Hanno Braun
139628b9cb Derive Debug for Bivector 2025-04-03 12:40:16 +02:00
Hanno Braun
2f9469b04d Run cargo update 2025-04-03 12:33:12 +02:00
Hanno Braun
3912d0c868 Update list of sponsors 2025-03-31 20:40:33 +02:00
Hanno Braun
d948f22018 Run cargo update 2025-03-31 20:39:42 +02:00
Hanno Braun
8357249cb8
Merge pull request #2514 from hannobraun/dependabot/cargo/cargo-42a4b511a0
Bump the cargo group with 3 updates
2025-03-31 20:28:32 +02:00
dependabot[bot]
4076ee5368
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [clap](https://github.com/clap-rs/clap), [image](https://github.com/image-rs/image) and [octocrab](https://github.com/XAMPPRocky/octocrab).


Updates `clap` from 4.5.32 to 4.5.34
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.32...clap_complete-v4.5.34)

Updates `image` from 0.25.5 to 0.25.6
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.5...v0.25.6)

Updates `octocrab` from 0.43.0 to 0.44.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 12:35:49 +00:00
Hanno Braun
c20835c7a3 Don't maximize model viewer windows
Now that multiple can be open, this isn't so great anymore as the
default.
2025-03-28 20:11:05 +01:00
Hanno Braun
e6df6208e3 Display intermediate result 2025-03-28 20:09:55 +01:00
Hanno Braun
6db159c174 Prepare to display intermediate result 2025-03-28 20:09:04 +01:00
Hanno Braun
e86b14ef0c Prepare to display intermediate result 2025-03-28 20:09:04 +01:00
Hanno Braun
8cc992d3b8 Allow user thread to return a result 2025-03-28 20:04:17 +01:00
Hanno Braun
65104a4416 Upgrade to latest fj-viewer 2025-03-28 20:00:35 +01:00
Hanno Braun
d07e2719a9 Update doc comment 2025-03-28 19:58:53 +01:00
Hanno Braun
7b9613038c Simplify API of Viewer 2025-03-28 19:58:37 +01:00
Hanno Braun
d19cd87020 Remove flag to invert zoom
This makes the API a bit simpler, and allows for removing some code.

The model viewer is not supposed to be user-facing. It's a debugging
tool for development of Fornjot and code using it. I think it's fine for
it to be opinionated.
2025-03-28 19:53:24 +01:00
Hanno Braun
c192515652 Don't require API user to manage threads 2025-03-28 19:50:29 +01:00
Hanno Braun
6cd2e9e57b Update name of module 2025-03-28 19:22:33 +01:00
Hanno Braun
39830ace0a Update doc comment 2025-03-28 19:21:23 +01:00
Hanno Braun
8066c08376 Update name of variable 2025-03-28 19:20:04 +01:00
Hanno Braun
cd65615b03 Update name of function parameter 2025-03-28 19:19:42 +01:00
Hanno Braun
1a36e6593a Prepare to manage multiple windows 2025-03-28 19:19:16 +01:00
Hanno Braun
938808966c Simplify API of Camera 2025-03-28 19:15:06 +01:00
Hanno Braun
7993d25780 Remove unused code 2025-03-28 19:14:20 +01:00
Hanno Braun
81ed53bdb7 Prepare for follow-on change 2025-03-28 19:13:04 +01:00
Hanno Braun
c4ef2a59a0 Prepare for follow-on change 2025-03-28 19:12:41 +01:00
Hanno Braun
de5f827dcb Simplify API of Renderer 2025-03-28 19:12:05 +01:00
Hanno Braun
fa955a59ea Update name of function parameter 2025-03-28 19:10:15 +01:00
Hanno Braun
27ffb7d696 Simplify API of window 2025-03-28 19:08:33 +01:00
Hanno Braun
fc5940c55e Prepare for follow-on change 2025-03-28 19:06:15 +01:00
Hanno Braun
b7d0727595 Update doc comment 2025-03-28 19:03:31 +01:00
Hanno Braun
6b37ab365b Update name of struct field 2025-03-28 19:01:42 +01:00
Hanno Braun
9cc0abdecd Prepare to manage multiple windows 2025-03-28 19:01:02 +01:00
Hanno Braun
403068ba6c Create window at the end of every frame, if needed 2025-03-28 18:53:30 +01:00
Hanno Braun
d9fa21ce86 Update name of variable 2025-03-28 18:52:00 +01:00
Hanno Braun
7e47b2c868 Make name of method more explicit 2025-03-28 18:51:00 +01:00
Hanno Braun
6e99385041 Update name of struct field 2025-03-28 18:50:42 +01:00
Hanno Braun
cc26b594ea Prepare to manage multiple windows 2025-03-28 18:50:02 +01:00
Hanno Braun
ac732892fd Remove redundant code 2025-03-28 18:49:08 +01:00
Hanno Braun
05e52cbdcc Don't request redraw every frame 2025-03-28 18:48:27 +01:00
Hanno Braun
4390d6d088 Update formatting 2025-03-28 18:44:34 +01:00
Hanno Braun
cb569ec2ff Update formatting 2025-03-28 18:44:17 +01:00
Hanno Braun
54d6dda39d Update name of constructor 2025-03-28 18:33:26 +01:00
Hanno Braun
81fd1b51b5 Convert display into constructor on Viewer 2025-03-28 18:32:58 +01:00
Hanno Braun
f82aa7e325 Update imports 2025-03-28 18:31:49 +01:00
Hanno Braun
de89abe776 Update imports 2025-03-28 18:31:27 +01:00
Hanno Braun
ea6473c27c Return Viewer from display 2025-03-28 18:28:48 +01:00
Hanno Braun
538e65368f Add Viewer 2025-03-28 18:28:26 +01:00
Hanno Braun
a673201c4b Run cargo update 2025-03-28 18:26:12 +01:00
Hanno Braun
cd7ba50b18 Update name of module 2025-03-25 21:14:11 +01:00
Hanno Braun
f916b5c303 Rename ViewerWindow to Window
The simpler name is available now.
2025-03-25 21:13:30 +01:00
Hanno Braun
ed4685dfe5 Merge remnants of window into viewer 2025-03-25 21:13:12 +01:00
Hanno Braun
ad15d9d9ae Inline redundant struct 2025-03-25 21:11:40 +01:00
Hanno Braun
69aacef1b1 Simplify return type 2025-03-25 21:10:56 +01:00
Hanno Braun
5d70470f41 Remove redundant struct 2025-03-25 21:09:14 +01:00
Hanno Braun
850dcce00f Remove redundant code 2025-03-25 21:07:38 +01:00
Hanno Braun
6fc4675011 Simplify function parameter 2025-03-25 21:06:44 +01:00
Hanno Braun
770724ac44 Prepare for follow-on change 2025-03-25 21:05:51 +01:00
Hanno Braun
b72401847c Simplify 2025-03-25 21:04:59 +01:00
Hanno Braun
f40f98a131 Fix word in comment 2025-03-25 21:04:14 +01:00
Hanno Braun
fd6d1f42da Simplify 2025-03-25 21:04:10 +01:00
Hanno Braun
515bcb77aa Update name of function parameter 2025-03-25 21:02:52 +01:00
Hanno Braun
fe9e0f4ff8 Simplify 2025-03-25 21:02:27 +01:00
Hanno Braun
a095a9aece Simplify 2025-03-25 21:01:22 +01:00
Hanno Braun
5af1b5ab22 Inline redundant function 2025-03-25 21:00:56 +01:00
Hanno Braun
000a9a52df Prepare for follow-on change 2025-03-25 21:00:21 +01:00
Hanno Braun
28a4428c88 Inline redundant function 2025-03-25 20:59:44 +01:00
Hanno Braun
f789c09ef7 Inline redundant function 2025-03-25 20:57:56 +01:00
Hanno Braun
a3d28e4e3b Simplify 2025-03-25 20:56:54 +01:00
Hanno Braun
c879beeead Inline redundant constructor 2025-03-25 20:55:38 +01:00
Hanno Braun
c77b56a688 Improve error handling 2025-03-25 20:54:49 +01:00
Hanno Braun
7669a8edef Prepare to improve error handling 2025-03-25 20:53:57 +01:00
Hanno Braun
eed5f8ad86 Inline redundant struct 2025-03-25 20:52:10 +01:00
Hanno Braun
048818602f Remove unused code 2025-03-25 20:51:29 +01:00
Hanno Braun
3b809602f9 Prepare to inline Window 2025-03-25 20:48:06 +01:00
Hanno Braun
582d36ce17 Consolidate window code in ViewerWindow 2025-03-25 20:47:34 +01:00
Hanno Braun
32fe568547 Re-enable window decorations
It's been almost two years since I disabled them, and I can't currently
reproduce the issue.

Close #1848
2025-03-25 20:45:13 +01:00
Hanno Braun
030249adcb Rename ScreenSize to WindowSize 2025-03-25 20:42:51 +01:00
Hanno Braun
b07d5dd47c Merge remains of screen into window 2025-03-25 20:42:09 +01:00
Hanno Braun
f948e327ca Update name of variable 2025-03-25 20:38:46 +01:00
Hanno Braun
cb06358da6 Update name of variable 2025-03-25 20:38:25 +01:00
Hanno Braun
b93a745515 Update name of struct field 2025-03-25 20:38:01 +01:00
Hanno Braun
7ab64c20f4 Remove redundant struct field 2025-03-25 20:36:23 +01:00
Hanno Braun
8d0d57dada Move Window into ViewerWindow 2025-03-25 20:34:54 +01:00
Hanno Braun
3cd03eb840 Update name of function parameter 2025-03-25 20:32:19 +01:00
Hanno Braun
2af0044cf2 Remove stale doc comments 2025-03-25 20:31:36 +01:00
Hanno Braun
a47316b443 Make name of method more explicit 2025-03-25 20:30:45 +01:00
Hanno Braun
29c3111963 Remove redundant code 2025-03-25 20:30:08 +01:00
Hanno Braun
7940ec81d4 Convert trait method to inherent method 2025-03-25 20:26:52 +01:00
Hanno Braun
21ea140339 Simplify function parameter 2025-03-25 20:24:42 +01:00
Hanno Braun
5156abf896 Simplify function parameter 2025-03-25 20:24:04 +01:00
Hanno Braun
03d4cfc546 Rename Viewer to ViewerWindow
I'm going to re-use the name `Viewer` for a type that supports opening
multiple windows.
2025-03-25 20:21:39 +01:00
Hanno Braun
9c66bbc5f3 Remove more unused dependencies 2025-03-25 20:19:55 +01:00
Hanno Braun
09f2022ad7 Remove unused dependencies 2025-03-25 20:17:46 +01:00
Hanno Braun
369cfd0081 Run cargo update 2025-03-25 20:08:46 +01:00
Hanno Braun
a7c8d87a3b Upgrade to decorum 0.4.0
Close #2484
2025-03-24 20:43:34 +01:00
Hanno Braun
5b69a3c6ee Update import 2025-03-24 20:41:09 +01:00
Hanno Braun
4fe51e94f6 Update comment 2025-03-24 20:40:54 +01:00
Hanno Braun
d9ce7f436c Make sure Eq and Hash impls of Scalar match 2025-03-24 20:39:06 +01:00
Hanno Braun
2ef096b2fb Upgrade to wgpu 24.0.3
Close #2495
2025-03-24 20:17:22 +01:00
Hanno Braun
4865c5d730 Upgrade to Rust 1.85.1 2025-03-24 20:10:42 +01:00
Hanno Braun
7cadd6fbc2 Run cargo update 2025-03-24 20:08:22 +01:00
Hanno Braun
a46ddfb88a
Merge pull request #2513 from hannobraun/dependabot/cargo/cargo-c0f61551f6
Bump log from 0.4.26 to 0.4.27 in the cargo group across 1 directory
2025-03-24 14:13:32 +01:00
dependabot[bot]
fbc6b6ab50
Bump log from 0.4.26 to 0.4.27 in the cargo group across 1 directory
Bumps the cargo group with 1 update in the / directory: [log](https://github.com/rust-lang/log).


Updates `log` from 0.4.26 to 0.4.27
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.26...0.4.27)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 13:09:51 +00:00
Hanno Braun
ccd94ef58b Re-use fj-viewer 2025-03-21 23:25:16 +01:00
Hanno Braun
c342108437 Add dependency on fj-viewer 2025-03-21 23:24:14 +01:00
Hanno Braun
d77b84a8f5 Re-use fj-export 2025-03-21 23:22:11 +01:00
Hanno Braun
bc451bb6a0 Make fj_export::export more convenient to call 2025-03-21 23:19:40 +01:00
Hanno Braun
e722e83432 Prepare to re-use fj-export 2025-03-21 23:14:46 +01:00
Hanno Braun
7e7828d79a Add dependency on fj-export 2025-03-21 23:13:30 +01:00
Hanno Braun
6460040f62 Remove redundant re-export 2025-03-21 23:11:20 +01:00
Hanno Braun
0a94adf4ea Remove redundant re-export 2025-03-21 23:10:17 +01:00
Hanno Braun
a46683aff3 Re-use fj_interop::TriMesh 2025-03-21 23:09:45 +01:00
Hanno Braun
3bba47254b Remove redundant re-export 2025-03-21 23:09:16 +01:00
Hanno Braun
e97a92111a Remove redundant re-export 2025-03-21 23:08:58 +01:00
Hanno Braun
a31f6f33a2 Re-use fj_interop::MeshTriangle 2025-03-21 23:07:29 +01:00
Hanno Braun
504b63895d Prepare to re-use fj_interop::MeshTriangle 2025-03-21 23:07:07 +01:00
Hanno Braun
d47b6c8b38 Add dependency on fj-interop 2025-03-21 23:05:04 +01:00
Hanno Braun
199abab1be Add TriMesh::external_triangles 2025-03-21 23:04:19 +01:00
Hanno Braun
6293a817b5 Add TriMesh::all_triangles 2025-03-21 23:03:24 +01:00
Hanno Braun
29366b4495 Add TriMesh::merge 2025-03-21 23:02:37 +01:00
Hanno Braun
d809428825 Remove redundant re-export 2025-03-21 23:00:17 +01:00
Hanno Braun
8b6a34d7aa Remove redundant module 2025-03-21 22:59:44 +01:00
Hanno Braun
6d0fd9b0a8 Re-use fj_math::Triangle 2025-03-21 22:58:42 +01:00
Hanno Braun
cfda8baaf4 Remove redundant re-export 2025-03-21 22:58:11 +01:00
Hanno Braun
99aec3adfb Remove redundant module 2025-03-21 22:58:11 +01:00
Hanno Braun
42956a7961 Re-use fj_math::Point 2025-03-21 22:58:11 +01:00
Hanno Braun
cd8e0ef734 Remove redundant re-export 2025-03-21 22:58:11 +01:00
Hanno Braun
553401d6e7 Remove redundant module 2025-03-21 22:58:11 +01:00
Hanno Braun
b6fe1e5580 Re-use fj_math::Vector 2025-03-21 22:52:26 +01:00
Hanno Braun
b3a354415d Relax type of function parameter 2025-03-21 22:51:39 +01:00
Hanno Braun
590425214d Reduce reliance on nalgebra 2025-03-21 22:51:23 +01:00
Hanno Braun
c93fc1a430 Make name of method parameter more explicit 2025-03-21 22:51:23 +01:00
Hanno Braun
efa69f3d8b Reduce reliance on nalgebra: 2025-03-21 22:51:23 +01:00
Hanno Braun
57ee42240f Reduce reliance on nalgebra 2025-03-21 22:51:23 +01:00
Hanno Braun
faec10f6b8 Make name of method parameter more explicit 2025-03-21 22:51:23 +01:00
Hanno Braun
034ed617c9 Reduce reliance on nalgebra 2025-03-21 22:51:23 +01:00
Hanno Braun
84341c01be Make name of method parameter more explicit 2025-03-21 22:51:23 +01:00
Hanno Braun
d84103ce6e Reduce reliance on nalgebra 2025-03-21 22:51:23 +01:00
Hanno Braun
7c17362693 Add dependency on iter_fixed to fj-math 2025-03-21 22:51:23 +01:00
Hanno Braun
6de6374e33 Make trait implementation a bit less dense 2025-03-21 22:39:29 +01:00
Hanno Braun
a31bf78a68 Reduce reliance on nalgebra 2025-03-21 22:38:20 +01:00
Hanno Braun
ca310683a0 Reduce reliance on nalgebra 2025-03-21 22:36:46 +01:00
Hanno Braun
e7cc574dbf Reduce reliance on nalgebra 2025-03-21 22:33:49 +01:00
Hanno Braun
38967c5b3b Reduce reliance on nalgebra 2025-03-21 22:32:16 +01:00
Hanno Braun
ae141905e8 Update documentation of Vector 2025-03-21 22:31:44 +01:00
Hanno Braun
db88b69e0b Update documentation of Point 2025-03-21 22:28:16 +01:00
Hanno Braun
3c1050d91f Remove unused method 2025-03-21 22:27:12 +01:00
Hanno Braun
d02593e9ca Remove redundant re-export 2025-03-21 22:22:55 +01:00
Hanno Braun
a94571674b Remove redundant module 2025-03-21 22:22:55 +01:00
Hanno Braun
a3f19e81bb Re-use fj_math::Scalar 2025-03-21 22:21:20 +01:00
Hanno Braun
e9c32da93b Make trait implementations a bit less dense 2025-03-21 22:17:51 +01:00
Hanno Braun
03c5752d8e Add Scalar::sqrt 2025-03-21 22:15:08 +01:00
Hanno Braun
4a2277d3e7 Prepare to re-use fj_math::Scalar 2025-03-21 22:13:15 +01:00
Hanno Braun
837a8df28c Prepare to re-use fj_math::Scalar 2025-03-21 22:12:42 +01:00
Hanno Braun
9547bccd2f Prepare to re-use fj_math::Scalar 2025-03-21 22:11:40 +01:00
Hanno Braun
82ca4ad0eb Prepare for follow-on change 2025-03-21 22:11:09 +01:00
Hanno Braun
50f5e3c0e2 Prepare to re-use fj_math::Scalar 2025-03-21 22:10:21 +01:00
Hanno Braun
6ee2db1efe Forbid Scalar from being infinite 2025-03-21 22:07:21 +01:00
Hanno Braun
1e93578e34 Remove unused code 2025-03-21 22:05:44 +01:00
Hanno Braun
c68d2d3821 Update doc comment 2025-03-21 22:05:15 +01:00
Hanno Braun
c3b89c1886 Update name of function parameter 2025-03-21 22:03:36 +01:00
Hanno Braun
d6a1906dbf Update name of function parameter 2025-03-21 22:03:19 +01:00
Hanno Braun
c253449e1b Convert tuple struct into regular struct 2025-03-21 22:02:47 +01:00
Hanno Braun
a4e39080d3 Improve panic message 2025-03-21 22:00:00 +01:00
Hanno Braun
b767214f90 Simplify 2025-03-21 21:51:26 +01:00
Hanno Braun
7da66f8427 Make panic more explicit 2025-03-21 21:50:52 +01:00
Hanno Braun
0b61f2ec61 Update documentation of Sign 2025-03-21 21:49:33 +01:00
Hanno Braun
48ed0ba7a0 Update documentation of Scalar 2025-03-21 21:49:21 +01:00
Hanno Braun
3b713ca7c2 Prepare to re-use mainline math types 2025-03-21 21:41:51 +01:00
Hanno Braun
4c53779f78 Add Triangle::center 2025-03-21 21:39:03 +01:00
Hanno Braun
0a4fe71bf1 Update doc comment 2025-03-21 21:38:00 +01:00
Hanno Braun
769cad1e3e Fix assumption that is no longer valid 2025-03-21 21:37:13 +01:00
Hanno Braun
e74020f960 Prepare for follow-on change 2025-03-21 21:35:11 +01:00
Hanno Braun
5a4e7856f6 Update documentation of Winding 2025-03-21 21:33:37 +01:00
Hanno Braun
f2218ee044 Update documentation of Triangle 2025-03-21 21:33:26 +01:00
Hanno Braun
65bb42ba54 Prepare to use TriMesh in latest experiment 2025-03-21 21:28:18 +01:00
Hanno Braun
5fe9676949 Inline redundant method 2025-03-21 21:25:56 +01:00
Hanno Braun
803115c89c Remove unused method 2025-03-21 21:23:40 +01:00
Hanno Braun
736027681c Avoid use of redundant method 2025-03-21 21:23:33 +01:00
Hanno Braun
59d7db6fac Avoid use of redundant method 2025-03-21 21:23:23 +01:00
Hanno Braun
b09fab773b Avoid more uses of redundant method 2025-03-21 21:23:10 +01:00
Hanno Braun
4bc5c13d2c Avoid use of redundant method 2025-03-21 21:22:18 +01:00
Hanno Braun
df92f84bcb Make field public 2025-03-21 21:21:59 +01:00
Hanno Braun
58dcdb2193 Inline redundant variable 2025-03-21 21:17:28 +01:00
Hanno Braun
1ae1836472 Update formatting of doc comment 2025-03-21 21:17:10 +01:00
Hanno Braun
78ee4aae2c Remove redundant code 2025-03-21 21:16:57 +01:00
Hanno Braun
a5d16b4e02 Remove unused methods 2025-03-21 21:16:30 +01:00
Hanno Braun
fa20b46ab8 Prepare to simplify TriMesh 2025-03-21 21:15:58 +01:00
Hanno Braun
2f72ff27ee Prepare to simplify TriMesh 2025-03-21 21:13:06 +01:00
Hanno Braun
dabfe125bb Update documentation of MeshTriangle 2025-03-21 21:08:08 +01:00
Hanno Braun
ce5ef9545f Simplify reference to type in doc comment 2025-03-21 21:06:50 +01:00
Hanno Braun
27d1b71100 Simplify imports 2025-03-21 21:06:42 +01:00
Hanno Braun
2e3784efbf Rename struct to avoid name collision 2025-03-21 21:05:36 +01:00
Hanno Braun
6814141c05 Group related items 2025-03-21 21:04:03 +01:00
Hanno Braun
b78fe6d7aa Move indexing logic from viewer to reusable fn 2025-03-21 21:03:00 +01:00
Hanno Braun
990350bcc3 Remove redundant block 2025-03-21 20:46:20 +01:00
Hanno Braun
5eeb421970 Update formatting of doc comment 2025-03-21 20:29:05 +01:00
Hanno Braun
06beb0b066 Update name of function parameter 2025-03-21 20:28:36 +01:00
Hanno Braun
0069af64f3 Inline redundant variable 2025-03-21 20:09:55 +01:00
Hanno Braun
8f3ad7b50d Prepare for follow-on change 2025-03-21 20:09:42 +01:00
Hanno Braun
1380c604d3 Update name of function parameter 2025-03-21 20:07:05 +01:00
Hanno Braun
ac47bd5798 Update name of function 2025-03-21 20:06:41 +01:00
Hanno Braun
95c8881d5b Update name of function parameter 2025-03-21 20:06:16 +01:00
Hanno Braun
357cca7dfe Update name of struct field 2025-03-21 20:05:54 +01:00
Hanno Braun
df41db657e Update formatting of doc comment 2025-03-21 20:05:36 +01:00
Hanno Braun
54a2fc9aa0 Update name of function parameter 2025-03-21 20:05:26 +01:00
Hanno Braun
f580ff9529 Update name of function parameter 2025-03-21 20:04:54 +01:00
Hanno Braun
2207642d44 Update doc comment 2025-03-21 20:04:36 +01:00
Hanno Braun
52c71a22db Update name of function parameter 2025-03-21 20:04:24 +01:00
Hanno Braun
834a197a43 Update name of module 2025-03-21 20:03:57 +01:00
Hanno Braun
75a57a5b0a Update name of function parameter 2025-03-21 20:03:09 +01:00
Hanno Braun
d0a9819515 Update formatting of doc comment 2025-03-21 20:02:49 +01:00
Hanno Braun
040204231e Update function parameter 2025-03-21 20:02:21 +01:00
Hanno Braun
51d8805846 Update formatting of doc comment 2025-03-21 20:02:07 +01:00
Hanno Braun
ee87416648 Update name of function parameter 2025-03-21 20:01:55 +01:00
Hanno Braun
8899d96bef Update formatting of doc comment 2025-03-21 20:01:15 +01:00
Hanno Braun
a7350719bb Rename Mesh to TriMesh
This is preparation for merging it with the `TriMesh` from the latest
experiment.
2025-03-21 19:59:36 +01:00
Hanno Braun
c1bae7c045 Update doc comment 2025-03-21 19:51:16 +01:00
Hanno Braun
3af81be955 Remove unused code 2025-03-21 19:45:30 +01:00
Hanno Braun
961d432f72 Replace each_ref_ext with each_ref 2025-03-21 19:44:47 +01:00
Hanno Braun
2cf1a0a3c0 Run cargo update 2025-03-21 19:42:59 +01:00
Hanno Braun
e0ff5df223 Run cargo update 2025-03-21 19:40:39 +01:00
Hanno Braun
96a0e8782c Run cargo fmt 2025-03-20 20:34:58 +01:00
Hanno Braun
cebf110378 Run cargo update 2025-03-20 20:34:35 +01:00
Hanno Braun
915c3af1ad Inline redundant function 2025-03-19 21:03:02 +01:00
Hanno Braun
5ca2dc1b46 Remove redundant code 2025-03-19 20:56:45 +01:00
Hanno Braun
008a4fae02 Simplify 2025-03-19 20:56:14 +01:00
Hanno Braun
48097c2271 Avoid use of redundant struct 2025-03-19 20:55:54 +01:00
Hanno Braun
bba0a3ca67 Update name of variable 2025-03-19 20:55:11 +01:00
Hanno Braun
1c1f78a211 Avoid use of redundant struct 2025-03-19 20:54:58 +01:00
Hanno Braun
59a0284e64 Avoid use of redundant struct 2025-03-19 20:54:21 +01:00
Hanno Braun
d50931c357 Update name of variable 2025-03-19 20:53:37 +01:00
Hanno Braun
4379efacc8 Simplify 2025-03-19 20:53:25 +01:00
Hanno Braun
2bb2899bcc Simplify function parameter 2025-03-19 20:51:09 +01:00
Hanno Braun
2d23e9f65f Simplify Mesh 2025-03-19 20:48:57 +01:00
Hanno Braun
ae0a88d270 Group related methods 2025-03-19 20:45:59 +01:00
Hanno Braun
1fb4845a30 Merge redundant impl blocks 2025-03-19 20:45:35 +01:00
Hanno Braun
2c228a6a76 Simplify Mesh 2025-03-19 20:45:18 +01:00
Hanno Braun
3a21d86393 Make use of Vertices more explicit 2025-03-19 20:44:30 +01:00
Hanno Braun
b3e765373e Simplify 2025-03-19 20:42:33 +01:00
Hanno Braun
8ff67e7626 Inline redundant function 2025-03-19 20:41:36 +01:00
Hanno Braun
3415afa7d3 Consolidate redundant code 2025-03-19 20:40:35 +01:00
Hanno Braun
daae63bcde Prepare to simplify Mesh 2025-03-19 20:39:33 +01:00
Hanno Braun
c77a0ed803 Prepare to simplify Mesh 2025-03-19 20:34:55 +01:00
Hanno Braun
14e2b3b6c8 Simplify 2025-03-19 20:21:21 +01:00
Hanno Braun
c221576858 Simplify 2025-03-19 20:20:14 +01:00
Hanno Braun
83ab6151b3 Prepare to simplify 2025-03-19 20:18:59 +01:00
Hanno Braun
9072dbda7c Remove redundant struct field 2025-03-19 20:14:20 +01:00
Hanno Braun
42d712812e Avoid use of redundant struct field 2025-03-19 20:12:48 +01:00
Hanno Braun
961ab38826 Avoid use of redundant struct field 2025-03-19 20:12:18 +01:00
Hanno Braun
bf65384755 Avoid use of redundant struct field 2025-03-19 20:11:29 +01:00
Hanno Braun
1cea537b4b Update name of variable 2025-03-19 20:10:13 +01:00
Hanno Braun
8ba3315874 Add Mesh::aabb 2025-03-19 20:08:25 +01:00
Hanno Braun
8ae28c11f5 Remove redundant re-export 2025-03-19 20:05:01 +01:00
Hanno Braun
5dbc18a8cc Remove redundant re-export 2025-03-19 20:03:50 +01:00
Hanno Braun
204b2bbf8d Remove redudnant re-export 2025-03-19 20:03:03 +01:00
Hanno Braun
6f9e6eafaf Remove redundant re-export 2025-03-19 20:02:22 +01:00
Hanno Braun
f413115baa Remove redundant re-export 2025-03-19 20:01:11 +01:00
Hanno Braun
1a7bd9e5e7 Remove redundant re-export 2025-03-19 20:00:39 +01:00
Hanno Braun
f6a1c46fe8 Remove redundant re-export 2025-03-19 19:59:58 +01:00
Hanno Braun
bcca085001 Remove redundant re-export 2025-03-19 19:59:20 +01:00
Hanno Braun
f6484d171d Remove unused code 2025-03-19 19:58:32 +01:00
Hanno Braun
9cbe5e0e81 Remove unused re-exports 2025-03-19 19:56:49 +01:00
Hanno Braun
e613746294 Remove unused dependencies 2025-03-19 19:55:02 +01:00
Hanno Braun
8e68d9758d Remove unused dependency declaration 2025-03-19 19:54:45 +01:00
Hanno Braun
7fb5388df2 Remove fj-window from default-members 2025-03-19 19:54:28 +01:00
Hanno Braun
c54c8c7150 Merge fj-window into fj-viewer 2025-03-19 19:54:11 +01:00
Hanno Braun
7bba23a723 Run cargo update 2025-03-19 19:35:55 +01:00
Hanno Braun
1e26d8a49c Run cargo update 2025-03-19 19:29:14 +01:00
Hanno Braun
49a56ba33e Simplify directory structure 2025-03-18 22:04:32 +01:00
Hanno Braun
e2f4045b29 Inline redundant module 2025-03-18 22:04:32 +01:00
Hanno Braun
bdcd506ad2 Update module name 2025-03-18 22:04:32 +01:00
Hanno Braun
501a89cce3 Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
74c1315113 Merge related modules 2025-03-18 22:04:32 +01:00
Hanno Braun
cd1027e970 Update name of trait 2025-03-18 22:04:32 +01:00
Hanno Braun
14e698e8a0 Make name of trait method more specific 2025-03-18 22:04:32 +01:00
Hanno Braun
2e8e4f4180 Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
45d5425d7a Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
07b2b46b7e Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
d438a87798 Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
eda733e9f0 Consolidate redundant code 2025-03-18 22:04:32 +01:00
Hanno Braun
0d0d5b3183 Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
c3ac8defcd Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
01d8b125bc Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
40cfb0eb33 Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
8a88af9908 Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
b8d8cb3550 Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
44ab4227da Simplify 2025-03-18 22:04:32 +01:00
Hanno Braun
2b0c5bdbf7 Remove redundant code 2025-03-18 22:04:32 +01:00
Hanno Braun
e260017612 Remove redundant code 2025-03-18 22:04:32 +01:00
Hanno Braun
3dd03182c6 Remove redundant code 2025-03-18 22:04:32 +01:00
Hanno Braun
4f78311745 Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
14cf68b8b7 Remove unused code 2025-03-18 22:04:32 +01:00
Hanno Braun
dd3ca696ad Remove object tree 2025-03-18 22:04:32 +01:00
Hanno Braun
67c2327b9a Start new experiment as copy of previous one 2025-03-18 22:04:32 +01:00
Hanno Braun
22a9c5506f
Merge pull request #2511 from hannobraun/dependabot/cargo/zip-2.4.1
Bump zip from 2.2.1 to 2.4.1
2025-03-18 11:20:40 +01:00
Hanno Braun
5524057c90
Merge pull request #2510 from hannobraun/dependabot/cargo/experiments/2024-10-30/zip-2.4.1
Bump zip from 2.2.1 to 2.4.1 in /experiments/2024-10-30
2025-03-18 11:20:16 +01:00
dependabot[bot]
3257618f8b
Bump zip from 2.2.1 to 2.4.1
Bumps [zip](https://github.com/zip-rs/zip2) from 2.2.1 to 2.4.1.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.2.1...v2.4.1)

---
updated-dependencies:
- dependency-name: zip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 00:19:07 +00:00
dependabot[bot]
81cbd467ae
Bump zip from 2.2.1 to 2.4.1 in /experiments/2024-10-30
Bumps [zip](https://github.com/zip-rs/zip2) from 2.2.1 to 2.4.1.
- [Release notes](https://github.com/zip-rs/zip2/releases)
- [Changelog](https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zip-rs/zip2/compare/v2.2.1...v2.4.1)

---
updated-dependencies:
- dependency-name: zip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 00:18:38 +00:00
Hanno Braun
3687f11919 Add README for latest experiment 2025-03-17 20:30:03 +01:00
Hanno Braun
95951c0c60 Add screenshot 2025-03-17 20:30:03 +01:00
Hanno Braun
53b3a55250 Document code of current experiment 2025-03-17 20:30:03 +01:00
Hanno Braun
cf7c1f6d52 Run cargo update 2025-03-17 20:30:03 +01:00
Hanno Braun
8245c09b0d
Merge pull request #2509 from hannobraun/dependabot/cargo/cargo-dd8805b4ca
Bump the cargo group with 4 updates
2025-03-17 14:05:32 +01:00
dependabot[bot]
e5caa26560
Bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [clap](https://github.com/clap-rs/clap), [tokio](https://github.com/tokio-rs/tokio), [tempfile](https://github.com/Stebalien/tempfile) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `clap` from 4.5.31 to 4.5.32
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.31...clap_complete-v4.5.32)

Updates `tokio` from 1.44.0 to 1.44.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.44.0...tokio-1.44.1)

Updates `tempfile` from 3.18.0 to 3.19.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.18.0...v3.19.0)

Updates `reqwest` from 0.12.12 to 0.12.14
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.12.14/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.12...v0.12.14)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 13:02:18 +00:00
Hanno Braun
18336c0be5
Merge pull request #2506 from hannobraun/dependabot/cargo/cargo-3f9d8ab5b5
Bump the cargo group with 5 updates
2025-03-10 20:53:02 +01:00
dependabot[bot]
04ee444a16
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [spade](https://github.com/Stoeoef/spade) | `2.13.0` | `2.13.1` |
| [semver](https://github.com/dtolnay/semver) | `1.0.25` | `1.0.26` |
| [serde](https://github.com/serde-rs/serde) | `1.0.218` | `1.0.219` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.43.0` | `1.44.0` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.17.1` | `3.18.0` |


Updates `spade` from 2.13.0 to 2.13.1
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `semver` from 1.0.25 to 1.0.26
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.25...1.0.26)

Updates `serde` from 1.0.218 to 1.0.219
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.218...v1.0.219)

Updates `tokio` from 1.43.0 to 1.44.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.44.0)

Updates `tempfile` from 3.17.1 to 3.18.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.17.1...v3.18.0)

---
updated-dependencies:
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 13:00:25 +00:00
Hanno Braun
f2b61e5729 Run cargo update 2025-03-07 20:03:17 +01:00
Hanno Braun
dc2a7aa0ef
Merge pull request #2505 from hannobraun/dependabot/cargo/ring-0.17.13
Bump ring from 0.17.8 to 0.17.13
2025-03-07 19:04:12 +01:00
dependabot[bot]
70c2dc50be
Bump ring from 0.17.8 to 0.17.13
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 17:03:51 +00:00
Hanno Braun
8f7f723ad4
Merge pull request #2504 from hannobraun/dependabot/cargo/cargo-2658d3d3bb
Bump the cargo group with 7 updates
2025-03-03 13:50:46 +01:00
dependabot[bot]
3c6841f9ad
Bump the cargo group with 7 updates
Bumps the cargo group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.11` | `2.0.12` |
| [clap](https://github.com/clap-rs/clap) | `4.5.30` | `4.5.31` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.96` | `1.0.97` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.21.0` | `1.22.0` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.39` | `0.4.40` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.139` | `1.0.140` |
| [cargo_metadata](https://github.com/oli-obk/cargo_metadata) | `0.19.1` | `0.19.2` |


Updates `thiserror` from 2.0.11 to 2.0.12
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.11...2.0.12)

Updates `clap` from 4.5.30 to 4.5.31
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.30...v4.5.31)

Updates `anyhow` from 1.0.96 to 1.0.97
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.96...1.0.97)

Updates `bytemuck` from 1.21.0 to 1.22.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.21.0...v1.22.0)

Updates `chrono` from 0.4.39 to 0.4.40
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.39...v0.4.40)

Updates `serde_json` from 1.0.139 to 1.0.140
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.139...v1.0.140)

Updates `cargo_metadata` from 0.19.1 to 0.19.2
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.19.1...0.19.2)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: cargo_metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 12:22:46 +00:00
Hanno Braun
b23fa6c935 Consolidate function parameters 2025-02-28 21:14:06 +01:00
Hanno Braun
4a108d7b0a Prepare to support curved surfaces 2025-02-28 21:12:10 +01:00
Hanno Braun
e593aa9760 Prepare for follow-on change 2025-02-28 21:10:39 +01:00
Hanno Braun
d448898fde Prepare for follow-on change 2025-02-28 21:09:47 +01:00
Hanno Braun
2daed619c9 Group related code 2025-02-28 21:01:10 +01:00
Hanno Braun
96b89bfc36 Update type of function parameter 2025-02-28 21:00:30 +01:00
Hanno Braun
c94e60b18d Group related code 2025-02-28 20:59:20 +01:00
Hanno Braun
635d18e8bb Update type of function parameter 2025-02-28 20:58:30 +01:00
Hanno Braun
f90ac3c3f8 Wrap Surface in Face in Handle 2025-02-28 20:56:27 +01:00
Hanno Braun
02eecbb5d3 Bundle related code 2025-02-28 20:54:45 +01:00
Hanno Braun
66395df2c2 Bundle related code 2025-02-28 20:51:03 +01:00
Hanno Braun
7c05520554 Prepare to support curved surfaces 2025-02-28 20:50:26 +01:00
Hanno Braun
9ba7e0873e Prepare to support curved surfaces 2025-02-28 20:49:04 +01:00
Hanno Braun
640c124c5f Prepare for follow-on change 2025-02-28 20:48:26 +01:00
Hanno Braun
6cb0cd294a Implement TranslateExt for Surface 2025-02-28 20:47:58 +01:00
Hanno Braun
9cd32b0f4a Split expression into simpler ones 2025-02-28 20:47:50 +01:00
Hanno Braun
eec01461f5 Prepare for follow-on change 2025-02-28 20:46:15 +01:00
Hanno Braun
6039b5029e Implement FlipExt for Surface 2025-02-28 20:46:03 +01:00
Hanno Braun
db90ad663b Make FlipExt more flexible 2025-02-28 20:45:09 +01:00
Hanno Braun
ce305fc4fb Simplify 2025-02-28 20:44:53 +01:00
Hanno Braun
502a1af4b1 Prepare to support curved surfaces 2025-02-28 20:41:25 +01:00
Hanno Braun
3f07e9c6ee Add Surface 2025-02-28 20:39:34 +01:00
Hanno Braun
faeedbacff Run cargo update 2025-02-28 20:34:34 +01:00
Hanno Braun
ad8efe57df Run cargo update 2025-02-27 19:48:49 +01:00
Hanno Braun
436a4814d7 Remove redundant #[allow(unused)] 2025-02-25 13:05:04 +01:00
Hanno Braun
f66afe4369 Only export external triangles 2025-02-25 13:04:38 +01:00
Hanno Braun
ccb945f962 Fix tracking of internal half-edges 2025-02-25 13:04:24 +01:00
Hanno Braun
2d98aad2da Add TriMesh::all_triangles 2025-02-25 12:33:01 +01:00
Hanno Braun
a79a1b518f Derive Copy for Triangle 2025-02-25 12:32:34 +01:00
Hanno Braun
ea890bc4d6 Track internal triangles 2025-02-25 12:28:54 +01:00
Hanno Braun
65afe70951 Consolidate function parameters 2025-02-25 12:27:24 +01:00
Hanno Braun
ab8b2b9b9c Prepare to track internal triangles 2025-02-25 12:26:16 +01:00
Hanno Braun
4b8c25c89d Make code more explicit 2025-02-25 12:22:52 +01:00
Hanno Braun
fdd0338da5 Track internal faces 2025-02-25 12:21:38 +01:00
Hanno Braun
a0d5716687 Document precondition 2025-02-25 12:20:42 +01:00
Hanno Braun
23cf4d5993 Check precondition 2025-02-25 12:20:05 +01:00
Hanno Braun
214e2e18fa Update doc comment 2025-02-25 12:19:48 +01:00
Hanno Braun
182c181e6e Return move information from function 2025-02-25 12:15:52 +01:00
Hanno Braun
2744820542 Prepare for follow-on change 2025-02-25 12:13:54 +01:00
Hanno Braun
e8c7a793d1 Update name of function 2025-02-25 12:12:54 +01:00
Hanno Braun
368364e53a Remove redundant function 2025-02-24 20:17:19 +01:00
Hanno Braun
4cbd9be397 Remove redundant function 2025-02-24 20:16:10 +01:00
Hanno Braun
3241281563 Prepare to simplify Face 2025-02-24 20:15:41 +01:00
Hanno Braun
af36d953f3 Track internal half-edges 2025-02-24 20:13:47 +01:00
Hanno Braun
4f6c73dcbd Prepare for follow-on change 2025-02-24 20:09:43 +01:00
Hanno Braun
25542f76a0 Prepare for follow-on change 2025-02-24 20:08:44 +01:00
Hanno Braun
8dbb2e4a95 Prepare for follow-on change 2025-02-24 20:05:27 +01:00
Hanno Braun
1f914948c7 Update name of function parameter 2025-02-24 20:05:12 +01:00
Hanno Braun
37226202b6 Prepare for follow-on change 2025-02-24 19:40:21 +01:00
Hanno Braun
ec8d9ca59c Update formatting 2025-02-24 19:35:07 +01:00
Hanno Braun
20ad5a3572 Simplify 2025-02-24 19:33:30 +01:00
Hanno Braun
1f59100a90 Simplify 2025-02-24 19:32:50 +01:00
Hanno Braun
3e3180a935 Prepare to simplify HalfEdge 2025-02-24 19:32:03 +01:00
Hanno Braun
0b1ad8ba77 Inline redundant variable 2025-02-24 19:30:42 +01:00
Hanno Braun
496b20f0b8 Update name of function parameter 2025-02-24 19:30:29 +01:00
Hanno Braun
ffdfb7e2d6 Implement TranslateExt for HalfEdge 2025-02-24 19:30:07 +01:00
Hanno Braun
f23ab21a31 Relax self parameter 2025-02-24 19:29:28 +01:00
Hanno Braun
4b06e74827 Inline redundant variable 2025-02-24 19:27:51 +01:00
Hanno Braun
46429d0aa4 Simplify 2025-02-24 19:27:42 +01:00
Hanno Braun
a72690f074 Update name of variable 2025-02-24 19:27:13 +01:00
Hanno Braun
634c427e11 Update type of function parameter 2025-02-24 19:26:21 +01:00
Hanno Braun
3754d9e9b2 Implement TranslateExt for Vertex 2025-02-24 19:24:07 +01:00
Hanno Braun
dd0074abdd Remove unused code 2025-02-24 19:21:14 +01:00
Hanno Braun
07096243b1 Add Vertex::new 2025-02-24 19:21:01 +01:00
Hanno Braun
58902150ba Make TranslateExt more flexible 2025-02-24 19:19:12 +01:00
Hanno Braun
8f48c887f3 Simplify 2025-02-24 19:18:56 +01:00
Hanno Braun
21da909b46 Update name of function parameter 2025-02-24 19:18:08 +01:00
Hanno Braun
da2ca4c2b6 Update return type 2025-02-24 19:17:30 +01:00
Hanno Braun
0b57144e36 Implement Object for HalfEdge 2025-02-24 19:17:03 +01:00
Hanno Braun
193c428189 Remove redundant code 2025-02-24 19:11:37 +01:00
Hanno Braun
84c30f0bbb Update name of function parameter 2025-02-24 19:11:11 +01:00
Hanno Braun
3b0427c323 Update name of function parameter 2025-02-24 19:10:57 +01:00
Hanno Braun
46893b0892 Update name of function parameter 2025-02-24 19:10:44 +01:00
Hanno Braun
bd38c93cff Prepare to improve triangulation
Accepting half-edges as arguments will allow not adding internal
half-edges as constraint edges, once that information becomes available.
2025-02-24 19:09:46 +01:00
Hanno Braun
84a3f429d9 Update name of function 2025-02-24 19:07:51 +01:00
Hanno Braun
0c85f0c33a Update name of method 2025-02-24 19:07:13 +01:00
Hanno Braun
a089dde7bf Update name of variable 2025-02-24 19:05:51 +01:00
Hanno Braun
f4d7d19d77 Update name of struct field 2025-02-24 19:05:33 +01:00
Hanno Braun
bce3e7a158 Add HalfEdge, add it to Face 2025-02-24 19:05:33 +01:00
Hanno Braun
8d54268c72 Simplify 2025-02-24 19:03:52 +01:00
Hanno Braun
8ae9cabd8f Prepare for follow-on change 2025-02-24 18:59:53 +01:00
Hanno Braun
f9de0c18d9 Run cargo update 2025-02-24 18:55:05 +01:00
Hanno Braun
27cb9245b9 Update list of sponsors 2025-02-24 18:48:10 +01:00
Hanno Braun
584dd736a3
Merge pull request #2503 from hannobraun/dependabot/cargo/cargo-3f13db83a9
Bump the cargo group with 7 updates
2025-02-24 17:57:55 +01:00
dependabot[bot]
c8122e4d8e
Bump the cargo group with 7 updates
Bumps the cargo group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.29` | `4.5.30` |
| [spade](https://github.com/Stoeoef/spade) | `2.12.1` | `2.13.0` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.95` | `1.0.96` |
| [log](https://github.com/rust-lang/log) | `0.4.25` | `0.4.26` |
| [serde](https://github.com/serde-rs/serde) | `1.0.217` | `1.0.218` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.138` | `1.0.139` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.17.0` | `3.17.1` |


Updates `clap` from 4.5.29 to 4.5.30
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.29...clap_complete-v4.5.30)

Updates `spade` from 2.12.1 to 2.13.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits/v2.13.0)

Updates `anyhow` from 1.0.95 to 1.0.96
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.95...1.0.96)

Updates `log` from 0.4.25 to 0.4.26
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.25...0.4.26)

Updates `serde` from 1.0.217 to 1.0.218
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.217...v1.0.218)

Updates `serde_json` from 1.0.138 to 1.0.139
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.138...v1.0.139)

Updates `tempfile` from 3.17.0 to 3.17.1
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.17.0...v3.17.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 15:10:15 +00:00
Hanno Braun
b5965d34b6 Add comment 2025-02-21 21:45:49 +01:00
Hanno Braun
42d366d684 Remove stale comment 2025-02-21 21:45:19 +01:00
Hanno Braun
913485896b Derive Debug for TriMesh 2025-02-21 21:44:57 +01:00
Hanno Braun
9ad7a4990b Split statement into simpler ones 2025-02-21 21:29:26 +01:00
Hanno Braun
15e206d700 Add support for concave faces
There's still something wrong with the model, but that face is
definitely concave!
2025-02-21 21:27:59 +01:00
Hanno Braun
cf744d54ae Prepare to support concave faces 2025-02-21 21:21:08 +01:00
Hanno Braun
036da1fe38 Make conversion to triangle generic over dimension 2025-02-21 21:03:40 +01:00
Hanno Braun
3ec83390b9 Make Triangle generic over dimension 2025-02-21 21:03:11 +01:00
Hanno Braun
4d031346d1 Derive Ord for TriangulationPoint 2025-02-21 20:53:30 +01:00
Hanno Braun
8f3ff8be4f Derive Eq for TriangulationPoint 2025-02-21 20:53:12 +01:00
Hanno Braun
08b44c4928 Split function into simpler ones 2025-02-21 20:51:14 +01:00
Hanno Braun
2a43f8bc24 Derive Copy for TriangulationPoint 2025-02-21 20:50:38 +01:00
Hanno Braun
790a3c3c5c Remove redundant type annotation 2025-02-21 20:41:17 +01:00
Hanno Braun
ff386ae051 Prepare to expand triangulation code 2025-02-21 20:41:04 +01:00
Hanno Braun
e32bd5d649 Prepare for follow-on change 2025-02-21 20:40:17 +01:00
Hanno Braun
ace80850de Simplify 2025-02-21 20:38:58 +01:00
Hanno Braun
3c06851a9b Simplify 2025-02-21 20:38:08 +01:00
Hanno Braun
4aae29cacf Add dependency on geo 2025-02-21 20:34:28 +01:00
Hanno Braun
6f272341cf Run cargo update 2025-02-21 20:24:16 +01:00
Hanno Braun
5be067f16a Upgrade to 2024 edition 2025-02-20 19:28:48 +01:00
Hanno Braun
5269f6d0d1 Require rust-analyzer to be installed
This is required for my configuration with Zed on NixOS.
2025-02-20 19:27:44 +01:00
Hanno Braun
cf384bab53 Sort components alphabetically 2025-02-20 19:26:44 +01:00
Hanno Braun
5a58baaeee Auto-format according to 2024 edition style 2025-02-20 19:26:08 +01:00
Hanno Braun
7ac23f73df Upgrade to 2024 edition 2025-02-20 19:25:18 +01:00
Hanno Braun
09288f1283 Upgrade to Rust 1.85.0 2025-02-20 19:23:59 +01:00
Hanno Braun
ad4c798254 Prevent new Clippy warnings
I'm currently working on an upgrade to 1.85.0, and this change prevents
some warnings from appearing.
2025-02-20 19:19:06 +01:00
Hanno Braun
9edcb4a9c9 Run cargo update 2025-02-20 19:01:37 +01:00
Hanno Braun
abc9bdeafa Split statement into simpler ones 2025-02-19 21:54:56 +01:00
Hanno Braun
c1af8b277e Update formatting 2025-02-19 21:52:58 +01:00
Hanno Braun
ba8441c396 Move triangulation code to dedicated module 2025-02-19 21:48:15 +01:00
Hanno Braun
fed5b037f7 Add hole to sketch
Since convex faces aren't supported yet, this doesn't carry over to the
3D model correctly. In fact, it leads to weird visual artifacts and
breaks the exported 3MF model.

But that's fine for now. I'm going to work on fixing all of this now.
2025-02-19 21:29:10 +01:00
Hanno Braun
bff0881de9 Enlarge model 2025-02-19 21:18:44 +01:00
Hanno Braun
48f6b45286 Prepare to enlarge model 2025-02-19 21:17:29 +01:00
Hanno Braun
9cc96823cc Update name of module 2025-02-18 20:48:48 +01:00
Hanno Braun
e48670d7d4 Rename Operation to Object 2025-02-18 20:47:34 +01:00
Hanno Braun
639996caf1 Remove unused code 2025-02-18 20:45:08 +01:00
Hanno Braun
e103fe7555 Remove redundant calls 2025-02-18 20:44:19 +01:00
Hanno Braun
a079d80b15 Remove redundant calls 2025-02-18 20:43:04 +01:00
Hanno Braun
30dc94623c Remove redundant call 2025-02-18 20:42:30 +01:00
Hanno Braun
f0621bb0fb Remove redundant calls 2025-02-18 20:41:58 +01:00
Hanno Braun
d885aa558a Switch back to stable Rust
The simplification of `Handle` means we're no longer using any features
from nightly.
2025-02-18 20:30:39 +01:00
Hanno Braun
9c50d2164d Simplify Handle 2025-02-18 20:28:57 +01:00
Hanno Braun
93f15fabf5 Remove unused code 2025-02-18 20:28:16 +01:00
Hanno Braun
65df984746 Consolidate operations in dedicated module 2025-02-18 20:22:30 +01:00
Hanno Braun
c967076571 Prepare for follow-on change 2025-02-18 20:20:43 +01:00
Hanno Braun
c530f1520d Simplify return type of TranslateExt::translate 2025-02-18 20:20:05 +01:00
Hanno Braun
36e8d6aa15 Remove unused code 2025-02-18 20:19:37 +01:00
Hanno Braun
68b9af251a Simplify return value of TranslateExt::translate 2025-02-18 20:19:01 +01:00
Hanno Braun
580c713514 Simplify implementation of TranslateExt 2025-02-18 20:18:22 +01:00
Hanno Braun
89d13dee02 Simplify return value of Flip::flip 2025-02-18 20:17:45 +01:00
Hanno Braun
72de73c364 Remove unused code 2025-02-18 20:17:14 +01:00
Hanno Braun
d4d09ca89d Simplify return value of Flip::flip 2025-02-18 20:16:57 +01:00
Hanno Braun
c3836c9abf Remove redundant calls 2025-02-18 20:16:11 +01:00
Hanno Braun
0be4d5dacb Simplify implementation of Flip 2025-02-18 20:15:31 +01:00
Hanno Braun
ee6f74a104 Implement Deref for Handle 2025-02-18 20:15:16 +01:00
Hanno Braun
c93f8e1cc5 Prepare to for follow-on change 2025-02-18 20:12:19 +01:00
Hanno Braun
41a3b682f1 Update imports 2025-02-18 20:11:39 +01:00
Hanno Braun
a556176594 Update imports 2025-02-18 20:10:29 +01:00
Hanno Braun
c0dcc77f6c Remove unused code 2025-02-18 20:08:27 +01:00
Hanno Braun
1fddd302e6 Simplify return value of SweepExt::sweep 2025-02-18 20:07:59 +01:00
Hanno Braun
460084d11c Simplify return value of ConnectExt::connect 2025-02-18 20:06:52 +01:00
Hanno Braun
fe597c4fd4 Remove unused code 2025-02-18 20:06:15 +01:00
Hanno Braun
85c7253bcf Simplify return value of ConnectExt::connect 2025-02-18 20:05:37 +01:00
Hanno Braun
e9fde5da24 Prepare to simplify operations 2025-02-18 20:04:50 +01:00
Hanno Braun
188dcd3f81 Derive Clone for Solid 2025-02-18 20:04:32 +01:00
Hanno Braun
1e1c811830 Group related code in block 2025-02-18 20:01:55 +01:00
Hanno Braun
20fa25a0b0 Simplify 2025-02-18 20:01:06 +01:00
Hanno Braun
3e5eeee6f2 Run cargo update 2025-02-18 19:55:11 +01:00
Hanno Braun
f149e46cf1 Remove unused trait implementations 2025-02-17 22:03:56 +01:00
Hanno Braun
ee2a26d75f Prepare for follow-on change 2025-02-17 21:56:50 +01:00
Hanno Braun
16b6aa1c76 Prepare for follow-on change 2025-02-17 21:56:18 +01:00
Hanno Braun
eb26d50ee9 Simplify Sweep 2025-02-17 21:54:01 +01:00
Hanno Braun
03395f4384 Derive Clone for Connect 2025-02-17 21:53:47 +01:00
Hanno Braun
df11742d14 Remove unused code 2025-02-17 21:52:46 +01:00
Hanno Braun
dbc5f6656e Simplify operation tree 2025-02-17 21:52:18 +01:00
Hanno Braun
53acdf396f Run cargo update 2025-02-17 21:35:25 +01:00
Hanno Braun
1e36cb0b51
Merge pull request #2502 from hannobraun/dependabot/cargo/cargo-297a19538e
Bump the cargo group with 2 updates
2025-02-17 13:41:11 +01:00
dependabot[bot]
4c4fba10e4
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [clap](https://github.com/clap-rs/clap) and [tempfile](https://github.com/Stebalien/tempfile).


Updates `clap` from 4.5.28 to 4.5.29
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.28...clap_complete-v4.5.29)

Updates `tempfile` from 3.16.0 to 3.17.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.16.0...v3.17.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 12:32:42 +00:00
Hanno Braun
5043965ac0 Be more explicit about sweep output in tree 2025-02-13 19:19:42 +01:00
Hanno Braun
80caef1119 Move HandleAny to dedicated module 2025-02-13 19:08:23 +01:00
Hanno Braun
4e68b1ba78 Simplify 2025-02-13 19:06:18 +01:00
Hanno Braun
f57664c0c9 Move Handle to dedicated module 2025-02-13 19:06:09 +01:00
Hanno Braun
1527528c53 Move operation traits to dedicated module 2025-02-13 19:04:21 +01:00
Hanno Braun
5d2523a1f3 Prepare to clean up operation module 2025-02-13 19:02:36 +01:00
Hanno Braun
76f38fbc9a Move operation module to top-level 2025-02-13 19:02:06 +01:00
Hanno Braun
891b004592 Remove redundant Deref implementation 2025-02-13 18:54:14 +01:00
Hanno Braun
65c83e9dd5 Avoid use of redundant Deref implementation 2025-02-13 18:54:05 +01:00
Hanno Braun
e1c2e28091 Implement OperationOutput for Handle 2025-02-13 18:51:34 +01:00
Hanno Braun
c0944fd72c Implement Operation for Handle 2025-02-13 18:51:23 +01:00
Hanno Braun
5e623cee1e Rename AnyOp to HandleAny 2025-02-13 18:50:46 +01:00
Hanno Braun
6b9262a2bf Remove errant character in comment 2025-02-13 18:26:05 +01:00
Hanno Braun
f9e7aa4f9c Make Translate show up in operations tree 2025-02-12 21:14:41 +01:00
Hanno Braun
4416110980 Prepare for follow-on change 2025-02-12 21:11:20 +01:00
Hanno Braun
4ffeaa4a04 Simplify 2025-02-12 20:53:04 +01:00
Hanno Braun
ab0308ad80 Make TranslateExt implementation more flexible 2025-02-12 20:52:50 +01:00
Hanno Braun
998d19ceee Simplify 2025-02-12 20:51:40 +01:00
Hanno Braun
d4660a5601 Make FlipExt implementation more flexible 2025-02-12 20:51:16 +01:00
Hanno Braun
fb712859a2 Implement OperationOutput for Translate 2025-02-12 20:48:36 +01:00
Hanno Braun
b6a1e86cc5 Implement Operation for Translate 2025-02-12 20:47:44 +01:00
Hanno Braun
974219a78d Add Translate 2025-02-12 20:46:30 +01:00
Hanno Braun
c2bf687171 Prepare to add Translate operation 2025-02-12 20:45:07 +01:00
Hanno Braun
f04129884f Inline redundant function 2025-02-12 20:44:09 +01:00
Hanno Braun
55684c17c6 Simplify 2025-02-12 20:43:21 +01:00
Hanno Braun
58fc23863c Prepare for follow-on change 2025-02-12 20:43:08 +01:00
Hanno Braun
93d7e6af94 Prepare for follow-on change 2025-02-12 20:42:54 +01:00
Hanno Braun
9cef834cb5 Add TranslateExt 2025-02-12 20:42:10 +01:00
Hanno Braun
0f586d64c8 Implement OperationOutput for Flip 2025-02-12 20:37:14 +01:00
Hanno Braun
68d3c49c3c Implement Operation for Flip 2025-02-12 20:35:44 +01:00
Hanno Braun
99578ff96d Add Flip 2025-02-12 20:33:43 +01:00
Hanno Braun
c25d1167e0 Prepare to add Flip operation 2025-02-12 20:32:28 +01:00
Hanno Braun
a7387eadfc Inline redundant function 2025-02-12 20:30:57 +01:00
Hanno Braun
00d908d61b Add Face::surface 2025-02-12 20:29:41 +01:00
Hanno Braun
fff88fa536 Remove redundant #[allow(unused)] 2025-02-12 20:29:05 +01:00
Hanno Braun
b3259c11e4 Prepare for follow-on change 2025-02-12 20:28:55 +01:00
Hanno Braun
d947722c2b Prepare for follow-on change 2025-02-12 20:27:57 +01:00
Hanno Braun
ca5b07d68e Add FlixExt 2025-02-12 20:27:18 +01:00
Hanno Braun
fda0a34d42 Prepare for follow-on change 2025-02-12 20:26:03 +01:00
Hanno Braun
5b2b8ec309 Run cargo update 2025-02-12 20:22:43 +01:00
Hanno Braun
4083d2b4a4 Update Handle<T>, so that T is the output type
`Handle<T>` is a type that serves as a handle (as the name suggests) for
operations. So far, the operation that a `Handle<T>` referred to, was
always of type `T`. This is a problem, given what I'm trying to do with
operations in this experiment.

Unlike the current mainline code, where operations are just
"code that transforms objects", I want to reify operations. They should
be concrete things that you can see (right now, in the debug viewer's
operation tree) and (later on) refer to and build upon.

Let's use the example of translating faces, to understand what the
problem is.

If the translate operation is just a piece of code that transforms one
face into another, then any other operation that expects to operate on a
face can receive the output of that operation. Because it's just a face.

But if the translate operation is a concrete thing in a tree of
operations, then it's not as simple. Because that other operation, that
expects to operate on a face, it can't _just_ operate on faces. It needs
to be able to operate on any nested operation that _produces_ a face.
Like our example translate operation.

And this is what this change to `Handle<T>` enables. Where previously,
its type would have been `Handle<Translate>`, because `Translate` (in
this example) is the operation it refers to; it's now `Handle<Face>`,
because `Face` is the output that `Translate` produces.

So this new version of `Handle<T>` abstracts over the concrete operation
it refers to, only exposing what that operation's output is. That means
our example `Translate` operation can now be treated just like a `Face`,
or any other operation that produces a `Face`.
2025-02-10 20:53:34 +01:00
Hanno Braun
d8c511708b Prepare for follow-on change
I'm about to make a change that adds metadata to these pointers.
Comparing them with that metadata included leads to a warning, and that
warning is what this change avoids.
2025-02-10 20:52:50 +01:00
Hanno Braun
2dd604b19b Switch to nightly toolchain
I would like to use trait upcasting:
https://github.com/rust-lang/rust/issues/65991

Which has already been stabilized:
https://github.com/rust-lang/rust/pull/134367

This happened only a few days ago, so the feature is not available on
stable yet.
2025-02-10 20:31:34 +01:00
Hanno Braun
fb0beb8572 Unconditionally implement Ord for Handle 2025-02-10 20:18:57 +01:00
Hanno Braun
2f409a8b15 Unconditionally implement Eq for Handle 2025-02-10 20:18:51 +01:00
Hanno Braun
32f2e92d64 Unconditionally implement Debug for Handle 2025-02-10 20:14:02 +01:00
Hanno Braun
4bbf41644f Sort trait implementations alphabetically 2025-02-10 20:10:38 +01:00
Hanno Braun
a3d9ea4674 Avoid using Plane with Handle
`Plane` is not an operation (i.e. it doesn't implement the `Operation`
trait), and I'm working on change that will restrict `Handle` to working
with operations.
2025-02-10 20:08:00 +01:00
Hanno Braun
e1daf4ba91 Run cargo update 2025-02-10 19:22:31 +01:00
Hanno Braun
c10f095ec4 Update list of sponsors 2025-02-10 19:15:05 +01:00
Hanno Braun
caeb172bf4
Merge pull request #2501 from hannobraun/dependabot/cargo/cargo-af1710f5dd
Bump the cargo group with 2 updates
2025-02-10 13:45:05 +01:00
dependabot[bot]
e585ee0d7f
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [clap](https://github.com/clap-rs/clap) and [winit](https://github.com/rust-windowing/winit).


Updates `clap` from 4.5.27 to 4.5.28
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.27...clap_complete-v4.5.28)

Updates `winit` from 0.30.8 to 0.30.9
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.8...v0.30.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 12:22:38 +00:00
Hanno Braun
a1034987c5 Prepare to show more operations in tree 2025-02-06 21:36:28 +01:00
Hanno Braun
c1f9c5f3f4 Remove unused trait bounds 2025-02-06 21:34:36 +01:00
Hanno Braun
a0904a918a Prepare to show more operations in tree 2025-02-06 21:33:35 +01:00
Hanno Braun
676fc85f92 Remove redundant #[allow(unused)] 2025-02-06 21:17:00 +01:00
Hanno Braun
1de32c7a52 Make struct field public
No reason not to, really.
2025-02-06 21:16:23 +01:00
Hanno Braun
4aa5d1aa46 Display operation IDs in tree 2025-02-06 21:15:10 +01:00
Hanno Braun
6db578a6b0 Remove unnecessary wrapper 2025-02-06 21:14:55 +01:00
Hanno Braun
3c4daaadd1 Remove unnecessary wrapper 2025-02-06 21:13:40 +01:00
Hanno Braun
9e4ce3f658 Prepare for follow-on change 2025-02-06 21:10:41 +01:00
Hanno Braun
4654699b4b Show connect operation in tree 2025-02-06 21:09:33 +01:00
Hanno Braun
33e3b555f1 Prepare to show connect operation in tree 2025-02-06 21:08:52 +01:00
Hanno Braun
c5ef864901 Show solid in tree 2025-02-06 21:06:18 +01:00
Hanno Braun
e483d9bc21 Prepare to show solid in tree 2025-02-06 21:04:21 +01:00
Hanno Braun
4147c3012d Prepare to show connect operation in tree 2025-02-06 21:02:57 +01:00
Hanno Braun
9510d0f72e Implement Operation for Connect 2025-02-06 21:01:46 +01:00
Hanno Braun
1c7a6e1c16 Update formatting 2025-02-06 20:58:26 +01:00
Hanno Braun
67723409c9 Update name of variable 2025-02-06 20:58:15 +01:00
Hanno Braun
0fb8879e75 Add Connect 2025-02-06 20:57:56 +01:00
Hanno Braun
4246a2169f Inline redundant function 2025-02-06 20:54:52 +01:00
Hanno Braun
ec835ebf13 Update formatting in doc comments 2025-02-06 20:53:12 +01:00
Hanno Braun
6c589f7bdc Move doc comment 2025-02-06 20:52:59 +01:00
Hanno Braun
9efd5211c7 Add ConnectExt 2025-02-06 20:52:20 +01:00
Hanno Braun
ef73336cd2 Remove storage code
The storage code didn't really do anything. It existed as a placeholder.
Or rather, as a tool for API design.

I didn't (and still don't) want to deal with any unnecessary complexity
at this point in the experimentation. But I figured, it would still be
good to write the APIs _as if_ operations were centrally stored. Because
then I wouldn't accidentally design the system in a way, that would make
centrally stored operations impractical.

Because I believed (and still do) that this is going to be necessary for
performance, at some point. (Definitely not right now, at this stage of
the ongoing experiments.) But what I've realized, is that I don't
actually know how exactly this centralized storage needs to be managed.

I just kinda assumed that it makes sense to store operations grouped by
type, as the mainline code currently does. But guess what, that hasn't
been optimized for performance (or even profiled) either.

And since there's currently no code (either in the experiments or
mainline) that iterates over operations by type to mass-update them,
which is the kind of access pattern that would benefit from grouping by
type, I doubt that this was ever a good idea in the first place.

Maybe it would be better to store operations heterogeneously, to
minimize cache misses when iterating over operations as a tree. Maybe it
makes sense to allocate them in multiple arenas, divided into
generations, depending on which are updated when. Maybe.

That's all speculation. But the facts are these: I don't know what the
right approach is going to be, and meanwhile this fake storage code is
slowing down the ongoing experiment. So I've decided to get rid of it.

Of course, this way it's fairly certain that I'll have to re-architect
things, once performance becomes a non-optional requirement. But at that
point I'll also have information on my access patterns, so I'll be in a
position to know what to optimize _for_.

That's going to be a huge pain, of course. But I don't think I can avoid
that, without having the answers to all these questions in advance.

Which I don't.
2025-02-06 20:32:09 +01:00
Hanno Braun
b23eec5d41 Create Handles directly
This is preparation for removing the storage code.
2025-02-06 20:10:50 +01:00
Hanno Braun
f67ecef793 Run cargo update 2025-02-06 20:06:46 +01:00
Hanno Braun
ce25482653 Sort code by order of relevance 2025-02-05 21:42:56 +01:00
Hanno Braun
03cc2e818b Make operation labels more flexible 2025-02-05 21:42:56 +01:00
Hanno Braun
6d6affee53 Prepare to make operation labels more flexible 2025-02-05 21:42:56 +01:00
Hanno Braun
d14ba5399e Update name of trait method 2025-02-05 21:42:56 +01:00
Hanno Braun
f7cb32f58b Run cargo update 2025-02-05 21:42:56 +01:00
Hanno Braun
19258c8b2c
Merge pull request #2500 from hannobraun/dependabot/cargo/openssl-0.10.70
Bump openssl from 0.10.68 to 0.10.70
2025-02-03 20:04:18 +01:00
dependabot[bot]
8b6760690f
Bump openssl from 0.10.68 to 0.10.70
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.68 to 0.10.70.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.70)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 18:49:34 +00:00
Hanno Braun
e7d7a5fae3
Merge pull request #2499 from hannobraun/dependabot/cargo/cargo-1729fdc871
Bump the cargo group with 3 updates
2025-02-03 14:38:01 +01:00
dependabot[bot]
ff2083f73b
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [threemf](https://github.com/hannobraun/3mf-rs), [serde_json](https://github.com/serde-rs/json) and [tempfile](https://github.com/Stebalien/tempfile).


Updates `threemf` from 0.6.0 to 0.7.0
- [Changelog](https://github.com/hannobraun/3mf-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hannobraun/3mf-rs/compare/v0.6.0...v0.7.0)

Updates `serde_json` from 1.0.137 to 1.0.138
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.137...v1.0.138)

Updates `tempfile` from 3.15.0 to 3.16.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.15.0...v3.16.0)

---
updated-dependencies:
- dependency-name: threemf
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-03 12:42:34 +00:00
Hanno Braun
097bdf18b8 Update name of variable 2025-01-31 21:16:27 +01:00
Hanno Braun
f7d046408b Update nomenclature 2025-01-31 21:16:17 +01:00
Hanno Braun
e311c9d00d Add Sweep 2025-01-31 21:11:20 +01:00
Hanno Braun
640e9d341d Prepare to display all operations 2025-01-31 21:08:19 +01:00
Hanno Braun
9937928005 Inline redundant function 2025-01-31 21:03:44 +01:00
Hanno Braun
a489484f95 Remove redundant re-exports 2025-01-31 21:02:53 +01:00
Hanno Braun
a286059145 Prepare to simplify 2025-01-31 21:01:24 +01:00
Hanno Braun
379d414687 Move doc comment 2025-01-31 21:00:19 +01:00
Hanno Braun
e181447a1a Add SweepExt 2025-01-31 20:59:57 +01:00
Hanno Braun
81cfbed007 Prepare to display all operations 2025-01-31 20:55:10 +01:00
Hanno Braun
85fe6e959c Document Solid::sweep_from 2025-01-31 20:49:57 +01:00
Hanno Braun
03d1e7954f Document Solid::connect_faces 2025-01-31 20:49:02 +01:00
Hanno Braun
b2c48533b7 Check precondition in Solid::connect_faces 2025-01-31 20:48:55 +01:00
Hanno Braun
3cacc25120 Upgrade to threemf 0.7.0 2025-01-31 20:34:11 +01:00
Hanno Braun
9e19d3ad75 Run cargo update 2025-01-31 20:19:28 +01:00
Hanno Braun
d8549508d9 Add Solid::sweep_from 2025-01-28 20:23:28 +01:00
Hanno Braun
e58bcded29 Sort store parameters alphabetically
It would be nice to have a consistent rule, and this one seems as good
as any.
2025-01-28 20:14:48 +01:00
Hanno Braun
8c615c7904 Add Solid::connect_faces 2025-01-28 20:12:16 +01:00
Hanno Braun
e9f4b1f67c Prepare for follow-on change 2025-01-28 20:10:25 +01:00
Hanno Braun
30917b6636 Update list of sponsors in README 2025-01-28 19:57:03 +01:00
Hanno Braun
30b58fb102
Merge pull request #2498 from hannobraun/dependabot/cargo/cargo-f11834d300
Bump the cargo group across 1 directory with 2 updates
2025-01-27 14:55:20 +01:00
dependabot[bot]
721e6b9aa5
Bump the cargo group across 1 directory with 2 updates
Bumps the cargo group with 2 updates in the / directory: [clap](https://github.com/clap-rs/clap) and [tobj](https://github.com/Twinklebear/tobj).


Updates `clap` from 4.5.26 to 4.5.27
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.26...clap_complete-v4.5.27)

Updates `tobj` from 4.0.2 to 4.0.3
- [Release notes](https://github.com/Twinklebear/tobj/releases)
- [Commits](https://github.com/Twinklebear/tobj/compare/4.0.2...4.0.3)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tobj
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 13:51:07 +00:00
Hanno Braun
b7610f2e5f Make construction of side faces more generic 2025-01-23 21:56:08 +01:00
Hanno Braun
36e472c771 Simplify function parameters 2025-01-23 21:52:24 +01:00
Hanno Braun
6c29384c8c Remove unused dependency 2025-01-23 21:51:30 +01:00
Hanno Braun
3e1afe5f88 Replace AnyMap in Stores
Using this approach, accessing a store required borrowing all of
`Stores`. This caused problems, as multiple stores couldn't get bored
separately. Or when using iterators and closures.
2025-01-23 21:50:10 +01:00
Hanno Braun
1fa9e15acd Run cargo update 2025-01-23 21:38:13 +01:00
Hanno Braun
a9c980f5a1 Remove unused dependency 2025-01-21 20:30:12 +01:00
Hanno Braun
85b29fc4f1 Simplify 2025-01-21 20:29:58 +01:00
Hanno Braun
b916746ea8 Update name of variable 2025-01-21 20:27:56 +01:00
Hanno Braun
3fa98f0432 Prepare for follow-on change 2025-01-21 20:27:30 +01:00
Hanno Braun
8a1fb8680d Make app::run more flexible 2025-01-21 20:26:33 +01:00
Hanno Braun
306cae95b9 Update name of function parameter 2025-01-21 20:25:03 +01:00
Hanno Braun
b10cf22fe1 Make export more flexible 2025-01-21 20:24:50 +01:00
Hanno Braun
81e98ebbf0 Add Solid 2025-01-21 20:24:07 +01:00
Hanno Braun
f4010867f4 Remove redundant #[allow(...)] 2025-01-21 20:18:18 +01:00
Hanno Braun
9eecc85c94 Define side walls as faces 2025-01-21 20:17:59 +01:00
Hanno Braun
d7cf92c597 Add Plane::from_points 2025-01-21 20:16:09 +01:00
Hanno Braun
ef061b4e16 Convert Face::from_sketch into Sketch::to_face 2025-01-21 19:32:10 +01:00
Hanno Braun
fa3da9acad Add Face::new 2025-01-21 19:29:53 +01:00
Hanno Braun
8d54b123e2 Prepare for follow-on change 2025-01-21 19:29:31 +01:00
Hanno Braun
5f17519df0 Make name of constructor more explicit 2025-01-21 19:27:46 +01:00
Hanno Braun
0f6331309e Update wgpu and glyphon 2025-01-21 19:26:48 +01:00
Hanno Braun
2baba16956 Run cargo update 2025-01-21 19:25:13 +01:00
Hanno Braun
14afc6b06c Pin glyphon version to sync it with wgpu 2025-01-21 19:24:40 +01:00
Hanno Braun
1d7b1c6d12 Remove redundant #[allow(..._)]s 2025-01-20 20:31:58 +01:00
Hanno Braun
97b94cb7f4 Update formatting 2025-01-20 20:31:58 +01:00
Hanno Braun
22faac1335 Order variables consistently 2025-01-20 20:31:58 +01:00
Hanno Braun
984369ba78 Update name of variable 2025-01-20 20:31:58 +01:00
Hanno Braun
9b2d36db60 Group related code 2025-01-20 20:31:58 +01:00
Hanno Braun
731d851ccf Simplify 2025-01-20 20:31:58 +01:00
Hanno Braun
91791122b7 Derive bottom face from top face 2025-01-20 20:31:58 +01:00
Hanno Braun
ac8356ce4d Update name of function parameter 2025-01-20 20:31:58 +01:00
Hanno Braun
5bb1ec1a9a Update name of struct field 2025-01-20 20:31:58 +01:00
Hanno Braun
daebaf0a7d Update name of struct field 2025-01-20 20:31:58 +01:00
Hanno Braun
e0162d9efb Inline redundant struct 2025-01-20 20:31:58 +01:00
Hanno Braun
012388fffc Display Shape children by themselves
Being able to go through the children of shape, seeing how each is added
one by one, was kinda neat, but not that useful in the end. Being able
to see each child in isolation instead, is about as useful and quite a
bit simpler.

And there is one way, in which the previous way started getting in the
way: When building up the shape child by child, sometimes the
construction of some children could not be observed, as other children
had already been constructed in front. This is the reason that I decided
to abandon the previous approach.
2025-01-20 20:31:58 +01:00
Hanno Braun
e13d252b49 Remove redundant #[allow(...)] 2025-01-20 20:31:58 +01:00
Hanno Braun
d4a58a933e Remove redundant #[allow(...)] 2025-01-20 20:31:58 +01:00
Hanno Braun
467b66750f Add Face::translate 2025-01-20 20:31:58 +01:00
Hanno Braun
e92296a1f0 Add Vertex::translate 2025-01-20 20:31:58 +01:00
Hanno Braun
6410f39b36 Derive Debug for Face 2025-01-20 20:31:58 +01:00
Hanno Braun
5fb4a0ec54 Derive Debug for Plane 2025-01-20 20:31:58 +01:00
Hanno Braun
a27be72de8 Derive Debug for Bivector 2025-01-20 20:31:58 +01:00
Hanno Braun
c1b0b5b3be Remove redundant #[allow(...)] 2025-01-20 20:31:58 +01:00
Hanno Braun
97d26e0211 Add Face::flip 2025-01-20 20:31:58 +01:00
Hanno Braun
9cf0d8f3f1 Add Plane::flip 2025-01-20 20:31:58 +01:00
Hanno Braun
337957caf6 Implement Neg for Vector 2025-01-20 20:31:58 +01:00
Hanno Braun
60864e75a5 Run cargo update 2025-01-20 20:31:58 +01:00
Hanno Braun
06b17cfb6b
Merge pull request #2496 from hannobraun/dependabot/cargo/cargo-e266527910
Bump the cargo group across 1 directory with 4 updates
2025-01-20 13:47:09 +01:00
dependabot[bot]
3c59e2d578
Bump the cargo group across 1 directory with 4 updates
Bumps the cargo group with 4 updates in the / directory: [log](https://github.com/rust-lang/log), [semver](https://github.com/dtolnay/semver), [octocrab](https://github.com/XAMPPRocky/octocrab) and [serde_json](https://github.com/serde-rs/json).


Updates `log` from 0.4.22 to 0.4.25
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.22...0.4.25)

Updates `semver` from 1.0.24 to 1.0.25
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.24...1.0.25)

Updates `octocrab` from 0.42.1 to 0.43.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.42.1...v0.43.0)

Updates `serde_json` from 1.0.135 to 1.0.137
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.135...v1.0.137)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 12:39:30 +00:00
Hanno Braun
ad2c7b4e9a Lift fmt::Display requirement of Operations 2025-01-17 20:01:54 +01:00
Hanno Braun
cb165bbd81 Prepare to lift fmt::Display requirement 2025-01-17 20:00:43 +01:00
Hanno Braun
183d834b3d Prepare to lift fmt::Display requirement 2025-01-17 19:58:40 +01:00
Hanno Braun
62e5e8db95 Run cargo update 2025-01-17 19:46:51 +01:00
Hanno Braun
77edecf9fc Remove redundant pub 2025-01-16 19:26:28 +01:00
Hanno Braun
3704b0b3bd Add Face::vertices 2025-01-16 19:26:03 +01:00
Hanno Braun
7beb03072e Make sure wgpu stays in sync with glyphon 2025-01-16 19:21:02 +01:00
Hanno Braun
86b0415791 Update name of trait method 2025-01-15 20:45:49 +01:00
Hanno Braun
79d19fbc49 Simplify signature or Operation::triangles
This is less performance-friendly, due to the additional allocations
that might be required. But for now, it's easier to work with, I think.
I can revisit the performance implications later again, when my thinking
around this whole API has solidified a bit more.
2025-01-15 20:40:48 +01:00
Hanno Braun
b3f9745f56 Update name of function parameter 2025-01-15 20:31:56 +01:00
Hanno Braun
2dd2e95929 Update name of function parameter 2025-01-15 20:31:35 +01:00
Hanno Braun
aa11d0f350 Update name of variable 2025-01-15 20:31:02 +01:00
Hanno Braun
39b427b2aa Update name of function parameter 2025-01-15 20:30:33 +01:00
Hanno Braun
77bb1a8f17 Update name of function parameter 2025-01-15 20:29:29 +01:00
Hanno Braun
8aabfd5fbe Update name of function parameter 2025-01-15 20:29:05 +01:00
Hanno Braun
9de3fecbec Update name of function parameter 2025-01-15 20:27:56 +01:00
Hanno Braun
94240dab56 Update name of function parameter 2025-01-15 20:27:30 +01:00
Hanno Braun
d0e85b8f23 Update name of variable 2025-01-15 20:27:08 +01:00
Hanno Braun
cf20b3e45b Add TriMesh
For now, it is functionally the same as the `Vec<Triangle>` it replaces.
It does offer opportunities for providing better APIs to access the
triangle mesh though.
2025-01-15 20:25:44 +01:00
Hanno Braun
fe8eaf18ea Run cargo update 2025-01-15 20:03:14 +01:00
Hanno Braun
2c22de834a Update name of variable 2025-01-14 20:14:31 +01:00
Hanno Braun
534300bd4b Update name of function parameter 2025-01-14 20:14:05 +01:00
Hanno Braun
1fa73523cc Update name of function parameter 2025-01-14 20:13:47 +01:00
Hanno Braun
60fd35774d Update name of variable 2025-01-14 20:13:19 +01:00
Hanno Braun
63db25e6ec Update name of function parameter 2025-01-14 20:12:50 +01:00
Hanno Braun
6bb0064fbe Update name of struct field 2025-01-14 20:12:05 +01:00
Hanno Braun
ee9bfab851 Run cargo update 2025-01-14 19:59:13 +01:00
Hanno Braun
8ed94a5b75 Consolidate Stores in single Stores struct 2025-01-13 20:45:46 +01:00
Hanno Braun
d3b6c37d4c Implement Default for Store 2025-01-13 20:45:46 +01:00
Hanno Braun
66d4d4d455 Add dependency on anymap3 2025-01-13 20:45:46 +01:00
Hanno Braun
68a8880cee Remove unused trait method 2025-01-13 20:45:46 +01:00
Hanno Braun
0617382375 Make imports consistent with other modules 2025-01-13 20:45:46 +01:00
Hanno Braun
5e04f66dcf Update name of module 2025-01-13 20:45:46 +01:00
Hanno Braun
6bd6bd9c19 Simplify directory structure 2025-01-13 20:45:46 +01:00
Hanno Braun
717f886c93 Inline redundant module 2025-01-13 20:45:46 +01:00
Hanno Braun
776f5c42ba Flatten module structure 2025-01-13 20:45:46 +01:00
Hanno Braun
19a626ffdf Update name of module 2025-01-13 20:45:46 +01:00
Hanno Braun
4a6e6298f8 Simplify module structure within render 2025-01-13 20:45:46 +01:00
Hanno Braun
c90e345a76 Clean up imports 2025-01-13 20:45:46 +01:00
Hanno Braun
83d40cc5df Clean up import 2025-01-13 20:45:46 +01:00
Hanno Braun
9e01da248e Remove redundant trait 2025-01-13 20:45:46 +01:00
Hanno Braun
12adfa68f6 Update name of variable 2025-01-13 20:45:46 +01:00
Hanno Braun
05d7f90987 Merge redundant constructors 2025-01-13 20:45:46 +01:00
Hanno Braun
dc92444bb3 Update name of variable 2025-01-13 20:45:46 +01:00
Hanno Braun
72c035a842 Update name of struct field 2025-01-13 20:45:46 +01:00
Hanno Braun
e5c98273f4 Inline redundant struct 2025-01-13 20:45:46 +01:00
Hanno Braun
71f15297e7 Consolidate more pipeline code in Pipeline 2025-01-13 20:45:46 +01:00
Hanno Braun
7e9e7ab2e3 Remove unused shader 2025-01-13 20:45:46 +01:00
Hanno Braun
3053eb4e5d Inline redundant function parameter 2025-01-13 20:45:46 +01:00
Hanno Braun
0bcd50a596 Make name of function parameter more explicit 2025-01-13 20:45:46 +01:00
Hanno Braun
1ec59fd854 Remove redundant type parameter 2025-01-13 20:45:46 +01:00
Hanno Braun
bc153e2896 Merge redundant impl blocks 2025-01-13 20:45:46 +01:00
Hanno Braun
4683a6d88f Remove redundant type parameter 2025-01-13 20:45:46 +01:00
Hanno Braun
fb5328da01 Remove unused code 2025-01-13 20:45:46 +01:00
Hanno Braun
14367cd783 No longer render vertices
Vertices are currently exposed through `Operation` in a privileged way,
and with the new topographical operations incoming, this no longer makes
sense.

Rendering vertices depends on this privileged way. I'm removing it, so I
can then clean up `Operation` itself. Right now, this feature isn't
adding a lot of value, so I don't think it's much of a loss.

It seems desirable to render vertices again at some point. But it also
seems desirable to render other things that currently aren't, like
planes (or surfaces in general). It makes sense that we'd grow a
mechanism for things with specialized rendering in the future, but right
now I neither know what that would be, nor do I want to be weighed down
by it.
2025-01-13 20:45:46 +01:00
Hanno Braun
30a57f8fde Run cargo update 2025-01-13 20:45:46 +01:00
Hanno Braun
36299985bc
Merge pull request #2493 from hannobraun/dependabot/cargo/cargo-c508cd507e
Bump the cargo group with 6 updates
2025-01-13 13:41:48 +01:00
dependabot[bot]
7abb8beb24
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.9` | `2.0.11` |
| [clap](https://github.com/clap-rs/clap) | `4.5.23` | `4.5.26` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.17.4` | `0.18.0` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.17.4` | `0.18.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.134` | `1.0.135` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.42.0` | `1.43.0` |


Updates `thiserror` from 2.0.9 to 2.0.11
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.9...2.0.11)

Updates `clap` from 4.5.23 to 4.5.26
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.23...clap_complete-v4.5.26)

Updates `parry2d-f64` from 0.17.4 to 0.18.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.18.0)

Updates `parry3d-f64` from 0.17.4 to 0.18.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.18.0)

Updates `serde_json` from 1.0.134 to 1.0.135
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.134...v1.0.135)

Updates `tokio` from 1.42.0 to 1.43.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.42.0...tokio-1.43.0)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13 12:08:09 +00:00
Hanno Braun
5059eff026 Update name of variable 2025-01-10 19:46:11 +01:00
Hanno Braun
d781b878cc Update name of function parameter 2025-01-10 19:45:59 +01:00
Hanno Braun
2dfe500613 Add comment 2025-01-10 19:40:21 +01:00
Hanno Braun
3578f5c94a Prepare to add comment 2025-01-10 19:25:00 +01:00
Hanno Braun
413f4d92a8 Remove redundant pub 2025-01-10 19:24:01 +01:00
Hanno Braun
3f3fc9fcd9 Remove redundant #[allow(...)] 2025-01-10 19:21:53 +01:00
Hanno Braun
dea2699188 Add Face and use it for top/bottom faces
This is one more (significant!) step in the direction of a real b-rep
representation.
2025-01-10 19:19:00 +01:00
Hanno Braun
b1f718a705 Update coordination system of bottom surface
Previously, it had the same coordinate system as the top one, meaning an
automated triangulization of both would come up with faces that have the
same normal. But obviously, the normals need to be inverse.

This change updates the bottom surface, preparing for the automated
triangulatization.
2025-01-10 19:13:45 +01:00
Hanno Braun
dc904e3bc1 Prevent self-intersection of faces
The way the vertices were order previously, the faces they defined would
have self-intersected.

This wasn't relevant, since I've been doing the triangulation manually.
But it's becoming relevant now, as I'm automating that.
2025-01-10 18:40:58 +01:00
Hanno Braun
cb9388c7fa Run cargo update 2025-01-10 18:33:15 +01:00
Hanno Braun
3683caeb22 Remove redundant #[allow(...)] 2025-01-09 18:54:07 +01:00
Hanno Braun
acd13fd925 Add Plane::project_point 2025-01-09 18:53:44 +01:00
Hanno Braun
1b7adfd87f Implement Sub for Point/Vector 2025-01-09 18:52:44 +01:00
Hanno Braun
8be6b041aa Avoid generics in Sub implementation for Point
Otherwise, it's going to conflict with the second Point-Vector
implementation that I'm about to add.
2025-01-09 18:52:06 +01:00
Hanno Braun
10a2036740 Add Vector::dot 2025-01-09 18:38:02 +01:00
Hanno Braun
878f6051bc Implement Sub between two Points 2025-01-09 18:33:56 +01:00
Hanno Braun
a2cc0f7699 Implement Sub between two Vectors 2025-01-09 18:33:48 +01:00
Hanno Braun
7958712869 Update name of type parameter 2025-01-09 18:29:15 +01:00
Hanno Braun
ed95fb7a16 Update name of type parameter 2025-01-09 18:28:56 +01:00
Hanno Braun
ad9be6a5c1 Remove redundant #[allow(...)]s 2025-01-08 21:40:08 +01:00
Hanno Braun
6bb97c6c1a Remove redundant #[allow(...)]s 2025-01-08 21:39:03 +01:00
Hanno Braun
12701bbecc Add Plane::u, Plane::v 2025-01-08 21:37:43 +01:00
Hanno Braun
f3fb458f2c Add Plane::normal 2025-01-08 21:28:46 +01:00
Hanno Braun
5778366e00 Add Vector::normalize 2025-01-08 21:28:15 +01:00
Hanno Braun
30fbe3e2e9 Add Vector::magnitude 2025-01-08 21:27:42 +01:00
Hanno Braun
e7f46bba8a Implement Div for Vector 2025-01-08 21:27:04 +01:00
Hanno Braun
d42302fc7c Implement Div for Scalar 2025-01-08 21:26:32 +01:00
Hanno Braun
99587dab6c Run cargo update 2025-01-08 21:18:52 +01:00
Hanno Braun
f734573672 Add Scalar::sqrt 2025-01-07 19:43:11 +01:00
Hanno Braun
9f41b81cc1 Add Scalar::zero 2025-01-07 19:43:11 +01:00
Hanno Braun
9152c23b92 Add Vector<3>::cross 2025-01-07 19:43:11 +01:00
Hanno Braun
828326441e Implement Neg for Scalar 2025-01-07 19:43:11 +01:00
Hanno Braun
cc3a852bbe Implement Sub for Scalar 2025-01-07 19:43:11 +01:00
Hanno Braun
b14d64cab2 Add dependency on itertools 2025-01-07 19:43:11 +01:00
Hanno Braun
0fec6e10bd Run cargo update 2025-01-07 19:43:11 +01:00
Hanno Braun
87864192d8
Merge pull request #2492 from hannobraun/dependabot/cargo/cargo-0511f0b4d5
Bump the cargo group with 4 updates
2025-01-06 13:16:50 +01:00
dependabot[bot]
7dcfa9ad34
Bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [itertools](https://github.com/rust-itertools/itertools), [winit](https://github.com/rust-windowing/winit), [tempfile](https://github.com/Stebalien/tempfile) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `itertools` from 0.13.0 to 0.14.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.13.0...v0.14.0)

Updates `winit` from 0.30.7 to 0.30.8
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.7...v0.30.8)

Updates `tempfile` from 3.14.0 to 3.15.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.14.0...v3.15.0)

Updates `reqwest` from 0.12.11 to 0.12.12
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.11...v0.12.12)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 12:04:27 +00:00
Hanno Braun
a9c0a77b2b
Merge pull request #2491 from hannobraun/dependabot/cargo/cargo-b7f942fcca
Bump the cargo group with 2 updates
2024-12-30 13:54:34 +01:00
dependabot[bot]
4141a8ee76
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [serde](https://github.com/serde-rs/serde) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `serde` from 1.0.216 to 1.0.217
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.216...v1.0.217)

Updates `reqwest` from 0.12.9 to 0.12.11
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.9...v0.12.11)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-30 12:12:43 +00:00
Hanno Braun
16b1ddb4ed
Merge pull request #2490 from hannobraun/dependabot/cargo/cargo-46602385b3
Bump the cargo group with 6 updates
2024-12-23 18:02:28 +01:00
dependabot[bot]
16a635b784
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.7` | `2.0.9` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.94` | `1.0.95` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.20.0` | `1.21.0` |
| [winit](https://github.com/rust-windowing/winit) | `0.30.5` | `0.30.7` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.133` | `1.0.134` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.11.5` | `0.11.6` |


Updates `thiserror` from 2.0.7 to 2.0.9
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.7...2.0.9)

Updates `anyhow` from 1.0.94 to 1.0.95
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.94...1.0.95)

Updates `bytemuck` from 1.20.0 to 1.21.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.20.0...v1.21.0)

Updates `winit` from 0.30.5 to 0.30.7
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.5...v0.30.7)

Updates `serde_json` from 1.0.133 to 1.0.134
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.133...v1.0.134)

Updates `env_logger` from 0.11.5 to 0.11.6
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.5...v0.11.6)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 12:18:56 +00:00
Hanno Braun
6e00260233 Add store for surfaces 2024-12-20 20:30:28 +01:00
Hanno Braun
f776fedb68 Run cargo fmt 2024-12-20 20:27:47 +01:00
Hanno Braun
09a375d4bb Run cargo update 2024-12-20 20:27:33 +01:00
Hanno Braun
cb165bae2e Add dependency on spade 2024-12-18 21:40:05 +01:00
Hanno Braun
47a47bacb5 Update name of module 2024-12-18 21:24:09 +01:00
Hanno Braun
87e03ced94 Move Vertex to dedicated module 2024-12-18 21:23:09 +01:00
Hanno Braun
cf30a152fd Update conversion to triangle 2024-12-18 21:17:25 +01:00
Hanno Braun
72a62b34f6 Simplify 2024-12-18 21:14:23 +01:00
Hanno Braun
9ea003bc5a Simplify 2024-12-18 21:12:48 +01:00
Hanno Braun
5327c1d9e3 Implement Deref for Handle 2024-12-18 21:11:29 +01:00
Hanno Braun
389b605754 Simplify 2024-12-18 21:06:05 +01:00
Hanno Braun
fe2410ca53 Define points in sketch 2024-12-18 20:42:45 +01:00
Hanno Braun
b04bc1021f Run cargo update 2024-12-18 20:37:37 +01:00
Hanno Braun
9985efaf40 Add Plane::translate 2024-12-17 20:49:03 +01:00
Hanno Braun
50d5703399 Derive Copy for Plane 2024-12-17 20:48:49 +01:00
Hanno Braun
d3ead3ea99 Derive Copy for Bivector 2024-12-17 20:48:39 +01:00
Hanno Braun
f675fd3db6 Use planes to define vertices 2024-12-17 20:46:12 +01:00
Hanno Braun
a6b1bbfdcb Implement Vector/Scalar multiplication 2024-12-17 20:41:12 +01:00
Hanno Braun
b01ebd326a Implement Scalar multiplication 2024-12-17 20:40:40 +01:00
Hanno Braun
a5fc856b00 Rename type parameter to increase clarity 2024-12-17 20:39:40 +01:00
Hanno Braun
b9fe448670 Rename type parameter to increase clarity 2024-12-17 20:37:45 +01:00
Hanno Braun
71a0bb7a33 Make Point/Vector addition generic 2024-12-17 20:33:43 +01:00
Hanno Braun
f237c4a84c Make conversion to Point generic 2024-12-17 20:33:08 +01:00
Hanno Braun
b75389d622 Make Point generic over dimensionality 2024-12-17 20:32:31 +01:00
Hanno Braun
ca72d1e897 Run cargo fmt 2024-12-17 20:32:15 +01:00
Hanno Braun
68b999beac Make vector addition generic 2024-12-17 20:30:51 +01:00
Hanno Braun
b8c729e077 Make conversion into vector generic 2024-12-17 20:30:26 +01:00
Hanno Braun
24ab6c42a2 Make Vector generic over dimensionality 2024-12-17 20:29:51 +01:00
Hanno Braun
a2393d7325 Move Scalar to dedicated module 2024-12-17 20:15:35 +01:00
Hanno Braun
38926ea7fe Move Vector to dedicated module 2024-12-17 20:14:53 +01:00
Hanno Braun
84705e9a28 Move Point to dedicated module 2024-12-17 20:13:29 +01:00
Hanno Braun
e143b4ad87 Prepare to expand math module 2024-12-17 20:12:33 +01:00
Hanno Braun
cf4be15f0f Rename HandleAny to AnyOp
It is a wrapper for _any_ operation. The old name implied that it was
tied to the storage system and `Handle`s, which it isn't.
2024-12-17 20:08:24 +01:00
Hanno Braun
35019bd965 Run cargo update 2024-12-17 20:05:03 +01:00
Hanno Braun
6437cd930c Add Store::insert 2024-12-16 21:18:00 +01:00
Hanno Braun
3b0d56fb52 Remove redundant struct field 2024-12-16 21:16:00 +01:00
Hanno Braun
784031af85 Prepare for centralized operation stores 2024-12-16 21:15:28 +01:00
Hanno Braun
3754d46fcf Prepare for follow-on change 2024-12-16 21:14:39 +01:00
Hanno Braun
9090b9bc60 Update name of method 2024-12-16 20:57:13 +01:00
Hanno Braun
1343026fad Add comment 2024-12-16 20:57:03 +01:00
Hanno Braun
ea3a198bbb Consolidate redundant code 2024-12-16 20:54:05 +01:00
Hanno Braun
5b8938f376 Prepare to consolidate redundant code 2024-12-16 20:52:29 +01:00
Hanno Braun
fec90acad4 Update name of type parameter 2024-12-16 20:43:07 +01:00
Hanno Braun
9a362350f8 Update name of type parameter 2024-12-16 20:42:33 +01:00
Hanno Braun
efa1a32404 Add ShapeExtender::new 2024-12-16 20:41:49 +01:00
Hanno Braun
3241984f18 Update name of struct field 2024-12-16 20:40:10 +01:00
Hanno Braun
40e0a7cc96 Make name of struct field more specific 2024-12-16 20:39:45 +01:00
Hanno Braun
b0620b301b Make name of struct field more compact 2024-12-16 20:38:45 +01:00
Hanno Braun
16b11e9148 Make name of function more specific 2024-12-16 20:38:19 +01:00
Hanno Braun
2a7f7dde02 Make name of struct field more specific 2024-12-16 20:36:40 +01:00
Hanno Braun
d4173d3dbc Update name of struct 2024-12-16 20:35:43 +01:00
Hanno Braun
1feae5a044 Simplify 2024-12-16 20:27:57 +01:00
Hanno Braun
388754e242 Inline redundant function 2024-12-16 20:26:10 +01:00
Hanno Braun
38409ce16d Inline redundant function 2024-12-16 20:24:02 +01:00
Hanno Braun
c5ceab8ef9 Prepare to consolidate operation addition APIs 2024-12-16 20:14:58 +01:00
Hanno Braun
3dc94c24ad Run cargo update 2024-12-16 20:06:17 +01:00
Hanno Braun
1fd7d78450 Update list of sponsors 2024-12-16 20:00:43 +01:00
Hanno Braun
73a6d1cea2 Run cargo update 2024-12-16 14:11:39 +01:00
Hanno Braun
f418cf4357
Merge pull request #2489 from hannobraun/dependabot/cargo/cargo-2f046d02dd
Bump the cargo group with 3 updates
2024-12-16 14:10:22 +01:00
dependabot[bot]
3953cc3c86
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [thiserror](https://github.com/dtolnay/thiserror), [semver](https://github.com/dtolnay/semver) and [serde](https://github.com/serde-rs/serde).


Updates `thiserror` from 2.0.6 to 2.0.7
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.6...2.0.7)

Updates `semver` from 1.0.23 to 1.0.24
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.23...1.0.24)

Updates `serde` from 1.0.215 to 1.0.216
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.215...v1.0.216)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-16 12:39:45 +00:00
Hanno Braun
23d73c5410 Refer to Vertex via Handle 2024-12-13 20:46:26 +01:00
Hanno Braun
4780753fb6 Prepare to refer to Vertex by Handle 2024-12-13 20:42:54 +01:00
Hanno Braun
f66603375b Prepare to refer to Vertex by Handle 2024-12-13 20:15:00 +01:00
Hanno Braun
1122367341 Refer to Triangle via new Handle 2024-12-13 20:06:31 +01:00
Hanno Braun
b368105d34 Prepare to refer to operations via handles 2024-12-13 20:02:55 +01:00
Hanno Braun
464fcdf664 Simplify 2024-12-13 19:48:31 +01:00
Hanno Braun
796fc796b7 Run cargo update 2024-12-13 19:44:01 +01:00
Hanno Braun
020fbbc35c Simplify rendering of triangles in operation list 2024-12-12 23:21:32 +01:00
Hanno Braun
8d043600e9 Start with collapsed view 2024-12-12 23:20:34 +01:00
Hanno Braun
3d1736b89e Support collapsing operations 2024-12-12 23:19:50 +01:00
Hanno Braun
788af1edc3 Group related code 2024-12-12 23:17:28 +01:00
Hanno Braun
a260993342 Always apply up/down key to lowest-level selection 2024-12-12 23:16:55 +01:00
Hanno Braun
ea792690f2 Support expanding operation 2024-12-12 23:02:15 +01:00
Hanno Braun
ffee556a97 Run cargo update 2024-12-12 22:49:54 +01:00
Hanno Braun
aff96dd7a7 Prepare to support expanding operations in list 2024-12-11 21:39:01 +01:00
Hanno Braun
3b02881cf0 Group related methods 2024-12-11 21:37:35 +01:00
Hanno Braun
3b29c87e96 Simplify 2024-12-11 21:37:19 +01:00
Hanno Braun
b649ae6fbf Only expand children, if one is selected 2024-12-11 21:33:48 +01:00
Hanno Braun
3f20187ad0 Prepare for follow-on change 2024-12-11 21:32:56 +01:00
Hanno Braun
6a53d4964d Render nested operations 2024-12-11 21:32:04 +01:00
Hanno Braun
fffe8061b9 Prepare for follow-on change 2024-12-11 21:31:00 +01:00
Hanno Braun
e39d3a0324 Split expression into simpler ones 2024-12-11 21:28:27 +01:00
Hanno Braun
07750e5e4f Prepare for follow-on change 2024-12-11 21:27:52 +01:00
Hanno Braun
3764226998 Make name of variable more explicit 2024-12-11 21:27:28 +01:00
Hanno Braun
a63ded757e Prepare for follow-on change 2024-12-11 21:27:01 +01:00
Hanno Braun
71828e7917 Prepare for follow-on change 2024-12-11 21:25:50 +01:00
Hanno Braun
f555c4f467 Prepare for follow-on change 2024-12-11 21:24:52 +01:00
Hanno Braun
69bd857320 Update name of function parameter 2024-12-11 21:20:14 +01:00
Hanno Braun
915b0155f9 Fix selection in operation list 2024-12-11 21:17:28 +01:00
Hanno Braun
5a81970418 Simplify 2024-12-11 21:16:52 +01:00
Hanno Braun
f5d315dbaf Simplify 2024-12-11 21:14:16 +01:00
Hanno Braun
c0c5a281fd Relax type of return value 2024-12-11 21:13:18 +01:00
Hanno Braun
9a2c311d18 Prepare to support nested operations 2024-12-11 21:11:53 +01:00
Hanno Braun
7257090783 Update how shape is rendered in list 2024-12-11 21:08:15 +01:00
Hanno Braun
ee0e50b5c7 Update name of module 2024-12-11 21:07:36 +01:00
Hanno Braun
2145bc8562 Update name of variable 2024-12-11 21:07:08 +01:00
Hanno Braun
db3920d3f1 Update name of variable 2024-12-11 21:06:48 +01:00
Hanno Braun
b3fa78b232 Update name of module 2024-12-11 21:06:31 +01:00
Hanno Braun
a009110f60 Remove redundant code 2024-12-11 21:05:41 +01:00
Hanno Braun
441e8b4d13 Update name of variable 2024-12-11 21:05:10 +01:00
Hanno Braun
b77c011d57 Update name of variable 2024-12-11 21:04:32 +01:00
Hanno Braun
a54ccd4848 Update name of function parameter 2024-12-11 21:04:05 +01:00
Hanno Braun
635b3a7ce6 Update name of struct field 2024-12-11 21:03:30 +01:00
Hanno Braun
b50250b7d8 Update name of variable 2024-12-11 21:02:59 +01:00
Hanno Braun
8e09fbac7a Update name of function parameter 2024-12-11 21:01:14 +01:00
Hanno Braun
380faa6371 Rename OpsLog to Shape 2024-12-11 21:00:42 +01:00
Hanno Braun
e2139eacb3 Display parent operation 2024-12-11 20:58:37 +01:00
Hanno Braun
97ce9f88ac Prepare to support nested operations 2024-12-11 20:55:52 +01:00
Hanno Braun
ec6b444ec9 Prepare to support nested operations 2024-12-11 20:40:05 +01:00
Hanno Braun
820caa2b43 Prepare to support nested operations 2024-12-11 20:39:52 +01:00
Hanno Braun
94625ac329 Prepare for follow-on change 2024-12-11 20:37:59 +01:00
Hanno Braun
23bc714a92 Update name of struct 2024-12-11 20:33:56 +01:00
Hanno Braun
e6b7fa4adc Simplify 2024-12-11 20:30:35 +01:00
Hanno Braun
a9f95d442b Simplify function parameter 2024-12-11 20:29:14 +01:00
Hanno Braun
03d7579b91 Simplify 2024-12-11 20:24:03 +01:00
Hanno Braun
2cfa6ed6b0 Add AnyOp 2024-12-11 20:20:38 +01:00
Hanno Braun
c28e5e0771 Replace ClonedOperation 2024-12-11 20:09:42 +01:00
Hanno Braun
056a367a2d Prepare to remove ClonedOperation 2024-12-11 20:08:28 +01:00
Hanno Braun
5da0f2b390 Remove redundant pub 2024-12-11 20:03:28 +01:00
Hanno Braun
f1c25019f7 Remove redundant pub 2024-12-11 20:02:56 +01:00
Hanno Braun
3177e94755 Run cargo update 2024-12-11 19:58:33 +01:00
Hanno Braun
d7a183b6fc Prepare to support nested operations 2024-12-10 19:27:53 +01:00
Hanno Braun
050b9357c2 Implement Operation for OperationView 2024-12-10 19:26:34 +01:00
Hanno Braun
7a654f2a70 Simplify 2024-12-10 19:09:18 +01:00
Hanno Braun
582e229139 Simplify 2024-12-10 19:08:19 +01:00
Hanno Braun
5a30ea690d Inline redundant variable 2024-12-10 19:07:29 +01:00
Hanno Braun
f444996598 Prepare to simplify 2024-12-10 19:07:19 +01:00
Hanno Braun
529068cec5 Prepare to support nested operations 2024-12-10 19:06:16 +01:00
Hanno Braun
ccf6d9a1d1 Fix off-by-one error when selecting next index 2024-12-10 19:02:33 +01:00
Hanno Braun
b3622693a5 Increase clarity 2024-12-10 18:56:16 +01:00
Hanno Braun
bab95fbdbc Update name of struct field 2024-12-10 18:51:47 +01:00
Hanno Braun
c4c139644e Make OperationView work with any operation 2024-12-10 18:51:27 +01:00
Hanno Braun
3f0a76aaf4 Prepare for follow-on change 2024-12-10 18:50:58 +01:00
Hanno Braun
6cff14dcda Prepare for follow-on change 2024-12-10 18:48:32 +01:00
Hanno Braun
7aca55a61c Prepare for follow-on change 2024-12-10 18:46:31 +01:00
Hanno Braun
3406ea310b Prepare for follow-on change 2024-12-10 18:46:03 +01:00
Hanno Braun
a5ee7ec28f Return more information from operations 2024-12-10 18:43:44 +01:00
Hanno Braun
e2428ea38a Prepare for follow-on change 2024-12-10 18:43:00 +01:00
Hanno Braun
9c82fae031 Remove redundant pub 2024-12-10 18:40:33 +01:00
Hanno Braun
424f90643d Add OperationView::operations 2024-12-10 18:40:21 +01:00
Hanno Braun
78f911b8d0 Add OperationView::new 2024-12-10 18:38:59 +01:00
Hanno Braun
091ebce436 Make name of struct more explicit 2024-12-10 18:37:40 +01:00
Hanno Braun
ca63735015 Properly configure Nix environment in VS Code 2024-12-10 18:22:51 +01:00
Hanno Braun
8723af81ba Prepare for follow-on change 2024-12-09 20:54:29 +01:00
Hanno Braun
2b135fe333 Prepare for follow-on change 2024-12-09 20:53:43 +01:00
Hanno Braun
cef2aaec07 Return triangle vertices as children 2024-12-09 20:45:34 +01:00
Hanno Braun
a9bcd5df1b Add Operation::children 2024-12-09 20:43:31 +01:00
Hanno Braun
20025690de Group related code 2024-12-09 20:39:04 +01:00
Hanno Braun
1375026571 Derive Clone for OperationInSequence 2024-12-09 20:27:19 +01:00
Hanno Braun
d474ee33ec Extract OpsUi from OpsLog 2024-12-09 20:27:05 +01:00
Hanno Braun
e1e77f47c4 Create new experiment, starting from previous one 2024-12-09 20:06:27 +01:00
Hanno Braun
b292fcfdbc Run cargo update 2024-12-09 13:30:46 +01:00
Hanno Braun
e800ab5c3e Update list of sponsors 2024-12-09 13:30:08 +01:00
Hanno Braun
9bbc273be8
Merge pull request #2488 from hannobraun/dependabot/cargo/cargo-e7734c0384
Bump the cargo group with 6 updates
2024-12-09 13:27:56 +01:00
dependabot[bot]
c3be429213
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.3` | `2.0.6` |
| [clap](https://github.com/clap-rs/clap) | `4.5.21` | `4.5.23` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.93` | `1.0.94` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.38` | `0.4.39` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.41.1` | `1.42.0` |
| [cargo_metadata](https://github.com/oli-obk/cargo_metadata) | `0.19.0` | `0.19.1` |


Updates `thiserror` from 2.0.3 to 2.0.6
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.3...2.0.6)

Updates `clap` from 4.5.21 to 4.5.23
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.21...clap_complete-v4.5.23)

Updates `anyhow` from 1.0.93 to 1.0.94
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.93...1.0.94)

Updates `chrono` from 0.4.38 to 0.4.39
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.38...v0.4.39)

Updates `tokio` from 1.41.1 to 1.42.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.41.1...tokio-1.42.0)

Updates `cargo_metadata` from 0.19.0 to 0.19.1
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.19.0...0.19.1)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: cargo_metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-09 12:15:55 +00:00
Hanno Braun
409d5df487 Upgrade to Rust 1.83.0 2024-12-05 20:19:28 +01:00
Hanno Braun
c80d3121c1 Elide redundant lifetime 2024-12-05 20:10:38 +01:00
Hanno Braun
ef949d9fa7
Merge pull request #2487 from hannobraun/dependabot/cargo/cargo-6fdae17dd2
Bump the cargo group with 4 updates
2024-12-02 14:27:15 +01:00
dependabot[bot]
6f540a9fd7
Bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [tracing](https://github.com/tokio-rs/tracing), [tracing-subscriber](https://github.com/tokio-rs/tracing), [parry2d-f64](https://github.com/dimforge/parry) and [parry3d-f64](https://github.com/dimforge/parry).


Updates `tracing` from 0.1.40 to 0.1.41
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.40...tracing-0.1.41)

Updates `tracing-subscriber` from 0.3.18 to 0.3.19
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.18...tracing-subscriber-0.3.19)

Updates `parry2d-f64` from 0.17.3 to 0.17.4
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.17.3 to 0.17.4
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-02 13:18:43 +00:00
Hanno Braun
30a6a05c8c Add note on proofreading 2024-11-27 22:03:32 +01:00
Hanno Braun
059d5e616f Document the code of the experiment 2024-11-27 21:57:51 +01:00
Hanno Braun
b9a8dabe29 Add README.md to document experiment 2024-11-27 21:57:16 +01:00
Hanno Braun
df40860912 Add screenshot 2024-11-27 21:57:01 +01:00
Hanno Braun
e6edbe90b4 Document experiments/ directory 2024-11-27 19:19:55 +01:00
Hanno Braun
ae0d46c702 Highlight selected operation 2024-11-27 19:09:52 +01:00
Hanno Braun
4fcc3fc5f4 Prepare for follow-on change 2024-11-27 19:07:30 +01:00
Hanno Braun
fc84f05235 Prepare for follow-on change 2024-11-27 19:07:00 +01:00
Hanno Braun
add77b0a13 Simplify 2024-11-27 19:05:17 +01:00
Hanno Braun
7e54b3484b Inline redundant variable 2024-11-27 19:04:39 +01:00
Hanno Braun
4a6888d3b2 Simplify 2024-11-27 19:00:46 +01:00
Hanno Braun
9b5ed60434 Simplify 2024-11-27 18:59:35 +01:00
Hanno Braun
cb0cc6b383 Only use a single buffer 2024-11-27 18:58:49 +01:00
Hanno Braun
a20b8e56e1 Draw list of operations 2024-11-27 18:51:31 +01:00
Hanno Braun
00dcff4676 Run cargo update 2024-11-27 18:48:38 +01:00
Hanno Braun
62e967e10f Prepare for follow-on change 2024-11-25 23:16:02 +01:00
Hanno Braun
02d1d75668 Update name of function parameter 2024-11-25 23:14:37 +01:00
Hanno Braun
ab7f435d06 Render list of operations (incorrectly)
This renders all operation names into one place. Work in progress!
2024-11-25 23:14:06 +01:00
Hanno Braun
f745509849 Prepare for follow-on change 2024-11-25 23:12:20 +01:00
Hanno Braun
6cf002ed6b Prepare for follow-on change 2024-11-25 23:09:51 +01:00
Hanno Braun
c843410397 Prepare for follow-on change 2024-11-25 23:09:04 +01:00
Hanno Braun
c644c63faa Update name of function parameter 2024-11-25 23:03:13 +01:00
Hanno Braun
08d21b62e8 Sort function parameters by relevance 2024-11-25 23:02:55 +01:00
Hanno Braun
2d354399f8 Remove redundant function parameter 2024-11-25 23:02:38 +01:00
Hanno Braun
81bb76cf85 Simplify name of function parameter 2024-11-25 23:02:08 +01:00
Hanno Braun
322200ed12 Remove redundant function parameter 2024-11-25 23:01:09 +01:00
Hanno Braun
12b01648bd Avoid use of redundant function paramater 2024-11-25 23:01:01 +01:00
Hanno Braun
e1e7e55e7b Add OpsLog::selected 2024-11-25 22:58:16 +01:00
Hanno Braun
090262c7db Prepare for follow-on change 2024-11-25 22:57:44 +01:00
Hanno Braun
225e66a92e Add OpsLog::select_previous 2024-11-25 22:55:13 +01:00
Hanno Braun
29527442dc Add OpsLog::select_next 2024-11-25 22:54:30 +01:00
Hanno Braun
de37322aa7 Group releated code 2024-11-25 22:52:43 +01:00
Hanno Braun
6a8ae9d83d Add OpsLog::select_last 2024-11-25 22:52:14 +01:00
Hanno Braun
0c840553f4 Track selected operation in OpsLog
This is going to simplify things, as both are going to be needed
together.
2024-11-25 22:50:35 +01:00
Hanno Braun
d7ec3fa57c Inline redundant variable 2024-11-25 22:47:36 +01:00
Hanno Braun
408f476d8f Update name of function parameter 2024-11-25 22:47:14 +01:00
Hanno Braun
94acb20fed Update name of function parameter 2024-11-25 22:46:57 +01:00
Hanno Braun
0896ffdcbc Prepare for rendering list of operations 2024-11-25 22:46:41 +01:00
Hanno Braun
4c98cc736b Require Operation impls to implement Display 2024-11-25 22:42:31 +01:00
Hanno Braun
612109a895 Update name of function parameter 2024-11-25 22:22:00 +01:00
Hanno Braun
0c4f54934d Prepare to render list of operations 2024-11-25 22:21:46 +01:00
Hanno Braun
15edf8b1b7 Prepare for rendering list of operations 2024-11-25 22:20:28 +01:00
Hanno Braun
97228383eb Make name of variable more explicit 2024-11-25 22:18:57 +01:00
Hanno Braun
39134a46fe Prepare for follow-on change 2024-11-25 22:18:45 +01:00
Hanno Braun
2199a3d523 Make name of function parameter more explicit 2024-11-25 22:18:24 +01:00
Hanno Braun
8fc8453f57 Prepare for rendering list of operations 2024-11-25 22:07:38 +01:00
Hanno Braun
5680b13607 Prepare for rendering list of operations 2024-11-25 22:06:36 +01:00
Hanno Braun
c74a6399ff Prepare for follow-on change 2024-11-25 22:05:49 +01:00
Hanno Braun
d9285d00da Prepare for follow-on change 2024-11-25 22:05:39 +01:00
Hanno Braun
fec7f1df07 Prepare for follow-on change 2024-11-25 22:02:54 +01:00
Hanno Braun
ef9fca80b4 Prepare for follow-on change 2024-11-25 21:59:40 +01:00
Hanno Braun
cf1c542964 Prepare for follow-on change 2024-11-25 21:58:07 +01:00
Hanno Braun
0d31c03351 Set text scale factor 2024-11-25 21:47:41 +01:00
Hanno Braun
8323ad826d Render text 2024-11-25 21:45:32 +01:00
Hanno Braun
b15617129a Set viewport resolution 2024-11-25 21:31:07 +01:00
Hanno Braun
8f9a84c4e1 Prepare to render list of operations 2024-11-25 21:25:05 +01:00
Hanno Braun
10a34955fb Prepare for follow-on change 2024-11-25 21:22:50 +01:00
Hanno Braun
d05c127653 Make name of variable more explicit 2024-11-25 21:20:50 +01:00
Hanno Braun
8d38eb0005 Share a single render pass 2024-11-25 21:10:18 +01:00
Hanno Braun
b32b232a06 Add dependency on glyphon 2024-11-25 20:55:11 +01:00
Hanno Braun
8f4fef022a Run cargo update 2024-11-25 20:06:54 +01:00
Hanno Braun
b6dcb56a43 Run cargo update 2024-11-25 20:01:44 +01:00
Hanno Braun
b78be4292c Update list of sponsors 2024-11-25 20:01:06 +01:00
Hanno Braun
d16c3fbd8d
Merge pull request #2486 from hannobraun/dependabot/cargo/rustls-0.23.18
Bump rustls from 0.23.17 to 0.23.18
2024-11-25 18:31:20 +01:00
dependabot[bot]
ed42ed1139
Bump rustls from 0.23.17 to 0.23.18
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.17 to 0.23.18.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.17...v/0.23.18)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 17:02:24 +00:00
Hanno Braun
a7bc7f46c9
Merge pull request #2485 from hannobraun/dependabot/cargo/cargo-4fb7b618ac
Bump the cargo group across 1 directory with 7 updates
2024-11-25 14:45:36 +01:00
dependabot[bot]
b73d6d9daa
Bump the cargo group across 1 directory with 7 updates
Bumps the cargo group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.17.2` | `0.17.3` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.17.2` | `0.17.3` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.19.0` | `1.20.0` |
| [wgpu](https://github.com/gfx-rs/wgpu) | `23.0.0` | `23.0.1` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.42.0` | `0.42.1` |
| [url](https://github.com/servo/rust-url) | `2.5.3` | `2.5.4` |
| [cargo_metadata](https://github.com/oli-obk/cargo_metadata) | `0.18.1` | `0.19.0` |



Updates `parry2d-f64` from 0.17.2 to 0.17.3
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.17.2...v0.17.3)

Updates `parry3d-f64` from 0.17.2 to 0.17.3
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.17.2...v0.17.3)

Updates `bytemuck` from 1.19.0 to 1.20.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.19.0...v1.20.0)

Updates `wgpu` from 23.0.0 to 23.0.1
- [Release notes](https://github.com/gfx-rs/wgpu/releases)
- [Changelog](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu/compare/wgpu-v23.0.0...wgpu-v23.0.1)

Updates `octocrab` from 0.42.0 to 0.42.1
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.42.0...v0.42.1)

Updates `url` from 2.5.3 to 2.5.4
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.3...v2.5.4)

Updates `cargo_metadata` from 0.18.1 to 0.19.0
- [Release notes](https://github.com/oli-obk/cargo_metadata/releases)
- [Changelog](https://github.com/oli-obk/cargo_metadata/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oli-obk/cargo_metadata/compare/0.18.1...0.19.0)

---
updated-dependencies:
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: wgpu
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: cargo_metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 13:15:54 +00:00
Hanno Braun
4e543901a3 Simplify name of struct 2024-11-22 20:02:28 +01:00
Hanno Braun
81e4cb130c Simplify name of struct 2024-11-22 20:02:07 +01:00
Hanno Braun
0861be47e1 Prepare for follow-on change 2024-11-22 20:01:45 +01:00
Hanno Braun
10a61dbc9d Update name of trait 2024-11-22 20:00:36 +01:00
Hanno Braun
8f0e5f2818 Clean up module 2024-11-22 20:00:01 +01:00
Hanno Braun
1d46fb43ff Prepare for follow-on change 2024-11-22 19:59:53 +01:00
Hanno Braun
b2fb28311e Move more code into pipelines 2024-11-22 19:58:04 +01:00
Hanno Braun
4e3c0deda2 Split module into simpler ones 2024-11-22 19:40:50 +01:00
Hanno Braun
0b3ede5383 Remove redundant type declarations 2024-11-22 19:39:10 +01:00
Hanno Braun
3440690452 Move Vertex to more appropriate location 2024-11-22 19:37:28 +01:00
Hanno Braun
f4838b14ee Merge shaders into pipelines 2024-11-22 19:36:19 +01:00
Hanno Braun
8052b65384 Move shaders into pipelines directory 2024-11-22 19:32:10 +01:00
Hanno Braun
ac4d954af3 Update name of function parameter 2024-11-22 19:30:50 +01:00
Hanno Braun
ed81321bac Inline redundant constructors 2024-11-22 19:30:15 +01:00
Hanno Braun
6d35aed162 Prepare for follow-on change 2024-11-22 19:29:39 +01:00
Hanno Braun
427c2cb7be Move Pipeline to dedicated module` 2024-11-22 19:28:41 +01:00
Hanno Braun
1f84a2302f Prepare for moving more things into pipelines 2024-11-22 19:26:34 +01:00
Hanno Braun
18a053d46e Sort variables by order of use 2024-11-22 19:25:00 +01:00
Hanno Braun
af94183c68 Make name of variable more specific 2024-11-22 19:23:58 +01:00
Hanno Braun
dfd0ac0dcb Inline redundant variable 2024-11-22 19:23:23 +01:00
Hanno Braun
9fafb63226 Simplify 2024-11-22 19:22:57 +01:00
Hanno Braun
4d45b72045 Inline redundant method 2024-11-22 19:21:11 +01:00
Hanno Braun
761f27c111 Inline redundant method 2024-11-22 19:19:27 +01:00
Hanno Braun
e291565bb9 Inline redundant constructor 2024-11-22 19:18:45 +01:00
Hanno Braun
d0ff6f0b4e Prepare for follow-on change 2024-11-22 19:18:07 +01:00
Hanno Braun
a3d76eb5e6 Consolidate redundant code 2024-11-22 19:17:18 +01:00
Hanno Braun
2b360f5a44 Simplify names of variables 2024-11-22 19:14:33 +01:00
Hanno Braun
32d477ab0f Remove redundant type declarations 2024-11-22 19:14:18 +01:00
Hanno Braun
b9c38fc6cc Increase type safety 2024-11-22 19:13:01 +01:00
Hanno Braun
d6b5972183 Prepare for follow-on change 2024-11-22 19:12:38 +01:00
Hanno Braun
e218666396 Prepare for follow-on change 2024-11-22 19:11:58 +01:00
Hanno Braun
50704cf18b Prepare to increase type safety 2024-11-22 19:11:24 +01:00
Hanno Braun
c878755085 Improve type safety 2024-11-22 19:09:52 +01:00
Hanno Braun
c4f156930b Prepare for follow-on change 2024-11-22 19:09:13 +01:00
Hanno Braun
d6f3d0c3f6 Prepare for follow-on change 2024-11-22 19:08:51 +01:00
Hanno Braun
6c3bdc125f Prepare to improve type safety 2024-11-22 19:07:40 +01:00
Hanno Braun
295efd3382 Inline redundant variables 2024-11-22 19:06:22 +01:00
Hanno Braun
3954df580f Update name of function parameter 2024-11-22 19:05:21 +01:00
Hanno Braun
d4f72ea891 Consolidate redundant code 2024-11-22 19:04:20 +01:00
Hanno Braun
bae966fa63 Inline redundant constructors 2024-11-22 19:02:05 +01:00
Hanno Braun
c710e63479 Remove redundant pub 2024-11-22 19:00:11 +01:00
Hanno Braun
409861df92 Remove redundant mentions of type 2024-11-22 18:59:40 +01:00
Hanno Braun
48fb2d8be4 Simplify name of variable 2024-11-22 18:59:18 +01:00
Hanno Braun
0153bf59e3 Simplify name of variable 2024-11-22 18:59:05 +01:00
Hanno Braun
8c97e1a2bb Add Pipeline::triangles 2024-11-22 18:58:45 +01:00
Hanno Braun
b8509aed00 Add Pipeline::vertices 2024-11-22 18:57:45 +01:00
Hanno Braun
13b4d3d0aa Add Pipelines::new 2024-11-22 18:56:36 +01:00
Hanno Braun
443492e9f0 Prepare for follow-on change 2024-11-22 18:54:53 +01:00
Hanno Braun
ccd9b7d472 Add Pipelines 2024-11-22 18:53:50 +01:00
Hanno Braun
d2a4d60b52 Update name of module 2024-11-22 18:52:23 +01:00
Hanno Braun
0b2e3ecbcf Draw vertices as circles 2024-11-22 18:47:03 +01:00
Hanno Braun
01a12b5c88 Update formatting 2024-11-22 18:12:43 +01:00
Hanno Braun
e13a2b75b1 Run cargo update 2024-11-22 18:11:40 +01:00
Hanno Braun
adfeba7d48 Update color of vertices 2024-11-21 20:02:12 +01:00
Hanno Braun
244b9bed2f Add dedicated shader for drawing vertices 2024-11-21 19:59:24 +01:00
Hanno Braun
445b80ebbb Prepare for adding more shaders 2024-11-21 19:57:41 +01:00
Hanno Braun
5c84189c2d Update name of variable 2024-11-21 19:56:18 +01:00
Hanno Braun
8883b198a2 Update name of struct field 2024-11-21 19:55:00 +01:00
Hanno Braun
762f40a3b8 Prepare for adding more shaders 2024-11-21 19:52:34 +01:00
Hanno Braun
33a3185710 Prepare to improve vertex rendering 2024-11-21 19:51:04 +01:00
Hanno Braun
7e27f5864b Prepare for adding more shaders 2024-11-21 19:49:26 +01:00
Hanno Braun
08c57c37de Prepare for follow-on change 2024-11-21 19:49:04 +01:00
Hanno Braun
2e9a7af4d9 Prepare for adding more shaders 2024-11-21 19:47:50 +01:00
Hanno Braun
3e275dcf57 Prepare for adding more shaders 2024-11-21 19:46:47 +01:00
Hanno Braun
5d91934761 Prepare for adding more shaders 2024-11-21 19:46:09 +01:00
Hanno Braun
6e540153e6 Render vertices
This rendering of vertices is very basic, and just a placeholder.
2024-11-21 19:40:45 +01:00
Hanno Braun
c4adf741e6 Implement Point-Vector addition 2024-11-21 19:33:55 +01:00
Hanno Braun
508e1bbff6 Implement Vector addition 2024-11-21 19:32:54 +01:00
Hanno Braun
1137726ea8 Prepare for expanding math module 2024-11-21 19:32:36 +01:00
Hanno Braun
5b85d38761 Implement addition for Scalar 2024-11-21 19:22:24 +01:00
Hanno Braun
8acafcfbd2 Make conversion more flexible 2024-11-21 19:09:15 +01:00
Hanno Braun
eba06f46d5 Add Vector 2024-11-21 19:08:30 +01:00
Hanno Braun
cbaa544bc6 Prepare for drawing vertices 2024-11-21 18:56:37 +01:00
Hanno Braun
dad052f57a Inline redundant method 2024-11-21 18:54:19 +01:00
Hanno Braun
58ccba5f23 Add comment 2024-11-21 18:53:33 +01:00
Hanno Braun
4e42b6e718 Prepare for doing another render pass 2024-11-21 18:52:53 +01:00
Hanno Braun
93261fbc9f Sort variables by order of use 2024-11-21 18:49:19 +01:00
Hanno Braun
a4ef2011c7 Update name of variable 2024-11-21 18:49:07 +01:00
Hanno Braun
ea5ef5101d Update name of function parameter 2024-11-21 18:48:51 +01:00
Hanno Braun
357210937c Prepare for making another render pass 2024-11-21 18:48:32 +01:00
Hanno Braun
3f82cbbcc9 Simplify 2024-11-21 18:45:06 +01:00
Hanno Braun
77fbd0277b Make name of variable more specific 2024-11-21 18:43:48 +01:00
Hanno Braun
8a38834afb Prepare for adding more shaders 2024-11-21 18:43:33 +01:00
Hanno Braun
346455d1c1 Update name of variable 2024-11-21 18:35:06 +01:00
Hanno Braun
9dc55e363b Make name of variable more explicit 2024-11-21 18:34:52 +01:00
Hanno Braun
b3ee3c458f Prepare for adding more shaders 2024-11-21 18:33:42 +01:00
Hanno Braun
f97b2bde8b Prepare for adding more shaders 2024-11-21 18:30:28 +01:00
Hanno Braun
a5f2fa8a87 Remove unused function parameter 2024-11-21 18:29:08 +01:00
Hanno Braun
18df3cddd7 Prepare for adding more shaders 2024-11-21 18:28:52 +01:00
Hanno Braun
4adef89aaf Run cargo update 2024-11-21 18:09:59 +01:00
Hanno Braun
fad4ad6167 Prepare for adding more shaders 2024-11-20 21:12:56 +01:00
Hanno Braun
fb9d7f1a1c Prepare for follow-on change 2024-11-20 21:11:20 +01:00
Hanno Braun
f6fd6ca31c Update name of function parameter 2024-11-20 21:07:13 +01:00
Hanno Braun
5909ad5022 Make name of struct more specific 2024-11-20 21:05:32 +01:00
Hanno Braun
77417a0b06 Move Uniforms to more appropriate module 2024-11-20 21:05:13 +01:00
Hanno Braun
25ed832be4 Move Vertex to more appropriate module 2024-11-20 21:04:06 +01:00
Hanno Braun
797840bb8b Prepare for adding more shaders 2024-11-20 21:03:15 +01:00
Hanno Braun
2c8a93c329 Prepare for adding more shaders 2024-11-20 21:02:20 +01:00
Hanno Braun
6f7f5c468f Prepare for adding more shaders 2024-11-20 21:01:05 +01:00
Hanno Braun
7b4221f581 Prepare for adding more shaders 2024-11-20 20:53:13 +01:00
Hanno Braun
9e4ea1513c Group related code 2024-11-20 20:49:53 +01:00
Hanno Braun
5abc682c7b Group related code 2024-11-20 20:49:33 +01:00
Hanno Braun
f120f32590 Update name of method parameter 2024-11-20 20:44:50 +01:00
Hanno Braun
807692f497 Run cargo update 2024-11-20 20:44:12 +01:00
Hanno Braun
606b89d842 Update name of variable 2024-11-20 01:42:39 +01:00
Hanno Braun
e6ca719a23 Update name of struct field 2024-11-20 01:42:21 +01:00
Hanno Braun
9ed9c2b80e Remove redundant pubs 2024-11-20 01:41:46 +01:00
Hanno Braun
19c41a86cf Add Pipeline::set 2024-11-20 01:41:39 +01:00
Hanno Braun
0e8dbb677a Add Pipeline::new 2024-11-20 01:40:04 +01:00
Hanno Braun
35bb494d33 Prepare for follow-on change 2024-11-20 01:38:19 +01:00
Hanno Braun
6c61538af4 Add Pipeline 2024-11-20 01:36:35 +01:00
Hanno Braun
5248c617da Prepare for rendering vertices 2024-11-20 01:35:15 +01:00
Hanno Braun
7646c904cb Prepare for rendering vertices 2024-11-20 01:33:54 +01:00
Hanno Braun
25c5262b45 Run cargo update 2024-11-20 01:29:23 +01:00
Hanno Braun
d1854de28b Move more code into fj-viewer 2024-11-18 20:39:39 +01:00
Hanno Braun
0ad2699f6d Remove redundant code 2024-11-18 20:38:22 +01:00
Hanno Braun
73476e5541 Consolidate redundant variables 2024-11-18 20:36:33 +01:00
Hanno Braun
8d850bef54 Simplify 2024-11-18 20:35:58 +01:00
Hanno Braun
4a46455826 Prepare for follow-on change 2024-11-18 20:35:01 +01:00
Hanno Braun
96204d4174 Simplify 2024-11-18 20:34:00 +01:00
Hanno Braun
202641052b Simplify 2024-11-18 20:32:33 +01:00
Hanno Braun
803c456d05 Prepare for making camera tuning configurable 2024-11-18 20:25:56 +01:00
Hanno Braun
49edd1097d Update formatting 2024-11-18 20:25:17 +01:00
Hanno Braun
b8c0ad54f7 Remove unused function parameters 2024-11-18 20:25:01 +01:00
Hanno Braun
213eae8bac Move more code into fj-viewer 2024-11-18 20:24:03 +01:00
Hanno Braun
5549e9ac24 Derive Copy for MouseButton 2024-11-18 20:23:50 +01:00
Hanno Braun
a642e46ee8 Make name of variable more explicit 2024-11-18 20:20:31 +01:00
Hanno Braun
39008000a3 Make name of variable more explicit 2024-11-18 20:20:05 +01:00
Hanno Braun
db8d0f99fe Prepare for making camera tuning configurable 2024-11-18 20:12:00 +01:00
Hanno Braun
d729087b7a Move input tuning constants into fj-viewer 2024-11-18 20:06:49 +01:00
Hanno Braun
d275399de0 Make name of constant more explicit 2024-11-18 20:06:01 +01:00
Hanno Braun
c8e3520ead Make name of constant more explicit 2024-11-18 20:06:01 +01:00
Hanno Braun
72051f0bbd Make name of constant more explicit 2024-11-18 20:06:01 +01:00
Hanno Braun
fca81513ff Update doc comments 2024-11-18 20:04:38 +01:00
Hanno Braun
23731b9127 Prepare for moving more code into fj-viewer 2024-11-18 19:59:24 +01:00
Hanno Braun
743fa8aedc Track most recent mouse button in fj-viewer 2024-11-18 19:58:52 +01:00
Hanno Braun
c5692f37a2 Add fj_viewer::MouseButton 2024-11-18 19:58:30 +01:00
Hanno Braun
4b70d7f1a1 Move code to match order of variants in enum 2024-11-18 19:44:14 +01:00
Hanno Braun
5b65b6cb98 Prepare for follow-on change 2024-11-18 19:42:31 +01:00
Hanno Braun
0aab9be11a Simplify 2024-11-18 19:41:24 +01:00
Hanno Braun
117233d0b7 Prepare for moving more code into fj-viewer 2024-11-18 19:40:17 +01:00
Hanno Braun
1df3e6a1b4 Move code to match order of enum variants 2024-11-18 19:34:33 +01:00
Hanno Braun
d2568de400 Run cargo update 2024-11-18 19:26:33 +01:00
Hanno Braun
e3caf40a89
Merge pull request #2482 from hannobraun/dependabot/cargo/cargo-9e250c741e
Bump the cargo group with 6 updates
2024-11-18 14:17:16 +01:00
dependabot[bot]
5e51c53d10
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.20` | `4.5.21` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.17.1` | `0.17.2` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.17.1` | `0.17.2` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.41.2` | `0.42.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.214` | `1.0.215` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.132` | `1.0.133` |


Updates `clap` from 4.5.20 to 4.5.21
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.20...clap_complete-v4.5.21)

Updates `parry2d-f64` from 0.17.1 to 0.17.2
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.17.1 to 0.17.2
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `octocrab` from 0.41.2 to 0.42.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.41.2...v0.42.0)

Updates `serde` from 1.0.214 to 1.0.215
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.214...v1.0.215)

Updates `serde_json` from 1.0.132 to 1.0.133
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.132...v1.0.133)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 13:09:15 +00:00
Hanno Braun
73c960045a Inline redundant variable 2024-11-15 19:31:55 +01:00
Hanno Braun
466efa2975 Move more logic into fj-viewer 2024-11-15 19:31:27 +01:00
Hanno Braun
532187d22b Remove redundant struct field 2024-11-15 19:28:33 +01:00
Hanno Braun
394f5417b3 Move more logic into fj-viewer 2024-11-15 19:28:22 +01:00
Hanno Braun
bbdf3958c3 Move more logic into fj-viewer 2024-11-15 19:21:43 +01:00
Hanno Braun
16fad1d284 Prepare for follow-on change 2024-11-15 19:20:48 +01:00
Hanno Braun
4781527cc4 Prepare for follow-on change 2024-11-15 19:18:53 +01:00
Hanno Braun
3558ace9f2 Prepare for follow-on change 2024-11-15 19:15:14 +01:00
Hanno Braun
a31381c9e4 Add ScreenSize::is_valid 2024-11-15 19:09:24 +01:00
Hanno Braun
522b7b6982 Make name of function parameter more explicit 2024-11-15 18:58:00 +01:00
Hanno Braun
3fb6584671 Update name of method 2024-11-15 18:57:48 +01:00
Hanno Braun
0d27e84e83 Flatten level of indentation 2024-11-15 18:52:48 +01:00
Hanno Braun
525bc8588d Simplify 2024-11-15 18:39:19 +01:00
Hanno Braun
dbe30fb308 Update doc comment to increase consistency 2024-11-15 18:38:14 +01:00
Hanno Braun
4805298357 Move function to more appropriate location 2024-11-15 18:37:51 +01:00
Hanno Braun
7eeeb1ef7f Simplify 2024-11-15 18:35:57 +01:00
Hanno Braun
92c0b368d1 Move function to more appropriate location 2024-11-15 18:33:46 +01:00
Hanno Braun
48c473e824 Simplify 2024-11-15 18:32:19 +01:00
Hanno Braun
c81d89664c Move function to more appropriate location 2024-11-15 18:31:26 +01:00
Hanno Braun
73d9f3e970 Inline redundant function 2024-11-15 18:26:37 +01:00
Hanno Braun
8acfd105ff Simplify 2024-11-15 18:26:04 +01:00
Hanno Braun
8065543d8e Simplify 2024-11-15 18:24:36 +01:00
Hanno Braun
04bd789006 Prepare for follow-on change 2024-11-15 18:20:20 +01:00
Hanno Braun
d78d3ec182 Inline redundant variable 2024-11-14 17:53:08 +01:00
Hanno Braun
8ac7f54b4a Remove redundant pubs 2024-11-14 17:50:25 +01:00
Hanno Braun
b2a6bd21b2 Update name of function 2024-11-14 17:49:53 +01:00
Hanno Braun
b5f3ece190 Inline redundant module 2024-11-14 17:49:39 +01:00
Hanno Braun
7a76355039 Simplify 2024-11-14 17:48:57 +01:00
Hanno Braun
c97cd9ae2b Inline redundant variable 2024-11-14 17:48:33 +01:00
Hanno Braun
a9debaccb3 Add Transform::up 2024-11-14 17:48:17 +01:00
Hanno Braun
63448f4469 Inline redundant variable 2024-11-14 17:47:06 +01:00
Hanno Braun
523e36a212 Add Transform::right 2024-11-14 17:46:51 +01:00
Hanno Braun
f2b8db6921 Inline redundant module 2024-11-14 17:36:53 +01:00
Hanno Braun
53e4a37fab Update name of function 2024-11-14 17:36:07 +01:00
Hanno Braun
5538be6a30 Simplify 2024-11-14 17:35:46 +01:00
Hanno Braun
6fa8109bf6 Improve formatting 2024-11-14 17:34:05 +01:00
Hanno Braun
a8aad73c65 Update imports 2024-11-14 17:33:21 +01:00
Hanno Braun
5b054f06ce Inline redundant module 2024-11-14 17:33:00 +01:00
Hanno Braun
dd7c743890 Simplify 2024-11-14 17:32:05 +01:00
Hanno Braun
3ac63e6d5a Update name of function 2024-11-14 17:31:31 +01:00
Hanno Braun
c12e7dfd5e Simplify 2024-11-14 17:30:58 +01:00
Hanno Braun
fde836bc7d Update formatting 2024-11-14 17:23:18 +01:00
Hanno Braun
b71ea698ae Remove outdated comment
There no longer is an `unsafe` block here, so no need to comment that
this is sound.
2024-11-14 17:21:07 +01:00
Hanno Braun
bf2e05f238 Run cargo update 2024-11-14 17:03:19 +01:00
Hanno Braun
304110e1e9 Upgrade to wgpu 23.0.0
Close https://github.com/hannobraun/fornjot/issues/2478
2024-11-13 23:54:42 +01:00
Hanno Braun
ab2a51b154
Merge pull request #2481 from hannobraun/dependabot/cargo/cargo-a457a25a31
Bump the cargo group with 5 updates
2024-11-12 07:31:27 +01:00
dependabot[bot]
3adf23dbc6
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.68` | `2.0.3` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.92` | `1.0.93` |
| [image](https://github.com/image-rs/image) | `0.25.4` | `0.25.5` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.41.0` | `1.41.1` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.13.0` | `3.14.0` |


Updates `thiserror` from 1.0.68 to 2.0.3
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.68...2.0.3)

Updates `anyhow` from 1.0.92 to 1.0.93
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.92...1.0.93)

Updates `image` from 0.25.4 to 0.25.5
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.4...v0.25.5)

Updates `tokio` from 1.41.0 to 1.41.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.41.0...tokio-1.41.1)

Updates `tempfile` from 3.13.0 to 3.14.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.13.0...v3.14.0)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 12:22:58 +00:00
Hanno Braun
216fedc77b Fix crash, if no triangles are being rendered 2024-11-08 19:47:29 +01:00
Hanno Braun
32ec73207e Make keyboard input more controlled 2024-11-08 19:15:03 +01:00
Hanno Braun
f445afa5c0 Control operation being rendered with arrow keys 2024-11-06 21:45:20 +01:00
Hanno Braun
83fd8cd031 Prepare for follow-on change 2024-11-06 21:34:13 +01:00
Hanno Braun
36fb2c87c8 Prepare for follow-on change 2024-11-06 21:32:34 +01:00
Hanno Braun
23f75b97c4 Update name of function parameter 2024-11-06 21:30:20 +01:00
Hanno Braun
42ad9202a8 Update name of struct field 2024-11-06 21:30:04 +01:00
Hanno Braun
327090796d Log triangle operations 2024-11-06 21:29:04 +01:00
Hanno Braun
cfb37302f2 Prepare for recording triangle operations 2024-11-06 21:18:47 +01:00
Hanno Braun
1726bb96ea Prepare for recording triangle operations 2024-11-06 21:17:37 +01:00
Hanno Braun
3412ae678d Prepare for follow-on change 2024-11-06 21:16:20 +01:00
Hanno Braun
d0dc33db4d Prepare for follow-on change 2024-11-06 21:15:56 +01:00
Hanno Braun
37810814a7 Update name of function parameter 2024-11-06 21:15:03 +01:00
Hanno Braun
fa1bd45280 Make method more convenient to call 2024-11-06 21:14:41 +01:00
Hanno Braun
6079b6b95e Update formatting 2024-11-06 21:14:04 +01:00
Hanno Braun
3efc1f3aab Update name of function parameter 2024-11-06 21:13:30 +01:00
Hanno Braun
3f777d7b23 Make method more convenient to call 2024-11-06 21:13:08 +01:00
Hanno Braun
19e2c099e3 Split module 2024-11-06 21:09:02 +01:00
Hanno Braun
f8c928a940 Update name of module 2024-11-06 21:08:01 +01:00
Hanno Braun
7cd6de1be7 Update name of struct 2024-11-06 21:07:43 +01:00
Hanno Braun
7bb4dbba4a Split module 2024-11-06 21:07:25 +01:00
Hanno Braun
f40c0bc43b Split module 2024-11-06 21:02:05 +01:00
Hanno Braun
24050cbda9 Prepare to clean up module 2024-11-06 20:59:19 +01:00
Hanno Braun
2a1cecfd7a Prepare to record triangle operations 2024-11-06 20:58:08 +01:00
Hanno Braun
6482073576 Simplify return type 2024-11-06 20:55:56 +01:00
Hanno Braun
36025aa4d7 Make model function more flexible 2024-11-06 20:55:34 +01:00
Hanno Braun
3f03ed49f7 Update name of variable 2024-11-06 20:55:00 +01:00
Hanno Braun
b4131f79e2 Update name of variable 2024-11-06 20:53:08 +01:00
Hanno Braun
d7e0fe6b71 Prepare for recording triangle operations 2024-11-06 20:52:27 +01:00
Hanno Braun
128c1b499c Prepare for displaying operations one by one 2024-11-06 20:48:44 +01:00
Hanno Braun
aff4f5898b Define triangles by referring to meshes 2024-11-06 20:37:30 +01:00
Hanno Braun
7051d681ca Prepare for follow-on change 2024-11-06 20:32:32 +01:00
Hanno Braun
8b0b349c45 Prepare for follow-on change 2024-11-06 20:31:44 +01:00
Hanno Braun
71110bda35 Prepare for follow-on change 2024-11-06 20:29:42 +01:00
Hanno Braun
5fc4cad6f7 Make Operations::vertex more convenient to call 2024-11-06 20:21:42 +01:00
Hanno Braun
ee9fc6c423 Implement From for Point 2024-11-06 20:21:07 +01:00
Hanno Braun
e93329fd1e Convert Point into Struct 2024-11-06 20:19:38 +01:00
Hanno Braun
ad5805825f Implement From<f64> for Scalar 2024-11-06 20:17:53 +01:00
Hanno Braun
204362bdcc Update name of struct 2024-11-06 19:49:19 +01:00
Hanno Braun
25f49d9bc5 Remove redundant code 2024-11-06 19:43:01 +01:00
Hanno Braun
a309fea090 Simplify name of variable 2024-11-06 19:41:53 +01:00
Hanno Braun
64906e8684 Simplify 2024-11-06 19:41:37 +01:00
Hanno Braun
5c3b5c736e Remove redundant code 2024-11-06 19:41:06 +01:00
Hanno Braun
229be4336e Update name of function parameter 2024-11-06 19:40:50 +01:00
Hanno Braun
1c47574e8c Prepare for follow-on change 2024-11-06 19:40:14 +01:00
Hanno Braun
fe8dcb171e Prepare for follow-on change 2024-11-06 19:39:56 +01:00
Hanno Braun
d500788b29 Prepare for follow-on change 2024-11-06 19:36:51 +01:00
Hanno Braun
49e63b5aa1 Derive Debug for Vertex 2024-11-06 19:34:02 +01:00
Hanno Braun
254dfb626c Derive more traits for Vertex 2024-11-06 19:21:11 +01:00
Hanno Braun
68ba8feb90 Implement Ord for Scalar 2024-11-06 19:20:34 +01:00
Hanno Braun
47fea1ecaf Prepare for follow-on change 2024-11-06 19:19:21 +01:00
Hanno Braun
beb116b9e0 Implement Eq for Scalar 2024-11-06 19:16:27 +01:00
Hanno Braun
112efe123a Derive some traits for Scalar 2024-11-06 19:16:00 +01:00
Hanno Braun
864e08b565 Document Scalar::new 2024-11-06 19:15:23 +01:00
Hanno Braun
3e0342e816 Disallow Scalar value being infinite 2024-11-06 19:14:55 +01:00
Hanno Braun
02e1ae05f4 Disallow Scalar value being NaN 2024-11-06 19:14:06 +01:00
Hanno Braun
1da2844030 Update name of struct field 2024-11-06 19:10:41 +01:00
Hanno Braun
3c7a2317c1 Remove redundant pub 2024-11-06 19:10:30 +01:00
Hanno Braun
378047b79a Prepare for making Scalar NaN-safe 2024-11-06 19:10:03 +01:00
Hanno Braun
babe357f11 Prepare for making Scalar NaN-safe 2024-11-06 19:09:11 +01:00
Hanno Braun
c55bb57338 Prepare for making Scalar NaN-safe 2024-11-06 19:07:51 +01:00
Hanno Braun
70e4836108 Prepare for follow-on change 2024-11-06 19:05:53 +01:00
Hanno Braun
024e769c3d Add Scalar 2024-11-06 19:03:14 +01:00
Hanno Braun
e9b8792b26 Prepare for follow-on change 2024-11-06 18:59:44 +01:00
Hanno Braun
0b81934433 Prepare for follow-on change 2024-11-06 18:59:32 +01:00
Hanno Braun
2d33534eed Prepare for follow-on change 2024-11-06 18:55:23 +01:00
Hanno Braun
755428e93e Simplify 2024-11-06 18:52:20 +01:00
Hanno Braun
6868f31a63 Run cargo update 2024-11-06 18:49:31 +01:00
Hanno Braun
70513bf146 Simplify 2024-11-06 18:48:47 +01:00
Hanno Braun
70b8a2ff32 Simplify 2024-11-06 18:48:26 +01:00
Hanno Braun
955d90680d Simplify 2024-11-06 18:48:04 +01:00
Hanno Braun
38c79002ac Prepare for follow-on change 2024-11-06 18:46:24 +01:00
Hanno Braun
54b308269e Prepare for follow-on change 2024-11-06 18:45:57 +01:00
Hanno Braun
d842ffe424 Prepare for follow-on change 2024-11-06 18:44:58 +01:00
Hanno Braun
2dbfddf137 Simplify 2024-11-06 18:41:48 +01:00
Hanno Braun
8320f9264a Simplify 2024-11-06 18:41:39 +01:00
Hanno Braun
a56026c05a Implement Operation for ClonedOperation 2024-11-06 18:41:23 +01:00
Hanno Braun
71adabddce Configure VS Code to use cargo clippy 2024-11-06 18:38:58 +01:00
Hanno Braun
c1379451a8 Simplify 2024-11-06 18:38:19 +01:00
Hanno Braun
00a8b98982 Simplify 2024-11-06 18:35:01 +01:00
Hanno Braun
0917b95fb8 Prepare for follow-on change 2024-11-06 18:34:18 +01:00
Hanno Braun
a7624deead Update formatting 2024-11-06 18:29:57 +01:00
Hanno Braun
f32bc7df51 Fix formatting 2024-11-06 18:29:39 +01:00
Hanno Braun
b8d2d3ee79 Prepare for follow-on change 2024-11-06 18:29:18 +01:00
Hanno Braun
b2b8b73bf7 Prepare for follow-on change 2024-11-06 18:28:48 +01:00
Hanno Braun
7dcd55fd8f Simplify 2024-11-06 18:27:16 +01:00
Hanno Braun
f1112f9d49 Prepare for follow-on change 2024-11-05 19:47:11 +01:00
Hanno Braun
ccf934c6f3 Add OperationInSequence 2024-11-05 19:46:21 +01:00
Hanno Braun
8e134a4ed1 Simplify 2024-11-05 19:42:37 +01:00
Hanno Braun
9039c81a26 Simplify 2024-11-05 19:41:24 +01:00
Hanno Braun
e7f9dd5d06 Simplify 2024-11-05 19:39:44 +01:00
Hanno Braun
84fb848ae6 Simplify 2024-11-05 19:39:20 +01:00
Hanno Braun
686c262c61 Simplify 2024-11-05 19:29:34 +01:00
Hanno Braun
1889552c8e Prepare for displaying operations step-by-step 2024-11-05 19:28:15 +01:00
Hanno Braun
e642890981 Make trait implementation more flexible 2024-11-05 19:27:59 +01:00
Hanno Braun
d3713aefe9 Implement Operation for Vertex 2024-11-05 19:26:49 +01:00
Hanno Braun
3ee2049560 Prepare for follow-on change 2024-11-05 19:25:16 +01:00
Hanno Braun
deb131ab39 Update name of function parameter 2024-11-05 18:19:27 +01:00
Hanno Braun
bc62168984 Simplify type of function parameter 2024-11-05 18:18:41 +01:00
Hanno Braun
68b97e02a2 Add Point 2024-11-05 18:17:48 +01:00
Hanno Braun
20b69fc757 Prepare for follow-on change 2024-11-05 18:11:51 +01:00
Hanno Braun
a0831e6e62 Prepare for follow-on change 2024-11-05 18:11:32 +01:00
Hanno Braun
2d4b58e07f Prepare for follow-on change 2024-11-05 18:10:44 +01:00
Hanno Braun
3ac70f4877 Prepare for follow-on change 2024-11-05 18:08:41 +01:00
Hanno Braun
8fe493c8d1 Simplify 2024-11-05 18:04:00 +01:00
Hanno Braun
f9643a257b Remove redundant code 2024-11-05 18:03:32 +01:00
Hanno Braun
f04983e6ad Use f64 on the geometry side 2024-11-05 18:02:34 +01:00
Hanno Braun
9b4ae17a13 Convert Vertex into struct 2024-11-05 18:01:33 +01:00
Hanno Braun
94e157bbf0 Add Triangle 2024-11-05 17:55:33 +01:00
Hanno Braun
34aa368907 Add Index 2024-11-05 17:54:57 +01:00
Hanno Braun
596a02d82a Update name of module 2024-11-05 17:53:36 +01:00
Hanno Braun
cdd242e4c5 Add Vertex 2024-11-05 17:53:11 +01:00
Hanno Braun
47c935044a Simplify 2024-11-05 00:01:05 +01:00
Hanno Braun
c0d515e47f Fix aspect ratio 2024-11-05 00:01:05 +01:00
Hanno Braun
abff5979fe Prepare for fixing aspect ratio 2024-11-05 00:01:05 +01:00
Hanno Braun
fd9a6161fc Inline redundant trait 2024-11-05 00:01:05 +01:00
Hanno Braun
07968c7bff Inline redundant variable 2024-11-05 00:01:05 +01:00
Hanno Braun
916f927e1e Prepare for fixing aspect ratio 2024-11-05 00:01:05 +01:00
Hanno Braun
1d421236cd Add depth buffer 2024-11-05 00:01:05 +01:00
Hanno Braun
74fba739a6 Make variable name more explicit 2024-11-04 23:32:49 +01:00
Hanno Braun
cdd60de12e Make render pass descriptor more explicit 2024-11-04 23:30:33 +01:00
Hanno Braun
97401e8bd0 Color surface according to normal 2024-11-04 21:03:34 +01:00
Hanno Braun
979c82c129 Simplify normal 2024-11-04 21:03:10 +01:00
Hanno Braun
317e320f44 Prepare for follow-on change 2024-11-04 20:52:14 +01:00
Hanno Braun
c86b621244 Provide normal to fragment shader 2024-11-04 20:47:18 +01:00
Hanno Braun
cc156b43ab Add transformation matrix for normal vectors 2024-11-04 20:44:42 +01:00
Hanno Braun
95a2cb4c7d Add Uniforms in shader 2024-11-04 20:42:37 +01:00
Hanno Braun
78a178b710 Add Uniforms 2024-11-04 20:41:20 +01:00
Hanno Braun
1ca86301af Replace Point 2024-11-04 20:38:50 +01:00
Hanno Braun
072c813995 Replace Vector 2024-11-04 20:37:07 +01:00
Hanno Braun
653cc569bc Start to replace Vector 2024-11-04 20:36:15 +01:00
Hanno Braun
5c98983a0c Replace Mat4x4 2024-11-04 20:34:58 +01:00
Hanno Braun
efadbd026f Prepare for replacing homegrown math types 2024-11-04 20:34:15 +01:00
Hanno Braun
48c62b69be Prepare for follow-on change 2024-11-04 20:33:58 +01:00
Hanno Braun
5ba8905512 Prepare for replacing Mat4x4 2024-11-04 20:23:46 +01:00
Hanno Braun
8671a88376 Add dependency on glam 2024-11-04 20:22:38 +01:00
Hanno Braun
a90567ec62 Run cargo update 2024-11-04 19:24:32 +01:00
Hanno Braun
5907a34640 Run cargo update 2024-11-04 19:24:13 +01:00
Hanno Braun
7d30ab44e7 Upgrade wgpu to 23.0.0 2024-11-04 19:24:13 +01:00
Hanno Braun
b8b77554a5 Un-pin wgpu dependency
I've changed my mind about using egui.
2024-11-04 19:24:13 +01:00
Hanno Braun
294c69c414
Merge pull request #2480 from hannobraun/dependabot/cargo/cargo-221f68f7ce
Bump the cargo group across 1 directory with 4 updates
2024-11-04 19:23:30 +01:00
dependabot[bot]
438cd1ee3e
Bump the cargo group across 1 directory with 4 updates
Bumps the cargo group with 4 updates in the / directory: [thiserror](https://github.com/dtolnay/thiserror), [anyhow](https://github.com/dtolnay/anyhow), [nalgebra](https://github.com/dimforge/nalgebra) and [url](https://github.com/servo/rust-url).


Updates `thiserror` from 1.0.65 to 1.0.68
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.65...1.0.68)

Updates `anyhow` from 1.0.91 to 1.0.92
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.91...1.0.92)

Updates `nalgebra` from 0.33.1 to 0.33.2
- [Changelog](https://github.com/dimforge/nalgebra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/compare/v0.33.1...v0.33.2)

Updates `url` from 2.5.2 to 2.5.3
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.2...v2.5.3)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: nalgebra
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-04 18:00:41 +00:00
Hanno Braun
25a303edea Make normal accessible in fragment shader 2024-10-31 22:15:37 +01:00
Hanno Braun
a1361661d8 Update formatting 2024-10-31 22:15:04 +01:00
Hanno Braun
6650df381e Consolidate redundant type definition 2024-10-31 22:14:30 +01:00
Hanno Braun
11abf36dd6 Prepare to implement shading 2024-10-31 22:12:39 +01:00
Hanno Braun
6842a6bf82 Simplify 2024-10-31 22:10:54 +01:00
Hanno Braun
3ce11ac71b Remove redundant #[allow(...)] 2024-10-31 22:10:01 +01:00
Hanno Braun
6b5b54574f Add normals to vertices 2024-10-31 22:09:40 +01:00
Hanno Braun
c29741730b Consolidate redundant code 2024-10-31 22:08:44 +01:00
Hanno Braun
4108371ac1 Implement subtraction of points 2024-10-31 22:01:42 +01:00
Hanno Braun
9a01093fd8 Derive Copy for Point 2024-10-31 22:00:51 +01:00
Hanno Braun
e1d4de9f55 Update name of variable 2024-10-31 21:57:09 +01:00
Hanno Braun
fee497718f Prepare for follow-on change 2024-10-31 21:56:53 +01:00
Hanno Braun
533b620433 Split expression into simpler ones 2024-10-31 21:47:15 +01:00
Hanno Braun
c5fe1cd477 Prepare for computing surface normals 2024-10-31 21:46:43 +01:00
Hanno Braun
039a6245ef Prepare for using custom vertex type 2024-10-31 21:46:08 +01:00
Hanno Braun
0e4ef20b81 Prepare for follow-on change 2024-10-31 21:45:11 +01:00
Hanno Braun
63f228d634 Split statement into two simpler ones 2024-10-31 21:42:39 +01:00
Hanno Braun
338adb6daf Prepare for follow-on change 2024-10-31 21:41:38 +01:00
Hanno Braun
624ed2886b Remove redundant pub 2024-10-31 21:28:08 +01:00
Hanno Braun
79c018b39b Add Mesh::triangles 2024-10-31 21:27:55 +01:00
Hanno Braun
553042ed56 Remove redundant pub 2024-10-31 21:26:51 +01:00
Hanno Braun
7146ce45a6 Add Mesh::vertices 2024-10-31 21:26:32 +01:00
Hanno Braun
924e9a03d4 Add Mesh::push_triangle 2024-10-31 21:24:42 +01:00
Hanno Braun
e1f79bd171 Add Mesh::push_vertex 2024-10-31 21:23:58 +01:00
Hanno Braun
48c7a842a0 Prepare for follow-on change 2024-10-31 21:23:15 +01:00
Hanno Braun
3931991aaf Derive Default for Mesh 2024-10-31 21:21:32 +01:00
Hanno Braun
cbd4f9e216 Rotate camera around z 2024-10-31 21:19:16 +01:00
Hanno Braun
7c2bffcf2c Move camera higher 2024-10-31 21:18:49 +01:00
Hanno Braun
f5ab8da0d6 Rotate camera around x 2024-10-31 21:14:45 +01:00
Hanno Braun
67aae47812 Move camera up 2024-10-31 21:09:39 +01:00
Hanno Braun
293c2ae505 Do not set near plane at zero 2024-10-31 21:07:40 +01:00
Hanno Braun
cb85813d03 Implement matrix multiplication 2024-10-31 21:02:48 +01:00
Hanno Braun
a3502baff0 Add Mat4x4::default_transform 2024-10-31 20:53:38 +01:00
Hanno Braun
4a506c3adb Update name of constructor 2024-10-31 20:52:31 +01:00
Hanno Braun
f1b537b6d8 Use perspective projection 2024-10-31 20:51:44 +01:00
Hanno Braun
ed62604435 Make configuration more explicit 2024-10-31 20:01:32 +01:00
Hanno Braun
fdf3ffd88f Simplify 2024-10-31 17:48:18 +01:00
Hanno Braun
c20fe7475a Add Mat4x4 2024-10-31 17:46:44 +01:00
Hanno Braun
c82af034c8 Add transformation matrix 2024-10-30 18:48:37 +01:00
Hanno Braun
18d6c7b6d7 Render mesh 2024-10-30 18:23:06 +01:00
Hanno Braun
63fdd08562 Make vertex type friendlier for graphics 2024-10-30 18:16:58 +01:00
Hanno Braun
edd18750a9 Prepare for rendering mesh 2024-10-30 18:16:58 +01:00
Hanno Braun
0e890bf964 Change index format to have dependable size 2024-10-30 18:02:14 +01:00
Hanno Braun
f499b0f6a9 Pin wgpu version
I foresee needing egui in the near future. Since a new version of wgpu
just dropped, and egui might take some time to release a compatible
version, I'm pinning wgpu for the time being.
2024-10-30 17:56:44 +01:00
Hanno Braun
4d1d701d43 Prepare to render mesh 2024-10-30 03:13:58 +01:00
Hanno Braun
c8a78fae79 Prepare for follow-on change 2024-10-30 02:51:30 +01:00
Hanno Braun
513dcdc590 Prepare to draw mesh 2024-10-30 02:50:41 +01:00
Hanno Braun
63e1f15e7b Prepare for follow-on change 2024-10-30 02:45:51 +01:00
Hanno Braun
ab979525f9 Close on escape key 2024-10-30 02:43:18 +01:00
Hanno Braun
aa61ee52fe Exit when window is closed 2024-10-30 02:40:40 +01:00
Hanno Braun
2b5403530a Add Renderer::render 2024-10-30 02:39:39 +01:00
Hanno Braun
63b921fc3f Updat error message 2024-10-30 02:38:20 +01:00
Hanno Braun
4fafacd01b Improve error handling 2024-10-30 02:38:01 +01:00
Hanno Braun
2875247d8c Prepare to improve error handling 2024-10-30 02:37:42 +01:00
Hanno Braun
9cb33e8bd3 Improve error handling 2024-10-30 02:34:47 +01:00
Hanno Braun
72fcf21580 Split statement into simpler ones 2024-10-30 02:33:12 +01:00
Hanno Braun
1ca1a7c268 Update formatting 2024-10-30 02:32:17 +01:00
Hanno Braun
61ce412533 Consolidate redundant code 2024-10-30 02:31:53 +01:00
Hanno Braun
ab4a2f6f40 Improve error handling 2024-10-30 02:30:54 +01:00
Hanno Braun
8e2ec045c3 Add Renderer::new 2024-10-30 02:28:35 +01:00
Hanno Braun
e6e9eeaabc Prepare for follow-on change 2024-10-30 02:27:08 +01:00
Hanno Braun
7e3a4f0853 Add Renderer 2024-10-30 02:26:03 +01:00
Hanno Braun
6b12f6aab8 Prepare for follow-on change 2024-10-30 02:24:09 +01:00
Hanno Braun
ce19e97253 Update name of function 2024-10-30 02:23:48 +01:00
Hanno Braun
bf2034f74a Update formatting 2024-10-30 02:23:26 +01:00
Hanno Braun
f735edee68 Update name of module 2024-10-30 02:23:13 +01:00
Hanno Braun
4c6b0154c9 Open window 2024-10-30 02:18:49 +01:00
Hanno Braun
696c69e2f3 Prepare to open window 2024-10-30 02:18:38 +01:00
Hanno Braun
decf1aaeef Simplify 2024-10-30 02:09:45 +01:00
Hanno Braun
e3caa6837b Prepare for follow-on change 2024-10-30 02:07:59 +01:00
Hanno Braun
ae869965c8 Prepare to open window 2024-10-30 01:51:13 +01:00
Hanno Braun
2a9042361d Prepare to open window 2024-10-30 01:47:24 +01:00
Hanno Braun
3c0ff8bffc Create event loop 2024-10-30 01:44:39 +01:00
Hanno Braun
99275c1404 Prepare for opening window 2024-10-30 01:44:29 +01:00
Hanno Braun
33aad5c58f Prepare to open window 2024-10-30 01:35:37 +01:00
Hanno Braun
198998c73b Prepare to open window 2024-10-30 01:34:48 +01:00
Hanno Braun
1f04b89dbc Add placeholder for render 2024-10-30 01:33:19 +01:00
Hanno Braun
5664e97561 Relax type of function parameter 2024-10-30 01:32:04 +01:00
Hanno Braun
2e630af798 Prepare for follow-on change 2024-10-30 01:31:44 +01:00
Hanno Braun
0c46ec8d3b Simplify 2024-10-30 01:31:15 +01:00
Hanno Braun
c2eb84c84b Run cargo fmt 2024-10-30 01:30:53 +01:00
Hanno Braun
552bdc4c96 Inline redundant variable 2024-10-30 01:29:45 +01:00
Hanno Braun
d344880c75 Inline redundant variable 2024-10-30 01:29:28 +01:00
Hanno Braun
fc595f6246 Simplify model 2024-10-30 01:29:10 +01:00
Hanno Braun
663a794840 Simplify 2024-10-30 01:28:32 +01:00
Hanno Braun
b5f968d6f2 Prepare to simplify 2024-10-30 01:28:13 +01:00
Hanno Braun
b610abeffc Add Mesh 2024-10-30 01:27:55 +01:00
Hanno Braun
02348ebe9e Move export to dedicated module 2024-10-30 01:25:12 +01:00
Hanno Braun
a5f2d71995 Start organizing into modules 2024-10-30 01:24:24 +01:00
Hanno Braun
54b4c80b30 Add export function 2024-10-30 01:18:54 +01:00
Hanno Braun
7334d5839a Ignore output files 2024-10-30 01:14:13 +01:00
Hanno Braun
b675afdbaa Generate 3MF file 2024-10-30 01:13:49 +01:00
Hanno Braun
47d6296680 Format on save 2024-10-30 00:52:20 +01:00
Hanno Braun
4acfaa2c97 Prepare for follow-on change 2024-10-30 00:51:01 +01:00
Hanno Braun
53cffe0bfe Keep experiment config out of of top-level file 2024-10-30 00:50:02 +01:00
Hanno Braun
7c034a2c16 Prepare for follow-on change 2024-10-30 00:48:05 +01:00
Hanno Braun
b33398908f Prepare for exporting 3MF 2024-10-30 00:46:09 +01:00
Hanno Braun
ae652811a6 Ignore target/ folders of experiments 2024-10-30 00:45:16 +01:00
Hanno Braun
a66e8f4216 Start experiment 2024-10-30 00:44:57 +01:00
Hanno Braun
1389be77ec Prepare for follow-on change 2024-10-29 17:55:52 +01:00
Hanno Braun
f1101c20d6 Inline redundant variable 2024-10-29 17:55:12 +01:00
Hanno Braun
cfbe58d55f Run cargo update 2024-10-28 19:55:44 +01:00
Hanno Braun
d0137f37ee
Merge pull request #2475 from hannobraun/dependabot/cargo/cargo-9913c3a26a
Bump the cargo group with 5 updates
2024-10-28 14:01:38 +01:00
dependabot[bot]
51a85f2ac3
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.64` | `1.0.65` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.90` | `1.0.91` |
| [regex](https://github.com/rust-lang/regex) | `1.11.0` | `1.11.1` |
| [serde](https://github.com/serde-rs/serde) | `1.0.210` | `1.0.213` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.40.0` | `1.41.0` |


Updates `thiserror` from 1.0.64 to 1.0.65
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.64...1.0.65)

Updates `anyhow` from 1.0.90 to 1.0.91
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.90...1.0.91)

Updates `regex` from 1.11.0 to 1.11.1
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.11.0...1.11.1)

Updates `serde` from 1.0.210 to 1.0.213
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.213)

Updates `tokio` from 1.40.0 to 1.41.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.40.0...tokio-1.41.0)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 12:39:45 +00:00
Hanno Braun
f7f09b324f Run cargo fmt 2024-10-25 20:54:43 +02:00
Hanno Braun
a72c0ed188 Update doc comment 2024-10-24 19:16:05 +02:00
Hanno Braun
c93ff10f68 Update name of method 2024-10-24 19:15:28 +02:00
Hanno Braun
4f42f01076 Update name of struct field 2024-10-24 19:14:40 +02:00
Hanno Braun
6d5592336d Update doc comment 2024-10-24 19:14:08 +02:00
Hanno Braun
b333b6d1b3 Update name of method argument 2024-10-24 19:13:10 +02:00
Hanno Braun
4c943be58d Update name of struct field 2024-10-24 19:12:22 +02:00
Hanno Braun
6d5ce7c385 Update name of struct 2024-10-24 19:11:46 +02:00
Hanno Braun
0fb8dddd2c Store generated geometry alongside generator 2024-10-24 19:10:03 +02:00
Hanno Braun
8e5d07b9ac Add TriMesh::empty 2024-10-24 19:05:33 +02:00
Hanno Braun
dd8ac91c40 Add TriMesh 2024-10-24 19:04:27 +02:00
Hanno Braun
b96cc3ff05 Update doc comment 2024-10-24 19:02:42 +02:00
Hanno Braun
94e67f1093 Update name of module 2024-10-24 19:01:43 +02:00
Hanno Braun
54b7c877e3 Update doc comment 2024-10-24 18:59:00 +02:00
Hanno Braun
eaeb6e8ee5 Update name of method 2024-10-24 18:58:07 +02:00
Hanno Braun
e3a1ffde5b Update doc comment 2024-10-24 18:57:17 +02:00
Hanno Braun
b847359f76 Update name of method parameter 2024-10-24 18:54:59 +02:00
Hanno Braun
2730ac19c5 Update name of struct field 2024-10-24 18:54:39 +02:00
Hanno Braun
3a452be34c Update name of struct field 2024-10-24 18:54:08 +02:00
Hanno Braun
166081a995 Update name of type 2024-10-24 18:53:25 +02:00
Hanno Braun
2935c24482 Store generated curve geometry alongside generator 2024-10-24 18:51:43 +02:00
Hanno Braun
f2a0cdc7d5 Fix cargo doc warning 2024-10-24 18:34:58 +02:00
Hanno Braun
90e37a053c Update list of sponsors 2024-10-24 18:25:47 +02:00
Hanno Braun
473d63babf Update doc comments 2024-10-23 19:59:37 +02:00
Hanno Braun
6b47590cf0 Update doc comments 2024-10-23 19:57:19 +02:00
Hanno Braun
90a378f32a Update name of function parameter 2024-10-23 19:56:06 +02:00
Hanno Braun
6899c7a824 Update name of struct field 2024-10-23 19:55:36 +02:00
Hanno Braun
8e1abaa2c9 Update name of function parameter 2024-10-23 19:54:04 +02:00
Hanno Braun
eead7ee1ed Update name of struct field 2024-10-23 19:53:43 +02:00
Hanno Braun
ef8d73f78c Update name of type 2024-10-23 19:52:44 +02:00
Hanno Braun
bccad4d197 Update name of field in enum variant 2024-10-23 19:49:36 +02:00
Hanno Braun
b30b1f37a4 Update name of field in enum variant 2024-10-23 19:49:09 +02:00
Hanno Braun
88d88bda7e Update name of function parameter 2024-10-23 19:48:32 +02:00
Hanno Braun
3b2607f127 Update name of struct field 2024-10-23 19:48:10 +02:00
Hanno Braun
0bd9554519 Update type name 2024-10-23 19:46:36 +02:00
Hanno Braun
01e5ffbd05 Group related methods 2024-10-23 19:44:06 +02:00
Hanno Braun
721b2d1e8a Update doc comments 2024-10-23 19:43:26 +02:00
Hanno Braun
d9092b4302 Update name of method 2024-10-23 19:42:29 +02:00
Hanno Braun
018c2d4e46 Update name of method 2024-10-23 19:41:35 +02:00
Hanno Braun
9156b40207 Update name of struct field 2024-10-23 19:40:12 +02:00
Hanno Braun
2a8f050d6a Update name of struct field 2024-10-23 19:39:39 +02:00
Hanno Braun
84e98d7f74 Separate field for new and old geometry
The representation of new geometry will change a bit. It will no longer
make sense to sort those fields by type of geometry.
2024-10-23 19:38:59 +02:00
Hanno Braun
bd88268122 Simplify 2024-10-23 19:30:02 +02:00
Hanno Braun
6d9a55c574 Un-derive unused Clone implementation 2024-10-23 19:29:49 +02:00
Hanno Braun
1b8cb20ce5 Refer to surface by Handle
There's currently this weird redundant thing going on with the new
geometry, where `Rc`s are used to refer to surface geometry. This is
kinda redundant with the established way it's already being done, i.e.
refering to stuff via `Handle`s.

This is one step towards addressing that.
2024-10-23 19:27:54 +02:00
Hanno Braun
8a7035f624 Prepare for follow-on change 2024-10-23 19:22:00 +02:00
Hanno Braun
f80778e7a7 Prepare for follow-on change 2024-10-23 19:19:58 +02:00
Hanno Braun
db957dc36f Prepare for follow-on change 2024-10-23 19:19:19 +02:00
Hanno Braun
da0965e311 Prepare for follow-on change 2024-10-23 19:17:14 +02:00
Hanno Braun
7ca63e4344 Prepare for follow-on change 2024-10-23 19:16:28 +02:00
Hanno Braun
2e04c47ea9 Prepare for follow-on change 2024-10-23 19:15:58 +02:00
Hanno Braun
6f98fb059c Prepare for follow-on change 2024-10-23 19:06:27 +02:00
Hanno Braun
3fb44e6932 Prepare for follow-on change 2024-10-23 19:05:39 +02:00
Hanno Braun
e58dbdddd3 Remove tests
They are pretty simple, and they're getting in the way of changes I'm
working on. I think they're no longer carrying their weight.
2024-10-23 19:04:54 +02:00
Hanno Braun
3f9b4a1345 Simplify 2024-10-23 19:00:39 +02:00
Hanno Braun
b6f2cf80b8 Un-derive unused Clone implementation 2024-10-23 19:00:01 +02:00
Hanno Braun
ca51bae4d2 Remove unnecessary .clone()s 2024-10-23 18:59:40 +02:00
Hanno Braun
465e84131a Take events by value when evolving state
This enables some simplifications, since now certain aspects of events
no longer have to be `Clone`.
2024-10-23 18:57:09 +02:00
Hanno Braun
88dc031a78 Prepare for follow-on change 2024-10-23 18:54:39 +02:00
Hanno Braun
6debe7279f Fix name of variable 2024-10-23 18:54:00 +02:00
Hanno Braun
1e8bbb9bb8 Simplify 2024-10-23 18:53:41 +02:00
Hanno Braun
8813c8324b Add Layer::process_command 2024-10-23 18:50:50 +02:00
Hanno Braun
c16fbfe33e Update doc comment 2024-10-23 18:49:20 +02:00
Hanno Braun
afe0698296 Make name of method more explicit 2024-10-23 18:47:57 +02:00
Hanno Braun
16c2adaa7b Remove errant comment 2024-10-23 18:23:54 +02:00
Hanno Braun
a21f978080 Run cargo update 2024-10-21 18:31:32 +02:00
Hanno Braun
f3ae1c666d Add Polyline::line_segments 2024-10-21 18:29:01 +02:00
Hanno Braun
48d102dd1b
Merge pull request #2474 from hannobraun/dependabot/cargo/cargo-7c283dbf1c
Bump the cargo group with 5 updates
2024-10-21 14:57:37 +02:00
dependabot[bot]
b291eda89e
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.89` | `1.0.90` |
| [nalgebra](https://github.com/dimforge/nalgebra) | `0.33.0` | `0.33.1` |
| [image](https://github.com/image-rs/image) | `0.25.2` | `0.25.4` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.41.1` | `0.41.2` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.128` | `1.0.132` |


Updates `anyhow` from 1.0.89 to 1.0.90
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.89...1.0.90)

Updates `nalgebra` from 0.33.0 to 0.33.1
- [Changelog](https://github.com/dimforge/nalgebra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/commits/v0.33.1)

Updates `image` from 0.25.2 to 0.25.4
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.2...v0.25.4)

Updates `octocrab` from 0.41.1 to 0.41.2
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.41.1...v0.41.2)

Updates `serde_json` from 1.0.128 to 1.0.132
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.128...1.0.132)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: nalgebra
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 12:51:23 +00:00
Hanno Braun
5170ff47cb Improve documentation of Polyline 2024-10-15 20:17:57 +02:00
Hanno Braun
10db20edcf Add Polyline::from_curve 2024-10-15 20:09:42 +02:00
Hanno Braun
f97daf112f Make function generic over dimensionality 2024-10-15 20:02:49 +02:00
Hanno Braun
32532fdb6c Update function name 2024-10-15 20:02:00 +02:00
Hanno Braun
d447259e49 Add Polyline 2024-10-15 19:56:17 +02:00
Hanno Braun
29daf84510 Use new-style surface geometry in more places 2024-10-14 22:15:55 +02:00
Hanno Braun
1c0ad95e67 Implement GenTriMesh for types that deref to it 2024-10-14 22:02:01 +02:00
Hanno Braun
a9ed3ba790 Update formatting 2024-10-14 21:57:14 +02:00
Hanno Braun
0d9c6aae6a Create TransformedSurface 2024-10-14 21:57:14 +02:00
Hanno Braun
d329fc35bd Simplify 2024-10-14 21:50:02 +02:00
Hanno Braun
4a778e2f88 Consolidate redundant type definitions 2024-10-14 21:46:28 +02:00
Hanno Braun
748cef852e Inline redundant method 2024-10-14 21:42:50 +02:00
Hanno Braun
ac93f9d26e Define new-style geometry on surface transform 2024-10-14 21:38:36 +02:00
Hanno Braun
06e2f09dba Define new-style geometry in BuildSurface 2024-10-14 21:35:29 +02:00
Hanno Braun
d75296acc6 Add Geometry::of_surface_2 2024-10-14 21:34:38 +02:00
Hanno Braun
95111e6593 Add infrastructure for defining new surface geom 2024-10-14 21:34:38 +02:00
Hanno Braun
a07353a8c7 Add SurfaceGeom 2024-10-14 21:19:19 +02:00
Hanno Braun
3714644bec Merge related modules 2024-10-14 21:16:55 +02:00
Hanno Braun
43c6e491dd Run cargo update 2024-10-14 21:12:09 +02:00
Hanno Braun
d26acb1bbc
Merge pull request #2473 from hannobraun/dependabot/cargo/cargo-51df736430
Bump the cargo group with 2 updates
2024-10-14 17:08:19 +02:00
dependabot[bot]
645e636c81
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [bytemuck](https://github.com/Lokathor/bytemuck) and [octocrab](https://github.com/XAMPPRocky/octocrab).


Updates `bytemuck` from 1.18.0 to 1.19.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.18.0...v1.19.0)

Updates `octocrab` from 0.41.0 to 0.41.1
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.41.0...v0.41.1)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 12:08:53 +00:00
Hanno Braun
7e150a5924 Don't rely on specifics of SweptSurface 2024-10-11 19:43:39 +02:00
Hanno Braun
996d704fd7 Implement SubAssign for Point 2024-10-11 19:40:28 +02:00
Hanno Braun
1236513539 Update comment 2024-10-11 19:32:47 +02:00
Hanno Braun
35a689cfd7 Prepare for follow-on change 2024-10-11 19:32:10 +02:00
Hanno Braun
a0a470009b Inline redundant variable 2024-10-11 19:29:46 +02:00
Hanno Braun
a725998f31 Prepare for follow-on change 2024-10-11 19:29:11 +02:00
Hanno Braun
c10366951a Add TransformedSurface 2024-10-11 19:19:32 +02:00
Hanno Braun
93c982c509 Update doc comment 2024-10-11 18:57:59 +02:00
Hanno Braun
ee2bb384a4 Remove redundant doc comment 2024-10-11 18:55:08 +02:00
Hanno Braun
8cd6501ebe Remove unnecessary pub 2024-10-11 18:54:56 +02:00
Hanno Braun
3928443331 Re-export SweptCurve from surfaces 2024-10-11 18:54:04 +02:00
Hanno Braun
e2c97bfd54 Remove unused re-export 2024-10-11 18:48:56 +02:00
Hanno Braun
6f5ab430d8 Update imports 2024-10-11 18:48:44 +02:00
Hanno Braun
15689057a8 Update documentation of SweptCurve 2024-10-11 18:47:12 +02:00
Hanno Braun
c961770ec0 Update module path 2024-10-11 18:46:58 +02:00
Hanno Braun
57060be1ed Inline redundant method 2024-10-11 18:42:24 +02:00
Hanno Braun
be9634bb67 Move tests to code under test 2024-10-11 18:40:50 +02:00
Hanno Braun
8e47f0f8d6 Add convert_vector_surface_to_global 2024-10-11 18:40:09 +02:00
Hanno Braun
bc63af3222 Inline redundant method 2024-10-11 18:38:07 +02:00
Hanno Braun
ec3732c0b1 Consolidate redundant code 2024-10-11 18:35:50 +02:00
Hanno Braun
737ed52fa0 Consolidate redundant code 2024-10-11 18:33:52 +02:00
Hanno Braun
f992592cf2 Add convert_point_surface_to_global 2024-10-11 18:28:47 +02:00
Hanno Braun
a820229829 Make GenTriMesh object-safe 2024-10-11 18:27:31 +02:00
Hanno Braun
c946fabc91 Prepare for making GenTriMesh object-safe 2024-10-11 18:25:37 +02:00
Hanno Braun
6ba93fff82 Prepare for expanding geometry::util 2024-10-11 18:21:05 +02:00
Hanno Braun
380cbb84ce Prepare for expanding geometry::util 2024-10-11 18:19:11 +02:00
Hanno Braun
a036ee99b9 Extract GenTriMesh trait from SweptCurve 2024-10-11 18:16:09 +02:00
Hanno Braun
251487f56d Rename SurfaceGeom to SweptCurve
Under the new geometry system, this is no longer "the surface geometry",
this is just one kind of surface geometry: A curve swept along a path.
This new name better reflects that.
2024-10-11 18:07:39 +02:00
Hanno Braun
a08f4024c9 Mention projects built on top of Fornjot 2024-10-10 20:05:22 +02:00
Hanno Braun
21217f7b2f Improve wording 2024-10-10 20:01:51 +02:00
Hanno Braun
c2f6d3bee8 Remove reference to feature wishlist
I have deprecated it just now.
2024-10-10 20:01:17 +02:00
Hanno Braun
eeb2eb1786 Add SurfaceGeom::generate_tri_mesh 2024-10-10 19:06:13 +02:00
Hanno Braun
671ffc169a Add surface_aabb_from_bounded_curve 2024-10-10 18:49:38 +02:00
Hanno Braun
27179edb8f Add curve_point_to_surface_point 2024-10-10 18:43:54 +02:00
Hanno Braun
69b347961e Fix type names in doc comment 2024-10-10 18:35:11 +02:00
Hanno Braun
6f584ad1a9 Run cargo update 2024-10-10 18:31:08 +02:00
Hanno Braun
b0628995d2 Update list of sponsors 2024-10-10 18:19:21 +02:00
Hanno Braun
b7c9780206
Merge pull request #2472 from hannobraun/dependabot/cargo/cargo-77bb3f3ed7
Bump the cargo group with 4 updates
2024-10-08 11:04:02 +02:00
dependabot[bot]
ec4b26f175
Bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [clap](https://github.com/clap-rs/clap), [futures](https://github.com/rust-lang/futures-rs), [octocrab](https://github.com/XAMPPRocky/octocrab) and [cmd_lib](https://github.com/rust-shell-script/rust_cmd_lib).


Updates `clap` from 4.5.18 to 4.5.19
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.18...clap_complete-v4.5.19)

Updates `futures` from 0.3.30 to 0.3.31
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31)

Updates `octocrab` from 0.40.0 to 0.41.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.40.0...v0.41.0)

Updates `cmd_lib` from 1.9.4 to 1.9.5
- [Release notes](https://github.com/rust-shell-script/rust_cmd_lib/releases)
- [Commits](https://github.com/rust-shell-script/rust_cmd_lib/commits)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: cmd_lib
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 12:37:04 +00:00
Hanno Braun
b98372174b Run cargo update 2024-09-30 21:07:45 +02:00
Hanno Braun
7addc07903
Merge pull request #2471 from hannobraun/dependabot/cargo/cargo-7da5046cec
Bump the cargo group with 2 updates
2024-09-30 21:04:31 +02:00
dependabot[bot]
3c197af39b
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [regex](https://github.com/rust-lang/regex) and [tempfile](https://github.com/Stebalien/tempfile).


Updates `regex` from 1.10.6 to 1.11.0
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 12:50:52 +00:00
Hanno Braun
ef5830fc79 Add LineSegment::to_line 2024-09-26 19:49:14 +02:00
Hanno Braun
b88f4728dc Simplify 2024-09-26 19:46:30 +02:00
Hanno Braun
78c1b5fd43 Add points_line field to LineSegment 2024-09-26 19:46:27 +02:00
Hanno Braun
b2c73bde94 Make parameter name more explicit 2024-09-26 19:44:52 +02:00
Hanno Braun
51900b75b4 Make parameter name more explicit 2024-09-26 19:44:36 +02:00
Hanno Braun
262cf8aa3e Make parameter name more explicit 2024-09-26 19:44:27 +02:00
Hanno Braun
ae34179e34 Make parameter name more explicit 2024-09-26 19:44:15 +02:00
Hanno Braun
5ad81ea11c Prepare for follow-on change 2024-09-26 19:41:18 +02:00
Hanno Braun
2b45441603 Prepare for follow-on change 2024-09-26 19:40:54 +02:00
Hanno Braun
b9a8c2e305 Prepare for follow-on change 2024-09-26 19:39:27 +02:00
Hanno Braun
a1433a6e2c Remove unused dependency 2024-09-26 19:34:05 +02:00
Hanno Braun
1d2ce022ed Move Line back to fj-math
See previous commit for an explanation.
2024-09-26 19:33:47 +02:00
Hanno Braun
a67d0bf29f Move Circle back to fj-match
For a while, it seemed to make sense to consolidate all curve-related
code in `fj-core`. But I think that was a mistake.

At least `Line` would need to move back, because I'm about to add a
dependency on that from `LineSegment`, which lives in `fj-math`. I could
move `LineSegment` to `fj-core`, of course, but then I'd basically need
to add a `math` module there, and I'm don't think that makes sense.

Anyway, if `Line` has to move back, it would be inconsistent to leave
just `Circle`.
2024-09-26 19:29:45 +02:00
Hanno Braun
a5af3399f9 Fix cargo doc warnings 2024-09-26 19:14:25 +02:00
Hanno Braun
ac5c769392 Remove redundant type 2024-09-25 19:53:00 +02:00
Hanno Braun
b0f79aa373 Update module name 2024-09-25 19:48:18 +02:00
Hanno Braun
aae4a12fbc Remove unused code 2024-09-25 19:47:43 +02:00
Hanno Braun
9c056e37da Simplify 2024-09-25 19:47:31 +02:00
Hanno Braun
44c3736625 Avoid use of redundant constructor 2024-09-25 19:47:11 +02:00
Hanno Braun
1471ecb654 Simplify 2024-09-25 19:46:23 +02:00
Hanno Braun
fa9da97dad Simplify 2024-09-25 19:45:48 +02:00
Hanno Braun
e05fb72534 Simplify 2024-09-25 19:45:42 +02:00
Hanno Braun
5a946ebfab Run cargo fmt 2024-09-25 19:45:20 +02:00
Hanno Braun
cb1b3a8ea3 Don't check for degeneracy in From impl 2024-09-25 19:44:33 +02:00
Hanno Braun
b6175803e6 Simplify 2024-09-25 19:43:23 +02:00
Hanno Braun
6009e94ab3 Allow degenerate line segments 2024-09-25 19:42:52 +02:00
Hanno Braun
66bff8b43a Make type name more explicit 2024-09-25 19:41:41 +02:00
Hanno Braun
baf41379df Update documentation on geometry traits 2024-09-25 19:40:12 +02:00
Hanno Braun
8ec40754d6 Move Line into geometry::curves 2024-09-25 19:36:59 +02:00
Hanno Braun
8aa06f7a5e Remove unused code 2024-09-25 19:34:22 +02:00
Hanno Braun
f57417f32a Remove unused code 2024-09-25 19:34:00 +02:00
Hanno Braun
ab32b708e9 Add Line::transform 2024-09-25 19:31:55 +02:00
Hanno Braun
b61e5025eb Return LineSegment from line_segment_at 2024-09-25 19:24:45 +02:00
Hanno Braun
eecfa66461 Add LineSegment 2024-09-25 19:24:21 +02:00
Hanno Braun
81399b6253 Remove unused code 2024-09-24 19:54:48 +02:00
Hanno Braun
64f290010b Move Circle into fj_core::geometry 2024-09-24 19:54:35 +02:00
Hanno Braun
6c45865e24 Add dependency to prepare for follow-on change 2024-09-24 19:53:16 +02:00
Hanno Braun
8adb670d49 Inline redundant method 2024-09-24 19:49:27 +02:00
Hanno Braun
3a7d2ed4ce Add Circle::transform 2024-09-24 19:48:39 +02:00
Hanno Braun
4772a55091 Add geometry::util 2024-09-24 19:19:19 +02:00
Hanno Braun
0045b9ffb0
Merge pull request #2469 from hannobraun/dependabot/cargo/cargo-665747e22b
Bump the cargo group with 4 updates
2024-09-23 21:55:07 +02:00
Hanno Braun
820352d862 Run cargo update 2024-09-23 21:54:35 +02:00
dependabot[bot]
5ff4bb6f89
Bump the cargo group with 4 updates
Bumps the cargo group with 4 updates: [thiserror](https://github.com/dtolnay/thiserror), [clap](https://github.com/clap-rs/clap), [threemf](https://github.com/hannobraun/3mf-rs) and [octocrab](https://github.com/XAMPPRocky/octocrab).


Updates `thiserror` from 1.0.63 to 1.0.64
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64)

Updates `clap` from 4.5.17 to 4.5.18
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.17...clap_complete-v4.5.18)

Updates `threemf` from 0.5.0 to 0.6.0
- [Changelog](https://github.com/hannobraun/3mf-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hannobraun/3mf-rs/compare/v0.5.0...v0.6.0)

Updates `octocrab` from 0.39.0 to 0.40.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.39.0...v0.40.0)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: threemf
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 12:33:22 +00:00
Hanno Braun
818d1f709f Make CircleApproxParams private
It used to be a private utility struct, in `approx`. I made it public
for the transition, but now it's a private utility struct again, only in
`geometry`.
2024-09-19 20:06:42 +02:00
Hanno Braun
492643e6ff Avoid direct use of CircleApproxParams 2024-09-19 20:05:19 +02:00
Hanno Braun
5eef38324f Prepare for follow-on change 2024-09-19 20:04:16 +02:00
Hanno Braun
798c984438 Remove unused re-export 2024-09-19 20:00:48 +02:00
Hanno Braun
195cdf93a0 Update imports to prepare for follow-on change 2024-09-19 20:00:28 +02:00
Hanno Braun
5a4a1ad732 Move GenPolyline to geometry::traits 2024-09-19 19:59:07 +02:00
Hanno Braun
a1f043b9e0 Add placeholder for geometry::traits 2024-09-19 19:56:45 +02:00
Hanno Braun
b44a125f11 Move test closer to code under test 2024-09-19 19:52:21 +02:00
Hanno Braun
c275ee3e29 Move line-related code to curves::line 2024-09-19 19:49:54 +02:00
Hanno Braun
64ce9788d1 Clean up directory structure 2024-09-19 19:48:28 +02:00
Hanno Braun
56f24fb20d Move more circle-related code to curves::circle 2024-09-19 19:47:09 +02:00
Hanno Braun
26bc6e3697 Remove unused re-export 2024-09-19 19:34:34 +02:00
Hanno Braun
e550baa078 Update imports 2024-09-19 19:34:20 +02:00
Hanno Braun
4735f46d6c Move CircleApproxParams to geometry 2024-09-19 19:33:38 +02:00
Hanno Braun
72327fd9b0 Add placeholder for geometry::curves::circle 2024-09-19 19:31:47 +02:00
Hanno Braun
1c26d1bfc1 Make method name more explicit 2024-09-19 19:24:27 +02:00
Hanno Braun
89a57e88cd Update constructor name 2024-09-19 19:22:53 +02:00
Hanno Braun
9577c6f044 Make type name more specific 2024-09-19 19:22:18 +02:00
Hanno Braun
285a559eac Add GenPolyline::generate_polyline 2024-09-19 19:19:39 +02:00
Hanno Braun
9ed1a44268 Remove curve geometry mismatch validation check
The CI build is currently failing because of that check. This has
started happening due to a change of how circles are represented in the
new geometry system. Parts of the new geometry system are being used by
this check,

The cause of the problem seems to be that the curves that are failing
the check have their geometry defined as a circle on a straight surface,
and a line on a curved surface. The new geometry system, which is
designed to eliminate this kind of redundancy, doesn't deal with that
well, and delivers slightly different results for each case.

This doesn't actually matter though. Only one of those definitions is
actually used. When disabling the check, the affected models look fine
in the viewer, and most importantly, they validate just fine when
exported to 3MF.

I don't think this validation check was ever there to prevent invalid
geometry. Its purpose was to discover bugs, which these kinds of
discrepancies are a sign of. But here, it wasn't detecting a bug (as far
as I can tell, at least). It was detecting a discrepancy due to the
ongoing transition to the new geometry system.

The new geometry system will eliminate the redundancies that this check
was designed to keep in check. It would have become obsolete anyway. In
light of this, I've decided it has already outlived its purpose.

The alternative would be to somehow paper over this discrepancy until
the redundancy can be eliminated. But I don't know how to do that. I
suspect it would have been hard. And I've already spent enough time
tracking this problem down.

I think it's fine taking the easy way out, and retiring this validation
check a bit early.
2024-09-18 21:12:11 +02:00
Hanno Braun
33270a03cf Improve wording 2024-09-18 20:03:26 +02:00
Hanno Braun
dfe67074d1 Fix typo in comment 2024-09-18 20:02:50 +02:00
Hanno Braun
f9eb492885 Update comments 2024-09-18 20:01:50 +02:00
Hanno Braun
fccfbe1b0c Simplify 2024-09-18 20:01:23 +02:00
Hanno Braun
6fd26b1969 Simplify 2024-09-18 20:00:53 +02:00
Hanno Braun
28cc6ce3d3 Update variable name 2024-09-18 19:59:26 +02:00
Hanno Braun
f568f52fb4 Update error message 2024-09-18 19:58:00 +02:00
Hanno Braun
1f7efa95ae Remove debug output 2024-09-18 19:56:51 +02:00
Hanno Braun
233207593c Fix determinism of Curve representation 2024-09-17 19:37:10 +02:00
Hanno Braun
a7240db02c Derive Debug for PathApproxParams 2024-09-17 19:20:02 +02:00
Hanno Braun
01a60f4306 Document determisism of GenPolyline 2024-09-17 18:53:18 +02:00
Hanno Braun
dc87d6a07c Update doc comment 2024-09-17 18:52:30 +02:00
Hanno Braun
d32cdd2ecf Add infrastructure for defining new curve geometry 2024-09-16 19:52:07 +02:00
Hanno Braun
9088ebb155 Derive Clone for CurceGeom2 2024-09-16 19:47:25 +02:00
Hanno Braun
3520527d40 Store GenPolyline instances in Arcs 2024-09-16 19:45:36 +02:00
Hanno Braun
b16746f8f6 Update list of sponsors 2024-09-16 19:36:12 +02:00
Hanno Braun
1e4ec21214 Fix broken link to example models in README
Fix https://github.com/hannobraun/fornjot/issues/2467
2024-09-16 19:26:20 +02:00
Hanno Braun
5450c28e3e
Merge pull request #2468 from hannobraun/dependabot/cargo/cargo-ee9092fe70
Bump the cargo group with 2 updates
2024-09-16 19:20:03 +02:00
Hanno Braun
a77b5af0bb Run cargo update 2024-09-16 19:18:51 +02:00
dependabot[bot]
d5311c18b1
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) and [anyhow](https://github.com/dtolnay/anyhow).


Updates `pretty_assertions` from 1.4.0 to 1.4.1
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.4.0...v1.4.1)

Updates `anyhow` from 1.0.87 to 1.0.89
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.87...1.0.89)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 12:23:20 +00:00
Hanno Braun
99582c6319 Add new-style curve geometry to Geometry 2024-09-13 20:54:42 +02:00
Hanno Braun
b6146dfd16 Add CurveGeom2 2024-09-13 20:50:49 +02:00
Hanno Braun
7891a69895 Make GenPolyline object-safe 2024-09-13 20:46:14 +02:00
Hanno Braun
69f2e68b58 Prepare for follow-on change 2024-09-13 20:45:51 +02:00
Hanno Braun
0ca08d3b52 Prepare for making GenPolyline object-safe 2024-09-13 20:44:56 +02:00
Hanno Braun
2ab37348a8 Prepare for follow-on change 2024-09-13 20:44:01 +02:00
Hanno Braun
826bc80b67 Update doc comment 2024-09-13 20:37:55 +02:00
Hanno Braun
eca3a71c0a Rename CurveGeom2 to GenPolyline
I'll need the `CurveGeom2` name for another type shortly. `GenPolyline`
seems like a decent name for the treat, since it's principally about
generating polylines, the uniform intermediate representation for
curves.
2024-09-13 20:34:25 +02:00
Hanno Braun
e5b37803e9 Remove transitionary re-exports 2024-09-13 20:20:21 +02:00
Hanno Braun
7addb43bf3 Update imports 2024-09-13 20:19:24 +02:00
Hanno Braun
8f57025392 Move tolerance to geometry
It is starting to see use there, and I think it makes more sense for
`approx` to depend on `geometry` than the other way around. `geometry`
can be seen to provide low-level geometry primitives, which `approx`,
which is higher-level functionality, should depend on at some point.
2024-09-13 20:18:44 +02:00
Hanno Braun
dc0c0108d1 Inline redundant variable 2024-09-12 20:39:19 +02:00
Hanno Braun
d76dd8ad4c Simplify 2024-09-12 20:39:19 +02:00
Hanno Braun
be1b621285 Add CurveGeom2::line_segment_at 2024-09-12 20:39:19 +02:00
Hanno Braun
78854f69cd Inline redundant method 2024-09-12 20:39:19 +02:00
Hanno Braun
00027857e1 Consolidate redundant code 2024-09-12 20:39:19 +02:00
Hanno Braun
2c70cc6e3a Add SurfaceGeom2::origin 2024-09-12 20:39:19 +02:00
Hanno Braun
0471cf257b Add placeholder for CurveGeom2 trait 2024-09-12 20:39:19 +02:00
Hanno Braun
34cdfd2540 Simplify 2024-09-12 20:39:19 +02:00
Hanno Braun
f60e50c8ed Consolidate redundant code 2024-09-12 20:39:19 +02:00
Hanno Braun
754fcbb5c3
Merge pull request #2466 from hannobraun/rust
Upgrade to Rust 1.81.0
2024-09-10 21:27:29 +02:00
Hanno Braun
3e28b4be9a Upgrade to Rust 1.81.0 2024-09-10 21:22:25 +02:00
Hanno Braun
e813c5e9dd
Merge pull request #2465 from hannobraun/dependabot/cargo/cargo-d9860d77df
Bump the cargo group with 8 updates
2024-09-09 18:37:46 +02:00
Hanno Braun
d6731646ab Run cargo update 2024-09-09 18:22:31 +02:00
dependabot[bot]
7e0a3abe3d
Bump the cargo group with 8 updates
Bumps the cargo group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.16` | `4.5.17` |
| [spade](https://github.com/Stoeoef/spade) | `2.12.0` | `2.12.1` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.86` | `1.0.87` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.17.0` | `0.17.1` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.17.0` | `0.17.1` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.17.1` | `1.18.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.209` | `1.0.210` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.127` | `1.0.128` |


Updates `clap` from 4.5.16 to 4.5.17
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.16...clap_complete-v4.5.17)

Updates `spade` from 2.12.0 to 2.12.1
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `anyhow` from 1.0.86 to 1.0.87
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.86...1.0.87)

Updates `parry2d-f64` from 0.17.0 to 0.17.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.17.0 to 0.17.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `bytemuck` from 1.17.1 to 1.18.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.17.1...v1.18.0)

Updates `serde` from 1.0.209 to 1.0.210
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210)

Updates `serde_json` from 1.0.127 to 1.0.128
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.127...1.0.128)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 12:55:45 +00:00
Hanno Braun
c60455aceb
Merge pull request #2464 from hannobraun/dependabot/cargo/cargo-fdd9b5c000
Bump the cargo group with 2 updates
2024-09-03 10:25:08 +02:00
Hanno Braun
50552b1f4e Run cargo update 2024-09-03 10:18:22 +02:00
dependabot[bot]
9f880613c7
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [bytemuck](https://github.com/Lokathor/bytemuck) and [tokio](https://github.com/tokio-rs/tokio).


Updates `bytemuck` from 1.17.0 to 1.17.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.17.0...v1.17.1)

Updates `tokio` from 1.39.3 to 1.40.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.3...tokio-1.40.0)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 12:56:46 +00:00
Hanno Braun
62160742c9
Merge pull request #2463 from hannobraun/surface
Consolidate redundancies in `SurfaceGeom::triangle_at`
2024-08-26 20:20:39 +02:00
Hanno Braun
33b76e3d19 Inline redundant variables 2024-08-26 19:56:57 +02:00
Hanno Braun
f47a1f8a96 Consolidate redundant code 2024-08-26 19:56:57 +02:00
Hanno Braun
fcdb7518b8 Inline redundant variable 2024-08-26 19:56:57 +02:00
Hanno Braun
7808b55583 Prepare for follow-on change 2024-08-26 19:56:57 +02:00
Hanno Braun
984ee93df9 Simplify variable name 2024-08-26 19:56:57 +02:00
Hanno Braun
efd7739162 Update comments 2024-08-26 19:56:57 +02:00
Hanno Braun
351a61cd7c Inline redundant variable 2024-08-26 19:56:57 +02:00
Hanno Braun
961b72ee5d Inline redundant variable 2024-08-26 19:56:57 +02:00
Hanno Braun
eef3ac3a4f Consolidate redundant code 2024-08-26 19:56:57 +02:00
Hanno Braun
1c387fd625 Prepare for follow-on change 2024-08-26 19:56:57 +02:00
Hanno Braun
d8b4166ccc Simplify 2024-08-26 19:56:57 +02:00
Hanno Braun
08e067bbb3
Merge pull request #2462 from hannobraun/dependabot/cargo/cargo-10e246865e
Bump the cargo group with 3 updates
2024-08-26 19:53:26 +02:00
Hanno Braun
7e073b68f4 Run cargo update 2024-08-26 19:45:36 +02:00
dependabot[bot]
98de0d278d
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [serde](https://github.com/serde-rs/serde), [serde_json](https://github.com/serde-rs/json) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `serde` from 1.0.208 to 1.0.209
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209)

Updates `serde_json` from 1.0.125 to 1.0.127
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.125...1.0.127)

Updates `reqwest` from 0.12.6 to 0.12.7
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.6...v0.12.7)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 12:58:45 +00:00
Hanno Braun
258e6391c6
Merge pull request #2461 from hannobraun/surface
Fix `SurfaceGeom::origin` providing wrong point for cylinder surface
2024-08-22 20:48:13 +02:00
Hanno Braun
bed5d5c70d Simplify 2024-08-22 20:42:46 +02:00
Hanno Braun
5c945f5b45 Fix cylinder surface providing wrong origin point 2024-08-22 20:42:02 +02:00
Hanno Braun
c54a17bbf2
Merge pull request #2458 from hannobraun/dependabot/cargo/cargo-cfaeee6554
Bump the cargo group with 6 updates
2024-08-19 18:40:40 +02:00
Hanno Braun
be88593b57 Run cargo update 2024-08-19 18:33:28 +02:00
dependabot[bot]
4fd054fd59
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.15` | `4.5.16` |
| [spade](https://github.com/Stoeoef/spade) | `2.11.0` | `2.12.0` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.16.3` | `1.17.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.206` | `1.0.208` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.124` | `1.0.125` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.39.2` | `1.39.3` |


Updates `clap` from 4.5.15 to 4.5.16
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.15...clap_complete-v4.5.16)

Updates `spade` from 2.11.0 to 2.12.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits/v2.12.0)

Updates `bytemuck` from 1.16.3 to 1.17.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.3...v1.17.0)

Updates `serde` from 1.0.206 to 1.0.208
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.206...v1.0.208)

Updates `serde_json` from 1.0.124 to 1.0.125
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.124...1.0.125)

Updates `tokio` from 1.39.2 to 1.39.3
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.39.2...tokio-1.39.3)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 12:12:31 +00:00
Hanno Braun
d833dffbc3
Merge pull request #2456 from hannobraun/path
Merge `SurfacePath` and `GlobalPath` into `Path`
2024-08-15 20:17:26 +02:00
Hanno Braun
0b5c3c3461 Simplify 2024-08-15 20:11:05 +02:00
Hanno Braun
e07825c790 Simplify 2024-08-15 20:11:05 +02:00
Hanno Braun
3798e3f709 Share methods between Path<2> and Path<3> 2024-08-15 20:11:04 +02:00
Hanno Braun
df4ccd1581 Update comment 2024-08-15 20:11:04 +02:00
Hanno Braun
7622a9b91f Update doc comments 2024-08-15 20:11:04 +02:00
Hanno Braun
f5fc4991f9 Merge GlobalPath into Path 2024-08-15 20:11:04 +02:00
Hanno Braun
485c67adad Update doc comment 2024-08-15 20:11:04 +02:00
Hanno Braun
a665815bf5 Make Path generic over dimensionality 2024-08-15 20:11:04 +02:00
Hanno Braun
e7a2634108 Rename SurfacePath to Path
This is preparation for merging it with `GlobalPath`.
2024-08-15 20:11:04 +02:00
Hanno Braun
07ffb0f94a
Merge pull request #2455 from hannobraun/geom
Convert `SurfaceGeom` back into struct
2024-08-15 20:10:43 +02:00
Hanno Braun
8d9f841de9 Convert SurfaceGeom back into struct
The original conversion to an enum turned out to be a dead end, and I'm
now working on different ways of evolving it.
2024-08-15 19:41:04 +02:00
Hanno Braun
6126e957a9
Merge pull request #2454 from hannobraun/sweep
Simplify `SweepSketch`
2024-08-14 20:00:46 +02:00
Hanno Braun
490a075112 Update documentation of SweepSketch 2024-08-14 19:55:36 +02:00
Hanno Braun
a654c93728 Simplify SweepSketch
Remove the more complicated code path, only leaving the simple ones.
This puts more requirements on the caller, which I'm going to document
in a follow-up commit.
2024-08-14 19:55:35 +02:00
Hanno Braun
125c21c7e2 Prepare for simplifying SweepSketch
`SweepSketch` has two internal code paths. All models have so far been
using the more complicated one. This commit updates them to instead use
the more simple one, in preparation of removing the more complicated
one.
2024-08-14 19:55:21 +02:00
Hanno Braun
b78358dfd9
Merge pull request #2453 from hannobraun/geom
Add `SurfaceGeom::triangle_at`; rewrite point/vector conversion on top of it
2024-08-13 19:17:40 +02:00
Hanno Braun
884c28416c Rewrite conversion function on top of triangle_at 2024-08-13 19:13:18 +02:00
Hanno Braun
bea80db446 Add SurfaceGeom::origin 2024-08-13 19:13:18 +02:00
Hanno Braun
dc499ab859 Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
de6f8fb157 Rewrite conversion function on top of triangle_at 2024-08-13 19:13:18 +02:00
Hanno Braun
30f08d9f5b Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
64f0a6d757 Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
26dfddb7af Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
7b54a176f6 Group function arguments to increase clarity 2024-08-13 19:13:18 +02:00
Hanno Braun
9858e41fe2 Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
8215ff90a7 Prepare for follow-on change 2024-08-13 19:13:18 +02:00
Hanno Braun
ee755ac5e8 Add SurfaceGeom::triangle_at 2024-08-13 19:13:18 +02:00
Hanno Braun
e75225a0de Make PathApproxParams public
I need to use it from the `geometry` module. I expect that long-term,
`approx` and `geometry` will get merged, and this code will turn into an
internal implementation detail again.

But for now, I don't want to rearchitect the whole module structure,
before I have a better grasp on what the new geometry system is going to
look like. So just making it public is the more pragmatic choice.
2024-08-13 19:13:18 +02:00
Hanno Braun
4d46e39eb2 Document PathApproxParams 2024-08-13 19:13:18 +02:00
Hanno Braun
6e747acd3a
Merge pull request #2452 from hannobraun/triangle
Add `Triangle::point_from_barycentric_coords`
2024-08-13 19:12:01 +02:00
Hanno Braun
c0d4db9ae4 Add Triangle::point_from_barycentric_coords 2024-08-13 19:07:42 +02:00
Hanno Braun
b787d9923c
Merge pull request #2449 from hannobraun/validate
Update default validation config; compute values from each other, based on the tolerance
2024-08-12 22:03:21 +02:00
Hanno Braun
e7e500bd0e Update order of fields based on natural order
Now we start with the most basic value, moving to the ones that are
computed based on the more basic ones.
2024-08-12 21:54:21 +02:00
Hanno Braun
8c78e3512a Compute "identical max" based on tolerance 2024-08-12 21:53:41 +02:00
Hanno Braun
682fc6b9dc Compute "dinstinct min" based on "identical max" 2024-08-12 21:52:50 +02:00
Hanno Braun
ba2c744cfe Move code to improve consistency 2024-08-12 21:49:42 +02:00
Hanno Braun
86e9ad1ca6 Prepare for follow-on change 2024-08-12 21:49:12 +02:00
Hanno Braun
7515515a99 Add ValidationConfig::from_tolerance 2024-08-12 21:40:53 +02:00
Hanno Braun
710ee5ead0 Match order of struct fields
Use the same order where the struct fields are defined and where they
are initialized.
2024-08-12 21:37:28 +02:00
Hanno Braun
c157b66f5e
Merge pull request #2448 from hannobraun/validate
Fix bug where validation errors could overwrite previous validation errors
2024-08-12 21:23:02 +02:00
Hanno Braun
e977da834f Remove unused struct field 2024-08-12 21:16:07 +02:00
Hanno Braun
be70a5330a Fix validation errors overwriting each other
Validation errors were stored by object ID, which made no sense. It
wasn't necessary, but provided the possibility of a validation error
overwriting a previous one that applied to the same object.

On top of that, this change is a simplification, so a win all around.
2024-08-12 21:11:49 +02:00
Hanno Braun
a19143c87b
Merge pull request #2447 from hannobraun/validate
Add more information to validation error
2024-08-12 20:52:37 +02:00
Hanno Braun
2f7fcaa3be Update validation error message 2024-08-12 20:49:12 +02:00
Hanno Braun
48567354d5 Add more information to validation error 2024-08-12 20:49:12 +02:00
Hanno Braun
cb8fc19991 Update variable name 2024-08-12 20:49:12 +02:00
Hanno Braun
e0de292008 Return more information from function 2024-08-12 20:49:12 +02:00
Hanno Braun
1a97c08cf2 Simplify return value 2024-08-12 20:49:12 +02:00
Hanno Braun
0b28e63709 Fix typo in doc comment 2024-08-12 20:49:12 +02:00
Hanno Braun
cf97375afc
Merge pull request #2446 from hannobraun/join
Improve documentation around `add_joined_half_edges`
2024-08-12 20:48:23 +02:00
Hanno Braun
d80414476a Add comment to add_joined_half_edges 2024-08-12 20:43:04 +02:00
Hanno Braun
36257235bc Update parameter name 2024-08-12 20:41:57 +02:00
Hanno Braun
a62a60dc56 Add comments to SweepCycle 2024-08-12 20:41:20 +02:00
Hanno Braun
a3b61d2aad Update method name 2024-08-12 20:41:02 +02:00
Hanno Braun
4512f96d34 Update parameter name 2024-08-12 20:40:28 +02:00
Hanno Braun
379cd35a89 Document expected order add_joined_edges 2024-08-12 20:40:28 +02:00
Hanno Braun
5bb617f87d
Merge pull request #2445 from hannobraun/rust
Update to Rust 1.80.1
2024-08-12 20:21:15 +02:00
Hanno Braun
cc17fb354a Update to Rust 1.80.1 2024-08-12 20:10:24 +02:00
Hanno Braun
f640249d13
Merge pull request #2444 from hannobraun/sponsors
Update list of sponsors
2024-08-12 20:08:12 +02:00
Hanno Braun
99239fed8b Update list of sponsors 2024-08-12 20:05:52 +02:00
Hanno Braun
e075f610de
Merge pull request #2443 from hannobraun/dependabot/cargo/cargo-54cd775d53
Bump the cargo group with 5 updates
2024-08-12 14:40:25 +02:00
Hanno Braun
80b8b5e0f2 Run cargo update 2024-08-12 14:33:01 +02:00
dependabot[bot]
48b3f306aa
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.13` | `4.5.15` |
| [winit](https://github.com/rust-windowing/winit) | `0.30.4` | `0.30.5` |
| [serde](https://github.com/serde-rs/serde) | `1.0.204` | `1.0.206` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.122` | `1.0.124` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.11.0` | `3.12.0` |


Updates `clap` from 4.5.13 to 4.5.15
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.13...v4.5.15)

Updates `winit` from 0.30.4 to 0.30.5
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.4...v0.30.5)

Updates `serde` from 1.0.204 to 1.0.206
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206)

Updates `serde_json` from 1.0.122 to 1.0.124
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.122...v1.0.124)

Updates `tempfile` from 3.11.0 to 3.12.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 12:11:49 +00:00
Hanno Braun
33bd307a3d
Merge pull request #2442 from hannobraun/validate
Improve validation error message
2024-08-09 22:11:44 +02:00
Hanno Braun
311a54c690 Update validation error message 2024-08-09 22:05:51 +02:00
Hanno Braun
e369e3c9ff Add more information to validation error 2024-08-09 22:05:37 +02:00
Hanno Braun
5f7b70705b
Merge pull request #2441 from hannobraun/tolerance
Make tolerance value available in `ValidationConfig`
2024-08-07 20:23:18 +02:00
Hanno Braun
8e21b48a52 Inline redundant constructor 2024-08-07 20:19:47 +02:00
Hanno Braun
b284dd109e Remove unused struct field 2024-08-07 20:19:47 +02:00
Hanno Braun
305e631487 Use validation tolerance in Core::tolerance
It is important that the same value is used everywhere. Otherwise,
validation could miss problems that then end up in an exported file,
for example.
2024-08-07 20:19:46 +02:00
Hanno Braun
8afcc7efe3 Add tolerance field to ValidationConfig
Validation also needs access to a tolerance value. And since it doesn't
have access to `Core`, having it in `ValidationConfig` is the most
practical solution.
2024-08-07 20:19:40 +02:00
Hanno Braun
e7c6f0e71c Add Core::tolerance 2024-08-07 20:10:10 +02:00
Hanno Braun
b41344f81d
Merge pull request #2440 from hannobraun/tolerance
Add default tolerance to `Core`
2024-08-06 20:16:46 +02:00
Hanno Braun
ddd7a392ba Add default tolerance to Core
As per its documentation, this can be used when computing the new
uniform intermediate geometry representation. I'm working on that right
now, so it's hopefully going to see some use soon.
2024-08-06 19:33:53 +02:00
Hanno Braun
cc457a85a2 Prepare for follow-on change 2024-08-06 19:26:17 +02:00
Hanno Braun
5a7f10964e Update documentation of Core 2024-08-06 19:22:32 +02:00
Hanno Braun
5beb8e8a54 Prepare for follow-on change 2024-08-06 19:15:37 +02:00
Hanno Braun
4de577fdda
Merge pull request #2439 from hannobraun/sponsors
Update list of sponsors
2024-08-05 20:25:27 +02:00
Hanno Braun
a22a842612 Update list of sponsors 2024-08-05 20:21:20 +02:00
Hanno Braun
dc1a2770f6
Merge pull request #2438 from hannobraun/dependabot/cargo/cargo-518b6d7b2a
Bump the cargo group with 8 updates
2024-08-05 20:20:15 +02:00
Hanno Braun
32c494acf6 Run cargo update 2024-08-05 20:14:26 +02:00
dependabot[bot]
ddc0a47dc4
Bump the cargo group with 8 updates
Bumps the cargo group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.11` | `4.5.13` |
| [spade](https://github.com/Stoeoef/spade) | `2.10.0` | `2.11.0` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.16.1` | `1.16.3` |
| [wgpu](https://github.com/gfx-rs/wgpu) | `22.0.0` | `22.1.0` |
| [regex](https://github.com/rust-lang/regex) | `1.10.5` | `1.10.6` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.38.0` | `0.39.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.121` | `1.0.122` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.10.1` | `3.11.0` |


Updates `clap` from 4.5.11 to 4.5.13
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.11...v4.5.13)

Updates `spade` from 2.10.0 to 2.11.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `bytemuck` from 1.16.1 to 1.16.3
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.1...v1.16.3)

Updates `wgpu` from 22.0.0 to 22.1.0
- [Release notes](https://github.com/gfx-rs/wgpu/releases)
- [Changelog](https://github.com/gfx-rs/wgpu/blob/wgpu-v22.1.0/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu/compare/wgpu-v22.0.0...wgpu-v22.1.0)

Updates `regex` from 1.10.5 to 1.10.6
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6)

Updates `octocrab` from 0.38.0 to 0.39.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.38.0...v0.39.0)

Updates `serde_json` from 1.0.121 to 1.0.122
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.121...v1.0.122)

Updates `tempfile` from 3.10.1 to 3.11.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.10.1...v3.11.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: wgpu
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:02:56 +00:00
Hanno Braun
e67dc74f6d
Merge pull request #2436 from hannobraun/point
Remove implementation of scalar multiplication for `Point`
2024-07-31 20:26:21 +02:00
Hanno Braun
4f450088ee Remove implementation of scalar mult for Point
There's no clear interpretation. I don't think it makes sense. And it
seems it wasn't used anywhere in the code base anyway.
2024-07-31 20:21:57 +02:00
Hanno Braun
f9cb056b8c
Merge pull request #2435 from hannobraun/approx
Make minor improvements in approximation code
2024-07-30 20:15:15 +02:00
Hanno Braun
dba6d72d1e Remove confusing and wrong comment
I don't see how the half-edges that bound a sphere would be any less
tied to curvature than those that define a cylinder.
2024-07-30 20:10:01 +02:00
Hanno Braun
d878bc8cd6 Update formatting in Tolerance documentation 2024-07-30 20:10:01 +02:00
Hanno Braun
d1d730aed0
Merge pull request #2434 from hannobraun/triangle
Allow degenerate triangles
2024-07-30 18:42:29 +02:00
Hanno Braun
b553b1eaea Remove unused code 2024-07-30 18:34:19 +02:00
Hanno Braun
14e1982545 Remove Triangle::points
With the `points` field public, it has become redundant.
2024-07-30 18:34:19 +02:00
Hanno Braun
be31c2d10a Make field of Triangle public
With the constructor no longer preventing degenerate triangle, there's
no reason to keep it private.
2024-07-30 18:34:19 +02:00
Hanno Braun
1d149d2968 Update doc comment 2024-07-30 18:34:19 +02:00
Hanno Braun
63a45460f9 Simplify return value 2024-07-30 18:34:19 +02:00
Hanno Braun
cc15b15a57 Allow degenerate triangles to be constructed
Degenerate triangles are actually useful in some cases, and I'm actually
working on some code that needs them. Thus, the constructor as it was,
was too restrictive.
2024-07-30 18:34:19 +02:00
Hanno Braun
f5668b0e25 Simplify numbers used in tests 2024-07-30 18:34:19 +02:00
Hanno Braun
227b2adbc9 Make tests more explicit 2024-07-29 20:05:00 +02:00
Hanno Braun
0df27dee0d Make sure triangulation returns valid triangles
This check is currently redundant with what the `Triangle` constructor
already does. The constructor will soon get simplified though, and then
the new check will be necessary.
2024-07-29 20:05:00 +02:00
Hanno Braun
d4b880d185 Inline redundant variable 2024-07-29 20:05:00 +02:00
Hanno Braun
3529eca44a Prepare for follow-on change 2024-07-29 20:05:00 +02:00
Hanno Braun
d9533ee033 Add Triangle::is_valid
The method doesn't make sense yet, as `Triangle::new` explicitly forbids
degenerate triangles. This is about to change though, and adding this
method is preparation for that.
2024-07-29 20:04:59 +02:00
Hanno Braun
1dbd431f94
Merge pull request #2433 from hannobraun/angle
Fix panic when computing angle with zero vector
2024-07-29 19:51:53 +02:00
Hanno Braun
db3ea1c53b Update doc comment 2024-07-29 19:47:16 +02:00
Hanno Braun
4739ef60f6 Fix panic, if computing angle with zero vector 2024-07-29 19:46:59 +02:00
Hanno Braun
8b7133b92d Prepare for follow-on change 2024-07-29 19:45:59 +02:00
Hanno Braun
1b01055a17
Merge pull request #2432 from hannobraun/bivector
Add `Bivector`
2024-07-29 19:12:19 +02:00
Hanno Braun
914bf84c7a Add Bivector::magnitude 2024-07-29 19:00:42 +02:00
Hanno Braun
c38ab65562 Add Vector::angle_to 2024-07-29 19:00:42 +02:00
Hanno Braun
06baede8e7 Add Scalar::sin 2024-07-29 19:00:42 +02:00
Hanno Braun
0b6da29386 Add Vector::outer 2024-07-29 19:00:42 +02:00
Hanno Braun
06900460ca Add Bivector 2024-07-29 19:00:42 +02:00
Hanno Braun
b7f6620942
Merge pull request #2431 from hannobraun/dependabot/cargo/cargo-5d1ddde93d
Bump the cargo group with 5 updates
2024-07-29 18:02:55 +02:00
Hanno Braun
20341fb8d8 Run cargo update 2024-07-29 17:58:22 +02:00
dependabot[bot]
c361bc3d8d
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.9` | `4.5.11` |
| [spade](https://github.com/Stoeoef/spade) | `2.9.0` | `2.10.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.120` | `1.0.121` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.1` | `1.39.2` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.11.3` | `0.11.5` |


Updates `clap` from 4.5.9 to 4.5.11
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.9...clap_complete-v4.5.11)

Updates `spade` from 2.9.0 to 2.10.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `serde_json` from 1.0.120 to 1.0.121
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121)

Updates `tokio` from 1.38.1 to 1.39.2
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.1...tokio-1.39.2)

Updates `env_logger` from 0.11.3 to 0.11.5
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.3...v0.11.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 12:38:37 +00:00
Hanno Braun
a45ea9fe73
Merge pull request #2430 from hannobraun/math
Remove `Plane`
2024-07-26 21:00:09 +02:00
Hanno Braun
9da23c1ea5 Remove Plane
It is no longer used anywhere.
2024-07-26 20:56:13 +02:00
Hanno Braun
e7e6892931
Merge pull request #2429 from hannobraun/geom
Remove the unused `SurfaceGeom::project_global_point` function
2024-07-26 20:55:20 +02:00
Hanno Braun
6806b585b6 Fix typo in comment 2024-07-26 20:01:22 +02:00
Hanno Braun
a3b263dd93 Remove unused SurfaceGeom::project_global_point 2024-07-26 20:01:04 +02:00
Hanno Braun
1b0b171f2f
Merge pull request #2428 from hannobraun/geom
Prepare `SurfaceGeom` for the transition to a more flexible geometry representation
2024-07-26 19:11:42 +02:00
Hanno Braun
0dade0ea96 Prepare SurfaceGeom for better geometry repr 2024-07-26 19:09:36 +02:00
Hanno Braun
0aac52a0f2 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
8af9f2fe87 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
3ed5c4006d Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
7ab22cd476 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
d4ba69c0da Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
b294ad08c4 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
de6d8fbc21 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
a21376ec08 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
3cdfbe5c52 Prepare for follow-on change 2024-07-26 19:09:36 +02:00
Hanno Braun
8146afdb93
Merge pull request #2427 from felix91gr/main
Upgrade to wgpu 22
2024-07-26 09:41:22 +02:00
Félix Fischer
ba0c7fbd90 Upgrade to wgpu 22 2024-07-25 23:31:29 -04:00
Hanno Braun
e4d2e72531
Merge pull request #2426 from hannobraun/rust
Upgrade to Rust 1.80.0
2024-07-25 20:22:12 +02:00
Hanno Braun
66a7d87501 Upgrade to Rust 1.80.0 2024-07-25 20:17:17 +02:00
Hanno Braun
3eed84163d Ignore clippy::mutable_key_type lint
This lint starts to have false positives in Rust 1.80.0.
2024-07-25 20:17:17 +02:00
Hanno Braun
41331a8185
Merge pull request #2425 from hannobraun/dependabot/cargo/cargo-e29a0c68e9
Bump the cargo group across 1 directory with 6 updates
2024-07-22 20:31:40 +02:00
Hanno Braun
81224ffc47 Run cargo update 2024-07-22 20:22:51 +02:00
dependabot[bot]
6189b23bde
Bump the cargo group across 1 directory with 6 updates
Bumps the cargo group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.62` | `1.0.63` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.16.1` | `0.17.0` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.16.1` | `0.17.0` |
| [image](https://github.com/image-rs/image) | `0.25.1` | `0.25.2` |
| [winit](https://github.com/rust-windowing/winit) | `0.30.3` | `0.30.4` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.0` | `1.38.1` |



Updates `thiserror` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63)

Updates `parry2d-f64` from 0.16.1 to 0.17.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.17.0)

Updates `parry3d-f64` from 0.16.1 to 0.17.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.17.0)

Updates `image` from 0.25.1 to 0.25.2
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.1...v0.25.2)

Updates `winit` from 0.30.3 to 0.30.4
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.3...v0.30.4)

Updates `tokio` from 1.38.0 to 1.38.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 18:18:38 +00:00
Hanno Braun
083ca57405
Merge pull request #2423 from hannobraun/dependabot/cargo/openssl-0.10.66
Bump openssl from 0.10.64 to 0.10.66
2024-07-22 20:15:45 +02:00
dependabot[bot]
98bc5ea572
Bump openssl from 0.10.64 to 0.10.66
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64 to 0.10.66.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.66)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 18:12:58 +00:00
Hanno Braun
dbf5c4f9f8
Merge pull request #2420 from hannobraun/dependabot/cargo/cargo-f5fbefe1b7
Bump the cargo group with 2 updates
2024-07-15 18:38:14 +02:00
Hanno Braun
830ae5f282 Run cargo update 2024-07-15 18:28:36 +02:00
dependabot[bot]
d7126373d4
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [thiserror](https://github.com/dtolnay/thiserror) and [clap](https://github.com/clap-rs/clap).


Updates `thiserror` from 1.0.61 to 1.0.62
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62)

Updates `clap` from 4.5.8 to 4.5.9
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.8...v4.5.9)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 13:02:58 +00:00
Hanno Braun
44955d9b0a
Merge pull request #2419 from hannobraun/geom
Remove all code dealing with half-edge geometry
2024-07-10 22:26:28 +02:00
Hanno Braun
346e2027cd Update doc comment 2024-07-10 22:18:51 +02:00
Hanno Braun
cb81b30dcc Remove remaining traces of half-edge geometry 2024-07-10 22:18:51 +02:00
Hanno Braun
29fc2d5fa2 Remove infrastructure for defining half-edge geom 2024-07-10 22:18:51 +02:00
Hanno Braun
5170181c72 Remove UpdateHalfEdgeGeometry 2024-07-10 22:18:51 +02:00
Hanno Braun
2abd1dda54 Remove code that defines half-edge geometry 2024-07-10 22:18:51 +02:00
Hanno Braun
1b7776e4f5 Remove redundant code 2024-07-10 22:18:51 +02:00
Hanno Braun
d033c9a585 Don't set half-edge geometry in add_joined_edge 2024-07-10 22:18:51 +02:00
Hanno Braun
20f0a09a22 Only transform already existing half-edge geometry
This makes the transformation operation more flexible, easing the
transition away from half-edge geometry.
2024-07-10 22:18:51 +02:00
Hanno Braun
fb9726c51e Return Option from Geometry::of_half_edge
This makes the method a bit more flexible, which is going to help in the
transition away from half-edge geometry.
2024-07-10 22:18:51 +02:00
Hanno Braun
f3aff3baa6 Remove unused HalfEdgeGeom::start_position 2024-07-10 22:18:51 +02:00
Hanno Braun
ee5121bb38
Merge pull request #2418 from hannobraun/validate
Simplify validation error
2024-07-10 22:16:22 +02:00
Hanno Braun
82a9e03a86 Simplify validation error 2024-07-10 22:10:23 +02:00
Hanno Braun
7c7bfe5c0b
Merge pull request #2417 from hannobraun/geom
Replace all reads of half-edge geometry with reads of vertex geometry
2024-07-09 22:05:01 +02:00
Hanno Braun
be89c2ea12 Read vertex geometry in validation check 2024-07-09 21:57:24 +02:00
Hanno Braun
22433ac8b8 Read vertex geometry in validation check 2024-07-09 21:57:24 +02:00
Hanno Braun
35edeaca76 Remove commented code 2024-07-09 21:57:24 +02:00
Hanno Braun
104bbea1ed Read vertex geometry in Cycle::winding 2024-07-09 21:57:24 +02:00
Hanno Braun
d2d89fcec2 Read vertex geometry in SplitHalfEdge 2024-07-09 21:57:24 +02:00
Hanno Braun
972895707e Read vertex geometry in SweepHalfEdge 2024-07-09 21:57:24 +02:00
Hanno Braun
e96f66c17e Prepare for follow-on change 2024-07-09 21:57:24 +02:00
Hanno Braun
04dc00988f Read vertex geometry in solid validation check 2024-07-09 21:53:50 +02:00
Hanno Braun
2ba09e1213 Read vertex geometry in Cycle::winding 2024-07-09 21:53:50 +02:00
Hanno Braun
8648590fa8 Read vertex geometry in SplitFace::split_face 2024-07-09 21:53:50 +02:00
Hanno Braun
aec37de69b Add variable to increase clarity 2024-07-09 21:53:50 +02:00
Hanno Braun
24e0b0cbca Add variable to increase clarity 2024-07-09 21:53:50 +02:00
Hanno Braun
22b50e2f31 Read vertex geometry in validation check 2024-07-09 21:53:50 +02:00
Hanno Braun
bed86118de Read vertex geometry in bounding box calculation 2024-07-09 21:53:50 +02:00
Hanno Braun
8778855744 Require end vertex for HalfEdge AABB calculation
This is preparation for using the vertex geometry there.
2024-07-09 21:53:50 +02:00
Hanno Braun
b655fb6dbf Read vertex geometry in validation check 2024-07-09 21:53:50 +02:00
Hanno Braun
86650e61a2 Construct half-edge boundary from vertex geometry 2024-07-09 21:53:50 +02:00
Hanno Braun
e0204138fb
Merge pull request #2416 from hannobraun/validate
Remove superfluous info from validation check
2024-07-09 21:51:37 +02:00
Hanno Braun
9b90543bd3 Update doc comment 2024-07-09 21:46:58 +02:00
Hanno Braun
24c856b00d Remove superfluous info from validation check 2024-07-09 21:46:58 +02:00
Hanno Braun
3ba6cd81bf
Merge pull request #2415 from hannobraun/split
Implement `SplitHalfEdge` for `Cycle`
2024-07-09 21:45:26 +02:00
Hanno Braun
5110eebede Implement SplitHalfEdge for Cycle
This provides more flexibility, specifically regarding the ongoing
changes to the geometry representation.
2024-07-09 21:40:53 +02:00
Hanno Braun
c1f57303ed Prepare for follow-on change 2024-07-09 21:40:53 +02:00
Hanno Braun
ff1e7e6178
Merge pull request #2414 from hannobraun/queries
Improve query capabilities on `Shell`
2024-07-09 21:39:39 +02:00
Hanno Braun
610c99cf9d Add CycleOfHalfEdge 2024-07-09 20:49:59 +02:00
Hanno Braun
61ef8f024c Add more information to Sibling 2024-07-09 20:43:13 +02:00
Hanno Braun
cf6e1626c5 Add Sibling 2024-07-09 20:41:52 +02:00
Hanno Braun
6afc3c1718
Merge pull request #2413 from hannobraun/geom
Define missing vertex geometry in test
2024-07-08 20:17:13 +02:00
Hanno Braun
88a396a313 Define missing vertex geometry in test 2024-07-08 20:10:42 +02:00
Hanno Braun
4449fefa78
Merge pull request #2412 from hannobraun/rust
Upgrade to Rust 1.79.0
2024-07-08 20:09:21 +02:00
Hanno Braun
9f9b35233c Upgrade to Rust 1.79.0 2024-07-08 20:02:01 +02:00
Hanno Braun
c498ab2a97 Replace default_features with default-features 2024-07-08 20:01:45 +02:00
Hanno Braun
8c241298e2 Remove unuse code
Rust 1.79 is starting to warn about those. For some reason, the unused
fields weren't caught before.
2024-07-08 20:01:15 +02:00
Hanno Braun
d5c175f7fd
Merge pull request #2411 from hannobraun/sponsors
Update list of sponsors
2024-07-08 19:35:39 +02:00
Hanno Braun
791500c1dc Update list of sponsors 2024-07-08 19:32:56 +02:00
Hanno Braun
aaf965d326
Merge pull request #2410 from hannobraun/dependabot/cargo/cargo-311fdd4ce6
Bump serde from 1.0.203 to 1.0.204 in the cargo group
2024-07-08 15:24:33 +02:00
Hanno Braun
0ceccdab4a Run cargo update 2024-07-08 15:19:12 +02:00
dependabot[bot]
6c8a6a576c
Bump serde from 1.0.203 to 1.0.204 in the cargo group
Bumps the cargo group with 1 update: [serde](https://github.com/serde-rs/serde).


Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 12:32:21 +00:00
Hanno Braun
a652011161
Merge pull request #2409 from thestig4242/main
Update cube.obj
2024-07-07 19:30:40 +02:00
thestig4242
40df34e0a0
Update cube.obj
applied material textures in orientations so the top view is default.
2024-07-07 01:47:53 -06:00
Hanno Braun
baaacdf02c
Merge pull request #2408 from hannobraun/sponsors
Update list of sponsors
2024-07-03 20:34:36 +02:00
Hanno Braun
dc4cda1835 Update list of sponsors 2024-07-03 20:32:20 +02:00
Hanno Braun
6874e4865c
Merge pull request #2407 from hannobraun/dependabot/cargo/cargo-c722aeba1e
Bump the cargo group with 5 updates
2024-07-02 10:11:26 +02:00
Hanno Braun
585f583bee Run cargo update 2024-07-02 10:04:04 +02:00
dependabot[bot]
80401c749a
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.7` | `4.5.8` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.16.0` | `0.16.1` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.16.0` | `0.16.1` |
| [log](https://github.com/rust-lang/log) | `0.4.21` | `0.4.22` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.117` | `1.0.119` |


Updates `clap` from 4.5.7 to 4.5.8
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.7...v4.5.8)

Updates `parry2d-f64` from 0.16.0 to 0.16.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.16.0 to 0.16.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `log` from 0.4.21 to 0.4.22
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22)

Updates `serde_json` from 1.0.117 to 1.0.119
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.119)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 12:10:01 +00:00
Hanno Braun
14b95668bc
Merge pull request #2406 from hannobraun/query
Simplify half-edge sibling query
2024-06-28 20:06:14 +02:00
Hanno Braun
dc434861db Simplify validation check
The boundary is no longer a necessary part of the definition of
siblings, and has already been removed from the query infrastructure in
an earlier commit.
2024-06-28 19:27:17 +02:00
Hanno Braun
6db64fe0e6 Remove unused argument 2024-06-28 19:27:17 +02:00
Hanno Braun
e299373ba7 Remove unused argument 2024-06-28 19:27:17 +02:00
Hanno Braun
8767fc1fa3 Remove boundary criterion from sibling query
Two half-edges having the same vertices but different boundaries is
invalid, and that should be caught by the half-edge connection
validation check.
2024-06-28 19:27:17 +02:00
Hanno Braun
f4676a283f
Merge pull request #2405 from hannobraun/geom
Define vertex geometry in more places
2024-06-28 18:55:08 +02:00
Hanno Braun
98f253236e Set vertex geometry in test of validation check 2024-06-28 18:43:21 +02:00
Hanno Braun
b542648be7 Set vertex geometry in BuildCycle::circle 2024-06-28 18:43:21 +02:00
Hanno Braun
0cd10cb5ab Add BuildCycle::from_half_edges_and_boundaries 2024-06-28 18:43:21 +02:00
Hanno Braun
eab0f0da5c Return boundary from BuildHalfEdge::arc 2024-06-28 18:43:21 +02:00
Hanno Braun
9cddbb3c5f Prepare for follow-on change 2024-06-28 18:43:21 +02:00
Hanno Braun
39afc7eb0a Make variable name more specific 2024-06-28 18:43:21 +02:00
Hanno Braun
011b93b8ac Update vertex geometry in JoinCycle::join_to 2024-06-28 18:43:21 +02:00
Hanno Braun
6923615328 Prepare for follow-on change 2024-06-28 18:43:21 +02:00
Hanno Braun
dccfc27d43 Prepare for follow-on change 2024-06-28 18:43:21 +02:00
Hanno Braun
a65c5d83d6 Prepare for follow-on change 2024-06-28 18:43:21 +02:00
Hanno Braun
e70a9f4836 Update variable name 2024-06-28 18:43:21 +02:00
Hanno Braun
07a48ef57a Set vertex geometry in test for validation check 2024-06-28 18:43:21 +02:00
Hanno Braun
921b6c7c46 Refactor to improve clarity 2024-06-28 18:43:21 +02:00
Hanno Braun
021f8b7665 Update vertex geometry in half-edge reverse code 2024-06-28 18:43:21 +02:00
Hanno Braun
3897826b5c Require end vertex to reverse HalfEdge coords
This is preparation for updating the vertex geometry in that code.
2024-06-28 18:43:21 +02:00
Hanno Braun
8defcab4bf Update argument names 2024-06-28 18:43:21 +02:00
Hanno Braun
2c7c406aea
Merge pull request #2404 from hannobraun/set
Add `ObjectSet::before`
2024-06-28 18:06:28 +02:00
Hanno Braun
80828e28cb Add ObjectSet::before 2024-06-28 18:01:37 +02:00
Hanno Braun
7bccd67394 Fix word in doc comment 2024-06-28 18:01:37 +02:00
Hanno Braun
26cc863e06 Inline redundant variable 2024-06-28 18:01:37 +02:00
Hanno Braun
97ab25cb03
Merge pull request #2403 from hannobraun/reverse
Remove unused code from `reverse` module
2024-06-27 21:45:24 +02:00
Hanno Braun
6ea36b061d Remove unused code from reverse module 2024-06-27 21:41:08 +02:00
Hanno Braun
5595e3b007
Merge pull request #2402 from hannobraun/geom
Update vertex geometry in transform code
2024-06-27 20:58:50 +02:00
Hanno Braun
f4619258e7 Update vertex geometry in transform code 2024-06-27 20:35:45 +02:00
Hanno Braun
42e39bb668 Prepare for follow-on change 2024-06-27 20:35:45 +02:00
Hanno Braun
48586c15b5 Prepare for follow-on change 2024-06-27 20:35:45 +02:00
Hanno Braun
a4cfb48903 Update module name 2024-06-27 20:35:45 +02:00
Hanno Braun
7b06a98887
Merge pull request #2401 from hannobraun/geom
Define vertex geometry in various places
2024-06-26 20:36:10 +02:00
Hanno Braun
c173891917 Define vertex geom in from_vertices_and_indices 2024-06-26 20:32:34 +02:00
Hanno Braun
59ec619918 Prepare for follow-on change 2024-06-26 20:32:34 +02:00
Hanno Braun
c60ccfef65 Define vertex geometry in SplitHalfEdge 2024-06-26 20:32:34 +02:00
Hanno Braun
5977c932db Define vertex geometry in SplitFace 2024-06-26 20:32:34 +02:00
Hanno Braun
e8e2359642 Define vertex geometry in SweepCycle 2024-06-26 20:32:34 +02:00
Hanno Braun
ed4210395e Add more information to SweptHalfEdge 2024-06-26 20:32:34 +02:00
Hanno Braun
f4f14420d9 Set vertex geometry in SweepHalfEdge 2024-06-26 20:32:34 +02:00
Hanno Braun
1c6d22ae40 Define vertex geometry in BuildCycle::polygon 2024-06-26 20:32:34 +02:00
Hanno Braun
e8ea51e3e8 Return CurveBoundary from line_segment 2024-06-26 20:32:34 +02:00
Hanno Braun
d376876390 Add VertexGeom::local_on 2024-06-26 20:32:34 +02:00
Hanno Braun
1aedbdb6da Update doc comment 2024-06-26 20:32:34 +02:00
Hanno Braun
605001938a
Merge pull request #2400 from hannobraun/sweep
Clean up in sweep code
2024-06-26 20:22:06 +02:00
Hanno Braun
f5e31019d4 Update variable name 2024-06-26 19:27:37 +02:00
Hanno Braun
2a38d70d46 Simplify 2024-06-26 19:22:00 +02:00
Hanno Braun
07f6701935 Add SweptHalfEdge 2024-06-26 19:20:12 +02:00
Hanno Braun
d906b5327d
Merge pull request #2399 from hannobraun/build
Clean up in build operations
2024-06-26 19:05:31 +02:00
Hanno Braun
0f1669c5a0 Simplify BuildHalfEdge::line_segment 2024-06-26 18:46:30 +02:00
Hanno Braun
681f71c417 Consolidate duplicated code 2024-06-26 18:46:30 +02:00
Hanno Braun
f9e79ba50a Simplify 2024-06-26 18:46:30 +02:00
Hanno Braun
4da0622958 Remove redundant calls to insert 2024-06-26 18:46:30 +02:00
Hanno Braun
e827945643 Update variable name 2024-06-26 18:46:30 +02:00
Hanno Braun
c267df6cff Simplify make_line_on_surface 2024-06-26 18:46:30 +02:00
Hanno Braun
acc0c00d48
Merge pull request #2398 from hannobraun/approx
Prepare approximation code for vertex geometry changes
2024-06-25 20:36:41 +02:00
Hanno Braun
f7783d1240 Simplify argument name 2024-06-25 20:30:19 +02:00
Hanno Braun
0fcd1faafe Move vertex approximation out of half-edge approx 2024-06-25 20:30:19 +02:00
Hanno Braun
f1e1b3ed63 Prepare for follow-on change 2024-06-25 20:30:17 +02:00
Hanno Braun
74e577440f Move ApproxCache to approx 2024-06-25 20:24:22 +02:00
Hanno Braun
b17b3b0d96 Rename HalfEdgeApproxCache to ApproxCache 2024-06-25 20:24:04 +02:00
Hanno Braun
afa741d29f Make fields of HalfEdgeApproxCache public 2024-06-25 20:23:49 +02:00
Hanno Braun
4582a17b48 Update struct field name 2024-06-25 20:23:37 +02:00
Hanno Braun
6faa38dc98
Merge pull request #2397 from hannobraun/approx
Continue cleanup of approximation code
2024-06-24 23:00:12 +02:00
Hanno Braun
8070a39edf Convert trait implementation into simple function 2024-06-24 22:54:41 +02:00
Hanno Braun
7b696898a7 Remove unused code 2024-06-24 22:54:41 +02:00
Hanno Braun
b13b4a5e23 Circumvent redundant abstraction layer 2024-06-24 22:54:41 +02:00
Hanno Braun
e6a506cefc Add approx_cycle function 2024-06-24 22:54:41 +02:00
Hanno Braun
815d80f61a Prepare for follow-on change 2024-06-24 22:54:41 +02:00
Hanno Braun
a96d03aa91 Remove unused code 2024-06-24 22:54:40 +02:00
Hanno Braun
153f8060aa Circumvent redundant abstraction layer 2024-06-24 22:54:21 +02:00
Hanno Braun
e7edc33bcb Prepare for follow-on change 2024-06-24 22:54:21 +02:00
Hanno Braun
978d4c00f1
Merge pull request #2396 from hannobraun/sponsors
Update list of sponsors
2024-06-24 22:15:58 +02:00
Hanno Braun
54edadd364 Update list of sponsors 2024-06-24 22:12:58 +02:00
Hanno Braun
1c48948336
Merge pull request #2395 from hannobraun/dependabot/cargo/cargo-e40c48cbc3
Bump the cargo group with 6 updates
2024-06-24 15:05:11 +02:00
Hanno Braun
40db7c6059 Run cargo update 2024-06-24 14:52:21 +02:00
dependabot[bot]
ac07aa23f9
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [nalgebra](https://github.com/dimforge/nalgebra) | `0.32.6` | `0.33.0` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.15.1` | `0.16.0` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.15.1` | `0.16.0` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.16.0` | `1.16.1` |
| [winit](https://github.com/rust-windowing/winit) | `0.30.2` | `0.30.3` |
| [url](https://github.com/servo/rust-url) | `2.5.1` | `2.5.2` |


Updates `nalgebra` from 0.32.6 to 0.33.0
- [Changelog](https://github.com/dimforge/nalgebra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/commits)

Updates `parry2d-f64` from 0.15.1 to 0.16.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.16.0)

Updates `parry3d-f64` from 0.15.1 to 0.16.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits/v0.16.0)

Updates `bytemuck` from 1.16.0 to 1.16.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.0...v1.16.1)

Updates `winit` from 0.30.2 to 0.30.3
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.2...v0.30.3)

Updates `url` from 2.5.1 to 2.5.2
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.1...v2.5.2)

---
updated-dependencies:
- dependency-name: nalgebra
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: url
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 12:25:05 +00:00
Hanno Braun
6df81c7c1d
Merge pull request #2394 from hannobraun/approx
Clean up some of the approximation code
2024-06-21 22:00:03 +02:00
Hanno Braun
3dc32934c0 Save unnecessary allocation 2024-06-21 21:50:24 +02:00
Hanno Braun
1da0f6aa17 Update variable name 2024-06-21 21:50:24 +02:00
Hanno Braun
09ebcab257 Return more appropriate type from approx_vertex 2024-06-21 21:50:24 +02:00
Hanno Braun
19642f55be Consolidate vertex approximation code 2024-06-21 21:50:24 +02:00
Hanno Braun
63aa5c59f2 Prepare for follow-on change 2024-06-21 21:50:24 +02:00
Hanno Braun
0560022c2c Add approx_vertex 2024-06-21 21:50:24 +02:00
Hanno Braun
85e31174c2 Remove redundant doc comment 2024-06-21 21:50:24 +02:00
Hanno Braun
1adf7a60d1 Remove unnecessary pub 2024-06-21 21:50:24 +02:00
Hanno Braun
adce91db4a Remove redundant doc comment 2024-06-21 21:50:24 +02:00
Hanno Braun
6c7ce69b4f Remove unnecessary pub 2024-06-21 21:50:24 +02:00
Hanno Braun
7dbb6d1260 Remove unused code 2024-06-21 21:50:24 +02:00
Hanno Braun
e7b8278775 Simplify test 2024-06-21 21:50:24 +02:00
Hanno Braun
3afd86aadf Simplify test 2024-06-21 21:50:24 +02:00
Hanno Braun
567229816d Simplify test 2024-06-21 21:50:24 +02:00
Hanno Braun
219f0d080c Simplify test 2024-06-21 21:50:24 +02:00
Hanno Braun
972a0b98b3 Circumvent redundant abstraction layer 2024-06-21 21:50:24 +02:00
Hanno Braun
93be464872 Prepare for follow-on change 2024-06-21 21:50:24 +02:00
Hanno Braun
77183637a3 Remove redundant comment 2024-06-21 21:50:24 +02:00
Hanno Braun
6a6448070b Add missing word to panic message 2024-06-21 21:50:24 +02:00
Hanno Braun
c2b87ca1ca Extract code into dedicated function 2024-06-21 21:50:24 +02:00
Hanno Braun
9391ede47d Extract code into dedicated function 2024-06-21 21:50:24 +02:00
Hanno Braun
8c4ecf3218 Extract code into dedicated function 2024-06-21 21:50:24 +02:00
Hanno Braun
788aab543e Circumvent redundant abstraction layer 2024-06-21 21:50:24 +02:00
Hanno Braun
a6612aa55e Update module name 2024-06-21 21:50:24 +02:00
Hanno Braun
7d48d20a57 Remove outdated and redundant doc comment 2024-06-21 21:50:24 +02:00
Hanno Braun
adf114abf1 Remove unnecessary pub 2024-06-21 21:50:24 +02:00
Hanno Braun
2b7a8ebc81 Consolidate documentation on circle approx 2024-06-21 21:50:24 +02:00
Hanno Braun
8e7d311ef9 Consolidate circle approx in dedicated module 2024-06-21 21:50:24 +02:00
Hanno Braun
7a10405b90 Remove unused code 2024-06-21 21:50:24 +02:00
Hanno Braun
ba2a0f425f Remove unused argument 2024-06-21 21:50:24 +02:00
Hanno Braun
e0262026c5 Circumvent redundant abstraction layer 2024-06-21 21:50:24 +02:00
Hanno Braun
fc8db4353f Circumvent redundant abstraction layer 2024-06-21 21:50:24 +02:00
Hanno Braun
714bc35f4d Prepare for follow-on change 2024-06-21 21:50:24 +02:00
Hanno Braun
c17d5ef9f8 Remove unused code 2024-06-21 21:50:24 +02:00
Hanno Braun
e5a4070b6c Circumvent redundant abstraction layer in test 2024-06-21 21:50:24 +02:00
Hanno Braun
50dd44201e Prepare for follow-on change 2024-06-21 21:50:24 +02:00
Hanno Braun
fdb92762ab Circumvent redundant code in circle approximation 2024-06-21 21:50:24 +02:00
Hanno Braun
d6c17fe3f4 Make approx_circle more convenient to call 2024-06-21 21:50:24 +02:00
Hanno Braun
a23fe37e4b Prepare for follow-on change 2024-06-21 21:50:24 +02:00
Hanno Braun
ad5ec4d562 Improve documentation of line approximation 2024-06-21 21:50:24 +02:00
Hanno Braun
633bf5edcc Improve documentation for line approximation 2024-06-21 21:50:24 +02:00
Hanno Braun
8bc97b2352 Remove redundant variable 2024-06-21 21:50:24 +02:00
Hanno Braun
af971c7801 Construct correct data type right away 2024-06-21 21:50:24 +02:00
Hanno Braun
5f629ca597 Improve documentation of curve approximation 2024-06-21 21:50:24 +02:00
Hanno Braun
0e9e5c83e4 Update documentation of half-edge approximation 2024-06-21 21:50:24 +02:00
Hanno Braun
56216e2255 Update module name 2024-06-21 21:50:15 +02:00
Hanno Braun
0030b7cc76 Extract variable to simplify 2024-06-21 21:46:38 +02:00
Hanno Braun
1e44da2c49 Remove redundant variables 2024-06-21 21:46:38 +02:00
Hanno Braun
a6ccd52b81 Simplify argument for curve approximation 2024-06-21 21:46:38 +02:00
Hanno Braun
5c3be8d63a Update order of arguments to increase clarity
The surface is very closely related to the curve, especially its
geometry, while the half-edge only provide supplemental information
about the approximation.
2024-06-21 21:46:38 +02:00
Hanno Braun
d1eccc7dae
Merge pull request #2393 from hannobraun/surface
Add `BuildSurface::from_geometry`
2024-06-21 21:45:50 +02:00
Hanno Braun
b66c81429e Add BuildSurface::from_geometry 2024-06-21 20:53:18 +02:00
Hanno Braun
ef441195c8 Fix documentation of BuildSurface::from_uv 2024-06-21 20:51:47 +02:00
Hanno Braun
04575bb941 Move method to restore alphabetical order 2024-06-21 20:51:23 +02:00
Hanno Braun
0d25b1e463
Merge pull request #2392 from hannobraun/geometry
Add infrastructure for defining vertex geometry
2024-06-20 22:04:55 +02:00
Hanno Braun
d19b12e2df Add machinery for defining vertex geometry 2024-06-20 21:58:35 +02:00
Hanno Braun
b627a0131f Add vertex geometry to Geometry 2024-06-20 21:58:35 +02:00
Hanno Braun
d9e1f6cf00 Fix doc comment 2024-06-20 21:58:35 +02:00
Hanno Braun
2b2228072f Add VertexGeom 2024-06-20 21:58:35 +02:00
Hanno Braun
a47bf36eb2 Improve grammar in doc comment 2024-06-20 21:58:35 +02:00
Hanno Braun
8ac8ac819d Fix/improve CurveGeom documentation 2024-06-20 21:58:35 +02:00
Hanno Braun
fac32765fd
Merge pull request #2391 from hannobraun/geometry
Remove `path` field from `HalfEdgeGeom`
2024-06-19 21:50:26 +02:00
Hanno Braun
72efa214aa Remove path field from HalfEdgeGeom
This is a big milestone, as it means that all curve geometry is now
exclusively defined within `CurveGeom`.
2024-06-19 21:42:52 +02:00
Hanno Braun
082dd9f1a9 Read path from curve geometry in edge approx code 2024-06-19 21:39:29 +02:00
Hanno Braun
8ed9db8675 Read path from curve geometry in curve approx code 2024-06-19 21:38:57 +02:00
Hanno Braun
8bb5e6b13f Read path from curve geometry in bounding volume code 2024-06-19 21:37:15 +02:00
Hanno Braun
4f1b311013 Give surface to HalfEdge's BoundingVolume impl 2024-06-19 21:33:16 +02:00
Hanno Braun
2aaf431ac0 Provide surface to Cycle's BoundingVolume impl 2024-06-19 21:33:16 +02:00
Hanno Braun
6c7fd44c22 Read path from curve geometry in validation check 2024-06-19 21:31:50 +02:00
Hanno Braun
58be958365 Read path from curve geometry in validation check 2024-06-19 21:29:30 +02:00
Hanno Braun
1973740877 Define missing curve geometry in test 2024-06-19 21:29:30 +02:00
Hanno Braun
b67b1b3ee7 Make variable name more specific 2024-06-19 21:29:30 +02:00
Hanno Braun
fcb87e70dd Prepare for follow-on change 2024-06-19 21:29:30 +02:00
Hanno Braun
4e5b8329f7 Make variable name more specific 2024-06-19 21:29:30 +02:00
Hanno Braun
59c6f7fdd2 Make variable name more specific 2024-06-19 21:29:30 +02:00
Hanno Braun
6136f94ce9 Update argument name 2024-06-19 21:29:30 +02:00
Hanno Braun
bc8414502c Update argument name 2024-06-19 21:29:30 +02:00
Hanno Braun
46453aff98 Read path from curve geometry in validation check 2024-06-19 21:29:30 +02:00
Hanno Braun
4381bb1c3a Prepare for follow-on change 2024-06-19 21:29:30 +02:00
Hanno Braun
b0bbd5fd68 Prepare for follow-on change 2024-06-19 21:29:30 +02:00
Hanno Braun
46fbbfbdd0 Prepare for follow-on change 2024-06-19 21:29:30 +02:00
Hanno Braun
4199432cf3
Merge pull request #2390 from hannobraun/validation
Disable tests for "multiple references" checks
2024-06-19 21:22:53 +02:00
Hanno Braun
51cf4ae8ab Disable tests for "multiple references" checks
See the comment I added in this commit for justification.
2024-06-19 21:10:38 +02:00
Hanno Braun
a38f8674c3
Merge pull request #2389 from hannobraun/validation
Make some cleanups in validation code
2024-06-17 22:54:13 +02:00
Hanno Braun
d43a206d8c Remove redundant check in test 2024-06-17 22:51:20 +02:00
Hanno Braun
30e5c0ba72 Prepare for follow-on change 2024-06-17 22:51:20 +02:00
Hanno Braun
845b0578f8 Consolidate redundant calls 2024-06-17 22:51:20 +02:00
Hanno Braun
9e85c98627 Simplify function signature 2024-06-17 22:51:20 +02:00
Hanno Braun
536187536a Prepare for follow-on change 2024-06-17 22:51:20 +02:00
Hanno Braun
2043b40c9e Prepare for follow-on change 2024-06-17 22:51:20 +02:00
Hanno Braun
c9bfce1ca9 Rename argument to make it more specific 2024-06-17 22:51:07 +02:00
Hanno Braun
3825599792 Rename argument to make it more specific 2024-06-17 22:50:23 +02:00
Hanno Braun
08aa1f69ed Rename argument to make it more specific 2024-06-17 22:50:23 +02:00
Hanno Braun
af5b01731b
Merge pull request #2388 from hannobraun/geometry
Update some code to avoid reading `path` field of `HalfEdgeGeom`
2024-06-17 22:46:37 +02:00
Hanno Braun
0fd2353c76 Read path from curve geometry in Cycle::winding 2024-06-17 22:17:45 +02:00
Hanno Braun
6c68506963 Rename variable to prepare for follow-on change 2024-06-17 22:17:45 +02:00
Hanno Braun
ab122eb457 Read path from curve geometry in SweepHalfEdge 2024-06-17 22:17:35 +02:00
Hanno Braun
6c86a93882 Read path from curve geometry in JoinCycle 2024-06-17 22:17:26 +02:00
Hanno Braun
b8dd63bcc2 Pass more geometry into JoinCycle method 2024-06-17 22:00:47 +02:00
Hanno Braun
6667560829 Rename argument to prepare for follow-on change 2024-06-17 21:57:56 +02:00
Hanno Braun
20270b39e7
Merge pull request #2387 from hannobraun/sponsors
Update list of sponsors
2024-06-17 21:36:49 +02:00
Hanno Braun
ef88379468 Update list of sponsors 2024-06-17 21:34:12 +02:00
Hanno Braun
fc10689288
Merge pull request #2386 from hannobraun/dependabot/cargo/cargo-7975b8a6e7
Bump the cargo group across 1 directory with 5 updates
2024-06-17 20:58:39 +02:00
Hanno Braun
e58cfac8dd Run cargo update 2024-06-17 20:46:46 +02:00
dependabot[bot]
7ab82006f5
Bump the cargo group across 1 directory with 5 updates
Bumps the cargo group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.6` | `4.5.7` |
| [spade](https://github.com/Stoeoef/spade) | `2.8.0` | `2.9.0` |
| [nalgebra](https://github.com/dimforge/nalgebra) | `0.32.5` | `0.32.6` |
| [wgpu](https://github.com/gfx-rs/wgpu) | `0.20.0` | `0.20.1` |
| [winit](https://github.com/rust-windowing/winit) | `0.30.0` | `0.30.2` |



Updates `clap` from 4.5.6 to 4.5.7
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.6...v4.5.7)

Updates `spade` from 2.8.0 to 2.9.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `nalgebra` from 0.32.5 to 0.32.6
- [Changelog](https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/commits)

Updates `wgpu` from 0.20.0 to 0.20.1
- [Release notes](https://github.com/gfx-rs/wgpu/releases)
- [Changelog](https://github.com/gfx-rs/wgpu/blob/v0.20.1/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu/compare/v0.20.0...v0.20.1)

Updates `winit` from 0.30.0 to 0.30.2
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.30.0...v0.30.2)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: nalgebra
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: wgpu
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 14:54:00 +00:00
Hanno Braun
2ed055d512
Merge pull request #2383 from hannobraun/geometry
Don't use `self.path` in `HalfEdgeGeom`
2024-06-14 22:33:30 +02:00
Hanno Braun
f7513d0646 Don't use self.path in HalfEdgeGeom
This prepares for moving the path to `CurveGeom`.
2024-06-14 22:26:28 +02:00
Hanno Braun
30549bc82e Provide surface to private method
This prepares for a follow-on change, as the surface will be needed
there shortly.
2024-06-14 22:26:28 +02:00
Hanno Braun
61f246213f Provide surface to Cycle::winding 2024-06-14 22:26:28 +02:00
Hanno Braun
e33d43b058
Merge pull request #2382 from hannobraun/transform
Correctly define curve geometry when transforming curve
2024-06-14 22:24:28 +02:00
Hanno Braun
74168aa240 Correctly define geometry of transformed curve 2024-06-14 22:15:54 +02:00
Hanno Braun
bd22e1d4e3 Relax surface transform implementation 2024-06-14 22:15:54 +02:00
Hanno Braun
13c8f938f1 Provide surface to curve transform implementation 2024-06-14 22:15:54 +02:00
Hanno Braun
d76417b48d Remove unnecessary clone 2024-06-14 22:15:54 +02:00
Hanno Braun
15d3a84982 Relax curve transform implementation 2024-06-14 22:15:54 +02:00
Hanno Braun
b84b1a0b6c Provide surface to half-edge transform impl 2024-06-14 22:15:54 +02:00
Hanno Braun
22e3d22d88 Remove unnecessary clone 2024-06-14 22:15:54 +02:00
Hanno Braun
6c0d7fc385 Relax requirements on half-edge transform impl 2024-06-14 22:15:54 +02:00
Hanno Braun
5369be268b Provide surface to cycle transform implementation 2024-06-14 22:15:54 +02:00
Hanno Braun
258fb03e7a Remove unnecessary clones 2024-06-14 22:15:54 +02:00
Hanno Braun
14fdf9d64b Implement TransformObject for &Handle<Cycle> 2024-06-14 22:15:54 +02:00
Hanno Braun
7612cfdcab Provide surface to region transform implementation 2024-06-14 22:15:54 +02:00
Hanno Braun
9992f73d53 Implement TransformObject for &Handle<Region> 2024-06-14 22:15:54 +02:00
Hanno Braun
730613f2de Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
44ea7fd318 Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
e4a92448fa Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
3aa6e06da4 Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
bf2b02dda4 Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
4f5ab570d7 Prepare for follow-on change 2024-06-14 22:15:54 +02:00
Hanno Braun
605e5241b2
Merge pull request #2381 from hannobraun/transform
Make `TransformObject` trait more flexible
2024-06-14 22:15:29 +02:00
Hanno Braun
5716bb7ca1 Take self by value in TransformObject
This is another measure to provide more flexibility that I'm going to
need going forward. It also has surprisingly little effect on the rest
of the code.
2024-06-14 21:02:28 +02:00
Hanno Braun
1c356747d9 Add TransformObject::Transformed
This makes the trait more flexible. I'm going to need this additional
flexibility for an upcoming change.
2024-06-14 21:02:01 +02:00
Hanno Braun
f3432b1f5e Update argument name 2024-06-14 20:46:24 +02:00
Hanno Braun
cb2f8091d1 Update variable name 2024-06-14 20:46:24 +02:00
Hanno Braun
b5559bfb1e
Merge pull request #2380 from hannobraun/sponsors
Update list of sponsors
2024-06-11 20:51:51 +02:00
Hanno Braun
a7ba9bd1e1 Update list of sponsors 2024-06-11 20:49:06 +02:00
Hanno Braun
23c0dcdf30
Merge pull request #2379 from hannobraun/geometry
Set missing curve geometry in through hole operation
2024-06-10 21:14:09 +02:00
Hanno Braun
cc8505eeeb Set missing curve geometry in through hole op 2024-06-10 21:09:07 +02:00
Hanno Braun
d13071bbd0 Derive Debug for CurveGeom 2024-06-10 21:09:07 +02:00
Hanno Braun
f8078a5331
Merge pull request #2378 from hannobraun/dependabot/cargo/cargo-8867f47c0b
Bump the cargo group with 2 updates
2024-06-10 15:43:24 +02:00
Hanno Braun
84021020c0 Run cargo update 2024-06-10 15:36:32 +02:00
dependabot[bot]
237326e91b
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [clap](https://github.com/clap-rs/clap) and [regex](https://github.com/rust-lang/regex).


Updates `clap` from 4.5.4 to 4.5.6
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.6)

Updates `regex` from 1.10.4 to 1.10.5
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 12:42:51 +00:00
Hanno Braun
350e9eb223
Merge pull request #2377 from hannobraun/ci
Disable CI build on Windows
2024-06-07 21:17:20 +02:00
Hanno Braun
3dec1bd464 Disable CI build on Windows 2024-06-07 21:14:28 +02:00
Hanno Braun
9033890a90
Merge pull request #2375 from hannobraun/circle
Build circle-cycle out of multiple arcs
2024-06-07 21:11:16 +02:00
Hanno Braun
57814ac923 Remove BuildHalfEdge::circle
Per the previous commit, it no longer creates valid geometry.
2024-06-06 19:52:01 +02:00
Hanno Braun
39b0274a92 Build circle-cycle out of multiple arcs
See the updated documentation for motivation.
2024-06-06 19:51:50 +02:00
Hanno Braun
de041b3cca
Merge pull request #2373 from hannobraun/geometry
Derive `Debug` for `HalfEdgeGeometry`
2024-06-05 22:12:37 +02:00
Hanno Braun
a7b6dc2792 Derive Debug for HalfEdgeGeometry 2024-06-05 22:06:42 +02:00
Hanno Braun
927d84b0ff
Merge pull request #2372 from hannobraun/holes
Simplify hole operations
2024-06-05 22:05:37 +02:00
Hanno Braun
8ba0f875c8 Simplify through hole operation 2024-06-05 22:00:26 +02:00
Hanno Braun
02c96f76c6 Avoid use of BuildHalfEdge::circle 2024-06-05 22:00:26 +02:00
Hanno Braun
a88b054754 Avoid use of BuildHalfEdge::circle 2024-06-05 22:00:26 +02:00
Hanno Braun
3bc1c23885
Merge pull request #2371 from hannobraun/validate
Simplify sketch validation tests
2024-06-05 22:00:08 +02:00
Hanno Braun
e4817f4c93 Simplify construction of Sketch in test 2024-06-05 21:53:39 +02:00
Hanno Braun
7fd69cbac5 Simplify variable name 2024-06-05 21:53:39 +02:00
Hanno Braun
546c4934ef Remove redundant call 2024-06-05 21:53:39 +02:00
Hanno Braun
488d0bb91b Inline redundant variable 2024-06-05 21:53:39 +02:00
Hanno Braun
1e04b5d966 Prepare for follow-on change 2024-06-05 21:53:39 +02:00
Hanno Braun
1e4e3908bd Prepare for follow-on change 2024-06-05 21:53:39 +02:00
Hanno Braun
a3315e0600 Simplify construction of Cycle in test 2024-06-05 21:53:39 +02:00
Hanno Braun
cf47ffbcde Simplify construction of Sketch in test 2024-06-05 21:53:39 +02:00
Hanno Braun
0bd5b70fa0 Simplify variable name 2024-06-05 21:53:39 +02:00
Hanno Braun
4b05d00cb3 Simplify construction of Sketch in test 2024-06-05 21:53:39 +02:00
Hanno Braun
58f04c15a0
Merge pull request #2370 from hannobraun/arc
Derive `Debug` for `Arc`
2024-06-05 21:53:19 +02:00
Hanno Braun
6ea7a8a763 Derive Debug for Arc 2024-06-05 21:46:45 +02:00
Hanno Braun
4a2d924f8e
Merge pull request #2369 from hannobraun/dependabot/cargo/cargo-1c4fca089f
Bump tokio from 1.37.0 to 1.38.0 in the cargo group
2024-06-03 15:52:54 +02:00
Hanno Braun
6f9cce5d88 Run cargo update 2024-06-03 15:41:39 +02:00
dependabot[bot]
40adc4d5a2
Bump tokio from 1.37.0 to 1.38.0 in the cargo group
Bumps the cargo group with 1 update: [tokio](https://github.com/tokio-rs/tokio).


Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-03 12:42:51 +00:00
Hanno Braun
6137799341
Merge pull request #2368 from hannobraun/validation
Port rest of reference counting validation checks to new infrastructure
2024-05-29 14:51:37 +02:00
Hanno Braun
5a91557cfb Make helper struct private 2024-05-29 14:41:20 +02:00
Hanno Braun
f4a5d9064c Use more targeted test conditions 2024-05-29 14:40:27 +02:00
Hanno Braun
6fd750b498 Derive invalid solid from valid one 2024-05-29 14:37:00 +02:00
Hanno Braun
73d9b16ad6 Derive invalid solid from valid one 2024-05-29 14:32:47 +02:00
Hanno Braun
1fe77d0a93 Derive invalid solid from valid one 2024-05-29 14:30:41 +02:00
Hanno Braun
d3ac878d25 Derive invalid solid from valid one 2024-05-29 14:20:39 +02:00
Hanno Braun
ba5d82c54a Use more targeted test condition 2024-05-29 14:12:41 +02:00
Hanno Braun
27b84a0fb8 Prepare for follow-on change 2024-05-29 14:10:28 +02:00
Hanno Braun
4031971dcf Simplify variable names 2024-05-29 14:08:34 +02:00
Hanno Braun
4ed903e150 Simplify variable names 2024-05-29 14:08:31 +02:00
Hanno Braun
57269cf47f Update test names 2024-05-29 14:02:42 +02:00
Hanno Braun
d5cb49758c Make test names more specific 2024-05-29 14:01:25 +02:00
Hanno Braun
8743c605e7 Move tests closer to code under test 2024-05-29 14:00:20 +02:00
Hanno Braun
d714275d85 Port rest of validation test to new infrastructure 2024-05-29 13:58:08 +02:00
Hanno Braun
e5d7a54a43 Port part of validation test to new infrastructure 2024-05-29 13:56:36 +02:00
Hanno Braun
96617eeb1d Port part of validation test to new infrastructure 2024-05-29 13:55:06 +02:00
Hanno Braun
9da967db61 Port part of validation test to new infrastructure 2024-05-29 13:51:55 +02:00
Hanno Braun
15f47a2415 Clean up imports 2024-05-29 13:48:27 +02:00
Hanno Braun
bd89182ee2
Merge pull request #2365 from hannobraun/dependabot/cargo/cargo-27f8793bd4
Bump the cargo group with 3 updates
2024-05-27 15:28:33 +02:00
Hanno Braun
444c456f9c Run cargo update 2024-05-27 15:21:32 +02:00
dependabot[bot]
7f56770b65 Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [parking_lot](https://github.com/Amanieu/parking_lot), [spade](https://github.com/Stoeoef/spade) and [serde](https://github.com/serde-rs/serde).


Updates `parking_lot` from 0.12.2 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.2...0.12.3)

Updates `spade` from 2.7.0 to 2.8.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `serde` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-27 15:21:32 +02:00
Hanno Braun
378097adb0
Merge pull request #2367 from hannobraun/validation
Port reference counting validation checks for `Sketch` to new infrastructure
2024-05-27 15:20:41 +02:00
Hanno Braun
26d166ecae Update test names 2024-05-27 15:11:22 +02:00
Hanno Braun
5ed1598088 Increase consistency 2024-05-27 15:11:22 +02:00
Hanno Braun
d26b60272f Simplify sketch construction 2024-05-27 15:11:22 +02:00
Hanno Braun
ce1d1bba80 Derive invalid sketch from valid one 2024-05-27 15:11:22 +02:00
Hanno Braun
e172c125b1 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
2614e4272f Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
f3ca0c9519 Increase consistency 2024-05-27 15:11:22 +02:00
Hanno Braun
76ef2bc12f Simplify sketch construction 2024-05-27 15:11:22 +02:00
Hanno Braun
0c87cfa84b Derive invalid sketch from valid one 2024-05-27 15:11:22 +02:00
Hanno Braun
1213f4f313 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
80cb780008 Remove redundant code 2024-05-27 15:11:22 +02:00
Hanno Braun
b5d10bdabb Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
f2fb5334c4 Move tests closer to code under test 2024-05-27 15:11:22 +02:00
Hanno Braun
e1902bbf3b Port rest of validation check to new infra 2024-05-27 15:11:22 +02:00
Hanno Braun
aa9a44c60a Port part of validation check to new infra 2024-05-27 15:11:22 +02:00
Hanno Braun
fa4642ff8a Prepare for follow-on change 2024-05-27 15:11:22 +02:00
Hanno Braun
c4309bccd9 Move reference infra to new validation infra 2024-05-27 15:11:22 +02:00
Hanno Braun
84de93d676 Avoid macro 2024-05-27 15:11:22 +02:00
Hanno Braun
097011f7ff Remove redundant macro parameter 2024-05-27 15:11:22 +02:00
Hanno Braun
5a1bc80b58 Add missing conversions 2024-05-27 15:11:22 +02:00
Hanno Braun
4f770f93f5 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
4b1ad78c87 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
02504f54b6 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
22798545b9 Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
a0fe3177ba Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
9ebe8498bf Simplify variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
43223ffa80 Update variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
610c2276f7 Update variable name 2024-05-27 15:11:22 +02:00
Hanno Braun
28cf226d4a Order variables to reflect order of use 2024-05-27 15:11:22 +02:00
Hanno Braun
4798974d82 Simplify method name 2024-05-27 15:11:22 +02:00
Hanno Braun
21d5be663b Simplify method name 2024-05-27 15:11:22 +02:00
Hanno Braun
e87936e03d Avoid useless allocation 2024-05-27 15:11:22 +02:00
Hanno Braun
bb3cd13938 Rename struct to improve clarity 2024-05-27 15:11:22 +02:00
Hanno Braun
34c415f77c
Merge pull request #2366 from hannobraun/build
Expand `BuildSketch`
2024-05-27 15:10:52 +02:00
Hanno Braun
25ab473301 Add BuildSketch::polygon 2024-05-27 14:53:53 +02:00
Hanno Braun
5d230a6e7e Add BuildSketch::circle 2024-05-27 14:42:27 +02:00
Hanno Braun
e861a511bc
Merge pull request #2364 from hannobraun/validation
Continue cleanup of reference-counting validation code
2024-05-24 22:41:00 +02:00
Hanno Braun
3c09fe54bd Move most important type to top of module 2024-05-24 22:27:20 +02:00
Hanno Braun
40a85afa4f Remove unused macro parameter 2024-05-24 22:26:04 +02:00
Hanno Braun
e64bc241f4 Merge redundant structs 2024-05-24 22:25:08 +02:00
Hanno Braun
cf977a7346 Refactor to prepare for follow-on change 2024-05-24 22:24:38 +02:00
Hanno Braun
4ea6aec162 Move error variants to ValidationError
This makes it possible to further simplify `ObjectNotExclusivelyOwned`
in a next step.
2024-05-24 22:22:15 +02:00
Hanno Braun
11857d16d8 Update doc comments 2024-05-24 22:15:29 +02:00
Hanno Braun
8f75a72b00 Make enum variant name more explicit 2024-05-24 22:14:52 +02:00
Hanno Braun
dab3851962 Make enum variant name more explicit 2024-05-24 22:14:35 +02:00
Hanno Braun
9e245450b1 Make enum variant name more explicit 2024-05-24 22:14:13 +02:00
Hanno Braun
d514a2fa1d Make enum variant name more explicit 2024-05-24 22:13:43 +02:00
Hanno Braun
8b7a60d788 Update formatting 2024-05-24 22:13:27 +02:00
Hanno Braun
e92123b0a8 Consolidate error variants in ValidationError 2024-05-24 22:05:43 +02:00
Hanno Braun
d612c0dba3 Simplify error message 2024-05-24 22:04:34 +02:00
Hanno Braun
10b80ea5eb Update validation error variant name 2024-05-24 22:04:15 +02:00
Hanno Braun
f7978bf0ee Re-export ObjectNotExclusivelyOwned 2024-05-24 22:01:21 +02:00
Hanno Braun
33850d4df5 Add missing doc comments 2024-05-24 22:01:14 +02:00
Hanno Braun
ae9291bce8 Update doc comment 2024-05-24 21:59:28 +02:00
Hanno Braun
4f5e1d31fe Simplify error message 2024-05-24 21:58:59 +02:00
Hanno Braun
3d633f6821
Merge pull request #2363 from hannobraun/validation
Clean up validation code that counts object references
2024-05-23 21:16:16 +02:00
Hanno Braun
f54ccc7c7f Generate error messages automatically 2024-05-23 21:06:37 +02:00
Hanno Braun
3f84c7b197 Derive trait to prepare for follow-on change 2024-05-23 21:06:37 +02:00
Hanno Braun
455b86165b simplify argument name 2024-05-23 21:06:37 +02:00
Hanno Braun
bfae0d4979 Simplify argument name 2024-05-23 21:06:37 +02:00
Hanno Braun
3e457142b7 Simplify 2024-05-23 21:06:37 +02:00
Hanno Braun
27c697d15d Update argument name 2024-05-23 21:06:37 +02:00
Hanno Braun
6906da0563 Make method name more explicit 2024-05-23 21:06:37 +02:00
Hanno Braun
564555ed11 Make method name more explicit 2024-05-23 21:06:37 +02:00
Hanno Braun
58a9cd854c Update argument name 2024-05-23 21:06:37 +02:00
Hanno Braun
dbea2b7890 Update argument name 2024-05-23 21:06:37 +02:00
Hanno Braun
9bc192e051 Make struct field name more explicit 2024-05-23 21:06:37 +02:00
Hanno Braun
798c7a892e Simplify struct field name 2024-05-23 21:06:37 +02:00
Hanno Braun
f73e8e161c Use Debug/Display as intended 2024-05-23 21:06:37 +02:00
Hanno Braun
4dc780207a Refactor to increase consistency 2024-05-23 21:06:37 +02:00
Hanno Braun
f0d6b1a2f2 Refactor to simplify 2024-05-23 21:06:37 +02:00
Hanno Braun
ec59f0edf8 Refactor to increase consistency 2024-05-23 21:06:37 +02:00
Hanno Braun
c46b9c5210 Clean up imports 2024-05-23 21:06:37 +02:00
Hanno Braun
bf2c770d9f Refactor to simplify 2024-05-23 21:06:37 +02:00
Hanno Braun
6d11cfd880 Simplify error messages 2024-05-23 21:06:37 +02:00
Hanno Braun
f4442bc390 Update doc comment 2024-05-23 21:06:37 +02:00
Hanno Braun
d80ceffd70 Update enum variant name 2024-05-23 21:06:37 +02:00
Hanno Braun
30dffb4188 Make name of validation error more specific 2024-05-23 21:06:37 +02:00
Hanno Braun
b0ce5927ae Update formatting 2024-05-23 21:06:37 +02:00
Hanno Braun
086dae0c7b
Merge pull request #2362 from hannobraun/validation
Migrate validation check for coincident half-edges that are not siblings to new validation infrastructure
2024-05-22 20:25:02 +02:00
Hanno Braun
cf3c97f9b9 Refactor to increase consistency 2024-05-22 20:18:03 +02:00
Hanno Braun
17ad40b3a6 Move test closer to code under test 2024-05-22 20:18:03 +02:00
Hanno Braun
907b9e32fc Remove redundant code 2024-05-22 20:18:03 +02:00
Hanno Braun
1bd5fc7380 Implement ValidationCheck for check 2024-05-22 20:18:03 +02:00
Hanno Braun
82c36dfada Rename argument to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
14020aa76b Move validation error variant to ValidationError 2024-05-22 20:18:03 +02:00
Hanno Braun
2d104db3c4 Refactor to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
d63f88c1fd Refactor to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
2711e4c7fc Refactor to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
c55af6c4c6 Move CoincidentHalfEdgesAreNotSiblings
Move it to the module for the new validation infrastructure.
2024-05-22 20:18:03 +02:00
Hanno Braun
8c334a92c0 Document CoincidentHalfEdgesAreNotSiblings 2024-05-22 20:18:03 +02:00
Hanno Braun
c73ea02487 Refactor to increase consistency 2024-05-22 20:18:03 +02:00
Hanno Braun
8f7ee901ca Inline redundant struct 2024-05-22 20:18:03 +02:00
Hanno Braun
f08f91f2ef Inline redundant struct 2024-05-22 20:18:03 +02:00
Hanno Braun
de90327970 Inline redundant struct 2024-05-22 20:18:03 +02:00
Hanno Braun
4dd921656e Remove unnecessary Boxes 2024-05-22 20:18:03 +02:00
Hanno Braun
fdb283023a Refactor to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
2efce53a38 Refactor to prepare for follow-on change 2024-05-22 20:18:03 +02:00
Hanno Braun
e47c267818 Add CoincidentHalfEdgesAreNotSiblings 2024-05-22 20:18:03 +02:00
Hanno Braun
ce6b4027c5 Make module name more specific
I need to add another module there that could basically have the same
name.
2024-05-22 20:18:03 +02:00
Hanno Braun
2fd43f4876
Merge pull request #2361 from hannobraun/validation
Port validation check for half-edge siblings to new validation infrastructure
2024-05-21 22:09:20 +02:00
Hanno Braun
7af79bd7a0 Refactor to increase consistency 2024-05-21 21:59:57 +02:00
Hanno Braun
e1178590b9 Refactor to increase consistency 2024-05-21 21:59:57 +02:00
Hanno Braun
ad06804675 Move test closer to code under test 2024-05-21 21:59:57 +02:00
Hanno Braun
f165c25faa Move HalfEdgeHasNoSibling to ValidationError 2024-05-21 21:59:57 +02:00
Hanno Braun
7885e699ba Inline redundant function 2024-05-21 21:59:57 +02:00
Hanno Braun
6f092467e7 Impl ValidationCheck for HalfEdgeHasNoSibling 2024-05-21 21:59:57 +02:00
Hanno Braun
aca0bc75d5 Pass argument to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
03e0c320fa Rename argument to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
0aef67f9ce Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
8c2a1eea69 Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
187a943e18 Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
43b924ed69 Add lifetime to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
aeb5ac8131 Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
b69691e523 Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
3ddc250bc8 Refactor to prepare for follow-on change 2024-05-21 21:59:57 +02:00
Hanno Braun
a06a8c0102 Derive Error for HalfEdgeHasNoSibling 2024-05-21 21:59:57 +02:00
Hanno Braun
f2bf1ede75 Add HalfEdgeHasNoSibling 2024-05-21 21:59:57 +02:00
Hanno Braun
610a05f6d0
Merge pull request #2360 from hannobraun/dependabot/cargo/cargo-ab05c0fadc
Bump the cargo group with 6 updates
2024-05-20 19:05:43 +02:00
Hanno Braun
dd7721e139 Run cargo update 2024-05-20 18:55:13 +02:00
dependabot[bot]
9ea8216a95
Bump the cargo group with 6 updates
Bumps the cargo group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.60` | `1.0.61` |
| [itertools](https://github.com/rust-itertools/itertools) | `0.12.1` | `0.13.0` |
| [spade](https://github.com/Stoeoef/spade) | `2.6.0` | `2.7.0` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.83` | `1.0.86` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.15.0` | `1.16.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.201` | `1.0.202` |


Updates `thiserror` from 1.0.60 to 1.0.61
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.60...1.0.61)

Updates `itertools` from 0.12.1 to 0.13.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.12.1...v0.13.0)

Updates `spade` from 2.6.0 to 2.7.0
- [Changelog](https://github.com/Stoeoef/spade/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stoeoef/spade/commits)

Updates `anyhow` from 1.0.83 to 1.0.86
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.83...1.0.86)

Updates `bytemuck` from 1.15.0 to 1.16.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.15.0...v1.16.0)

Updates `serde` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: spade
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 12:55:53 +00:00
Hanno Braun
e079fa85b6
Merge pull request #2359 from hannobraun/validation
Port curve geometry mismatch validation check to new infrastructure
2024-05-17 15:01:12 +02:00
Hanno Braun
0d2c46dd43 Refactor to simplify 2024-05-17 14:46:01 +02:00
Hanno Braun
10e372f001 Make test condition more specific 2024-05-17 14:46:01 +02:00
Hanno Braun
b93abf66c3 Move tests closer to the code it covers 2024-05-17 14:46:01 +02:00
Hanno Braun
d5d00348d7 Simplify test name 2024-05-17 14:46:01 +02:00
Hanno Braun
230d391f32 Inline redundant method 2024-05-17 14:46:01 +02:00
Hanno Braun
170a7016bc Refactor to simplify 2024-05-17 14:46:01 +02:00
Hanno Braun
6fb1348804 Simplify enum variant name 2024-05-17 14:46:01 +02:00
Hanno Braun
71ece41226 Move validation error variant to ValidationError 2024-05-17 14:46:01 +02:00
Hanno Braun
23ff2aeff1 Impl ValidationCheck for CurveGeometryMismatch 2024-05-17 14:45:56 +02:00
Hanno Braun
f7b4d78d88 Refactor to prepare for follow-on change 2024-05-17 14:45:34 +02:00
Hanno Braun
1886470383 Refactor to prepare for follow-on change 2024-05-17 14:45:34 +02:00
Hanno Braun
016488ae37 Refactor to simplify 2024-05-17 14:45:34 +02:00
Hanno Braun
105f97ed68 Inline redundant function 2024-05-17 14:45:34 +02:00
Hanno Braun
ab4b2299a6 Refactor to prepare for follow-on change 2024-05-17 14:45:34 +02:00
Hanno Braun
a67b5255c9 Remove redundant code
The nested loops already provide all the half-edges in all combinations.
So we don't need to check them in both directions per loop iteration.
2024-05-17 14:45:34 +02:00
Hanno Braun
f3e2dd82d8 Refactor to prepare for follow-on change 2024-05-17 14:45:32 +02:00
Hanno Braun
f2c9820b30 Update formatting 2024-05-17 14:45:18 +02:00
Hanno Braun
38c3ab5ba4 Refactor to simplify 2024-05-17 14:45:18 +02:00
Hanno Braun
f0746e6eee Move CurveGeometryMismatch to validation 2024-05-17 14:44:44 +02:00
Hanno Braun
2f4453c7f1 Simplify struct name 2024-05-17 14:43:18 +02:00
Hanno Braun
871144e918 Document CurveCoordinateSystemMismatch 2024-05-17 14:43:18 +02:00
Hanno Braun
1f4569d1b4
Merge pull request #2358 from hannobraun/query
Refactor `AllHalfEdgesWithSurface` query to not require allocations
2024-05-17 14:26:52 +02:00
Hanno Braun
61011b28d2 Refactor query to not require allocations 2024-05-17 14:19:04 +02:00
Hanno Braun
eb32d919b1 Refactor to simplify 2024-05-17 14:14:20 +02:00
Hanno Braun
c30828c7d4 Refactor to prepare for follow-on change 2024-05-17 14:13:43 +02:00
Hanno Braun
c949ff7252
Merge pull request #2357 from hannobraun/sweep
Make some minor cleanups in sweep code
2024-05-15 15:10:07 +02:00
Hanno Braun
a63ad3080d Make argument name more explicit 2024-05-15 14:18:26 +02:00
Hanno Braun
baf51fe38b Make argument name more explicit 2024-05-15 14:18:26 +02:00
Hanno Braun
20d29efd92 Update variable name 2024-05-15 14:18:26 +02:00
Hanno Braun
ae6c20959f
Merge pull request #2356 from hannobraun/validation
Add option to `ValidationConfig` that panics on the first error
2024-05-15 14:06:33 +02:00
Hanno Braun
6dcc7861fb Implement panic_on_error validation option 2024-05-15 13:56:47 +02:00
Hanno Braun
88389de0f0 Add panic_on_error option to ValidationConfig 2024-05-15 13:56:47 +02:00
Hanno Braun
8df4a27a53
Merge pull request #2355 from hannobraun/geometry
Define curve geometry for new face when sweeping sketch
2024-05-13 15:26:36 +02:00
Hanno Braun
58c58ab7a1 Define curve geometry when sweeping sketch 2024-05-13 15:17:59 +02:00
Hanno Braun
41b1b2e306 Fix typo in comment 2024-05-13 15:17:42 +02:00
Hanno Braun
631f24d380
Merge pull request #2354 from hannobraun/dependabot/cargo/cargo-48ecec4cae
Bump the cargo group with 8 updates
2024-05-13 15:16:05 +02:00
Hanno Braun
ae11822e3b Run cargo update 2024-05-13 14:55:01 +02:00
dependabot[bot]
a455208cea
Bump the cargo group with 8 updates
Bumps the cargo group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.59` | `1.0.60` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.82` | `1.0.83` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.15.0` | `0.15.1` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.15.0` | `0.15.1` |
| [semver](https://github.com/dtolnay/semver) | `1.0.22` | `1.0.23` |
| [serde](https://github.com/serde-rs/serde) | `1.0.200` | `1.0.201` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.116` | `1.0.117` |
| [cmd_lib](https://github.com/rust-shell-script/rust_cmd_lib) | `1.9.3` | `1.9.4` |


Updates `thiserror` from 1.0.59 to 1.0.60
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.59...1.0.60)

Updates `anyhow` from 1.0.82 to 1.0.83
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.82...1.0.83)

Updates `parry2d-f64` from 0.15.0 to 0.15.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `parry3d-f64` from 0.15.0 to 0.15.1
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/commits)

Updates `semver` from 1.0.22 to 1.0.23
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.22...1.0.23)

Updates `serde` from 1.0.200 to 1.0.201
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.200...v1.0.201)

Updates `serde_json` from 1.0.116 to 1.0.117
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.116...v1.0.117)

Updates `cmd_lib` from 1.9.3 to 1.9.4
- [Release notes](https://github.com/rust-shell-script/rust_cmd_lib/releases)
- [Commits](https://github.com/rust-shell-script/rust_cmd_lib/commits)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: cmd_lib
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 12:46:39 +00:00
Hanno Braun
b0ed3c69e3
Merge pull request #2353 from hannobraun/geometry
Set curve geometry when reverting curve coordinate systems
2024-05-08 14:23:27 +02:00
Hanno Braun
1476fc40b9 Impl ReverseCurveCoordinateSystems for curve
This plugs a hole, where the path in the half-edge geometry was updated,
but the same update wasn't made for the curve, leading to
inconsistencies.
2024-05-08 14:19:22 +02:00
Hanno Braun
b13a5eb773 Provide surface to HalfEdge's reverse trait impl 2024-05-08 14:19:22 +02:00
Hanno Braun
976922550b Refactor to prepare for follow-on change 2024-05-08 14:19:22 +02:00
Hanno Braun
a914247108 Provide surface to Cycle's reverse trait impl 2024-05-08 14:19:22 +02:00
Hanno Braun
6ccba6dbef Refactor to prepare for follow-on change 2024-05-08 14:19:22 +02:00
Hanno Braun
52753537aa Provide surface to Region's reverse trait impl 2024-05-08 14:19:22 +02:00
Hanno Braun
e6faabce2d Refactor to prepare for follow-on change 2024-05-08 14:19:22 +02:00
Hanno Braun
b7c84323a5
Merge pull request #2352 from hannobraun/reverse
Make `ReverseCurveCoordinateSystems` trait more flexible
2024-05-08 14:17:58 +02:00
Hanno Braun
fd9980adad Take self in ReverseCurveCoordinateSystems
This provides some more flexibility regarding the type that the trait is
implemented for.
2024-05-08 13:42:01 +02:00
Hanno Braun
9db2e6a389 Add ReverseCurveCoordinateSystems::Reversed
This is preparation for some other changes to make the trait more
flexible.
2024-05-08 13:39:26 +02:00
Hanno Braun
53db1db8e9 Remove unused code 2024-05-08 13:38:02 +02:00
Hanno Braun
481abb8d2d Update module name 2024-05-08 13:35:04 +02:00
Hanno Braun
21e246efea
Merge pull request #2351 from hannobraun/geometry
Define curve geometry in `JoinCycle::join_to`
2024-05-07 15:09:27 +02:00
Hanno Braun
a6b8a26fc1 Define curve geometry in JoinCycle::join_to 2024-05-07 15:02:58 +02:00
Hanno Braun
056aa48e9a Provide surface to JoinCycle::join_to
It's needed there to set curve geometry correctly.
2024-05-07 15:02:58 +02:00
Hanno Braun
1c7a76f650 Refactor to prepare for follow-on change 2024-05-07 15:02:58 +02:00
Hanno Braun
4e88df1fd3 Refactor to prepare for follow-on change 2024-05-07 15:02:58 +02:00
Hanno Braun
86ff12f857 Refactor to prepare for follow-on change 2024-05-07 15:02:58 +02:00
Hanno Braun
8ca2fbb7e6
Merge pull request #2350 from hannobraun/geometry
Return `Option` from `CurveGeom::local_on`
2024-05-07 14:55:29 +02:00
Hanno Braun
0fb32869f1 Return Option from CurveGeom::local_on
This makes the function more flexible, letting the caller decide if it
can accept a missing local definition.
2024-05-07 14:48:54 +02:00
Hanno Braun
739db0c1ff Update formatting 2024-05-07 14:48:29 +02:00
Hanno Braun
1df966a366
Merge pull request #2349 from hannobraun/geometry
Fix contradictory surface definitions in some solid validation tests
2024-05-07 14:42:16 +02:00
Hanno Braun
7998135816 Fix use of wrong surface in reference test 2024-05-07 14:12:55 +02:00
Hanno Braun
e9a49ffbe1 Refactor to prepare for follow-on change 2024-05-07 14:12:24 +02:00
Hanno Braun
3b10f2281b Fix use of wrong surfaces in reference tests 2024-05-07 14:10:40 +02:00
Hanno Braun
a08b78d1fe Refactor to prepare for follow-on change 2024-05-07 14:10:40 +02:00
Hanno Braun
64b93b72b4 Use shared surfaces in reference tests
This unlocks a fix, and otherwise makes no difference.
2024-05-07 14:07:47 +02:00
Hanno Braun
60f1e091b9
Merge pull request #2348 from hannobraun/geometry
Set curve geometry in `SweepHalfEdge`
2024-05-07 13:46:31 +02:00
Hanno Braun
d7c546f606 Set curve geometry in SweepHalfEdge 2024-05-07 13:36:58 +02:00
Hanno Braun
55cf57ba8d Refactor to prepare for follow-on change 2024-05-07 13:36:41 +02:00
Hanno Braun
67e85aadfb
Merge pull request #2347 from hannobraun/sponsors
Update list of sponsors in README
2024-05-07 13:26:32 +02:00
Hanno Braun
f34994e6ec Update list of sponsors in README 2024-05-07 13:23:19 +02:00
Hanno Braun
85cbd51fe2
Merge pull request #2346 from hannobraun/dependabot/cargo/cargo-02324edfdc
Bump the cargo group with 5 updates
2024-05-06 18:20:39 +02:00
Hanno Braun
1a282305c3 Run cargo update 2024-05-06 18:09:04 +02:00
dependabot[bot]
024bb1386e Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [num-traits](https://github.com/rust-num/num-traits) | `0.2.18` | `0.2.19` |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.14.0` | `0.15.0` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.14.0` | `0.15.0` |
| [getrandom](https://github.com/rust-random/getrandom) | `0.2.14` | `0.2.15` |
| [serde](https://github.com/serde-rs/serde) | `1.0.199` | `1.0.200` |


Updates `num-traits` from 0.2.18 to 0.2.19
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.18...num-traits-0.2.19)

Updates `parry2d-f64` from 0.14.0 to 0.15.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.14.0...v0.15.0)

Updates `parry3d-f64` from 0.14.0 to 0.15.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.14.0...v0.15.0)

Updates `getrandom` from 0.2.14 to 0.2.15
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.14...v0.2.15)

Updates `serde` from 1.0.199 to 1.0.200
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

---
updated-dependencies:
- dependency-name: num-traits
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: getrandom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 18:07:56 +02:00
Hanno Braun
5edcf353b2
Merge pull request #2345 from hannobraun/winit
Upgrade to winit 0.30
2024-05-06 14:44:08 +02:00
Hanno Braun
6ada107e28 Refactor to avoid use of deprecated method 2024-05-06 14:31:39 +02:00
Hanno Braun
157e7e92e7 Refactor to prepare for follow-on change 2024-05-06 14:31:13 +02:00
Hanno Braun
78839b69c3 Refactor to prepare for follow-on change 2024-05-06 14:30:01 +02:00
Hanno Braun
ef03265a77 Refactor to prepare for follow-on change 2024-05-06 14:29:01 +02:00
Hanno Braun
80dd8dd9a4 Make Viewer optional
This is preparation for making `Window` optional too, which I need to do
to avoid using a deprecated method.
2024-05-06 14:23:28 +02:00
Hanno Braun
f9ab17a313 Refactor to prepare for follow-on change 2024-05-06 14:22:49 +02:00
Hanno Braun
25384b3945 Refactor to prepare for follow-on change 2024-05-06 14:18:30 +02:00
Hanno Braun
0fad9ef3d1 Move model to DisplayState 2024-05-06 14:17:51 +02:00
Hanno Braun
637caa71e1 Refactor to avoid deprecated method 2024-05-06 14:13:48 +02:00
Hanno Braun
88d0395a76 Implement ApplicationHandler for DisplayState 2024-05-06 14:12:45 +02:00
Hanno Braun
c61c73e99a Refactor to prepare for follow-on change 2024-05-06 14:10:50 +02:00
Hanno Braun
80171239f2 Refactor to prepare for follow-on change 2024-05-06 14:08:15 +02:00
Hanno Braun
9546a8bb12 Refactor to prepare for follow-on change 2024-05-06 14:00:01 +02:00
Hanno Braun
0d2c08d58a Move invert_zoom to DisplayState 2024-05-06 13:58:28 +02:00
Hanno Braun
974556917a Simplify argument name 2024-05-06 13:55:45 +02:00
Hanno Braun
010b23eadd Refactor to prepare for follow-on change 2024-05-06 13:54:25 +02:00
Hanno Braun
d31487a3fc Move window to DisplayState 2024-05-06 13:54:03 +02:00
Hanno Braun
8b343c768b Move viewer to DisplayState 2024-05-06 13:53:43 +02:00
Hanno Braun
398bc1bd28 Refactor to prepare for follow-on change 2024-05-06 13:53:15 +02:00
Hanno Braun
04274ee841 Move held_mouse_button to DisplayState 2024-05-06 13:53:14 +02:00
Hanno Braun
6628ac05da Move new_size to DisplayState 2024-05-06 13:52:36 +02:00
Hanno Braun
e66c8c6b47 Move stop_drawing to new DisplayState struct 2024-05-06 13:52:08 +02:00
Hanno Braun
9b2a1d35e9 Upgrade to winit 0.30
This is only the minimally invasive upgrade, which triggers some
deprecation warnings. I'm going to fix those over the new few commits.
2024-05-06 13:25:11 +02:00
Hanno Braun
f2fc49520a
Merge pull request #2344 from hannobraun/wgpu
Upgrade to `wgpu` 0.20
2024-05-06 13:24:35 +02:00
Hanno Braun
a52e9c5525 Upgrade to wgpu 0.20 2024-05-06 13:14:47 +02:00
Hanno Braun
0e83bf9561
Merge pull request #2343 from hannobraun/rust
Upgrade to Rust 1.78.0
2024-05-06 13:13:51 +02:00
Hanno Braun
1dcb36b0ac Upgrade to Rust 1.78.0 2024-05-06 13:05:55 +02:00
Hanno Braun
4b5e24df59 Remove unused trait method
Rust 1.78.0 starts warning about this.
2024-05-06 13:02:36 +02:00
Hanno Braun
57d61b359b
Merge pull request #2342 from hannobraun/automation
Remove unused automation code
2024-05-06 12:41:58 +02:00
Hanno Braun
fd9b3794cf Remove unused automation code 2024-05-06 12:38:41 +02:00
Hanno Braun
992783ea15
Merge pull request #2341 from hannobraun/geometry
Set curve geometry in `JoinCycle::add_joined_edges`
2024-05-03 14:10:07 +02:00
Hanno Braun
36056ee995 Set curve geometry in JoinCycle method 2024-05-03 14:00:36 +02:00
Hanno Braun
a6738fc9b6 Update doc comment 2024-05-03 14:00:24 +02:00
Hanno Braun
9ad7934b22 Provide surface to JoinCycle::add_joined_edges 2024-05-03 14:00:24 +02:00
Hanno Braun
ce326893a4 Provide top surface to SweepCycle::sweep_cycle 2024-05-03 14:00:24 +02:00
Hanno Braun
537519737d Provide top surface to private sweep_cycle fn 2024-05-03 14:00:24 +02:00
Hanno Braun
833d91f15d Refactor to prepare for follow-on change 2024-05-03 14:00:24 +02:00
Hanno Braun
9dc849b287 Improve documentation of JoinCycle method 2024-05-03 14:00:24 +02:00
Hanno Braun
f43e845589 Make variable name more precise 2024-05-03 14:00:24 +02:00
Hanno Braun
eb6ac63e03
Merge pull request #2340 from hannobraun/geometry
Set curve geometry in shell validation test
2024-04-30 13:20:34 +02:00
Hanno Braun
b345881ad8 Set curve geometry in shell validation test 2024-04-30 13:12:44 +02:00
Hanno Braun
013f881426 Add UpdateCurveGeometry::update_geometry_from 2024-04-30 13:12:44 +02:00
Hanno Braun
3fd05d07cd Refactor to prepare for follow-on change 2024-04-30 13:12:44 +02:00
Hanno Braun
3259b3e067 Refactor to prepare for follow-on change 2024-04-30 13:12:43 +02:00
Hanno Braun
5f648b031a
Merge pull request #2339 from hannobraun/geometry
Set curve geometry when transforming curve
2024-04-30 12:47:38 +02:00
Hanno Braun
23af296ce9 Remove obsolete comment 2024-04-30 12:41:08 +02:00
Hanno Braun
8d0739f0d5 Set geometry when transforming curve 2024-04-30 12:41:06 +02:00
Hanno Braun
b143ffb8cf Implement TransformObject for Handle<Curve>
This is preparation for setting curve geometry there.
2024-04-30 12:40:53 +02:00
Hanno Braun
3f4a92e6c9 Return Option from Geometry::of_curve
This makes the method more flexible and error messages about missing
curve geometry more targetted.
2024-04-30 12:36:33 +02:00
Hanno Braun
b5bcd2cf99
Merge pull request #2338 from hannobraun/geometry
Set curve geometry in `BuildShell::from_vertices_and_indices`
2024-04-30 12:20:19 +02:00
Hanno Braun
b29d7312a9 Set curve geometry in BuildShell method 2024-04-30 12:08:10 +02:00
Hanno Braun
e032ab1bc7 Refactor to prepare for follow-on change 2024-04-30 12:08:10 +02:00
Hanno Braun
9be74da4fa
Merge pull request #2337 from hannobraun/geometry
Add `UpdateCurveGeometry::make_line_on_surface`
2024-04-29 15:37:47 +02:00
Hanno Braun
85907727fe Refactor to reduce redundancy 2024-04-29 15:33:05 +02:00
Hanno Braun
0904651d6c Add UpdateCurveGeometry::make_line_on_surface 2024-04-29 15:33:05 +02:00
Hanno Braun
3d83f929b6 Add CurveGeom::local_on 2024-04-29 15:33:05 +02:00
Hanno Braun
17180dc71c
Merge pull request #2336 from hannobraun/boundary
Implement `Default` for `CurveBoundary<Point<1>>`
2024-04-29 15:27:11 +02:00
Hanno Braun
5c55815655 Use CurveBoundary's Default implementation 2024-04-29 15:20:44 +02:00
Hanno Braun
ed769b7bd1 Implement Default for CurveBoundary<Point<1>> 2024-04-29 15:17:19 +02:00
Hanno Braun
37cd83d48b Expect CurveBoundary in BuildHalfEdge method
This is preparation for moving some of the code of that method into a
new, resuable method on `CurveBoundary`.
2024-04-29 15:17:19 +02:00
Hanno Braun
0e664024ad
Merge pull request #2335 from hannobraun/dependabot/cargo/cargo-f55e7a8529
Bump the cargo group across 1 directory with 4 updates
2024-04-29 15:16:27 +02:00
Hanno Braun
d4fbfa8c3a Run cargo update 2024-04-29 15:06:49 +02:00
dependabot[bot]
ace91353bd
Bump the cargo group across 1 directory with 4 updates
Bumps the cargo group with 4 updates in the / directory: [parking_lot](https://github.com/Amanieu/parking_lot), [parry2d-f64](https://github.com/dimforge/parry), [parry3d-f64](https://github.com/dimforge/parry) and [serde](https://github.com/serde-rs/serde).


Updates `parking_lot` from 0.12.1 to 0.12.2
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.2)

Updates `parry2d-f64` from 0.13.7 to 0.14.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.13.7...v0.14.0)

Updates `parry3d-f64` from 0.13.7 to 0.14.0
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.13.7...v0.14.0)

Updates `serde` from 1.0.198 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 13:00:38 +00:00
Hanno Braun
df602477fe
Merge pull request #2332 from hannobraun/boundary
Remove unused code related to `CurveBoundary`
2024-04-29 14:26:33 +02:00
Hanno Braun
5fb927395b Remove unused code related to CurveBoundary
These were part of the more flexible (and ultimately misguided)
approximation code I had been working a while ago. I guess I
accidentally kept this around, when the other code related to that was
removed.
2024-04-29 14:18:09 +02:00
Hanno Braun
ba744c9993
Merge pull request #2329 from hannobraun/geometry
Fix API for defining curve geometry
2024-04-29 13:57:49 +02:00
Hanno Braun
99cb0240e8 Remove unused constructor 2024-04-29 13:50:35 +02:00
Hanno Braun
128a15df53 Fix API for defining curve geometry
The previous version would not allow defining local curve geometry for
multiple surfaces.
2024-04-29 13:50:35 +02:00
Hanno Braun
635fc51645 Derive Default for CurveGeom 2024-04-29 13:50:35 +02:00
Hanno Braun
215996af5f
Merge pull request #2328 from hannobraun/geometry
Clean up curve geometry representation
2024-04-29 13:43:42 +02:00
Hanno Braun
00e983c2ff Remove unnecessary .clone() 2024-04-29 13:36:40 +02:00
Hanno Braun
9d2e1d8831 Remove redundant struct field 2024-04-29 13:36:39 +02:00
Hanno Braun
7079b28538 Don't allow multiple curve definitions per surface 2024-04-29 13:36:09 +02:00
Hanno Braun
b0e6b676f5 Refactor to prepare for follow-on change 2024-04-29 13:36:09 +02:00
Hanno Braun
2ac09330ce
Merge pull request #2327 from hannobraun/geometry
Create curve geometry update API
2024-04-29 13:30:56 +02:00
Hanno Braun
fae4dd4682 Make use of geometry update API in BuildCurve 2024-04-29 13:23:21 +02:00
Hanno Braun
2acde0c7c6 Add UpdateCurveGeometry::make_path_on_surface 2024-04-29 13:23:21 +02:00
Hanno Braun
af76177870
Merge pull request #2326 from hannobraun/sponsors
Update list of sponsors in README
2024-04-29 13:18:50 +02:00
Hanno Braun
74d0bcc950 Update list of sponsors in README 2024-04-29 13:13:16 +02:00
Hanno Braun
e2d2bfa3bf
Merge pull request #2325 from hannobraun/geometry
Define curve geometry when building half-edges
2024-04-26 13:29:46 +02:00
Hanno Braun
d97582cc42 Define curve geometry in BuildHalfEdge 2024-04-26 13:25:03 +02:00
Hanno Braun
23684c21b5 Provide surface to BuildHalfEdge methods 2024-04-26 13:25:03 +02:00
Hanno Braun
143e12b8f9 Refactor to prepare for follow-on change 2024-04-26 13:25:03 +02:00
Hanno Braun
fa2eea979e Provide surface to BuildCycle methods 2024-04-26 13:25:03 +02:00
Hanno Braun
feb45796c4 Refactor to prepare for follow-on change 2024-04-26 13:25:03 +02:00
Hanno Braun
073e0d08d5 Refactor to prepare for follow-on change 2024-04-26 13:25:03 +02:00
Hanno Braun
ddb6c10ebc Provide surface to BuildRegion methods 2024-04-26 13:25:03 +02:00
Hanno Braun
df3a7f586e Refactor to reduce redundancy 2024-04-26 13:25:03 +02:00
Hanno Braun
788345c258
Merge pull request #2324 from hannobraun/geometry
Define curve geometry in curve approximation tests
2024-04-26 13:18:47 +02:00
Hanno Braun
be5028b563 Define curve geometry in curve approx tests 2024-04-26 13:13:31 +02:00
Hanno Braun
5c39a3b3b4 Add BuildCurve::from_path_and_surface 2024-04-26 13:13:31 +02:00
Hanno Braun
b884e5f081 Add CurveGeom::from_path_and_surface 2024-04-26 13:08:34 +02:00
Hanno Braun
3c3d53bfe6
Merge pull request #2323 from hannobraun/geometry
Add curve geometry to geometry layer
2024-04-26 13:06:39 +02:00
Hanno Braun
79ebba2009 Add infrastructure for defining curve geometry 2024-04-25 14:30:08 +02:00
Hanno Braun
e6229c3f0d Add curve geometry to Geometry 2024-04-25 14:30:08 +02:00
Hanno Braun
b94f3e46dd Add CurveGeom 2024-04-25 14:30:08 +02:00
Hanno Braun
6b065639d2
Merge pull request #2322 from hannobraun/validation
Move half-edge connection check from `Cycle` to `Face`/`Sketch`
2024-04-25 14:25:20 +02:00
Hanno Braun
97bf88fbe8 Move Cycle validation check to Face/Sketch
The code of this check is going to require access to a `Surface` soon,
due to changes I'm working on. The reshuffling done in this commit is
preparation for having this surface available.
2024-04-25 14:01:13 +02:00
Hanno Braun
1a483918cf Clean up imports 2024-04-25 14:01:13 +02:00
Hanno Braun
2cf29e6851 Update argument name 2024-04-25 14:01:13 +02:00
Hanno Braun
8453a89ef3 Move check to separate function
This prepares for implementing the validation check for multiple object
types, with slightly different implementations for each.
2024-04-25 14:01:13 +02:00
Hanno Braun
cbceccdced Add explicit lifetime to ValidationCheck::check
I'm running into a situation with an implementation, where the lifetime
is no longer correctly infered. Making it explicit is the only way I
could find to address that.
2024-04-25 14:01:13 +02:00
Hanno Braun
73fd64f4c6
Merge pull request #2321 from hannobraun/surface
Define special surface to represent 2D space
2024-04-25 14:00:37 +02:00
Hanno Braun
7fc8a1846c Reference Surface from Sketch 2024-04-25 13:10:24 +02:00
Hanno Braun
de4cdc9cfb Expect &Topology in BuildSketch::empty 2024-04-25 13:10:24 +02:00
Hanno Braun
34d083e505 Improve punctuation 2024-04-25 13:10:24 +02:00
Hanno Braun
6383778ea4 Prevent defining geometry for 2D space 2024-04-25 13:10:24 +02:00
Hanno Braun
87d7de90b3 Add surface that represents 2D space 2024-04-25 13:10:24 +02:00
Hanno Braun
78fa96d460
Merge pull request #2320 from hannobraun/sponsors
Update list of sponsors in README
2024-04-24 14:03:48 +02:00
Hanno Braun
88ebd24d69 Update list of sponsors in README 2024-04-24 13:53:13 +02:00
Hanno Braun
1d1a6276ff
Merge pull request #2318 from hannobraun/dependabot/cargo/cargo-93a604793c
Bump the cargo group with 5 updates
2024-04-22 21:26:38 +02:00
Hanno Braun
56852fc8bf Run cargo update 2024-04-22 21:12:20 +02:00
dependabot[bot]
afeb8a23ea
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.59` |
| [wgpu](https://github.com/gfx-rs/wgpu) | `0.19.3` | `0.19.4` |
| [serde](https://github.com/serde-rs/serde) | `1.0.197` | `1.0.198` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.115` | `1.0.116` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.3` | `0.12.4` |


Updates `thiserror` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59)

Updates `wgpu` from 0.19.3 to 0.19.4
- [Release notes](https://github.com/gfx-rs/wgpu/releases)
- [Changelog](https://github.com/gfx-rs/wgpu/blob/trunk/CHANGELOG.md)
- [Commits](https://github.com/gfx-rs/wgpu/compare/v0.19.3...v0.19.4)

Updates `serde` from 1.0.197 to 1.0.198
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

Updates `reqwest` from 0.12.3 to 0.12.4
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.3...v0.12.4)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: wgpu
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 12:07:35 +00:00
Hanno Braun
21163dd898
Merge pull request #2315 from hannobraun/dependabot/cargo/rustls-0.22.4
Bump rustls from 0.22.3 to 0.22.4
2024-04-20 10:11:30 +02:00
dependabot[bot]
7db961827e
Bump rustls from 0.22.3 to 0.22.4
Bumps [rustls](https://github.com/rustls/rustls) from 0.22.3 to 0.22.4.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.22.3...v/0.22.4)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 19:52:44 +00:00
Hanno Braun
f6cabfbf0f
Merge pull request #2312 from hannobraun/dependabot/cargo/cargo-a691444a41
Bump the cargo group with 3 updates
2024-04-15 17:46:50 +02:00
Hanno Braun
789829adbf Run cargo update 2024-04-15 17:32:24 +02:00
dependabot[bot]
dacdd18d01
Bump the cargo group with 3 updates
Bumps the cargo group with 3 updates: [anyhow](https://github.com/dtolnay/anyhow), [chrono](https://github.com/chronotope/chrono) and [octocrab](https://github.com/XAMPPRocky/octocrab).


Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

Updates `chrono` from 0.4.37 to 0.4.38
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38)

Updates `octocrab` from 0.37.0 to 0.38.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 13:01:43 +00:00
Hanno Braun
cdaee31d1f
Merge pull request #2311 from hannobraun/dependabot/cargo/cargo-0cf1f9dc6f
Bump the cargo group with 2 updates
2024-04-08 20:19:33 +02:00
Hanno Braun
4eabe1814a Run cargo update 2024-04-08 20:11:01 +02:00
dependabot[bot]
29b80e7d93
Bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [getrandom](https://github.com/rust-random/getrandom) and [reqwest](https://github.com/seanmonstar/reqwest).


Updates `getrandom` from 0.2.12 to 0.2.14
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.14)

Updates `reqwest` from 0.12.2 to 0.12.3
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.2...v0.12.3)

---
updated-dependencies:
- dependency-name: getrandom
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 13:00:11 +00:00
Hanno Braun
1f2ee710f1
Merge pull request #2310 from hannobraun/dependabot/cargo/h2-0.4.4
Bump h2 from 0.4.3 to 0.4.4
2024-04-05 21:48:12 +02:00
dependabot[bot]
e7669c9112
Bump h2 from 0.4.3 to 0.4.4
Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 15:10:10 +00:00
Hanno Braun
b158c3feb6
Merge pull request #2309 from hannobraun/planes
Prevent accidental re-definition of basis plane geometry
2024-04-04 11:09:51 +02:00
Hanno Braun
55b6296990 Update documentation of define_surface 2024-04-04 11:01:01 +02:00
Hanno Braun
421a5b67e6 Update formatting 2024-04-04 10:59:50 +02:00
Hanno Braun
a1d820dae3 Panic, if user tries to redefine basis planes 2024-04-04 10:59:26 +02:00
Hanno Braun
218ef8fa47
Merge pull request #2308 from hannobraun/dependabot/cargo/cargo-4943bb7e95
Bump the cargo group with 9 updates
2024-04-02 12:18:08 +02:00
Hanno Braun
d7eccae0fe Run cargo update 2024-04-02 12:09:33 +02:00
dependabot[bot]
b55f77dda0
Bump the cargo group with 9 updates
Bumps the cargo group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.3` | `4.5.4` |
| [nalgebra](https://github.com/dimforge/nalgebra) | `0.32.4` | `0.32.5` |
| [tobj](https://github.com/Twinklebear/tobj) | `4.0.1` | `4.0.2` |
| [image](https://github.com/image-rs/image) | `0.25.0` | `0.25.1` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.35` | `0.4.37` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.36.0` | `0.37.0` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.114` | `1.0.115` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.36.0` | `1.37.0` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.1` | `0.12.2` |


Updates `clap` from 4.5.3 to 4.5.4
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.3...v4.5.4)

Updates `nalgebra` from 0.32.4 to 0.32.5
- [Changelog](https://github.com/dimforge/nalgebra/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/dimforge/nalgebra/compare/v0.32.4...v0.32.5)

Updates `tobj` from 4.0.1 to 4.0.2
- [Release notes](https://github.com/Twinklebear/tobj/releases)
- [Commits](https://github.com/Twinklebear/tobj/compare/4.0.1...4.0.2)

Updates `image` from 0.25.0 to 0.25.1
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.0...v0.25.1)

Updates `chrono` from 0.4.35 to 0.4.37
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.35...v0.4.37)

Updates `octocrab` from 0.36.0 to 0.37.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.36.0...v0.37.0)

Updates `serde_json` from 1.0.114 to 1.0.115
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115)

Updates `tokio` from 1.36.0 to 1.37.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.36.0...tokio-1.37.0)

Updates `reqwest` from 0.12.1 to 0.12.2
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.1...v0.12.2)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: nalgebra
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tobj
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:52:18 +00:00
Hanno Braun
6658cc1196
Merge pull request #2306 from hannobraun/geometry
Make some refactorings to geometry-related code
2024-03-28 13:36:05 +01:00
Hanno Braun
cd046a380b Refactor to prepare for follow-on change 2024-03-28 13:27:33 +01:00
Hanno Braun
9150edc328 Make variable name more specific 2024-03-28 13:27:33 +01:00
Hanno Braun
8207077338 Make variable name more specific 2024-03-28 13:27:33 +01:00
Hanno Braun
5e4594fa65 Refactor to prepare for follow-on change 2024-03-28 13:27:33 +01:00
Hanno Braun
1c452196dc Refactor to prepare for follow-on change 2024-03-28 13:27:33 +01:00
Hanno Braun
a3b6bd0b1d Refactor to prepare for follow-on change 2024-03-28 13:27:33 +01:00
Hanno Braun
de0f75b4f8
Merge pull request #2305 from hannobraun/validation
Update documentation of `AdjacentHalfEdgesNotConnected` validation check
2024-03-28 13:05:34 +01:00
Hanno Braun
10993f73ef Clean up imports 2024-03-27 14:14:30 +01:00
Hanno Braun
f14f9fb187 Add implementation note 2024-03-27 14:14:13 +01:00
Hanno Braun
f1caa77337 Update formatting in doc comment 2024-03-27 14:14:13 +01:00
Hanno Braun
4ad0844ced
Merge pull request #2304 from hannobraun/geometry
Shorten names of geometry struct
2024-03-27 12:34:33 +01:00
Hanno Braun
a8559a074b Shorten SurfaceGeometry to SurfaceGeom
Geometry is a very common concept within `fj-core`, and
`SurfaceGeometry` is used in many places. A shorthand seems justified.
2024-03-27 12:25:22 +01:00
Hanno Braun
2b49b57faf Shorten HalfEdgeGeometry to HalfEdgeGeom
Geometry is a very common concept within `fj-core`, and
`HalfEdgeGeometry` is used in many places. A shorthand seems justified.
2024-03-27 12:25:22 +01:00
Hanno Braun
9e67c4b8c6
Merge pull request #2303 from hannobraun/geometry
Don't implicitly copy geometry when returning it from geometry layer
2024-03-27 12:21:04 +01:00
Hanno Braun
54b7332eba Don't implicitly copy SurfaceGeometry 2024-03-27 12:10:59 +01:00
Hanno Braun
0fde6449da Refactor to prepare for follow-on change 2024-03-27 12:10:59 +01:00
Hanno Braun
1a35324b5c Make variable name more explicit 2024-03-27 12:10:59 +01:00
Hanno Braun
a158f244ed Don't implicitly copy HalfEdgeGeometry 2024-03-27 12:10:59 +01:00
Hanno Braun
8f67dc20f0
Merge pull request #2302 from hannobraun/approx
Only expect `&Geometry` in `Approx
2024-03-27 12:05:58 +01:00
Hanno Braun
9cf37f0de7 Only expect &Geometry in Approx::approx 2024-03-27 12:00:32 +01:00
Hanno Braun
50863cef46 Only expect &Geometry in approx_with_cache 2024-03-27 12:00:32 +01:00
Hanno Braun
cb00617258
Merge pull request #2301 from hannobraun/approx
Remove color from `FaceApprox`
2024-03-27 11:46:32 +01:00
Hanno Braun
4e3002ba94 Simplify argument name 2024-03-27 11:38:28 +01:00
Hanno Braun
157724d569 Remove color field from FaceApprox 2024-03-27 11:37:46 +01:00
Hanno Braun
5fad335620 Store the original face in FaceApprox
This enables code dealing with `FaceApprox` to load data about the face
from layers, which means `FaceApprox` can now be simplified by removing
the color.
2024-03-27 11:36:43 +01:00
Hanno Braun
c6c4a6ce32 Refactor to prepare for follow-on change 2024-03-27 11:36:43 +01:00
Hanno Braun
cc1a377e22 Refactor to prepare for follow-on change 2024-03-27 11:32:49 +01:00
Hanno Braun
d333c72a83 Implement Approx for Handle<Face>
This prepares for a simplification that I'm working on.
2024-03-27 11:32:07 +01:00
Hanno Braun
14610666cd Refactor to prepare for follow-on change 2024-03-27 11:30:20 +01:00
Hanno Braun
4699d6d29d
Merge pull request #2300 from hannobraun/validation
Make small cleanups in validation code
2024-03-27 11:20:15 +01:00
Hanno Braun
5055eead2a Update module name 2024-03-27 11:11:43 +01:00
Hanno Braun
003cfada45 Remove unused code 2024-03-27 11:11:43 +01:00
Hanno Braun
8b21004c00
Merge pull request #2299 from hannobraun/geometry
Provide `Handle<Surface>` to sweep code
2024-03-26 12:40:20 +01:00
Hanno Braun
f5ac8608f6 Provide Handle<Surface> to SweepHalfEdge 2024-03-26 12:33:55 +01:00
Hanno Braun
956c11322c Provide Handle<Surface> to SweepCycle 2024-03-26 12:33:55 +01:00
Hanno Braun
f95dc9cc0e Refactor to prepare for follow-on change 2024-03-26 12:33:55 +01:00
Hanno Braun
c3cf4a8901 Provide Handle<Surface> to SweepRegion 2024-03-26 12:33:55 +01:00
Hanno Braun
54eef7687c
Merge pull request #2298 from hannobraun/geometry
Make some cleanups in `BoundingVolume` code
2024-03-26 12:29:55 +01:00
Hanno Braun
2eaf27b677 Update module name 2024-03-26 12:19:12 +01:00
Hanno Braun
2160631f5a Refactor to prepare for follow-on change 2024-03-26 12:19:12 +01:00
Hanno Braun
85f57a9399 Rename variable to prepare for follow-on change 2024-03-26 12:19:12 +01:00
Hanno Braun
89d339f1ea Refactor to reduce redundancy 2024-03-26 12:19:12 +01:00
Hanno Braun
e5fbafd692 Refactor to prepare for follow-on change 2024-03-26 12:19:12 +01:00
Hanno Braun
8bdc4c4926 Update error message 2024-03-26 12:19:12 +01:00
Hanno Braun
f18435dd67 Update variable name 2024-03-26 12:19:12 +01:00
Hanno Braun
33803d3727 Refactor to prepare for follow-on change 2024-03-26 12:19:12 +01:00
Hanno Braun
3eb38ea5d9 Make BoundingVolume more flexible
This allows implementations for tuples, which I'm about to add.
2024-03-26 12:19:12 +01:00
Hanno Braun
7f3edb02c9
Merge pull request #2297 from hannobraun/geometry
Add missing word in doc comment
2024-03-26 12:10:02 +01:00
Hanno Braun
c91b2e9d0f Add missing word in doc comment 2024-03-26 12:06:35 +01:00
Hanno Braun
c634cdf951
Merge pull request #2296 from hannobraun/geometry
Provide `&Handle<Surface>` to approximation code
2024-03-26 12:05:38 +01:00
Hanno Braun
2e176fcb46 Provide &Handle<Surface> to curve approximation 2024-03-26 11:04:09 +01:00
Hanno Braun
35d763c18b Provide &Handle<Surface> to half-edge approx 2024-03-26 11:04:09 +01:00
Hanno Braun
757a3980fa Provide &Handle<Surface> to cycle approximation 2024-03-26 11:04:09 +01:00
Hanno Braun
266173593e
Merge pull request #2295 from hannobraun/rust
Upgrade to Rust 1.77
2024-03-26 10:51:57 +01:00
Hanno Braun
9d81d0be4c Upgrade to Rust 1.77 2024-03-26 10:46:27 +01:00
Hanno Braun
06322863cf
Merge pull request #2294 from hannobraun/ci
Update name of GitHub Actions workflow
2024-03-26 10:43:36 +01:00
Hanno Braun
bcfb80b13e Update file name 2024-03-26 10:32:18 +01:00
Hanno Braun
7bb017dc31 Update name of GitHub Actions workflow 2024-03-26 10:31:29 +01:00
Hanno Braun
adcd653f8d
Merge pull request #2293 from hannobraun/builder
Simplify `Surface::surface_from_uv` to `from_uv`
2024-03-25 14:07:46 +01:00
Hanno Braun
ec64299df1 Simplify Surface::surface_from_uv to from_uv 2024-03-25 14:00:59 +01:00
Hanno Braun
f850e47537
Merge pull request #2292 from hannobraun/dependabot/cargo/cargo-c85d5df535
Bump the cargo group with 5 updates
2024-03-25 13:58:38 +01:00
Hanno Braun
50c37d863f Run cargo update 2024-03-25 13:50:42 +01:00
dependabot[bot]
c31e542b11
Bump the cargo group with 5 updates
Bumps the cargo group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [parry2d-f64](https://github.com/dimforge/parry) | `0.13.6` | `0.13.7` |
| [parry3d-f64](https://github.com/dimforge/parry) | `0.13.6` | `0.13.7` |
| [regex](https://github.com/rust-lang/regex) | `1.10.3` | `1.10.4` |
| [octocrab](https://github.com/XAMPPRocky/octocrab) | `0.35.0` | `0.36.0` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.26` | `0.12.1` |


Updates `parry2d-f64` from 0.13.6 to 0.13.7
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.13.6...v0.13.7)

Updates `parry3d-f64` from 0.13.6 to 0.13.7
- [Changelog](https://github.com/dimforge/parry/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dimforge/parry/compare/v0.13.6...v0.13.7)

Updates `regex` from 1.10.3 to 1.10.4
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4)

Updates `octocrab` from 0.35.0 to 0.36.0
- [Release notes](https://github.com/XAMPPRocky/octocrab/releases)
- [Changelog](https://github.com/XAMPPRocky/octocrab/blob/main/CHANGELOG.md)
- [Commits](https://github.com/XAMPPRocky/octocrab/compare/v0.35.0...v0.36.0)

Updates `reqwest` from 0.11.26 to 0.12.1
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.26...v0.12.1)

---
updated-dependencies:
- dependency-name: parry2d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: parry3d-f64
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: octocrab
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 12:16:29 +00:00
Hanno Braun
adf1927279
Merge pull request #2291 from hannobraun/sponsors
Update list of sponsors in README
2024-03-25 12:31:59 +01:00
Hanno Braun
cb39f746ea Update list of sponsors in README 2024-03-25 12:28:07 +01:00
Hanno Braun
b44e5bd632
Merge pull request #2289 from hannobraun/topology
Reframe "objects" as "topology"
2024-03-23 12:14:50 +01:00
Hanno Braun
155a8dfbf4 Update argument name 2024-03-23 12:07:13 +01:00
Hanno Braun
2bb189fcac Update module name 2024-03-23 12:07:13 +01:00
Hanno Braun
c730109490 Update variable name 2024-03-23 12:07:13 +01:00
Hanno Braun
d559b1489c Update doc comment 2024-03-23 12:07:13 +01:00
Hanno Braun
e40d4f828f Update struct field name 2024-03-23 12:07:13 +01:00
Hanno Braun
860a0690b8 Update argument name 2024-03-23 12:07:13 +01:00
Hanno Braun
a52459c2b1 Update doc comment 2024-03-23 12:07:13 +01:00
Hanno Braun
dfbf6723b8 Rename Objects to Topology 2024-03-23 12:07:13 +01:00
Hanno Braun
2c4e2e98a8 Rename topology::kinds to objects 2024-03-23 12:07:13 +01:00
Hanno Braun
9c25cb6628 Rename objects module to topology 2024-03-23 12:07:13 +01:00
Hanno Braun
0d840c47f5 Simplify doc comments 2024-03-23 12:07:13 +01:00
Hanno Braun
5d3bab7c3a
Merge pull request #2288 from hannobraun/geometry
Complete migration of `HalfEdge` boundary to geometry layer
2024-03-23 01:46:39 +01:00
Hanno Braun
53d1fb882d Remove unused argument 2024-03-23 01:39:00 +01:00
Hanno Braun
4740b3bdb6 Remove curve boundary from HalfEdge 2024-03-23 01:39:00 +01:00
Hanno Braun
f1a6e63260 Read boundary from layer in cycle validation check 2024-03-23 01:39:00 +01:00
Hanno Braun
a33bcc9add Read boundary from layer in shell validation code 2024-03-23 01:39:00 +01:00
Hanno Braun
f037fc979c Read geometry from layer in are_siblings 2024-03-23 01:39:00 +01:00
Hanno Braun
6ba10adb0c Expect &Geometry in check_half_edge_pairs 2024-03-23 01:39:00 +01:00
Hanno Braun
1302dd89c4 Expect &Geometry in get_sibling_of 2024-03-23 01:39:00 +01:00
Hanno Braun
9656a2638c Read geometry from layer in SweepHalfEdge 2024-03-23 01:39:00 +01:00
Hanno Braun
426ef782b9 Refactor to prepare for follow-on change 2024-03-23 01:39:00 +01:00
Hanno Braun
f74669cdb4 Simplify args of JoinCycle::add_joined_edges 2024-03-23 01:39:00 +01:00
Hanno Braun
88716ed327 Read geometry from layer in Cycle::winding 2024-03-23 01:39:00 +01:00
Hanno Braun
82c7666a63 Refactor to prepare for follow-on change 2024-03-23 01:39:00 +01:00
Hanno Braun
5fed3493a8 Read geometry from layer in BoundingVolume impl 2024-03-23 01:39:00 +01:00
Hanno Braun
83eab225d2 Refactor to prepare for follow-on change 2024-03-23 01:39:00 +01:00
Hanno Braun
bf3b6b5b82 Simplify arguments of curve approximation impl 2024-03-23 01:39:00 +01:00
Hanno Braun
f392d9a807 Rename variables to prepare for follow-on change 2024-03-23 01:39:00 +01:00
Hanno Braun
f2621c4e88 Read boundary from layer in SplitHalfEdge 2024-03-23 01:39:00 +01:00
Hanno Braun
210f8ac27b Refactor to reduce redundancy 2024-03-23 01:39:00 +01:00
Hanno Braun
2ebc613a92
Merge pull request #2287 from hannobraun/geometry
Add redundant definition of `HalfEdge`'s `CurveBoundary` to geometry layer
2024-03-23 01:37:49 +01:00
Hanno Braun
f750a16b5b Remove redundant argument 2024-03-23 01:33:42 +01:00
Hanno Braun
7df87529b6 Update boundary in shell validation test case 2024-03-23 01:28:15 +01:00
Hanno Braun
5112f6fc34 Update boundary in SplitHalfEdge 2024-03-23 01:28:15 +01:00
Hanno Braun
48dbae8f98 Add HalfEdgeGeometry::with_boundary 2024-03-23 01:28:15 +01:00
Hanno Braun
5dcd681efd Refactor to simplify 2024-03-23 01:28:15 +01:00
Hanno Braun
87e0db8cf3 Refactor to simplify 2024-03-23 01:28:15 +01:00
Hanno Braun
6b036c69ff Read boundary from geometry layer in reverse code 2024-03-23 01:28:15 +01:00
Hanno Braun
a59c06bc1e Refactor to prepare for follow-on change 2024-03-23 01:28:15 +01:00
Hanno Braun
13fe22a710 Update boundary in Reverse impl of Cycle 2024-03-23 01:28:15 +01:00
Hanno Braun
b0faf90f6e Refactor to prepare for follow-on change 2024-03-23 01:28:15 +01:00
Hanno Braun
d7f3a30796 Update geometry in BuildHalfEdge::from_sibling 2024-03-23 01:28:15 +01:00
Hanno Braun
c921c3f48a Refactor to prepare for follow-on change 2024-03-23 01:28:15 +01:00
Hanno Braun
ed00c7e19e Add boundary to HalfEdgeGeometry 2024-03-23 01:28:15 +01:00
Hanno Braun
4b74964372
Merge pull request #2286 from hannobraun/geometry
Simplify how half-edge geometry is set
2024-03-23 01:27:13 +01:00
Hanno Braun
75fb280277 Remove obsolete comment 2024-03-23 01:16:14 +01:00
Hanno Braun
4b509d3324 Refactor to simplify 2024-03-23 01:16:14 +01:00
Hanno Braun
b528430be3 Inline redundant variable 2024-03-23 01:16:14 +01:00
Hanno Braun
532af46a34 Refactor to simplify 2024-03-23 01:16:14 +01:00
Hanno Braun
346eb8b344 Refactor to simplify 2024-03-23 01:16:14 +01:00
Hanno Braun
4abb422653 Refactor to simplify 2024-03-23 01:16:14 +01:00
Hanno Braun
ee8bfe4c7c Accept full HalfEdgeGeometry in set_geometry 2024-03-23 01:16:14 +01:00
Hanno Braun
d4439b8378 Rename set_path to set_geometry 2024-03-23 01:16:14 +01:00
Hanno Braun
f227217623 Refactor to prepare for follow-on change 2024-03-23 01:16:14 +01:00
Hanno Braun
4f7f679e77 Refactor to prepare for follow-on change 2024-03-23 01:16:14 +01:00
Hanno Braun
4b2ea9dd6b Inline redundant variable 2024-03-23 01:16:14 +01:00
Hanno Braun
4d86db22dc Rename argument to prepare for follow-on change 2024-03-23 01:16:14 +01:00
Hanno Braun
a811b8b96e
Merge pull request #2285 from hannobraun/split
Clean up edge splitting code
2024-03-23 00:34:23 +01:00
Hanno Braun
d57730e0cd Update half-edge geometry in a more targeted way 2024-03-23 00:19:14 +01:00
Hanno Braun
41b745b46a Remove redundant call 2024-03-23 00:17:06 +01:00
Hanno Braun
2162af6238 Move derive_from to lower-level operation 2024-03-23 00:16:47 +01:00
Hanno Braun
69bc394a03 Remove redundant insertions 2024-03-23 00:14:45 +01:00
Hanno Braun
fcefab2f07 Remove redundant geometry updates 2024-03-23 00:13:39 +01:00
Hanno Braun
53d3a7c7e3
Merge pull request #2284 from hannobraun/handle
Merge `HandleWrapper` and `Handle`
2024-03-22 21:46:54 +01:00
Hanno Braun
3d86fc3970 Remove Eq/Ord implementations for all objects
They conflict with those on `Handle`, which seems error-prone.
2024-03-22 21:31:31 +01:00
Hanno Braun
74b122e2b4 Do unconditional Eq/Ord impls for ObjectSet 2024-03-22 21:31:04 +01:00
Hanno Braun
a5f319b82e Remove unnecessary trait bounds 2024-03-22 21:30:51 +01:00
Hanno Braun
3663be0ffc Remove Copy implementation from all objects
It seems unexpected an unnecessary, as evidenced by the fact that it
wasn't actually used anywhere. It also seems potentially error-prone,
although I can't come up with specific examples right now.

Either way, it's probably worth removing for the consistency alone.
2024-03-22 21:23:19 +01:00
Hanno Braun
fdc5c025bb Remove Hash implementation for all objects
It conflicts with the one on `Handle`, which seems error-prone.
2024-03-22 21:20:51 +01:00
Hanno Braun
81ecddb200 Provide unconditional Hash impl for ObjectSet 2024-03-22 21:17:50 +01:00
Hanno Braun
b3f9f8b319 Remove unused trait bounds 2024-03-22 21:16:56 +01:00
Hanno Braun
b8696803a2 Remove HandleWrapper 2024-03-22 21:13:19 +01:00
Hanno Braun
90e90c30ca Replace HandleWrapper in shell validation code 2024-03-22 21:13:06 +01:00
Hanno Braun
3ef9ea32cc Replace HandleWrapper in ObjectSet 2024-03-22 21:12:32 +01:00
Hanno Braun
de1b2fcd60 Replace HandleWrapper in object graph 2024-03-22 21:12:05 +01:00
Hanno Braun
69a6ee59dd Replace HandleWrapper in AnyObject 2024-03-22 21:11:29 +01:00
Hanno Braun
72665a0f2e Replace HandleWrapper in presentation layer 2024-03-22 21:11:07 +01:00
Hanno Braun
9c1ae75db0 Replace HandleWrapper in geometry layer 2024-03-22 21:10:36 +01:00
Hanno Braun
6b209b34aa Replace HandleWrapper in CurveBoundary 2024-03-22 21:10:05 +01:00
Hanno Braun
b96c47c9be Replace HandleWrapper in vertex approx code 2024-03-22 21:09:39 +01:00
Hanno Braun
9997ee7aea Replace HandleWrapper in curve approx code 2024-03-22 21:09:17 +01:00
Hanno Braun
8011502d27 Remove trait bounds from Handle trait impls 2024-03-22 21:00:22 +01:00
Hanno Braun
b33c02abb0 Define Handle equality and ordering based on ID 2024-03-22 20:57:01 +01:00
Hanno Braun
7115ad074b
Merge pull request #2283 from hannobraun/geometry
Remove redundant geometry from `HalfEdge`
2024-03-22 18:23:11 +01:00
Hanno Braun
dd9c33e652 Remove unused argument 2024-03-22 18:18:23 +01:00
Hanno Braun
be48a45607 Remove SurfacePath field from HalfEdge 2024-03-22 18:18:19 +01:00
Hanno Braun
8663d6c2c9 Fix storage of half-edge geometry
Half-edge geometry is supposed to be stored per-object, which is what
this commit achieves. Previously, it would have been overwritten, if an
object that happened to be equal was stored.

This bug doesn't manifest so far, because the geometry that is stored is
still redundantly part of `HalfEdge` itself, so you'd never overwrite
something that wasn't equal anyway. This will change, of course, as soon
as the redundant geometry definition in `HalfEdge` is removed.

This is one of those colossally stupid bugs that shouldn't have happend
in the first place. It's good though, because it helped me realize two
things:

1. The distinction between `Handle` and `HandleWrapper` is a footgun.
2. That distinction is also no longer necessary.

With geometry being stored in a dedicated layer, the times of needing to
compare objects for equality are coming to and end. There is simply no
reason to ever expect to objects to be equal, if they aren't also
identical.

This means, it should be possible to make `Handle` behave like
`HandleWrapper`, replace `HandleWrapper` with the new and improved
`Handle`, and then remove the `Eq`/`PartialEq` implementations for all
objects. Because otherwise, that's another footgun waiting to happen.

That's what I'll be doing next.
2024-03-22 18:18:19 +01:00
Hanno Braun
99836a3f21
Merge pull request #2282 from hannobraun/geometry
Make more cleanups related to half-edge geometry
2024-03-22 16:55:04 +01:00
Hanno Braun
7488920e90 Refactor to simplify 2024-03-22 16:40:50 +01:00
Hanno Braun
b932737115 Refactor to reduce redundancy 2024-03-22 16:39:20 +01:00
Hanno Braun
61a30933ed Refactor to simplify 2024-03-22 16:33:50 +01:00
Hanno Braun
c5cfff03cf Refactor to simplify 2024-03-22 16:11:21 +01:00
Hanno Braun
a165977889
Merge pull request #2281 from hannobraun/geometry
Clean update some code related to half-edge geometry
2024-03-22 16:01:57 +01:00
Hanno Braun
bc6a6a2763 Move start_position to HalfEdgeGeometry 2024-03-22 15:45:13 +01:00
Hanno Braun
bafd117b1c Fix word in comment 2024-03-22 15:45:13 +01:00
Hanno Braun
ae4b1b8a66 Fix word in doc comment 2024-03-22 15:45:13 +01:00
Hanno Braun
7fc1d406eb Update argument name 2024-03-22 15:45:13 +01:00
Hanno Braun
77cba2b04a Remove unused code 2024-03-22 15:43:27 +01:00
Hanno Braun
37c7cb597c Refactor to simplify 2024-03-22 15:43:01 +01:00
Hanno Braun
8583a5d231
Merge pull request #2280 from hannobraun/validation
Migrate validation check for interior cycle winding to new infrastructure
2024-03-22 14:34:54 +01:00
Hanno Braun
f98df7cfed Remove unused code 2024-03-22 14:25:53 +01:00
Hanno Braun
cba2af3904 Switch over to new validation check 2024-03-22 14:25:53 +01:00
Hanno Braun
44425e2ca0 Add interior cycle winding validation check 2024-03-22 14:25:53 +01:00
Hanno Braun
a32fc63eee
Merge pull request #2279 from hannobraun/release
Update release procedure
2024-03-21 14:57:30 +01:00
Hanno Braun
601859b30e Update release procedure 2024-03-21 14:53:50 +01:00
347 changed files with 23932 additions and 6891 deletions

View File

@ -48,7 +48,9 @@ jobs:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
# Windows CI build disabled for the time being. More information:
# https://github.com/hannobraun/fornjot/issues/2376
# - windows-latest
runs-on: ${{matrix.os}}
steps:
- name: Check out repository

View File

@ -1,4 +1,4 @@
name: Continuous Deployment
name: Release Automation
on:
push:

View File

@ -102,9 +102,7 @@ There are a lot of open issues, however. If you need some more guidance, there a
- Some issues that need extra attention are labeled as [`help wanted`](https://github.com/hannobraun/Fornjot/labels/help%20wanted). Don't take that too seriously though. Help is welcome everywhere, not just on issues explicitly labeled as such.
- Issues are typically labeled by topic to indicate which part of the project they affect. Check out the [list of labels](https://github.com/hannobraun/Fornjot/labels), specifically the various `topic: ` labels.
There's also the [feature wishlist](https://github.com/hannobraun/fornjot/discussions/146), for things that are not as actionable right now, or that I didn't want to track as issues for other reasons.
Finally, feel free to just ask. If you have a specific issue in mind, just comment there. Or direct your query to [Matrix] or [Discussions].
Always feel free to just ask. If you have a specific issue in mind, just comment there. Or direct your query to [Matrix] or [Discussions].
If you're not a programmer, or are looking for some variety, you can also work on [the website](https://github.com/hannobraun/www.fornjot.app).

2918
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -31,13 +31,12 @@ default-members = [
"crates/fj-interop",
"crates/fj-math",
"crates/fj-viewer",
"crates/fj-window",
]
[workspace.package]
version = "0.49.0"
edition = "2021"
edition = "2024"
description = "Early-stage b-rep CAD kernel."
readme = "README.md"
@ -81,7 +80,3 @@ path = "crates/fj-math"
[workspace.dependencies.fj-viewer]
version = "0.49.0"
path = "crates/fj-viewer"
[workspace.dependencies.fj-window]
version = "0.49.0"
path = "crates/fj-window"

View File

@ -22,7 +22,7 @@ For more information, [please check out the website](https://www.fornjot.app/).
## Sponsors
Fornjot is supported by [**@MitchellHansen**](https://github.com/MitchellHansen), [**@webtrax-oz**](https://github.com/webtrax-oz), [**@seanjensengrey**](https://github.com/seanjensengrey), [**@reivilibre**](https://github.com/reivilibre), [**@lthiery**](https://github.com/lthiery), [**@ahdinosaur**](https://github.com/ahdinosaur), [**@martindederer**](https://github.com/martindederer), [**@bollian**](https://github.com/bollian), [**@sucaba**](https://github.com/sucaba), [**@nullstyle**](https://github.com/nullstyle), [**@tachiniererin**](https://github.com/tachiniererin), [**@HalfVoxel**](https://github.com/HalfVoxel), [**@MattOslin**](https://github.com/MattOslin), [**@jminer**](https://github.com/jminer), [**@voxpelli**](https://github.com/voxpelli), [**@U007D**](https://github.com/U007D), [**@guillaumechauvat**](https://github.com/guillaumechauvat), [**@mayfieldiv**](https://github.com/mayfieldiv), [**@bglw**](https://github.com/bglw), [**@hansihe**](https://github.com/hansihe), [**@romixlab**](https://github.com/romixlab), [**@krl**](https://github.com/krl), and [my other awesome sponsors](https://github.com/sponsors/hannobraun). Thank you!
Fornjot is supported by [**@reivilibre**](https://github.com/reivilibre), [**@thestig4242**](https://github.com/thestig4242), [**@thomasgarrison**](https://github.com/thomasgarrison), [**@seanjensengrey**](https://github.com/seanjensengrey), [**@lthiery**](https://github.com/lthiery), [**@ahdinosaur**](https://github.com/ahdinosaur), [**@martindederer**](https://github.com/martindederer), [**@sucaba**](https://github.com/sucaba), [**@MitchellHansen**](https://github.com/MitchellHansen), [**@Rahix**](https://github.com/Rahix), [**@JanBerktold**](https://github.com/JanBerktold), [**@darwin**](https://github.com/darwin), [**@nullstyle**](https://github.com/nullstyle), [**@HalfVoxel**](https://github.com/HalfVoxel), [**@jessebraham**](https://github.com/jessebraham), [**@jminer**](https://github.com/jminer), [**@U007D**](https://github.com/U007D), [**@guillaumechauvat**](https://github.com/guillaumechauvat), [**@mayfieldiv**](https://github.com/mayfieldiv), [**@bglw**](https://github.com/bglw), [**@refarb**](https://github.com/refarb), [**@hansihe**](https://github.com/hansihe), [**@romixlab**](https://github.com/romixlab), [**@justinmimbs**](https://github.com/justinmimbs), [**@yikesable**](https://github.com/yikesable), [**@hrgdavor**](https://github.com/hrgdavor), [**@ironchief**](https://github.com/ironchief), [**@kingsmountainlabs**](https://github.com/kingsmountainlabs), [**@epyintheshell**](https://github.com/epyintheshell), [**@jneem**](https://github.com/jneem), [**@keithamus**](https://github.com/keithamus), [**@starthal**](https://github.com/starthal), and [my other awesome sponsors](https://github.com/sponsors/hannobraun). Thank you!
**Please consider [supporting me too](https://github.com/sponsors/hannobraun), to help make Fornjot sustainable long-term.**
@ -39,7 +39,13 @@ Fornjot is supported by [**@MitchellHansen**](https://github.com/MitchellHansen)
## Status
Fornjot is usable for simple models (see [examples](examples/)), but currently lacks the features for anything more advanced. Work to change that is underway.
Fornjot is usable for simple models (see [`models/` directory](models)), but currently lacks the features for anything more advanced. Work to change that is underway.
Despite this, there are some experimental projects that are build on top of Fornjot:
- [CommandCAD](https://github.com/IamTheCarl/CommandCAD)
- [`fj-text`](https://github.com/samgoldman/fj-text)
- [`bevy_mod_fornjot`](https://github.com/TotalKrill/bevy_mod_fornjot)
## Overview

View File

@ -16,13 +16,13 @@ workspace = true
[dependencies]
fj-interop.workspace = true
fj-math.workspace = true
itertools = "0.12.1"
parking_lot = "0.12.0"
itertools = "0.14.0"
parking_lot = "0.12.3"
robust = "1.1.0"
spade = "2.6.0"
thiserror = "1.0.58"
spade = "2.13.1"
thiserror = "2.0.12"
type-map = "0.5.0"
[dev-dependencies]
pretty_assertions = "1.4.0"
anyhow = "1.0.81"
pretty_assertions = "1.4.1"
anyhow = "1.0.98"

View File

@ -0,0 +1,57 @@
use fj_interop::Tolerance;
use fj_math::{Circle, Point};
use crate::geometry::{CurveBoundary, traits::GenPolyline};
/// # Approximate a circle
///
/// ## Arguments
///
/// Besides a circle, this method takes two arguments:
///
/// - The `boundary` within which the circle should be approximated.
/// - The `tolerance` that specifies how much the approximation is allowed to
/// deviate from the actual circle.
///
/// ## Return Value
///
/// The approximation returns points within the provided boundary. The boundary
/// points themselves are not included in the approximation. This gives the
/// caller (who knows the boundary anyway) more options for how to further
/// process the approximation.
///
/// ## Determinism
///
/// Circle approximation is carefully designed to produce a deterministic result
/// for the combination of a given circle and tolerance, regardless of the
/// boundary. This is done to prevent invalid meshes from being generated.
///
/// In specific terms, this means there is an infinite set of points that
/// approximates a circle (infinite, since the circle's local coordinate space
/// is infinite). That set is deterministic for a given combination of circle
/// and tolerance. The boundary that defines where the circle is approximated
/// only influences the result in two ways:
///
/// 1. It controls which points from the infinite set are actually computed.
/// 2. It defines the order in which the computed points are returned.
///
/// As a result, circle approximation is guaranteed to generate points that can
/// fit together in a valid mesh, no matter which ranges of a path are being
/// approximated, and how many times.
pub fn approx_circle<const D: usize>(
circle: &Circle<D>,
boundary: impl Into<CurveBoundary<Point<1>>>,
tolerance: impl Into<Tolerance>,
) -> Vec<(Point<1>, Point<D>)> {
let boundary = boundary.into();
let tolerance = tolerance.into();
let mut points = Vec::new();
for point_curve in circle.generate_polyline(boundary, tolerance) {
let point_global = circle.point_from_circle_coords(point_curve);
points.push((point_curve, point_global));
}
points
}

View File

@ -1,135 +1,158 @@
//! Curve approximation
use std::collections::BTreeMap;
use fj_math::Point;
use fj_interop::Tolerance;
use fj_math::{Circle, Line, Point};
use crate::{
geometry::{CurveBoundary, GlobalPath, SurfaceGeometry, SurfacePath},
objects::Curve,
storage::{Handle, HandleWrapper},
Core,
geometry::{
CurveBoundary, Geometry, Path,
repr::tri_mesh::convert_point_surface_to_global, surfaces::SweptCurve,
},
storage::Handle,
topology::{Curve, Surface},
};
use super::{Approx, ApproxPoint, Tolerance};
use super::{ApproxPoint, circle::approx_circle, line::approx_line};
impl Approx
for (
&Handle<Curve>,
SurfacePath,
&SurfaceGeometry,
CurveBoundary<Point<1>>,
)
{
type Approximation = CurveApprox;
type Cache = CurveApproxCache;
/// Approximate the provided curve
///
/// The approximation is cached, and cached approximations are used, where
/// possible.
pub fn approx_curve_with_cache(
curve: &Handle<Curve>,
surface: &Handle<Surface>,
boundary: CurveBoundary<Point<1>>,
tolerance: impl Into<Tolerance>,
cache: &mut CurveApproxCache,
geometry: &Geometry,
) -> CurveApprox {
match cache.get(curve, boundary) {
Some(approx) => approx,
None => {
let approx = approx_curve(
&geometry
.of_curve(curve)
.unwrap()
.local_on(surface)
.unwrap()
.path,
geometry.of_surface(surface),
boundary,
tolerance,
geometry,
);
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
) -> Self::Approximation {
let (curve, surface_path, surface, boundary) = self;
match cache.get(curve, boundary) {
Some(approx) => approx,
None => {
let approx = approx_curve(
&surface_path,
surface,
boundary,
tolerance,
core,
);
cache.insert(curve.clone(), boundary, approx)
}
cache.insert(curve.clone(), boundary, approx)
}
}
}
fn approx_curve(
path: &SurfacePath,
surface: &SurfaceGeometry,
path: &Path<2>,
surface: &SweptCurve,
boundary: CurveBoundary<Point<1>>,
tolerance: impl Into<Tolerance>,
core: &mut Core,
geometry: &Geometry,
) -> CurveApprox {
// There are different cases of varying complexity. Circles are the hard
// part here, as they need to be approximated, while lines don't need to be.
//
// This will probably all be unified eventually, as `SurfacePath` and
// `GlobalPath` grow APIs that are better suited to implementing this code
// in a more abstract way.
let points = match (path, surface.u) {
(SurfacePath::Circle(_), GlobalPath::Circle(_)) => {
todo!(
"Approximating a circle on a curved surface not supported yet."
let SweptCurve { u, .. } = surface;
let points = match (path, u) {
(Path::Circle(_), Path::Circle(_)) => approx_circle_on_curved_surface(),
(Path::Circle(circle), Path::Line(_)) => {
approx_circle_on_straight_surface(
circle, boundary, surface, tolerance, geometry,
)
}
(SurfacePath::Circle(_), GlobalPath::Line(_)) => {
(path, boundary)
.approx_with_cache(tolerance, &mut (), core)
.into_iter()
.map(|(point_curve, point_surface)| {
// We're throwing away `point_surface` here, which is a
// bit weird, as we're recomputing it later (outside of
// this function).
//
// It should be fine though:
//
// 1. We're throwing this version away, so there's no
// danger of inconsistency between this and the later
// version.
// 2. This version should have been computed using the
// same path and parameters and the later version
// will be, so they should be the same anyway.
// 3. Not all other cases handled in this function have
// a surface point available, so it needs to be
// computed later anyway, in the general case.
let point_global =
surface.point_from_surface_coords(point_surface);
(point_curve, point_global)
})
.collect()
}
(SurfacePath::Line(line), _) => {
let range_u =
CurveBoundary::from(boundary.inner.map(|point_curve| {
[path.point_from_path_coords(point_curve).u]
}));
let approx_u = (surface.u, range_u).approx_with_cache(
tolerance,
&mut (),
core,
);
let mut points = Vec::new();
for (u, _) in approx_u {
let t = (u.t - line.origin().u) / line.direction().u;
let point_surface = path.point_from_path_coords([t]);
let point_global =
surface.point_from_surface_coords(point_surface);
points.push((u, point_global));
}
points
}
(Path::Line(line), _) => approx_line_on_any_surface(
line, boundary, surface, tolerance, geometry,
),
};
let points = points
.into_iter()
.map(|(point_curve, point_global)| {
ApproxPoint::new(point_curve, point_global)
})
.collect();
CurveApprox { points }
}
/// Approximation of [`Curve`], within a specific boundary
fn approx_circle_on_curved_surface() -> Vec<ApproxPoint<1>> {
todo!("Approximating a circle on a curved surface is not supported yet.")
}
fn approx_circle_on_straight_surface(
circle: &Circle<2>,
boundary: CurveBoundary<Point<1>>,
surface: &SweptCurve,
tolerance: impl Into<Tolerance>,
geometry: &Geometry,
) -> Vec<ApproxPoint<1>> {
let tolerance = tolerance.into();
approx_circle(circle, boundary, tolerance)
.into_iter()
.map(|(point_curve, point_surface)| {
// We're throwing away `point_surface` here, which is a bit weird,
// as we're recomputing it later (outside of this function).
//
// It should be fine though:
//
// 1. We're throwing this version away, so there's no danger of
// inconsistency between this and the later version.
// 2. This version should have been computed using the same path and
// parameters and the later version will be, so they should be
// the same anyway.
// 3. Not all other cases handled in this function have a surface
// point available, so it needs to be computed later anyway, in
// the general case.
let point_global = convert_point_surface_to_global(
surface,
point_surface,
tolerance,
geometry,
);
ApproxPoint::new(point_curve, point_global)
})
.collect()
}
fn approx_line_on_any_surface(
line: &Line<2>,
boundary: CurveBoundary<Point<1>>,
surface: &SweptCurve,
tolerance: impl Into<Tolerance>,
geometry: &Geometry,
) -> Vec<ApproxPoint<1>> {
let tolerance = tolerance.into();
let range_u = CurveBoundary::from(
boundary
.inner
.map(|point_curve| [line.point_from_line_coords(point_curve).u]),
);
let SweptCurve { u, .. } = surface;
let approx_u = match u {
Path::Circle(circle) => approx_circle(circle, range_u, tolerance),
Path::Line(line) => approx_line(line),
};
let mut points = Vec::new();
for (u, _) in approx_u {
let t = (u.t - line.origin().u) / line.direction().u;
let point_surface = line.point_from_line_coords([t]);
let point_global = convert_point_surface_to_global(
surface,
point_surface,
tolerance,
geometry,
);
points.push(ApproxPoint::new(u, point_global));
}
points
}
/// Approximation of a [`Curve`], within a specific boundary
///
/// The approximation of the curve only includes points _within_ the boundary,
/// not those _on_ the boundary. Those boundary points are part of half-edge
/// approximation, which uses and includes curve approximation.
#[derive(Clone)]
pub struct CurveApprox {
/// The points that approximate the curve within the boundary
@ -146,8 +169,7 @@ impl CurveApprox {
/// Cache for curve approximations
#[derive(Default)]
pub struct CurveApproxCache {
inner:
BTreeMap<(HandleWrapper<Curve>, CurveBoundary<Point<1>>), CurveApprox>,
inner: BTreeMap<(Handle<Curve>, CurveBoundary<Point<1>>), CurveApprox>,
}
impl CurveApproxCache {
@ -156,12 +178,12 @@ impl CurveApproxCache {
handle: &Handle<Curve>,
boundary: CurveBoundary<Point<1>>,
) -> Option<CurveApprox> {
let handle = HandleWrapper::from(handle.clone());
if let Some(approx) = self.inner.get(&(handle.clone(), boundary)) {
return Some(approx.clone());
}
if let Some(approx) = self.inner.get(&(handle, boundary.reverse())) {
if let Some(approx) =
self.inner.get(&(handle.clone(), boundary.reverse()))
{
return Some(approx.clone().reverse());
}
@ -174,7 +196,6 @@ impl CurveApproxCache {
boundary: CurveBoundary<Point<1>>,
approx: CurveApprox,
) -> CurveApprox {
let handle = HandleWrapper::from(handle);
self.inner
.insert((handle, boundary), approx.clone())
.unwrap_or(approx)
@ -185,49 +206,62 @@ impl CurveApproxCache {
mod tests {
use std::f64::consts::TAU;
use fj_math::{Circle, Point, Vector};
use pretty_assertions::assert_eq;
use crate::{
algorithms::approx::{Approx, ApproxPoint},
geometry::{CurveBoundary, GlobalPath, SurfaceGeometry, SurfacePath},
objects::Curve,
operations::insert::Insert,
Core,
algorithms::approx::{
ApproxPoint, circle::approx_circle, curve::approx_curve,
},
geometry::{
CurveBoundary, Path,
repr::tri_mesh::convert_point_surface_to_global,
surfaces::SweptCurve,
},
operations::build::BuildSurface,
topology::Surface,
};
#[test]
fn approx_line_on_flat_surface() {
let mut core = Core::new();
let core = Core::new();
let curve = Curve::new().insert(&mut core);
let (surface_path, boundary) =
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
let boundary = CurveBoundary::from(boundary);
let surface = core.layers.geometry.xz_plane();
let (path, boundary) = Path::line_from_points([[1., 1.], [2., 1.]]);
let boundary = CurveBoundary::from(boundary);
let tolerance = 1.;
let approx = (&curve, surface_path, &surface, boundary)
.approx(tolerance, &mut core);
let approx = approx_curve(
&path,
surface,
boundary,
tolerance,
&core.layers.geometry,
);
assert_eq!(approx.points, vec![]);
}
#[test]
fn approx_line_on_curved_surface_but_not_along_curve() {
let mut core = Core::new();
let core = Core::new();
let curve = Curve::new().insert(&mut core);
let (surface_path, boundary) =
SurfacePath::line_from_points([[1., 1.], [2., 1.]]);
let boundary = CurveBoundary::from(boundary);
let surface = SurfaceGeometry {
u: GlobalPath::circle_from_radius(1.),
v: [0., 0., 1.].into(),
let surface = SweptCurve {
u: Path::circle_from_radius(1.),
v: Vector::from([0., 0., 1.]),
};
let (path, boundary) = Path::line_from_points([[1., 1.], [2., 1.]]);
let boundary = CurveBoundary::from(boundary);
let tolerance = 1.;
let approx = (&curve, surface_path, &surface, boundary)
.approx(tolerance, &mut core);
let approx = approx_curve(
&path,
&surface,
boundary,
tolerance,
&core.layers.geometry,
);
assert_eq!(approx.points, vec![]);
}
@ -236,30 +270,43 @@ mod tests {
fn approx_line_on_curved_surface_along_curve() {
let mut core = Core::new();
let global_path = GlobalPath::circle_from_radius(1.);
let curve = Curve::new().insert(&mut core);
let surface_path = SurfacePath::line_from_points_with_coords([
let circle = Circle::from_center_and_radius(Point::origin(), 1.);
let global_path = Path::Circle(circle);
let surface_geom = SweptCurve {
u: global_path,
v: Vector::from([0., 0., 1.]),
};
let surface = Surface::from_geometry(surface_geom, &mut core);
let path = Path::line_from_points_with_coords([
([0.], [0., 1.]),
([TAU], [TAU, 1.]),
]);
let boundary = CurveBoundary::from([[0.], [TAU]]);
let surface = SurfaceGeometry {
u: global_path,
v: [0., 0., 1.].into(),
};
let tolerance = 1.;
let approx = (&curve, surface_path, &surface, boundary)
.approx(tolerance, &mut core);
let approx = approx_curve(
&path,
&surface_geom,
boundary,
tolerance,
&core.layers.geometry,
);
let expected_approx = (global_path, boundary)
.approx(tolerance, &mut core)
let expected_approx = approx_circle(&circle, boundary, tolerance)
.into_iter()
.map(|(point_local, _)| {
let point_surface =
surface_path.point_from_path_coords(point_local);
let point_global =
surface.point_from_surface_coords(point_surface);
let point_surface = path.point_from_path_coords(point_local);
let point_global = convert_point_surface_to_global(
&core
.layers
.geometry
.of_surface_2(&surface)
.unwrap()
.generator,
point_surface,
tolerance,
&core.layers.geometry,
);
ApproxPoint::new(point_local, point_global)
})
.collect::<Vec<_>>();
@ -270,24 +317,36 @@ mod tests {
fn approx_circle_on_flat_surface() {
let mut core = Core::new();
let curve = Curve::new().insert(&mut core);
let surface_path =
SurfacePath::circle_from_center_and_radius([0., 0.], 1.);
let surface_geom = *core.layers.geometry.xz_plane();
let surface = Surface::from_geometry(surface_geom, &mut core);
let circle = Circle::from_center_and_radius([0., 0.], 1.);
let path = Path::Circle(circle);
let boundary = CurveBoundary::from([[0.], [TAU]]);
let surface = core.layers.geometry.xz_plane();
let tolerance = 1.;
let approx = (&curve, surface_path, &surface, boundary)
.approx(tolerance, &mut core);
let approx = approx_curve(
&path,
&surface_geom,
boundary,
tolerance,
&core.layers.geometry,
);
let expected_approx = (&surface_path, boundary)
.approx(tolerance, &mut core)
let expected_approx = approx_circle(&circle, boundary, tolerance)
.into_iter()
.map(|(point_local, _)| {
let point_surface =
surface_path.point_from_path_coords(point_local);
let point_global =
surface.point_from_surface_coords(point_surface);
let point_surface = path.point_from_path_coords(point_local);
let point_global = convert_point_surface_to_global(
&core
.layers
.geometry
.of_surface_2(&surface)
.unwrap()
.generator,
point_surface,
tolerance,
&core.layers.geometry,
);
ApproxPoint::new(point_local, point_global)
})
.collect::<Vec<_>>();

View File

@ -2,38 +2,76 @@
//!
//! See [`CycleApprox`].
use fj_math::Segment;
use fj_interop::Tolerance;
use fj_math::LineSegment;
use crate::{geometry::SurfaceGeometry, objects::Cycle, Core};
use super::{
edge::{HalfEdgeApprox, HalfEdgeApproxCache},
Approx, ApproxPoint, Tolerance,
use crate::{
geometry::{CurveBoundary, Geometry},
storage::Handle,
topology::{Cycle, Surface},
};
impl Approx for (&Cycle, &SurfaceGeometry) {
type Approximation = CycleApprox;
type Cache = HalfEdgeApproxCache;
use super::{
ApproxCache, ApproxPoint,
half_edge::{HalfEdgeApprox, approx_half_edge},
vertex::approx_vertex,
};
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
) -> Self::Approximation {
let (cycle, surface) = self;
let tolerance = tolerance.into();
/// Approximate the provided cycle
pub fn approx_cycle(
cycle: &Cycle,
surface: &Handle<Surface>,
tolerance: impl Into<Tolerance>,
cache: &mut ApproxCache,
geometry: &Geometry,
) -> CycleApprox {
let tolerance = tolerance.into();
let half_edges = cycle
.half_edges()
.iter()
.map(|half_edge| {
(half_edge, surface).approx_with_cache(tolerance, cache, core)
})
.collect();
let half_edges = cycle
.half_edges()
.pairs()
.map(|(half_edge, next_half_edge)| {
let boundary = CurveBoundary {
inner: [
geometry
.of_vertex(half_edge.start_vertex())
.unwrap()
.local_on(half_edge.curve())
.unwrap()
.position,
geometry
.of_vertex(next_half_edge.start_vertex())
.unwrap()
.local_on(half_edge.curve())
.unwrap()
.position,
],
};
let [start_position_curve, _] = boundary.inner;
CycleApprox { half_edges }
}
let start = approx_vertex(
half_edge.start_vertex().clone(),
half_edge.curve(),
surface,
start_position_curve,
tolerance,
&mut cache.vertex,
geometry,
);
approx_half_edge(
half_edge,
surface,
start,
boundary,
tolerance,
&mut cache.curve,
geometry,
)
})
.collect();
CycleApprox { half_edges }
}
/// An approximation of a [`Cycle`]
@ -60,7 +98,7 @@ impl CycleApprox {
}
/// Construct the segments that approximate the cycle
pub fn segments(&self) -> Vec<Segment<3>> {
pub fn segments(&self) -> Vec<LineSegment<3>> {
let mut segments = Vec::new();
for segment in self.points().windows(2) {
@ -68,8 +106,9 @@ impl CycleApprox {
// up, once `array_windows` is stable.
let segment = [&segment[0], &segment[1]];
segments
.push(Segment::from(segment.map(|point| point.global_form)));
segments.push(LineSegment::from(
segment.map(|point| point.global_form),
));
}
segments

View File

@ -1,90 +0,0 @@
//! Edge approximation
//!
//! The approximation of a curve is its first vertex, combined with the
//! approximation of its curve. The second vertex is left out, as edge
//! approximations are usually used to build cycle approximations, and this way,
//! the caller doesn't have to deal with duplicate vertices.
use crate::{
geometry::SurfaceGeometry, objects::HalfEdge, storage::Handle, Core,
};
use super::{
curve::CurveApproxCache, vertex::VertexApproxCache, Approx, ApproxPoint,
Tolerance,
};
impl Approx for (&Handle<HalfEdge>, &SurfaceGeometry) {
type Approximation = HalfEdgeApprox;
type Cache = HalfEdgeApproxCache;
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
) -> Self::Approximation {
let (half_edge, surface) = self;
let tolerance = tolerance.into();
let start_position_surface = half_edge.start_position();
let start_position =
match cache.start_position.get(half_edge.start_vertex()) {
Some(position) => position,
None => {
let position_global = surface
.point_from_surface_coords(start_position_surface);
cache.start_position.insert(
half_edge.start_vertex().clone(),
position_global,
)
}
};
let first = ApproxPoint::new(start_position_surface, start_position);
let rest = {
let approx = (
half_edge.curve(),
core.layers.geometry.of_half_edge(half_edge).path,
surface,
half_edge.boundary(),
)
.approx_with_cache(
tolerance,
&mut cache.curve,
core,
);
approx.points.into_iter().map(|point| {
let point_surface = core
.layers
.geometry
.of_half_edge(half_edge)
.path
.point_from_path_coords(point.local_form);
ApproxPoint::new(point_surface, point.global_form)
})
};
let mut points = vec![first];
points.extend(rest);
HalfEdgeApprox { points }
}
}
/// An approximation of a [`HalfEdge`]
#[derive(Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct HalfEdgeApprox {
/// The points that approximate the half-edge
pub points: Vec<ApproxPoint<2>>,
}
/// Cache for half-edge approximations
#[derive(Default)]
pub struct HalfEdgeApproxCache {
start_position: VertexApproxCache,
curve: CurveApproxCache,
}

View File

@ -4,35 +4,35 @@
use std::{collections::BTreeSet, ops::Deref};
use fj_interop::Color;
use fj_interop::Tolerance;
use crate::{
objects::{Face, Handedness, ObjectSet},
operations::presentation::GetColor,
geometry::Geometry,
storage::Handle,
topology::{Face, Handedness, ObjectSet},
validation::ValidationConfig,
Core,
};
use super::{
cycle::CycleApprox, edge::HalfEdgeApproxCache, Approx, ApproxPoint,
Tolerance,
Approx, ApproxCache, ApproxPoint,
cycle::{CycleApprox, approx_cycle},
};
impl Approx for &ObjectSet<Face> {
type Approximation = BTreeSet<FaceApprox>;
type Cache = HalfEdgeApproxCache;
type Cache = ApproxCache;
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
geometry: &Geometry,
) -> Self::Approximation {
let tolerance = tolerance.into();
let approx = self
.into_iter()
.map(|face| face.approx_with_cache(tolerance, cache, core))
.map(|face| approx_face(face.clone(), tolerance, cache, geometry))
.collect();
let min_distance = ValidationConfig::default().distinct_min_distance;
@ -65,68 +65,56 @@ impl Approx for &ObjectSet<Face> {
}
}
impl Approx for &Face {
type Approximation = FaceApprox;
type Cache = HalfEdgeApproxCache;
/// Approximate the provided face
pub fn approx_face(
face: Handle<Face>,
tolerance: impl Into<Tolerance>,
cache: &mut ApproxCache,
geometry: &Geometry,
) -> FaceApprox {
let tolerance = tolerance.into();
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
) -> Self::Approximation {
let tolerance = tolerance.into();
let exterior = approx_cycle(
face.region().exterior().deref(),
face.surface(),
tolerance,
cache,
geometry,
);
// Curved faces whose curvature is not fully defined by their edges
// are not supported yet. For that reason, we can fully ignore `face`'s
// `surface` field and just pass the edges to `Self::for_edges`.
//
// An example of a curved face that is supported, is the cylinder. Its
// curvature is fully defined be the edges (circles) that border it. The
// circle approximations are sufficient to triangulate the surface.
//
// An example of a curved face that is currently not supported, and thus
// doesn't need to be handled here, is a sphere. A spherical face would
// would need to provide its own approximation, as the edges that bound
// it have nothing to do with its curvature.
let mut interiors = BTreeSet::new();
for cycle in face.region().interiors() {
let cycle = approx_cycle(
cycle.deref(),
face.surface(),
tolerance,
cache,
geometry,
);
interiors.insert(cycle);
}
let exterior = (
self.region().exterior().deref(),
&core.layers.geometry.of_surface(self.surface()),
)
.approx_with_cache(tolerance, cache, core);
let mut interiors = BTreeSet::new();
for cycle in self.region().interiors() {
let cycle = (
cycle.deref(),
&core.layers.geometry.of_surface(self.surface()),
)
.approx_with_cache(tolerance, cache, core);
interiors.insert(cycle);
}
FaceApprox {
exterior,
interiors,
color: self.region().get_color(core),
coord_handedness: self.coord_handedness(&core.layers.geometry),
}
let coord_handedness = face.coord_handedness(geometry);
FaceApprox {
face,
exterior,
interiors,
coord_handedness,
}
}
/// An approximation of a [`Face`]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd)]
pub struct FaceApprox {
/// The [`Face`], that this approximates
pub face: Handle<Face>,
/// Approximation of the exterior cycle
pub exterior: CycleApprox,
/// Approximations of the interior cycles
pub interiors: BTreeSet<CycleApprox>,
/// The color of the approximated face
pub color: Option<Color>,
/// The handedness of the approximated face's front-side coordinate system
pub coord_handedness: Handedness,
}

View File

@ -0,0 +1,70 @@
//! Half-edge approximation
//!
//! See [`HalfEdgeApprox`].
use std::iter;
use fj_interop::Tolerance;
use fj_math::Point;
use crate::{
geometry::{CurveBoundary, Geometry},
storage::Handle,
topology::{HalfEdge, Surface},
};
use super::{
ApproxPoint,
curve::{CurveApproxCache, approx_curve_with_cache},
};
/// Approximate the provided half-edge
pub fn approx_half_edge(
half_edge: &Handle<HalfEdge>,
surface: &Handle<Surface>,
start: ApproxPoint<1>,
boundary: CurveBoundary<Point<1>>,
tolerance: impl Into<Tolerance>,
cache: &mut CurveApproxCache,
geometry: &Geometry,
) -> HalfEdgeApprox {
let tolerance = tolerance.into();
let rest = approx_curve_with_cache(
half_edge.curve(),
surface,
boundary,
tolerance,
cache,
geometry,
);
let points = iter::once(start)
.chain(rest.points)
.map(|point| {
let point_surface = geometry
.of_curve(half_edge.curve())
.unwrap()
.local_on(surface)
.unwrap()
.path
.point_from_path_coords(point.local_form);
ApproxPoint::new(point_surface, point.global_form)
})
.collect();
HalfEdgeApprox { points }
}
/// An approximation of a [`HalfEdge`]
///
/// The approximation of a half-edge is its first vertex, combined with the
/// approximation of its curve. The second vertex is left out, as half-edge
/// approximations are usually used to build cycle approximations, and this way,
/// the caller doesn't have to deal with duplicate vertices.
#[derive(Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct HalfEdgeApprox {
/// The points that approximate the half-edge
pub points: Vec<ApproxPoint<2>>,
}

View File

@ -0,0 +1,16 @@
use fj_math::{Line, Point};
/// Approximate a line
///
/// Since curve approximations don't include the approximation boundary itself,
/// and a line does not require any other points to be fully defined, this
/// method always returns no points.
///
/// The method still exists, to make the code that approximates lines, and thus
/// this piece of documentation, easy to find for anyone who's looking.
pub fn approx_line<const D: usize>(
line: &Line<D>,
) -> Vec<(Point<1>, Point<D>)> {
let _ = line;
Vec::new()
}

View File

@ -1,15 +1,16 @@
//! Approximation of objects
pub mod curve;
pub mod cycle;
pub mod edge;
pub mod face;
pub mod path;
pub mod half_edge;
pub mod shell;
pub mod sketch;
pub mod solid;
pub mod tolerance;
pub mod vertex;
mod circle;
mod curve;
mod line;
mod vertex;
use std::{
cmp::Ordering,
@ -17,11 +18,12 @@ use std::{
hash::{Hash, Hasher},
};
use curve::CurveApproxCache;
use fj_interop::Tolerance;
use fj_math::Point;
use vertex::VertexApproxCache;
use crate::Core;
pub use self::tolerance::{InvalidTolerance, Tolerance};
use crate::geometry::Geometry;
/// Approximate an object
pub trait Approx: Sized {
@ -38,10 +40,10 @@ pub trait Approx: Sized {
fn approx(
self,
tolerance: impl Into<Tolerance>,
core: &mut Core,
geometry: &Geometry,
) -> Self::Approximation {
let mut cache = Self::Cache::default();
self.approx_with_cache(tolerance, &mut cache, core)
self.approx_with_cache(tolerance, &mut cache, geometry)
}
/// Approximate the object, using the provided cache
@ -52,10 +54,20 @@ pub trait Approx: Sized {
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
geometry: &Geometry,
) -> Self::Approximation;
}
/// Cache for half-edge approximations
#[derive(Default)]
pub struct ApproxCache {
/// Cache for vertex approximations
pub vertex: VertexApproxCache,
/// Cache for curve approximations
pub curve: CurveApproxCache,
}
/// A point from an approximation, with local and global forms
#[derive(Clone, Copy, Debug)]
pub struct ApproxPoint<const D: usize> {

View File

@ -1,249 +0,0 @@
//! # Path approximation
//!
//! Since paths are infinite (even circles have an infinite coordinate space,
//! even though they connect to themselves in global coordinates), a range must
//! be provided to approximate them. The approximation then returns points
//! within that range.
//!
//! The boundaries of the range are not included in the approximation. This is
//! done, to give the caller (who knows the boundary anyway) more options on how
//! to further process the approximation.
//!
//! ## Determinism
//!
//! Path approximation is carefully designed to produce a deterministic result
//! for the combination of a given path and a given tolerance, regardless of
//! what the range is. This is done to prevent invalid meshes from being
//! generated.
//!
//! In specific terms, this means there is an infinite set of points that
//! approximates a path, and that set is deterministic for a given combination
//! of path and tolerance. The range that defines where the path is approximated
//! only influences the result in two ways:
//!
//! 1. It controls which points from the infinite set are actually computed.
//! 2. It defines the order in which the computed points are returned.
//!
//! As a result, path approximation is guaranteed to generate points that can
//! fit together in a valid mesh, no matter which ranges of a path are being
//! approximated, and how many times.
use std::iter;
use fj_math::{Circle, Point, Scalar, Sign};
use crate::{
geometry::{CurveBoundary, GlobalPath, SurfacePath},
Core,
};
use super::{Approx, Tolerance};
impl Approx for (&SurfacePath, CurveBoundary<Point<1>>) {
type Approximation = Vec<(Point<1>, Point<2>)>;
type Cache = ();
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
(): &mut Self::Cache,
_core: &mut Core,
) -> Self::Approximation {
let (path, range) = self;
match path {
SurfacePath::Circle(circle) => {
approx_circle(circle, range, tolerance.into())
}
SurfacePath::Line(_) => vec![],
}
}
}
impl Approx for (GlobalPath, CurveBoundary<Point<1>>) {
type Approximation = Vec<(Point<1>, Point<3>)>;
type Cache = ();
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
(): &mut Self::Cache,
_core: &mut Core,
) -> Self::Approximation {
let (path, range) = self;
match path {
GlobalPath::Circle(circle) => {
approx_circle(&circle, range, tolerance.into())
}
GlobalPath::Line(_) => vec![],
}
}
}
/// Approximate a circle
///
/// `tolerance` specifies how much the approximation is allowed to deviate
/// from the circle.
fn approx_circle<const D: usize>(
circle: &Circle<D>,
boundary: impl Into<CurveBoundary<Point<1>>>,
tolerance: Tolerance,
) -> Vec<(Point<1>, Point<D>)> {
let boundary = boundary.into();
let params = PathApproxParams::for_circle(circle, tolerance);
let mut points = Vec::new();
for point_curve in params.points(boundary) {
let point_global = circle.point_from_circle_coords(point_curve);
points.push((point_curve, point_global));
}
points
}
struct PathApproxParams {
increment: Scalar,
}
impl PathApproxParams {
pub fn for_circle<const D: usize>(
circle: &Circle<D>,
tolerance: impl Into<Tolerance>,
) -> Self {
let radius = circle.a().magnitude();
let num_vertices_to_approx_full_circle = Scalar::max(
Scalar::PI
/ (Scalar::ONE - (tolerance.into().inner() / radius)).acos(),
3.,
)
.ceil();
let increment = Scalar::TAU / num_vertices_to_approx_full_circle;
Self { increment }
}
pub fn increment(&self) -> Scalar {
self.increment
}
pub fn points(
&self,
boundary: impl Into<CurveBoundary<Point<1>>>,
) -> impl Iterator<Item = Point<1>> + '_ {
let boundary = boundary.into();
let [a, b] = boundary.inner.map(|point| point.t / self.increment());
let direction = (b - a).sign();
let [min, max] = if a < b { [a, b] } else { [b, a] };
// We can't generate a point exactly at the boundaries of the range as
// part of the approximation. Make sure we stay inside the range.
let min = min.floor() + 1.;
let max = max.ceil() - 1.;
let [start, end] = match direction {
Sign::Negative => [max, min],
Sign::Positive | Sign::Zero => [min, max],
};
let mut i = start;
iter::from_fn(move || {
let is_finished = match direction {
Sign::Negative => i < end,
Sign::Positive | Sign::Zero => i > end,
};
if is_finished {
return None;
}
let t = self.increment() * i;
i += direction.to_scalar();
Some(Point::from([t]))
})
}
}
#[cfg(test)]
mod tests {
use std::f64::consts::TAU;
use fj_math::{Circle, Point, Scalar};
use crate::algorithms::approx::{path::CurveBoundary, Tolerance};
use super::PathApproxParams;
#[test]
fn increment_for_circle() {
test_increment(1., 0.5, 3.);
test_increment(1., 0.1, 7.);
test_increment(1., 0.01, 23.);
fn test_increment(
radius: impl Into<Scalar>,
tolerance: impl Into<Tolerance>,
expected_num_vertices: impl Into<Scalar>,
) {
let circle = Circle::from_center_and_radius([0., 0.], radius);
let params = PathApproxParams::for_circle(&circle, tolerance);
let expected_increment = Scalar::TAU / expected_num_vertices;
assert_eq!(params.increment(), expected_increment);
}
}
#[test]
fn points_for_circle() {
// At the chosen values for radius and tolerance (see below), the
// increment is `PI / 4`, so ~1.57.
// Empty range
let empty: [Scalar; 0] = [];
test_path([[0.], [0.]], empty);
// Ranges contain all generated points. Start is before the first
// increment and after the last one in each case.
test_path([[0.], [TAU]], [1., 2., 3.]);
test_path([[1.], [TAU]], [1., 2., 3.]);
test_path([[0.], [TAU - 1.]], [1., 2., 3.]);
// Here the range is restricted to cut of the first or last increment.
test_path([[2.], [TAU]], [2., 3.]);
test_path([[0.], [TAU - 2.]], [1., 2.]);
// And everything again, but in reverse.
test_path([[TAU], [0.]], [3., 2., 1.]);
test_path([[TAU], [1.]], [3., 2., 1.]);
test_path([[TAU - 1.], [0.]], [3., 2., 1.]);
test_path([[TAU], [2.]], [3., 2.]);
test_path([[TAU - 2.], [0.]], [2., 1.]);
fn test_path(
boundary: impl Into<CurveBoundary<Point<1>>>,
expected_coords: impl IntoIterator<Item = impl Into<Scalar>>,
) {
// Choose radius and tolerance such, that we need 4 vertices to
// approximate a full circle. This is the lowest number that we can
// still cover all the edge cases with
let radius = 1.;
let tolerance = 0.375;
let circle = Circle::from_center_and_radius([0., 0.], radius);
let params = PathApproxParams::for_circle(&circle, tolerance);
let points = params.points(boundary).collect::<Vec<_>>();
let expected_points = expected_coords
.into_iter()
.map(|i| Point::from([params.increment() * i]))
.collect::<Vec<_>>();
assert_eq!(points, expected_points);
}
}
}

View File

@ -2,20 +2,20 @@
use std::collections::BTreeSet;
use crate::{objects::Shell, Core};
use crate::{geometry::Geometry, topology::Shell};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Shell {
type Approximation = BTreeSet<FaceApprox>;
type Cache = HalfEdgeApproxCache;
type Cache = ApproxCache;
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
geometry: &Geometry,
) -> Self::Approximation {
self.faces().approx_with_cache(tolerance, cache, core)
self.faces().approx_with_cache(tolerance, cache, geometry)
}
}

View File

@ -2,19 +2,19 @@
use std::collections::BTreeSet;
use crate::{objects::Sketch, Core};
use crate::{geometry::Geometry, topology::Sketch};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Sketch {
type Approximation = BTreeSet<FaceApprox>;
type Cache = HalfEdgeApproxCache;
type Cache = ApproxCache;
fn approx_with_cache(
self,
_tolerance: impl Into<Tolerance>,
_cache: &mut Self::Cache,
_core: &mut Core,
_: &Geometry,
) -> Self::Approximation {
todo!()
}

View File

@ -2,25 +2,27 @@
use std::collections::BTreeSet;
use crate::{objects::Solid, Core};
use crate::{geometry::Geometry, topology::Solid};
use super::{edge::HalfEdgeApproxCache, face::FaceApprox, Approx, Tolerance};
use super::{Approx, ApproxCache, Tolerance, face::FaceApprox};
impl Approx for &Solid {
type Approximation = BTreeSet<FaceApprox>;
type Cache = HalfEdgeApproxCache;
type Cache = ApproxCache;
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
geometry: &Geometry,
) -> Self::Approximation {
let tolerance = tolerance.into();
self.shells()
.iter()
.flat_map(|shell| shell.approx_with_cache(tolerance, cache, core))
.flat_map(|shell| {
shell.approx_with_cache(tolerance, cache, geometry)
})
.collect()
}
}

View File

@ -1,24 +1,59 @@
//! Vertex approximation
use std::collections::BTreeMap;
use fj_math::Point;
use crate::{
objects::Vertex,
storage::{Handle, HandleWrapper},
geometry::{Geometry, repr::tri_mesh::convert_point_surface_to_global},
storage::Handle,
topology::{Curve, Surface, Vertex},
};
use super::{ApproxPoint, Tolerance};
/// # Approximate a vertex position
pub fn approx_vertex(
vertex: Handle<Vertex>,
curve: &Handle<Curve>,
surface: &Handle<Surface>,
position_curve: Point<1>,
tolerance: impl Into<Tolerance>,
cache: &mut VertexApproxCache,
geometry: &Geometry,
) -> ApproxPoint<1> {
let position_surface = geometry
.of_curve(curve)
.unwrap()
.local_on(surface)
.unwrap()
.path
.point_from_path_coords(position_curve);
let position_global = match cache.get(&vertex) {
Some(position) => position,
None => {
let position_global = convert_point_surface_to_global(
&geometry.of_surface_2(surface).unwrap().generator,
position_surface,
tolerance,
geometry,
);
cache.insert(vertex, position_global)
}
};
ApproxPoint::new(position_curve, position_global)
}
/// Cache for vertex approximations
#[derive(Default)]
pub struct VertexApproxCache {
inner: BTreeMap<HandleWrapper<Vertex>, Point<3>>,
inner: BTreeMap<Handle<Vertex>, Point<3>>,
}
impl VertexApproxCache {
/// Get an approximated vertex from the cache
pub fn get(&self, handle: &Handle<Vertex>) -> Option<Point<3>> {
self.inner.get(&handle.clone().into()).cloned()
self.inner.get(handle).cloned()
}
/// Insert an approximated vertex into the cache
@ -27,8 +62,6 @@ impl VertexApproxCache {
handle: Handle<Vertex>,
position: Point<3>,
) -> Point<3> {
self.inner
.insert(handle.clone().into(), position)
.unwrap_or(position)
self.inner.insert(handle, position).unwrap_or(position)
}
}

View File

@ -1,14 +1,21 @@
use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Cycle};
use crate::{
geometry::Geometry,
storage::Handle,
topology::{Cycle, Surface},
};
impl super::BoundingVolume<2> for (&Cycle, &Handle<Surface>) {
fn aabb(self, geometry: &Geometry) -> Option<Aabb<2>> {
let (cycle, surface) = self;
impl super::BoundingVolume<2> for Cycle {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<2>> {
let mut aabb: Option<Aabb<2>> = None;
for edge in self.half_edges() {
let new_aabb =
edge.aabb(geometry).expect("`Edge` can always compute AABB");
for (half_edge, half_edge_next) in cycle.half_edges().pairs() {
let new_aabb = (half_edge, half_edge_next.start_vertex(), surface)
.aabb(geometry)
.expect("`HalfEdge` can always compute AABB");
aabb = Some(aabb.map_or(new_aabb, |aabb| aabb.merged(&new_aabb)));
}

View File

@ -1,36 +0,0 @@
use fj_math::{Aabb, Vector};
use crate::{
geometry::{Geometry, SurfacePath},
objects::HalfEdge,
storage::Handle,
};
impl super::BoundingVolume<2> for Handle<HalfEdge> {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<2>> {
match geometry.of_half_edge(self).path {
SurfacePath::Circle(circle) => {
// Just calculate the AABB of the whole circle. This is not the
// most precise, but it should do for now.
let center_to_min_max =
Vector::from([circle.radius(), circle.radius()]);
Some(Aabb {
min: circle.center() - center_to_min_max,
max: circle.center() + center_to_min_max,
})
}
SurfacePath::Line(_) => {
let points = self.boundary().inner.map(|point_curve| {
geometry
.of_half_edge(self)
.path
.point_from_path_coords(point_curve)
});
Some(Aabb::<2>::from_points(points))
}
}
}
}

View File

@ -1,33 +1,47 @@
use fj_math::Aabb;
use std::ops::Deref;
use fj_interop::Tolerance;
use fj_math::{Aabb, Vector};
use crate::{
geometry::{Geometry, GlobalPath},
objects::Face,
geometry::{
Geometry, repr::tri_mesh::convert_point_surface_to_global,
traits::GenTriMesh,
},
topology::Face,
};
impl super::BoundingVolume<3> for Face {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> {
self.region().exterior().aabb(geometry).map(|aabb2| {
let surface = geometry.of_surface(self.surface());
impl super::BoundingVolume<3> for &Face {
fn aabb(self, geometry: &Geometry) -> Option<Aabb<3>> {
// A bounding volume must include the body it bounds, but does not need
// to match it precisely. So it's okay, if it's a bit larger.
//
// Let's just choose a reasonable tolerance value here, that we can use
// to enlarge any AABBs we use in this method as necessary.
let tolerance = Tolerance::from_scalar(0.001)
.expect("Tolerance provided is larger than zero");
match surface.u {
GlobalPath::Circle(circle) => {
// This is not the most precise way to calculate the AABB,
// doing it for the whole circle, but it should do.
(self.region().exterior().deref(), self.surface())
.aabb(geometry)
.map(|aabb2| {
let surface =
&geometry.of_surface_2(self.surface()).unwrap().generator;
let tri_mesh =
surface.generate_tri_mesh(aabb2, tolerance, geometry);
let tri_mesh = tri_mesh.into_iter().map(|point| {
convert_point_surface_to_global(
surface, point, tolerance, geometry,
)
});
let aabb_bottom = circle.aabb();
let aabb_top = Aabb {
min: aabb_bottom.min + surface.v,
max: aabb_bottom.max + surface.v,
};
let mut aabb3 = Aabb::<3>::from_points(tri_mesh);
aabb_bottom.merged(&aabb_top)
}
GlobalPath::Line(_) => Aabb {
min: surface.point_from_surface_coords(aabb2.min),
max: surface.point_from_surface_coords(aabb2.max),
},
}
})
let offset = Vector::from([tolerance.inner(); 3]);
aabb3.min -= offset;
aabb3.max += offset;
aabb3
})
}
}

View File

@ -0,0 +1,52 @@
use fj_math::{Aabb, Vector};
use crate::{
geometry::{Geometry, Path},
storage::Handle,
topology::{HalfEdge, Surface, Vertex},
};
impl super::BoundingVolume<2>
for (&Handle<HalfEdge>, &Handle<Vertex>, &Handle<Surface>)
{
fn aabb(self, geometry: &Geometry) -> Option<Aabb<2>> {
let (half_edge, end_vertex, surface) = self;
let path = geometry
.of_curve(half_edge.curve())
.unwrap()
.local_on(surface)
.unwrap()
.path;
match path {
Path::Circle(circle) => {
// Just calculate the AABB of the whole circle. This is not the
// most precise, but it should do for now.
let center_to_min_max =
Vector::from([circle.radius(), circle.radius()]);
Some(Aabb {
min: circle.center() - center_to_min_max,
max: circle.center() + center_to_min_max,
})
}
Path::Line(_) => {
let points =
[half_edge.start_vertex(), end_vertex].map(|vertex| {
let point_curve = geometry
.of_vertex(vertex)
.unwrap()
.local_on(half_edge.curve())
.unwrap()
.position;
path.point_from_path_coords(point_curve)
});
Some(Aabb::<2>::from_points(points))
}
}
}
}

View File

@ -1,8 +1,8 @@
//! Compute a bounding volume for an object
mod cycle;
mod edge;
mod face;
mod half_edge;
mod shell;
mod solid;
@ -15,5 +15,5 @@ pub trait BoundingVolume<const D: usize> {
/// Compute an axis-aligned bounding box (AABB)
///
/// Return `None`, if no AABB can be computed (if the object is empty).
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<D>>;
fn aabb(self, geometry: &Geometry) -> Option<Aabb<D>>;
}

View File

@ -1,9 +1,9 @@
use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Shell};
use crate::{geometry::Geometry, topology::Shell};
impl super::BoundingVolume<3> for Shell {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> {
impl super::BoundingVolume<3> for &Shell {
fn aabb(self, geometry: &Geometry) -> Option<Aabb<3>> {
let mut aabb: Option<Aabb<3>> = None;
for face in self.faces() {

View File

@ -1,9 +1,9 @@
use fj_math::Aabb;
use crate::{geometry::Geometry, objects::Solid};
use crate::{geometry::Geometry, topology::Solid};
impl super::BoundingVolume<3> for Solid {
fn aabb(&self, geometry: &Geometry) -> Option<Aabb<3>> {
impl super::BoundingVolume<3> for &Solid {
fn aabb(self, geometry: &Geometry) -> Option<Aabb<3>> {
let mut aabb: Option<Aabb<3>> = None;
for shell in self.shells() {

View File

@ -1,6 +1,6 @@
use fj_math::{Aabb, Line, Point, Scalar, Segment, Vector};
use fj_math::{Aabb, Line, LineSegment, Point, Scalar, Vector};
/// An intersection between a [`Line`] and a [`Segment`]
/// An intersection between a [`Line`] and a [`LineSegment`]
#[derive(Debug, Eq, PartialEq)]
pub enum LineSegmentIntersection {
/// Line and segment intersect at a point
@ -17,12 +17,12 @@ pub enum LineSegmentIntersection {
}
impl LineSegmentIntersection {
/// Determine the intersection between a [`Line`] and a [`Segment`]
pub fn compute(line: &Line<2>, segment: &Segment<2>) -> Option<Self> {
/// Determine the intersection between a [`Line`] and a [`LineSegment`]
pub fn compute(line: &Line<2>, segment: &LineSegment<2>) -> Option<Self> {
// Algorithm adapted from Real-Time Collision Detection by Christer
// Ericson. See section 5.1.9.1, 2D Segment Intersection.
let [a, b] = segment.points();
let [a, b] = segment.points;
// Find vector that is orthogonal to `segment`.
let n = {
@ -40,7 +40,7 @@ impl LineSegmentIntersection {
// `line` and `segment` are not just parallel, but coincident!
return Some(Self::Coincident {
points_on_line: segment
.points()
.points
.map(|point| line.point_to_line_coords(point)),
});
}
@ -52,7 +52,7 @@ impl LineSegmentIntersection {
// line defined by `segment`'s points.
let t = n_dot_origin / n_dot_direction;
let point_is_on_segment = Aabb::<2>::from_points(segment.points())
let point_is_on_segment = Aabb::<2>::from_points(segment.points)
.contains(line.point_from_line_coords([t]));
if !point_is_on_segment {
return None;
@ -66,7 +66,7 @@ impl LineSegmentIntersection {
#[cfg(test)]
mod tests {
use fj_math::{Line, Point, Scalar, Segment, Vector};
use fj_math::{Line, LineSegment, Point, Scalar, Vector};
use super::LineSegmentIntersection;
@ -78,7 +78,7 @@ mod tests {
assert_eq!(
LineSegmentIntersection::compute(
&line,
&Segment::from_points([[1., -1.], [1., 1.]]),
&LineSegment::from([[1., -1.], [1., 1.]]),
),
Some(LineSegmentIntersection::Point {
point_on_line: Point::from([Scalar::ONE])
@ -94,7 +94,7 @@ mod tests {
assert_eq!(
LineSegmentIntersection::compute(
&line,
&Segment::from_points([[1., 0.], [2., 0.]]),
&LineSegment::from([[1., 0.], [2., 0.]]),
),
Some(LineSegmentIntersection::Coincident {
points_on_line: [Point::from([1.]), Point::from([2.])],
@ -110,7 +110,7 @@ mod tests {
assert_eq!(
LineSegmentIntersection::compute(
&line,
&Segment::from_points([[1., 1.], [1., 2.]]),
&LineSegment::from([[1., 1.], [1., 2.]]),
),
None,
);
@ -124,7 +124,7 @@ mod tests {
assert_eq!(
LineSegmentIntersection::compute(
&line,
&Segment::from_points([[1., -2.], [1., -1.]]),
&LineSegment::from([[1., -2.], [1., -1.]]),
),
None,
);
@ -138,7 +138,7 @@ mod tests {
assert_eq!(
LineSegmentIntersection::compute(
&line,
&Segment::from_points([[-1., 1.], [1., 1.]]),
&LineSegment::from([[-1., 1.], [1., 1.]]),
),
None,
);

View File

@ -1,16 +1,16 @@
//! Intersection between a ray and a line segment in 2D
use fj_math::Segment;
use fj_math::LineSegment;
use super::{HorizontalRayToTheRight, Intersect};
impl Intersect for (&HorizontalRayToTheRight<2>, &Segment<2>) {
impl Intersect for (&HorizontalRayToTheRight<2>, &LineSegment<2>) {
type Intersection = RaySegmentIntersection;
fn intersect(self) -> Option<Self::Intersection> {
let (ray, segment) = self;
let [a, b] = segment.points();
let [a, b] = segment.points;
let [lower, upper] = if a.v <= b.v { [a, b] } else { [b, a] };
let [left, right] = if a.u <= b.u { [a, b] } else { [b, a] };
@ -115,7 +115,7 @@ pub enum RaySegmentIntersection {
#[cfg(test)]
mod tests {
use fj_math::Segment;
use fj_math::LineSegment;
use crate::algorithms::intersect::Intersect;
@ -125,9 +125,9 @@ mod tests {
fn ray_is_left_of_segment() {
let ray = HorizontalRayToTheRight::from([0., 2.]);
let below = Segment::from([[1., 0.], [1., 1.]]);
let above = Segment::from([[1., 3.], [1., 4.]]);
let same_level = Segment::from([[1., 1.], [1., 3.]]);
let below = LineSegment::from([[1., 0.], [1., 1.]]);
let above = LineSegment::from([[1., 3.], [1., 4.]]);
let same_level = LineSegment::from([[1., 1.], [1., 3.]]);
assert!((&ray, &below).intersect().is_none());
assert!((&ray, &above).intersect().is_none());
@ -141,7 +141,7 @@ mod tests {
fn ray_is_right_of_segment() {
let ray = HorizontalRayToTheRight::from([1., 2.]);
let same_level = Segment::from([[0., 1.], [0., 3.]]);
let same_level = LineSegment::from([[0., 1.], [0., 3.]]);
assert!((&ray, &same_level).intersect().is_none());
}
@ -149,11 +149,11 @@ mod tests {
fn ray_overlaps_with_segment_along_x_axis() {
let ray = HorizontalRayToTheRight::from([1., 1.]);
let no_hit = Segment::from([[0., 0.], [2., 3.]]);
let no_hit = LineSegment::from([[0., 0.], [2., 3.]]);
let hit_segment = Segment::from([[0., 0.], [3., 2.]]);
let hit_upper = Segment::from([[0., 0.], [2., 1.]]);
let hit_lower = Segment::from([[0., 2.], [2., 1.]]);
let hit_segment = LineSegment::from([[0., 0.], [3., 2.]]);
let hit_upper = LineSegment::from([[0., 0.], [2., 1.]]);
let hit_lower = LineSegment::from([[0., 2.], [2., 1.]]);
assert!((&ray, &no_hit).intersect().is_none());
assert!(matches!(
@ -174,9 +174,9 @@ mod tests {
fn ray_starts_on_segment() {
let ray = HorizontalRayToTheRight::from([1., 1.]);
let hit_segment = Segment::from([[0., 0.], [2., 2.]]);
let hit_upper = Segment::from([[0., 0.], [1., 1.]]);
let hit_lower = Segment::from([[1., 1.], [2., 2.]]);
let hit_segment = LineSegment::from([[0., 0.], [2., 2.]]);
let hit_upper = LineSegment::from([[0., 0.], [1., 1.]]);
let hit_lower = LineSegment::from([[1., 1.], [2., 2.]]);
assert!(matches!(
(&ray, &hit_segment).intersect(),
@ -196,8 +196,8 @@ mod tests {
fn ray_and_segment_are_parallel_and_on_same_level() {
let ray = HorizontalRayToTheRight::from([2., 0.]);
let left = Segment::from([[0., 0.], [1., 0.]]);
let right = Segment::from([[3., 0.], [4., 0.]]);
let left = LineSegment::from([[0., 0.], [1., 0.]]);
let right = LineSegment::from([[3., 0.], [4., 0.]]);
assert!((&ray, &left).intersect().is_none());
assert!(matches!(
@ -210,9 +210,9 @@ mod tests {
fn ray_starts_on_parallel_segment() {
let ray = HorizontalRayToTheRight::from([2., 0.]);
let left = Segment::from([[0., 0.], [2., 0.]]);
let overlapping = Segment::from([[1., 0.], [3., 0.]]);
let right = Segment::from([[2., 0.], [4., 0.]]);
let left = LineSegment::from([[0., 0.], [2., 0.]]);
let overlapping = LineSegment::from([[1., 0.], [3., 0.]]);
let right = LineSegment::from([[2., 0.], [4., 0.]]);
assert!(matches!(
(&ray, &left).intersect(),

View File

@ -3,7 +3,7 @@ use std::collections::BTreeMap;
use fj_math::{Point, Scalar, Triangle, Winding};
use spade::HasPosition;
use crate::{algorithms::approx::cycle::CycleApprox, objects::Handedness};
use crate::{algorithms::approx::cycle::CycleApprox, topology::Handedness};
/// Create a Delaunay triangulation of all points
pub fn triangulate(
@ -47,20 +47,28 @@ pub fn triangulate(
let mut triangles = Vec::new();
for triangle in triangulation.inner_faces() {
let [v0, v1, v2] = triangle.vertices().map(|vertex| *vertex.data());
let triangle_winding = Triangle::<2>::from_points([
let triangle = Triangle::<2>::from_points([
v0.point_surface,
v1.point_surface,
v2.point_surface,
])
.expect("invalid triangle")
.winding();
]);
assert!(
triangle.is_valid(),
"Expecting triangles created by triangulation to be valid.",
);
let required_winding = match coord_handedness {
Handedness::LeftHanded => Winding::Cw,
Handedness::RightHanded => Winding::Ccw,
};
let Some(actual_winding) = triangle.winding() else {
unreachable!(
"Just asserted that the triangle is valid. Therefore it must \
have a winding."
);
};
let triangle = if triangle_winding == required_winding {
let triangle = if actual_winding == required_winding {
[v0, v1, v2]
} else {
[v0, v2, v1]

View File

@ -3,20 +3,19 @@
mod delaunay;
mod polygon;
use fj_interop::Mesh;
use fj_math::Point;
use fj_interop::{MeshTriangle, Tolerance, TriMesh};
use crate::Core;
use crate::{Core, operations::presentation::GetColor};
use self::polygon::Polygon;
use super::approx::{face::FaceApprox, Approx, Tolerance};
use super::approx::{Approx, face::FaceApprox};
/// Triangulate a shape
pub trait Triangulate: Sized {
/// Triangulate the shape
fn triangulate(self, core: &mut Core) -> Mesh<Point<3>> {
let mut mesh = Mesh::new();
fn triangulate(self, core: &mut Core) -> TriMesh {
let mut mesh = TriMesh::new();
self.triangulate_into_mesh(&mut mesh, core);
mesh
}
@ -25,7 +24,7 @@ pub trait Triangulate: Sized {
///
/// This is a low-level method, intended for implementation of
/// `Triangulate`. Most callers should prefer [`Triangulate::triangulate`].
fn triangulate_into_mesh(self, mesh: &mut Mesh<Point<3>>, core: &mut Core);
fn triangulate_into_mesh(self, mesh: &mut TriMesh, core: &mut Core);
}
impl<T> Triangulate for (T, Tolerance)
@ -33,10 +32,10 @@ where
T: Approx,
T::Approximation: IntoIterator<Item = FaceApprox>,
{
fn triangulate_into_mesh(self, mesh: &mut Mesh<Point<3>>, core: &mut Core) {
fn triangulate_into_mesh(self, mesh: &mut TriMesh, core: &mut Core) {
let (approx, tolerance) = self;
let approx = approx.approx(tolerance, core);
let approx = approx.approx(tolerance, &core.layers.geometry);
for approx in approx {
approx.triangulate_into_mesh(mesh, core);
@ -45,11 +44,7 @@ where
}
impl Triangulate for FaceApprox {
fn triangulate_into_mesh(
self,
mesh: &mut Mesh<Point<3>>,
_core: &mut Core,
) {
fn triangulate_into_mesh(self, mesh: &mut TriMesh, core: &mut Core) {
let face_as_polygon = Polygon::new()
.with_exterior(
self.exterior
@ -69,28 +64,35 @@ impl Triangulate for FaceApprox {
.contains_triangle(triangle.map(|point| point.point_surface))
});
let color = self.color.unwrap_or_default();
let color = self.face.region().get_color(core).unwrap_or_default();
for triangle in triangles {
let points = triangle.map(|point| point.point_global);
mesh.push_triangle(points, color);
mesh.triangles.push(MeshTriangle {
inner: points.into(),
is_internal: false,
color,
});
}
}
}
#[cfg(test)]
mod tests {
use fj_interop::Mesh;
use fj_interop::{Tolerance, TriMesh};
use fj_math::{Point, Scalar};
use crate::{
algorithms::approx::{Approx, Tolerance},
objects::{Cycle, Face},
Core,
algorithms::approx::{ApproxCache, face::approx_face},
geometry::repr::tri_mesh::convert_point_surface_to_global,
operations::{
build::{BuildCycle, BuildFace},
insert::Insert,
update::{UpdateFace, UpdateRegion},
},
Core,
storage::Handle,
topology::{Cycle, Face},
};
use super::Triangulate;
@ -104,17 +106,19 @@ mod tests {
let c = [2., 2.];
let d = [0., 1.];
let face =
Face::unbound(core.layers.objects.surfaces.xy_plane(), &mut core)
.update_region(
|region, core| {
region.update_exterior(
|_, core| Cycle::polygon([a, b, c, d], core),
core,
)
},
&mut core,
);
let surface = core.layers.topology.surfaces.xy_plane();
let face = Face::unbound(surface.clone(), &mut core)
.update_region(
|region, core| {
region.update_exterior(
|_, core| Cycle::polygon([a, b, c, d], surface, core),
core,
)
},
&mut core,
)
.insert(&mut core);
let a = Point::from(a).to_xyz();
let b = Point::from(b).to_xyz();
@ -145,52 +149,50 @@ mod tests {
let g = [3., 3.];
let h = [3., 1.];
let surface = core.layers.objects.surfaces.xy_plane();
let surface = core.layers.topology.surfaces.xy_plane();
let face = Face::unbound(surface.clone(), &mut core).update_region(
|region, core| {
region
.update_exterior(
|_, core| Cycle::polygon([a, b, c, d], core),
core,
)
.add_interiors([Cycle::polygon([e, f, g, h], core)], core)
},
&mut core,
);
let face = Face::unbound(surface.clone(), &mut core)
.update_region(
|region, core| {
region
.update_exterior(
|_, core| {
Cycle::polygon(
[a, b, c, d],
surface.clone(),
core,
)
},
core,
)
.add_interiors(
[Cycle::polygon(
[e, f, g, h],
surface.clone(),
core,
)],
core,
)
},
&mut core,
)
.insert(&mut core);
let triangles = triangulate(face, &mut core)?;
let a = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(a);
let b = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(b);
let e = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(e);
let f = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(f);
let g = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(g);
let h = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(h);
let [a, b, e, f, g, h] = [a, b, e, f, g, h].map(|point| {
convert_point_surface_to_global(
&core
.layers
.geometry
.of_surface_2(&surface)
.unwrap()
.generator,
point,
core.tolerance(),
&core.layers.geometry,
)
});
// Let's test that some correct triangles are present. We don't need to
// test them all.
@ -234,45 +236,41 @@ mod tests {
let d = [1., 1.];
let e = [0., 9.];
let surface = core.layers.objects.surfaces.xy_plane();
let surface = core.layers.topology.surfaces.xy_plane();
let face = Face::unbound(surface.clone(), &mut core).update_region(
|region, core| {
region.update_exterior(
|_, core| Cycle::polygon([a, b, c, d, e], core),
core,
)
},
&mut core,
);
let face = Face::unbound(surface.clone(), &mut core)
.update_region(
|region, core| {
region.update_exterior(
|_, core| {
Cycle::polygon(
[a, b, c, d, e],
surface.clone(),
core,
)
},
core,
)
},
&mut core,
)
.insert(&mut core);
let triangles = triangulate(face, &mut core)?;
let a = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(a);
let b = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(b);
let c = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(c);
let d = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(d);
let e = core
.layers
.geometry
.of_surface(&surface)
.point_from_surface_coords(e);
let [a, b, c, d, e] = [a, b, c, d, e].map(|point| {
convert_point_surface_to_global(
&core
.layers
.geometry
.of_surface_2(&surface)
.unwrap()
.generator,
point,
core.tolerance(),
&core.layers.geometry,
)
});
assert!(triangles.contains_triangle([a, b, d]));
assert!(triangles.contains_triangle([a, d, e]));
@ -282,10 +280,16 @@ mod tests {
}
fn triangulate(
face: Face,
face: Handle<Face>,
core: &mut Core,
) -> anyhow::Result<Mesh<Point<3>>> {
) -> anyhow::Result<TriMesh> {
let tolerance = Tolerance::from_scalar(Scalar::ONE)?;
Ok(face.approx(tolerance, core).triangulate(core))
Ok(approx_face(
face,
tolerance,
&mut ApproxCache::default(),
&core.layers.geometry,
)
.triangulate(core))
}
}

View File

@ -1,8 +1,8 @@
use fj_interop::ext::SliceExt;
use fj_math::{Point, PolyChain, Segment, Triangle};
use fj_math::{LineSegment, Point, PolyChain, Triangle};
use crate::algorithms::intersect::{
ray_segment::RaySegmentIntersection, HorizontalRayToTheRight, Intersect,
HorizontalRayToTheRight, Intersect, ray_segment::RaySegmentIntersection,
};
#[derive(Default)]
@ -42,12 +42,12 @@ impl Polygon {
}
pub fn contains_triangle(&self, triangle: impl Into<Triangle<2>>) -> bool {
let [a, b, c] = triangle.into().points();
let [a, b, c] = triangle.into().points;
let mut might_be_hole = true;
for &edge in [a, b, c, a].as_slice().array_windows_ext() {
let edge = Segment::from(edge);
let edge = LineSegment::from(edge);
let is_exterior_edge = self.contains_exterior_edge(edge);
let is_interior_edge = self.contains_interior_edge(edge);
@ -90,12 +90,12 @@ impl Polygon {
true
}
fn contains_exterior_edge(&self, edge: Segment<2>) -> bool {
fn contains_exterior_edge(&self, edge: LineSegment<2>) -> bool {
self.exterior.segments().contains(&edge)
|| self.exterior.segments().contains(&edge.reverse())
}
fn contains_interior_edge(&self, edge: Segment<2>) -> bool {
fn contains_interior_edge(&self, edge: LineSegment<2>) -> bool {
let mut contains = false;
for chain in &self.interiors {

View File

@ -2,26 +2,39 @@
//!
//! See [`Core`].
use fj_interop::Tolerance;
use crate::{layers::Layers, validation::ValidationConfig};
/// An instance of the Fornjot core
///
/// This is the main entry point to `fj-core`'s API.
#[derive(Default)]
pub struct Core {
/// The layers of data that make up the state of a core instance
pub layers: Layers,
}
impl Core {
/// Construct an instance of `Instance`
/// Construct an instance of `Core`
pub fn new() -> Self {
Self::default()
let layers = Layers::default();
Self { layers }
}
/// Construct an instance of `Instance`, using the provided configuration
/// Construct an instance of `Core`, using the provided configuration
pub fn with_validation_config(config: ValidationConfig) -> Self {
let layers = Layers::with_validation_config(config);
Self { layers }
}
/// Access the tolerance value used for intermediate geometry representation
pub fn tolerance(&self) -> Tolerance {
self.layers.validation.config.tolerance
}
}
impl Default for Core {
fn default() -> Self {
Self::new()
}
}

View File

@ -1,11 +1,11 @@
use std::{
cmp::{self, Ordering},
cmp::Ordering,
hash::{Hash, Hasher},
};
use fj_math::Point;
use crate::{objects::Vertex, storage::HandleWrapper};
use crate::{storage::Handle, topology::Vertex};
/// A boundary on a curve
///
@ -52,135 +52,12 @@ impl<T: CurveBoundaryElement> CurveBoundary<T> {
}
}
// Technically, these methods could be implemented for all
// `CurveBoundaryElement`s, but that would be misleading. While
// `HandleWrapper<Vertex>` implements `Ord`, which is useful for putting it (and
// by extension, `CurveBoundary<Vertex>`) into `BTreeMap`s, this `Ord`
// implementation doesn't actually define the geometrically meaningful ordering
// that the following methods rely on.
impl CurveBoundary<Point<1>> {
/// Indicate whether the boundary is empty
pub fn is_empty(&self) -> bool {
let [min, max] = &self.inner;
min >= max
}
/// Indicate whether the boundary contains the given element
pub fn contains(&self, point: Point<1>) -> bool {
let [min, max] = self.normalize().inner;
point > min && point < max
}
/// Indicate whether the boundary overlaps another
///
/// Boundaries that touch (i.e. their closest boundary elements are equal)
/// count as overlapping.
pub fn overlaps(&self, other: &Self) -> bool {
let [a_low, a_high] = self.normalize().inner;
let [b_low, b_high] = other.normalize().inner;
a_low <= b_high && a_high >= b_low
}
/// Create the difference of this boundary and another
///
/// The result will be normalized.
pub fn difference(self, other: Self) -> Option<OneOrTwoBoundaries> {
let [self_min, self_max] = self.normalize().inner;
let [other_min, other_max] = other.normalize().inner;
match (
self_min <= other_min,
self_min <= other_max,
self_max <= other_min,
self_max <= other_max,
) {
(true, true, true, true) => {
Some(OneOrTwoBoundaries::One(CurveBoundary {
inner: [self_min, self_max],
}))
}
(true, true, false, true) => {
let min = self_min;
let max = other_min;
if min == max {
return None;
}
Some(OneOrTwoBoundaries::One(CurveBoundary {
inner: [min, max],
}))
}
(true, true, false, false) => Some(OneOrTwoBoundaries::Two([
CurveBoundary {
inner: [self_min, other_min],
},
CurveBoundary {
inner: [other_max, self_max],
},
])),
(false, true, false, true) => None,
(false, true, false, false) => {
Some(OneOrTwoBoundaries::One(CurveBoundary {
inner: [other_max, self_max],
}))
}
(false, false, false, false) => {
Some(OneOrTwoBoundaries::One(CurveBoundary {
inner: [self_min, self_max],
}))
}
case => {
unreachable!(
"{case:?} is impossible, due to normalization above"
);
}
impl Default for CurveBoundary<Point<1>> {
fn default() -> Self {
Self {
inner: [[0.], [1.]].map(Point::from),
}
}
/// Create the intersection of this boundary and another
///
/// The result will be normalized.
#[must_use]
pub fn intersection(self, other: Self) -> Self {
let self_ = self.normalize();
let other = other.normalize();
let [self_min, self_max] = self_.inner;
let [other_min, other_max] = other.inner;
let min = cmp::max(self_min, other_min);
let max = cmp::min(self_max, other_max);
Self { inner: [min, max] }
}
/// Create the union of this boundary and another
///
/// The result will be normalized.
///
/// # Panics
///
/// Panics, if the two boundaries don't overlap (touching counts as
/// overlapping).
pub fn union(self, other: Self) -> Self {
let self_ = self.normalize();
let other = other.normalize();
assert!(
self.overlaps(&other),
"Can't merge boundaries that don't at least touch"
);
let [self_min, self_max] = self_.inner;
let [other_min, other_max] = other.inner;
let min = cmp::min(self_min, other_min);
let max = cmp::max(self_max, other_max);
Self { inner: [min, max] }
}
}
impl<S, T: CurveBoundaryElement> From<[S; 2]> for CurveBoundary<T>
@ -219,12 +96,6 @@ impl<T: CurveBoundaryElement> PartialOrd for CurveBoundary<T> {
}
}
#[derive(Debug, Eq, PartialEq)]
pub enum OneOrTwoBoundaries {
One(CurveBoundary<Point<1>>),
Two([CurveBoundary<Point<1>>; 2]),
}
/// An element of a curve boundary
///
/// Used for the type parameter of [`CurveBoundary`].
@ -240,125 +111,5 @@ impl CurveBoundaryElement for Point<1> {
}
impl CurveBoundaryElement for Vertex {
type Repr = HandleWrapper<Vertex>;
}
#[cfg(test)]
mod tests {
use fj_math::Point;
use crate::geometry::{boundary::OneOrTwoBoundaries, CurveBoundary};
#[test]
fn overlaps() {
assert!(overlap([0., 2.], [1., 3.])); // regular overlap
assert!(overlap([0., 1.], [1., 2.])); // just touching
assert!(overlap([2., 0.], [3., 1.])); // not normalized
assert!(overlap([1., 3.], [0., 2.])); // lower boundary comes second
assert!(!overlap([0., 1.], [2., 3.])); // regular non-overlap
assert!(!overlap([2., 3.], [0., 1.])); // lower boundary comes second
fn overlap(a: [f64; 2], b: [f64; 2]) -> bool {
let a = array_to_boundary(a);
let b = array_to_boundary(b);
a.overlaps(&b)
}
}
#[test]
fn difference() {
// `a \ b = x`
// b covers a exactly
diff([1., 2.], [1., 2.], &[]);
diff([1., 2.], [2., 1.], &[]);
diff([2., 1.], [1., 2.], &[]);
diff([2., 1.], [2., 1.], &[]);
// b covers a, overhang right
diff([1., 2.], [1., 3.], &[]);
diff([1., 2.], [3., 1.], &[]);
diff([2., 1.], [1., 3.], &[]);
diff([2., 1.], [3., 1.], &[]);
// b covers a, overhang left
diff([1., 2.], [0., 2.], &[]);
diff([1., 2.], [2., 0.], &[]);
diff([2., 1.], [0., 2.], &[]);
diff([2., 1.], [2., 0.], &[]);
// b covers a, overhang both sides
diff([1., 2.], [0., 3.], &[]);
diff([1., 2.], [3., 0.], &[]);
diff([2., 1.], [0., 3.], &[]);
diff([2., 1.], [3., 0.], &[]);
// a to the left of b, touching
diff([0., 1.], [1., 2.], &[[0., 1.]]);
diff([0., 1.], [2., 1.], &[[0., 1.]]);
diff([1., 0.], [1., 2.], &[[0., 1.]]);
diff([1., 0.], [2., 1.], &[[0., 1.]]);
// a to the left of b, not touching
diff([0., 1.], [2., 3.], &[[0., 1.]]);
diff([0., 1.], [3., 2.], &[[0., 1.]]);
diff([1., 0.], [2., 3.], &[[0., 1.]]);
diff([1., 0.], [3., 2.], &[[0., 1.]]);
// a to the right of b, touching
diff([2., 3.], [1., 2.], &[[2., 3.]]);
diff([2., 3.], [2., 1.], &[[2., 3.]]);
diff([3., 2.], [1., 2.], &[[2., 3.]]);
diff([3., 2.], [2., 1.], &[[2., 3.]]);
// a to the right of b, not touching
diff([2., 3.], [0., 1.], &[[2., 3.]]);
diff([2., 3.], [1., 0.], &[[2., 3.]]);
diff([3., 2.], [0., 1.], &[[2., 3.]]);
diff([3., 2.], [1., 0.], &[[2., 3.]]);
// b intersects a on the right
diff([0., 2.], [1., 3.], &[[0., 1.]]);
diff([0., 2.], [3., 1.], &[[0., 1.]]);
diff([2., 0.], [1., 3.], &[[0., 1.]]);
diff([2., 0.], [3., 1.], &[[0., 1.]]);
// b intersects a on the left
diff([1., 3.], [0., 2.], &[[2., 3.]]);
diff([1., 3.], [2., 0.], &[[2., 3.]]);
diff([3., 1.], [0., 2.], &[[2., 3.]]);
diff([3., 1.], [2., 0.], &[[2., 3.]]);
// a covers b, overhang both sides
diff([0., 3.], [1., 2.], &[[0., 1.], [2., 3.]]);
diff([0., 3.], [2., 1.], &[[0., 1.], [2., 3.]]);
diff([3., 0.], [1., 2.], &[[0., 1.], [2., 3.]]);
diff([3., 0.], [2., 1.], &[[0., 1.], [2., 3.]]);
fn diff(a: [f64; 2], b: [f64; 2], x: &[[f64; 2]]) {
print!("{a:?} \\ {b:?} = ");
let a = array_to_boundary(a);
let b = array_to_boundary(b);
let x = match x {
[] => None,
&[x] => Some(OneOrTwoBoundaries::One(array_to_boundary(x))),
&[x1, x2] => Some(OneOrTwoBoundaries::Two(
[x1, x2].map(array_to_boundary),
)),
_ => panic!("Invalid result"),
};
let diff = a.difference(b);
println!("{diff:?}");
assert_eq!(diff, x);
}
}
fn array_to_boundary(array: [f64; 2]) -> CurveBoundary<Point<1>> {
CurveBoundary::from(array.map(|element| [element]))
}
type Repr = Handle<Vertex>;
}

View File

@ -0,0 +1,173 @@
//! # Geometry code specific to circles
use fj_interop::{CircleApproxParams, Tolerance};
use fj_math::{Circle, LineSegment, Point};
use crate::geometry::{CurveBoundary, traits::GenPolyline};
impl<const D: usize> GenPolyline<D> for Circle<D> {
fn origin(&self) -> Point<D> {
self.center() + self.a()
}
fn line_segment_at(
&self,
point_curve: Point<1>,
tolerance: Tolerance,
) -> LineSegment<D> {
let params = CircleApproxParams::new(self.radius(), tolerance);
// The approximation parameters have an increment, in curve coordinates,
// that determines the distance between points on the polyline. Let's
// figure out where `point` is on the curve, in units of this increment.
let t = point_curve.t / params.increment();
// Now pick two points on the curve, again in units of approximation
// increment, where the locations of the two closest approximation
// points to the provided point are.
//
// Since we are calculating this in increment units, those are integer
// numbers.
let a = t.floor();
let b = t.ceil();
// Next, convert them into actual curve coordinates.
let points_curve = [a, b]
.map(|point_curve_in_increment_units| {
[point_curve_in_increment_units * params.increment()]
})
.map(Point::from);
// And finally, convert those into points of the desired dimensionality.
let points = points_curve
.map(|point_curve| self.point_from_circle_coords(point_curve));
LineSegment {
points,
points_line: points_curve,
}
}
fn generate_polyline(
&self,
boundary: CurveBoundary<Point<1>>,
tolerance: Tolerance,
) -> Vec<Point<1>> {
let params = CircleApproxParams::new(self.radius(), tolerance);
params.approx_circle(boundary.inner).collect()
}
}
#[cfg(test)]
mod tests {
use std::f64::consts::TAU;
use fj_interop::Tolerance;
use fj_math::{Point, Scalar};
use crate::geometry::{
CurveBoundary, curves::circle::Circle, traits::GenPolyline,
};
use super::CircleApproxParams;
#[test]
fn increment_for_circle() {
test_increment(1., 0.5, 3.);
test_increment(1., 0.1, 7.);
test_increment(1., 0.01, 23.);
fn test_increment(
radius: impl Into<Scalar>,
tolerance: impl Into<Tolerance>,
expected_num_vertices: impl Into<Scalar>,
) {
let circle = Circle::from_center_and_radius([0., 0.], radius);
let params = CircleApproxParams::new(circle.radius(), tolerance);
let expected_increment = Scalar::TAU / expected_num_vertices;
assert_eq!(params.increment(), expected_increment);
}
}
#[test]
fn points_for_circle() {
// At the chosen values for radius and tolerance (see below), the
// increment is `PI / 4`, so ~1.57.
// Empty range
let empty: [Scalar; 0] = [];
test_path([[0.], [0.]], empty);
// Ranges contain all generated points. Start is before the first
// increment and after the last one in each case.
test_path([[0.], [TAU]], [1., 2., 3.]);
test_path([[1.], [TAU]], [1., 2., 3.]);
test_path([[0.], [TAU - 1.]], [1., 2., 3.]);
// Here the range is restricted to cut of the first or last increment.
test_path([[2.], [TAU]], [2., 3.]);
test_path([[0.], [TAU - 2.]], [1., 2.]);
// And everything again, but in reverse.
test_path([[TAU], [0.]], [3., 2., 1.]);
test_path([[TAU], [1.]], [3., 2., 1.]);
test_path([[TAU - 1.], [0.]], [3., 2., 1.]);
test_path([[TAU], [2.]], [3., 2.]);
test_path([[TAU - 2.], [0.]], [2., 1.]);
fn test_path(
boundary: impl Into<CurveBoundary<Point<1>>>,
expected_coords: impl IntoIterator<Item = impl Into<Scalar>>,
) {
// Choose radius and tolerance such, that we need 4 vertices to
// approximate a full circle. This is the lowest number that we can
// still cover all the edge cases with
let radius = 1.;
let tolerance = 0.375;
let circle = Circle::from_center_and_radius([0., 0.], radius);
let params = CircleApproxParams::new(circle.radius(), tolerance);
let points = params
.approx_circle(boundary.into().inner)
.collect::<Vec<_>>();
let expected_points = expected_coords
.into_iter()
.map(|i| Point::from([params.increment() * i]))
.collect::<Vec<_>>();
assert_eq!(points, expected_points);
}
}
#[test]
fn curve_representation_must_be_deterministic() -> anyhow::Result<()> {
let circle = Circle::from_center_and_radius([0., 0.], 1.);
// Deliberately choose a very coarse tolerance, so the circle
// representation degenerates to a predictable triangle.
let tolerance = Tolerance::from_scalar(1.)?;
// Sample the circle at two points that are close together, relative to
// our tolerance. The intent here is to each time sample the same
// triangle edge, so also make sure they're not around zero, or another
// point where two edges are likely to meet.
//
// Where those edges meet is implementation-dependent of course, so this
// test might break if that implementation changes. But I don't think
// that really matters. We just need to make sure that this test doesn't
// accidentally hit such a point. Where specifically those points are,
// doesn't matter.
let a = circle.line_segment_at(Point::from([0.2]), tolerance);
let b = circle.line_segment_at(Point::from([0.3]), tolerance);
assert_eq!(
a, b,
"Expecting representation of the curve to be deterministic; it \
must not depend on the specific points that were sampled.",
);
Ok(())
}
}

View File

@ -0,0 +1,34 @@
//! # Geometry code specific to lines
use fj_interop::Tolerance;
use fj_math::{Line, LineSegment, Point};
use crate::geometry::{CurveBoundary, traits::GenPolyline};
impl<const D: usize> GenPolyline<D> for Line<D> {
fn origin(&self) -> Point<D> {
self.origin()
}
fn line_segment_at(
&self,
point_curve: Point<1>,
_: Tolerance,
) -> LineSegment<D> {
// Collapse line segment into a point, as per documentation.
let point = self.origin() + self.direction() * point_curve.t;
LineSegment {
points: [point; 2],
points_line: [point_curve; 2],
}
}
fn generate_polyline(
&self,
boundary: CurveBoundary<Point<1>>,
_: Tolerance,
) -> Vec<Point<1>> {
boundary.inner.into()
}
}

View File

@ -0,0 +1,4 @@
//! # Geometry code specific to various types of curves
pub mod circle;
pub mod line;

View File

@ -3,16 +3,28 @@ use std::collections::BTreeMap;
use fj_math::Vector;
use crate::{
objects::{HalfEdge, Objects, Surface},
storage::{Handle, HandleWrapper},
storage::Handle,
topology::{Curve, Surface, Topology, Vertex},
};
use super::{GlobalPath, HalfEdgeGeometry, SurfaceGeometry};
use super::{
Path, VertexGeom,
repr::{polyline::Polyline, tri_mesh::TriMesh},
surfaces::SweptCurve,
traits::{GenPolyline, GenTriMesh},
vertex::LocalVertexGeom,
};
/// Geometric data that is associated with topological objects
pub struct Geometry {
half_edge: BTreeMap<Handle<HalfEdge>, HalfEdgeGeometry>,
surface: BTreeMap<HandleWrapper<Surface>, SurfaceGeometry>,
curve: BTreeMap<Handle<Curve>, CurveGeom>,
surface: BTreeMap<Handle<Surface>, SweptCurve>,
vertex: BTreeMap<Handle<Vertex>, VertexGeom>,
curves: BTreeMap<Handle<Curve>, CurveGeom2>,
surfaces: BTreeMap<Handle<Surface>, SurfaceGeom>,
space_2d: Handle<Surface>,
xy_plane: Handle<Surface>,
xz_plane: Handle<Surface>,
@ -21,96 +33,298 @@ pub struct Geometry {
impl Geometry {
/// Create a new instance of `Geometry`
pub fn new(objects: &Objects) -> Self {
pub fn new(topology: &Topology) -> Self {
let mut self_ = Self {
half_edge: BTreeMap::new(),
curve: BTreeMap::new(),
surface: BTreeMap::new(),
vertex: BTreeMap::new(),
xy_plane: objects.surfaces.xy_plane(),
xz_plane: objects.surfaces.xz_plane(),
yz_plane: objects.surfaces.yz_plane(),
curves: BTreeMap::new(),
surfaces: BTreeMap::new(),
space_2d: topology.surfaces.space_2d(),
xy_plane: topology.surfaces.xy_plane(),
xz_plane: topology.surfaces.xz_plane(),
yz_plane: topology.surfaces.yz_plane(),
};
self_.define_surface_inner(
self_.xy_plane.clone(),
SurfaceGeometry {
u: GlobalPath::x_axis(),
SweptCurve {
u: Path::x_axis(),
v: Vector::unit_y(),
},
);
self_.define_surface_inner(
self_.xz_plane.clone(),
SurfaceGeometry {
u: GlobalPath::x_axis(),
SweptCurve {
u: Path::x_axis(),
v: Vector::unit_z(),
},
);
self_.define_surface_inner(
self_.yz_plane.clone(),
SurfaceGeometry {
u: GlobalPath::y_axis(),
SweptCurve {
u: Path::y_axis(),
v: Vector::unit_z(),
},
);
self_.define_surface_inner_2(
self_.xy_plane.clone(),
SurfaceGeom {
generator: Box::new(SweptCurve {
u: Path::x_axis(),
v: Vector::unit_y(),
}),
geometry: TriMesh::empty(),
},
);
self_.define_surface_inner_2(
self_.xz_plane.clone(),
SurfaceGeom {
generator: Box::new(SweptCurve {
u: Path::x_axis(),
v: Vector::unit_z(),
}),
geometry: TriMesh::empty(),
},
);
self_.define_surface_inner_2(
self_.yz_plane.clone(),
SurfaceGeom {
generator: Box::new(SweptCurve {
u: Path::y_axis(),
v: Vector::unit_z(),
}),
geometry: TriMesh::empty(),
},
);
self_
}
pub(crate) fn define_half_edge_inner(
pub(crate) fn define_curve_inner(
&mut self,
half_edge: Handle<HalfEdge>,
geometry: HalfEdgeGeometry,
curve: Handle<Curve>,
surface: Handle<Surface>,
geometry: LocalCurveGeom,
) {
self.half_edge.insert(half_edge, geometry);
self.curve
.entry(curve)
.or_default()
.definitions
.insert(surface, geometry);
}
pub(crate) fn define_curve_inner_2(
&mut self,
curve: Handle<Curve>,
geometry: CurveGeom2,
) {
self.curves.insert(curve, geometry);
}
pub(crate) fn define_surface_inner(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeometry,
geometry: SweptCurve,
) {
self.surface.insert(surface.into(), geometry);
if surface == self.space_2d {
panic!("Attempting to define geometry for 2D space");
}
if self.surface.contains_key(&surface)
&& (surface == self.xy_plane
|| surface == self.xz_plane
|| surface == self.yz_plane)
{
panic!("Attempting to redefine basis plane.");
}
self.surface.insert(surface, geometry);
}
/// # Access the geometry of the provided half-edge
///
/// ## Panics
///
/// Panics, if the geometry of the half-edge is not defined.
pub fn of_half_edge(
&self,
half_edge: &Handle<HalfEdge>,
) -> HalfEdgeGeometry {
self.half_edge
.get(half_edge)
.copied()
.expect("Expected geometry of half-edge to be defined")
pub(crate) fn define_surface_inner_2(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeom,
) {
if surface == self.space_2d {
panic!("Attempting to define geometry for 2D space");
}
if self.surfaces.contains_key(&surface)
&& (surface == self.xy_plane
|| surface == self.xz_plane
|| surface == self.yz_plane)
{
panic!("Attempting to redefine basis plane.");
}
self.surfaces.insert(surface, geometry);
}
pub(crate) fn define_vertex_inner(
&mut self,
vertex: Handle<Vertex>,
curve: Handle<Curve>,
geometry: LocalVertexGeom,
) {
self.vertex
.entry(vertex)
.or_default()
.definitions
.insert(curve, geometry);
}
/// # Access the geometry of the provided curve
pub fn of_curve(&self, curve: &Handle<Curve>) -> Option<&CurveGeom> {
self.curve.get(curve)
}
/// # Access the geometry of the provided surface
///
/// ## Panics
///
/// Panics, if the geometry of surface is not defined.
pub fn of_surface(&self, surface: &Handle<Surface>) -> SurfaceGeometry {
/// Panics, if the geometry of the surface is not defined.
pub fn of_surface(&self, surface: &Handle<Surface>) -> &SweptCurve {
self.surface
.get(&surface.clone().into())
.copied()
.get(surface)
.expect("Expected geometry of surface to be defined")
}
/// # Access the geometry of the provided vertex
pub fn of_vertex(&self, vertex: &Handle<Vertex>) -> Option<&VertexGeom> {
self.vertex.get(vertex)
}
/// # Access the geometry of the provided curve
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry system. This
/// method returns new-style geometry. Its name is temporary, while the
/// method returning the old-style geometry is still taking up the more
/// concise name.
pub fn of_curve_2(&self, curve: &Handle<Curve>) -> Option<&CurveGeom2> {
self.curves.get(curve)
}
/// # Access the geometry of the provided surface
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry system. This
/// method returns new-style geometry. Its name is temporary, while the
/// method returning the old-style geometry is still taking up the more
/// concise name.
pub fn of_surface_2(
&self,
surface: &Handle<Surface>,
) -> Option<&SurfaceGeom> {
self.surfaces.get(surface)
}
/// Access the geometry of the xy-plane
pub fn xy_plane(&self) -> SurfaceGeometry {
pub fn xy_plane(&self) -> &SweptCurve {
self.of_surface(&self.xy_plane)
}
/// Access the geometry of the xz-plane
pub fn xz_plane(&self) -> SurfaceGeometry {
pub fn xz_plane(&self) -> &SweptCurve {
self.of_surface(&self.xz_plane)
}
/// Access the geometry of the yz-plane
pub fn yz_plane(&self) -> SurfaceGeometry {
pub fn yz_plane(&self) -> &SweptCurve {
self.of_surface(&self.yz_plane)
}
}
/// The geometric definition of a curve
#[derive(Clone, Debug, Default)]
pub struct CurveGeom {
/// # The redundant local definitions of the curve geometry
///
/// ## Implementation Note
///
/// Having multiple redundant definitions is undesirable. However, we can't
/// just use one global definition in 3D, as we need the local 2D
/// definitions to triangulate faces, and we currently don't have the tools
/// to project a global definition into a local context.
///
/// Eventually, it should be possible to define the geometry of a curve
/// once, either locally or globally, and then convert that single
/// definition into (other) local contexts, as needed. There currently is no
/// issue to track that specifically, but there is the following issue,
/// which is a prerequisite for making the required tooling practical:
///
/// <https://github.com/hannobraun/fornjot/issues/2118>
pub definitions: BTreeMap<Handle<Surface>, LocalCurveGeom>,
}
impl CurveGeom {
/// # Return the local definition on the provided surface
pub fn local_on(
&self,
surface: &Handle<Surface>,
) -> Option<&LocalCurveGeom> {
self.definitions.get(surface)
}
}
/// The geometric definition of a curve, in 2D surface coordinates
#[derive(Clone, Debug)]
pub struct LocalCurveGeom {
/// The path that defines the curve on its surface
pub path: Path<2>,
}
/// # The representation of a curve's geometry
///
/// Curves are represented by polylines, their uniform intermediate
/// representation. However, this representation can be 2D (local to a surface)
/// or 3D. This enum distinguishes between the two cases.
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry system. This type
/// represents new-style geometry. Its name is temporary, while the type
/// representing the old-style geometry is still taking up the more concise
/// name.
pub enum CurveGeom2 {
/// # The curve is defined locally on a surface
Surface {
/// # A generator for local curve geometry
generator: Box<dyn GenPolyline<2>>,
/// # The local representation of curve geometry
geometry: Polyline<2>,
/// # The surface that the curve geometry is defined on
surface: Handle<Surface>,
},
/// # The curve is defined globally in 3D space
Global {
/// # A generator for global curve geometry
generator: Box<dyn GenPolyline<3>>,
/// # The global representation of curve geometry
geometry: Polyline<3>,
},
}
/// # The representation of a surface's geometry
///
/// Surface are represented by triangle meshes, their uniform intermediate
/// representation.
pub struct SurfaceGeom {
/// # A generator for surface geometry
pub generator: Box<dyn GenTriMesh>,
/// # The generated surface geometry
pub geometry: TriMesh,
}

View File

@ -1,32 +0,0 @@
use super::SurfacePath;
/// The geometry of a half-edge
#[derive(Copy, Clone)]
pub struct HalfEdgeGeometry {
/// # The path of the half-edge
///
/// ## Implementation Note
///
/// Currently, all curve-related geometry is defined locally, in terms of
/// the surface that the curve is on (or purely in 2D, if there is no
/// surface associated with this geometry). However, curves exist globally,
/// independently of surfaces. Half-edges in multiple surfaces can refer to
/// the same curve, and in fact, that is the whole reason for their
/// existence as a topological object.
///
/// This contradiction, globally defined curves but locally defined curve
/// geometry, is the reason that this curve geometry is defined right here,
/// associated with a locally existing half-edge. (And, I might add,
/// redundantly so, as multiple half-edges within the same surface context
/// can refer to the same curve.)
///
/// Instead, it should be possible to define curve geometry *either* locally
/// or globally. Then that respective definition can be associated with the
/// curve (and possibly, in addition, a surface). How exactly that is going
/// to work is up in the air.
///
/// The point of all this exposition is to clarify that this field doesn't
/// really belong here. It exists here for practical reasons that are,
/// hopefully, temporary.
pub path: SurfacePath,
}

View File

@ -1,15 +1,18 @@
//! Types that are tied to objects, but aren't objects themselves
//! Geometry that is applied to the topological object graph
pub mod curves;
pub mod repr;
pub mod surfaces;
pub mod traits;
mod boundary;
mod geometry;
mod half_edge;
mod path;
mod surface;
mod vertex;
pub use self::{
boundary::{CurveBoundary, CurveBoundaryElement},
geometry::Geometry,
half_edge::HalfEdgeGeometry,
path::{GlobalPath, SurfacePath},
surface::SurfaceGeometry,
geometry::{CurveGeom, CurveGeom2, Geometry, LocalCurveGeom, SurfaceGeom},
path::Path,
vertex::{LocalVertexGeom, VertexGeom},
};

View File

@ -1,28 +1,20 @@
//! Paths through 2D and 3D space
//!
//! See [`SurfacePath`] and [`GlobalPath`].
//! See [`Path`].
use fj_math::{Circle, Line, Point, Scalar, Transform, Vector};
/// A path through surface (2D) space
/// A path through surface (2D) or global (3D) space
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub enum SurfacePath {
pub enum Path<const D: usize> {
/// A circle
Circle(Circle<2>),
Circle(Circle<D>),
/// A line
Line(Line<2>),
Line(Line<D>),
}
impl SurfacePath {
/// Build a circle from the given radius
pub fn circle_from_center_and_radius(
center: impl Into<Point<2>>,
radius: impl Into<Scalar>,
) -> Self {
Self::Circle(Circle::from_center_and_radius(center, radius))
}
impl Path<2> {
/// Build a line that represents the u-axis of the surface its on
pub fn u_axis() -> Self {
let a = Point::origin();
@ -40,57 +32,10 @@ impl SurfacePath {
let (self_, _) = Self::line_from_points([a, b]);
self_
}
/// Construct a line from two points
///
/// Also returns the coordinates of the points on the path.
pub fn line_from_points(
points: [impl Into<Point<2>>; 2],
) -> (Self, [Point<1>; 2]) {
let (line, coords) = Line::from_points(points);
(Self::Line(line), coords)
}
/// Create a line from two points that include line coordinates
pub fn line_from_points_with_coords(
points: [(impl Into<Point<1>>, impl Into<Point<2>>); 2],
) -> Self {
Self::Line(Line::from_points_with_line_coords(points))
}
/// Convert a point on the path into surface coordinates
pub fn point_from_path_coords(
&self,
point: impl Into<Point<1>>,
) -> Point<2> {
match self {
Self::Circle(circle) => circle.point_from_circle_coords(point),
Self::Line(line) => line.point_from_line_coords(point),
}
}
/// Create a new path that is the reverse of this one
#[must_use]
pub fn reverse(self) -> Self {
match self {
Self::Circle(circle) => Self::Circle(circle.reverse()),
Self::Line(line) => Self::Line(line.reverse()),
}
}
}
/// A path through global (3D) space
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub enum GlobalPath {
/// A circle
Circle(Circle<3>),
/// A line
Line(Line<3>),
}
impl GlobalPath {
/// Construct a `GlobalPath` that represents the x-axis
impl Path<3> {
/// Construct a `Path` that represents the x-axis
pub fn x_axis() -> Self {
Self::Line(Line::from_origin_and_direction(
Point::origin(),
@ -98,7 +43,7 @@ impl GlobalPath {
))
}
/// Construct a `GlobalPath` that represents the y-axis
/// Construct a `Path` that represents the y-axis
pub fn y_axis() -> Self {
Self::Line(Line::from_origin_and_direction(
Point::origin(),
@ -106,7 +51,7 @@ impl GlobalPath {
))
}
/// Construct a `GlobalPath` that represents the z-axis
/// Construct a `Path` that represents the z-axis
pub fn z_axis() -> Self {
Self::Line(Line::from_origin_and_direction(
Point::origin(),
@ -114,6 +59,25 @@ impl GlobalPath {
))
}
/// Transform the path
#[must_use]
pub fn transform(self, transform: &Transform) -> Self {
match self {
Self::Circle(curve) => Self::Circle(curve.transform(transform)),
Self::Line(curve) => Self::Line(curve.transform(transform)),
}
}
}
impl<const D: usize> Path<D> {
/// Build a circle from the given radius
pub fn circle_from_center_and_radius(
center: impl Into<Point<D>>,
radius: impl Into<Scalar>,
) -> Self {
Self::Circle(Circle::from_center_and_radius(center, radius))
}
/// Build a circle from the given radius
pub fn circle_from_radius(radius: impl Into<Scalar>) -> Self {
let radius = radius.into();
@ -125,25 +89,24 @@ impl GlobalPath {
///
/// Also returns the coordinates of the points on the path.
pub fn line_from_points(
points: [impl Into<Point<3>>; 2],
points: [impl Into<Point<D>>; 2],
) -> (Self, [Point<1>; 2]) {
let (line, coords) = Line::from_points(points);
(Self::Line(line), coords)
}
/// Access the origin of the path's coordinate system
pub fn origin(&self) -> Point<3> {
match self {
Self::Circle(circle) => circle.center() + circle.a(),
Self::Line(line) => line.origin(),
}
/// Create a line from two points that include line coordinates
pub fn line_from_points_with_coords(
points: [(impl Into<Point<1>>, impl Into<Point<D>>); 2],
) -> Self {
Self::Line(Line::from_points_with_line_coords(points))
}
/// Convert a point on the path into global coordinates
/// Convert a point on the path into surface coordinates
pub fn point_from_path_coords(
&self,
point: impl Into<Point<1>>,
) -> Point<3> {
) -> Point<D> {
match self {
Self::Circle(circle) => circle.point_from_circle_coords(point),
Self::Line(line) => line.point_from_line_coords(point),
@ -154,21 +117,19 @@ impl GlobalPath {
pub fn vector_from_path_coords(
&self,
vector: impl Into<Vector<1>>,
) -> Vector<3> {
) -> Vector<D> {
match self {
Self::Circle(circle) => circle.vector_from_circle_coords(vector),
Self::Line(line) => line.vector_from_line_coords(vector),
}
}
/// Transform the path
/// Create a new path that is the reverse of this one
#[must_use]
pub fn transform(self, transform: &Transform) -> Self {
pub fn reverse(self) -> Self {
match self {
Self::Circle(curve) => {
Self::Circle(transform.transform_circle(&curve))
}
Self::Line(curve) => Self::Line(transform.transform_line(&curve)),
Self::Circle(circle) => Self::Circle(circle.reverse()),
Self::Line(line) => Self::Line(line.reverse()),
}
}
}

View File

@ -0,0 +1,4 @@
//! # The uniform intermediate representations of geometry
pub mod polyline;
pub mod tri_mesh;

View File

@ -0,0 +1,94 @@
//! # Geometric utility code based on polylines
use std::iter;
use fj_interop::Tolerance;
use fj_math::{Aabb, LineSegment, Point};
use crate::geometry::{CurveBoundary, traits::GenPolyline};
/// # A polyline, the uniform representation of curve geometry
///
/// Can be 2- or 3-dimensional, as specified by the `D` type parameter.
pub struct Polyline<const D: usize> {
/// # The connecting points between line segments
pub points: Vec<Point<D>>,
/// # The connecting points between line segments, in curve coordinates
pub points_curve: Vec<Point<1>>,
}
impl<const D: usize> Polyline<D> {
/// # Create an instance of `Polyline` from a curve
pub fn from_curve(
curve: &dyn GenPolyline<D>,
boundary: impl Into<CurveBoundary<Point<1>>>,
tolerance: impl Into<Tolerance>,
) -> Self {
let boundary = boundary.into();
let tolerance = tolerance.into();
let points_curve = curve.generate_polyline(boundary, tolerance);
let points = points_curve
.iter()
.map(|&point_curve| {
convert_from_curve_point(curve, point_curve, tolerance)
})
.collect();
Self {
points,
points_curve,
}
}
/// # Iterate over the line segments of this polyline
pub fn line_segments(&self) -> impl Iterator<Item = LineSegment<D>> + '_ {
let mut i = 0;
iter::from_fn(move || {
let points = [*self.points.get(i)?, *self.points.get(i + 1)?];
let points_line =
[*self.points_curve.get(i)?, *self.points_curve.get(i + 1)?];
i += 1;
Some(LineSegment {
points,
points_line,
})
})
}
}
/// # Convert a point on a curve from curve coordinates to surface coordinates
pub fn convert_from_curve_point<const D: usize>(
curve: &dyn GenPolyline<D>,
point_curve: impl Into<Point<1>>,
tolerance: impl Into<Tolerance>,
) -> Point<D> {
let point_curve = point_curve.into();
let tolerance = tolerance.into();
let line_segment = curve.line_segment_at(point_curve, tolerance);
let line = line_segment.to_line();
line.point_from_line_coords(point_curve)
}
/// # Generate a 2D axis-aligned bounding box for a curve in a given range
pub fn surface_aabb_from_bounded_curve(
curve: &dyn GenPolyline<2>,
boundary: impl Into<CurveBoundary<Point<1>>>,
tolerance: impl Into<Tolerance>,
) -> Aabb<2> {
let boundary = boundary.into();
let tolerance = tolerance.into();
let points_curve = curve.generate_polyline(boundary, tolerance);
let points_surface = points_curve.into_iter().map(|point_curve| {
convert_from_curve_point(curve, point_curve, tolerance)
});
Aabb::<2>::from_points(points_surface)
}

View File

@ -0,0 +1,50 @@
//! # Geometric utility code based on triangle meshes
use fj_interop::Tolerance;
use fj_math::{Point, Vector};
use crate::geometry::{Geometry, traits::GenTriMesh};
/// # A triangle mesh, the uniform intermediate representation of a surface
///
/// ## Implementation
///
/// This struct is currently a placeholder, while the transition to the new
/// geometry system is ongoing.
pub struct TriMesh {}
impl TriMesh {
/// # Construct an empty triangle mesh
pub fn empty() -> Self {
Self {}
}
}
/// # Convert a point in surface coordinates to global coordinates
pub fn convert_point_surface_to_global(
surface: &dyn GenTriMesh,
point: impl Into<Point<2>>,
tolerance: impl Into<Tolerance>,
geometry: &Geometry,
) -> Point<3> {
let (triangle, barycentric_coords) =
surface.triangle_at(point.into(), tolerance.into(), geometry);
triangle.point_from_barycentric_coords(barycentric_coords)
}
/// # Convert a vector in surface coordinates to global coordinates
pub fn convert_vector_surface_to_global(
surface: &dyn GenTriMesh,
vector: impl Into<Vector<2>>,
tolerance: impl Into<Tolerance>,
geometry: &Geometry,
) -> Vector<3> {
let vector = vector.into();
let point = convert_point_surface_to_global(
surface,
Point { coords: vector },
tolerance,
geometry,
);
point - surface.origin(geometry)
}

View File

@ -1,100 +0,0 @@
//! The geometry that defines a surface
use fj_math::{Line, Plane, Point, Transform, Vector};
use super::GlobalPath;
/// The geometry that defines a surface
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct SurfaceGeometry {
/// The u-axis of the surface
pub u: GlobalPath,
/// The v-axis of the surface
pub v: Vector<3>,
}
impl SurfaceGeometry {
/// Convert a point in surface coordinates to model coordinates
pub fn point_from_surface_coords(
&self,
point: impl Into<Point<2>>,
) -> Point<3> {
let point = point.into();
self.u.point_from_path_coords([point.u])
+ self.path_to_line().vector_from_line_coords([point.v])
}
/// Convert a vector in surface coordinates to model coordinates
pub fn vector_from_surface_coords(
&self,
vector: impl Into<Vector<2>>,
) -> Vector<3> {
let vector = vector.into();
self.u.vector_from_path_coords([vector.u])
+ self.path_to_line().vector_from_line_coords([vector.v])
}
fn path_to_line(&self) -> Line<3> {
Line::from_origin_and_direction(self.u.origin(), self.v)
}
/// Project the global point into the surface
pub fn project_global_point(&self, point: impl Into<Point<3>>) -> Point<2> {
let GlobalPath::Line(line) = self.u else {
todo!("Projecting point into non-plane surface is not supported")
};
let plane =
Plane::from_parametric(line.origin(), line.direction(), self.v);
plane.project_point(point)
}
/// Transform the surface geometry
#[must_use]
pub fn transform(self, transform: &Transform) -> Self {
let u = self.u.transform(transform);
let v = transform.transform_vector(&self.v);
Self { u, v }
}
}
#[cfg(test)]
mod tests {
use fj_math::{Line, Point, Vector};
use pretty_assertions::assert_eq;
use crate::geometry::{GlobalPath, SurfaceGeometry};
#[test]
fn point_from_surface_coords() {
let surface = SurfaceGeometry {
u: GlobalPath::Line(Line::from_origin_and_direction(
Point::from([1., 1., 1.]),
Vector::from([0., 2., 0.]),
)),
v: Vector::from([0., 0., 2.]),
};
assert_eq!(
surface.point_from_surface_coords([2., 4.]),
Point::from([1., 5., 9.]),
);
}
#[test]
fn vector_from_surface_coords() {
let surface = SurfaceGeometry {
u: GlobalPath::Line(Line::from_origin_and_direction(
Point::from([1., 0., 0.]),
Vector::from([0., 2., 0.]),
)),
v: Vector::from([0., 0., 2.]),
};
assert_eq!(
surface.vector_from_surface_coords([2., 4.]),
Vector::from([0., 4., 8.]),
);
}
}

View File

@ -0,0 +1,8 @@
//! # Geometry code specific to various types of surfaces
mod swept_curve;
mod transformed_surface;
pub use self::{
swept_curve::SweptCurve, transformed_surface::TransformedSurface,
};

View File

@ -0,0 +1,66 @@
use fj_interop::Tolerance;
use fj_math::{Aabb, Point, Scalar, Triangle, Vector};
use crate::geometry::{
Geometry, Path,
traits::{GenPolyline, GenTriMesh},
};
/// # A surface that is a curve, swept along a path
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct SweptCurve {
/// The u-axis of the surface
pub u: Path<3>,
/// The v-axis of the surface
pub v: Vector<3>,
}
impl GenTriMesh for SweptCurve {
fn origin(&self, _: &Geometry) -> Point<3> {
self.u.origin()
}
fn triangle_at(
&self,
point_surface: Point<2>,
tolerance: Tolerance,
_: &Geometry,
) -> (Triangle<3>, [Scalar; 3]) {
let [a, b] = self
.u
.line_segment_at(Point::from([point_surface.u]), tolerance)
.points
.map(|point_global| point_global + self.v * point_surface.v);
let c = a + (b - a) / 2.;
let triangle = Triangle::from([a, b, c]);
let barycentric_coords = [1. / 3.; 3].map(Into::into);
(triangle, barycentric_coords)
}
fn generate_tri_mesh(
&self,
boundary: Aabb<2>,
tolerance: Tolerance,
_: &Geometry,
) -> Vec<Point<2>> {
let boundary_curve = [[boundary.min.u], [boundary.max.u]];
let points_curve =
self.u.generate_polyline(boundary_curve.into(), tolerance);
points_curve
.iter()
.copied()
.map(|point| [point.t, Scalar::ZERO])
.chain(
points_curve
.iter()
.copied()
.map(|point| [point.t, self.v.magnitude()]),
)
.map(Point::from)
.collect()
}
}

View File

@ -0,0 +1,56 @@
use fj_interop::Tolerance;
use fj_math::{Aabb, Point, Scalar, Transform, Triangle};
use crate::{
geometry::{Geometry, traits::GenTriMesh},
storage::Handle,
topology::Surface,
};
/// # A surface that is a transformation of another surface
pub struct TransformedSurface {
/// # The original surface that is being transformed
pub surface: Handle<Surface>,
/// # The transform that is applied to the original surface
pub transform: Transform,
}
impl GenTriMesh for TransformedSurface {
fn origin(&self, geometry: &Geometry) -> Point<3> {
let surface = geometry.of_surface_2(&self.surface).unwrap();
self.transform
.transform_point(&surface.generator.origin(geometry))
}
fn triangle_at(
&self,
point_surface: Point<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> (Triangle<3>, [Scalar; 3]) {
let surface = geometry.of_surface_2(&self.surface).unwrap();
let (triangle, barycentric_coords) =
surface
.generator
.triangle_at(point_surface, tolerance, geometry);
let triangle = self.transform.transform_triangle(&triangle);
(triangle, barycentric_coords)
}
fn generate_tri_mesh(
&self,
boundary: Aabb<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> Vec<Point<2>> {
// The triangle mesh is generated in 2D surface coordinates. No need to
// transform that.
let surface = geometry.of_surface_2(&self.surface).unwrap();
surface
.generator
.generate_tri_mesh(boundary, tolerance, geometry)
}
}

View File

@ -0,0 +1,183 @@
//! # Traits that abstract over curve or surface geometry
//!
//! Fornjot's geometry is built on the concept of a uniform representation:
//! Polylines to represent curves and triangle meshes to represent surfaces. The
//! traits in this module provide the interface between this uniform
//! representation and specific geometry code.
//!
//! ## Determinism
//!
//! Uniform representation must be deterministic. That means a given geometric
//! curve or surface, at a given tolerance, must generate the same uniform
//! representation, regardless of where it is queried, and in which order.
//!
//! ## Implementation Note
//!
//! As of this writing, the transition from the previous, more limited, geometry
//! system to the new one based on uniform representation is still ongoing. As a
//! result of that, this module might still be incomplete.
use std::ops::Deref;
use fj_interop::Tolerance;
use fj_math::{Aabb, LineSegment, Point, Scalar, Triangle};
use super::{CurveBoundary, Geometry, Path};
/// # Generate polylines, the uniform representation of curve geometry
///
/// This trait provides a generic and uniform interface to curve geometry. It is
/// implemented by types that represent specific kinds of curve geometry.
///
/// It is generic over the dimensionality of the generated polyline. Typically,
/// two variants should be implemented per curve geometry type:
///
/// - `GenPolyline<2>` for surface-local geometry.
/// - `GenPolyline<3>` for global 3D geometry.
pub trait GenPolyline<const D: usize> {
/// # Access the origin of the curve
fn origin(&self) -> Point<D>;
/// # Compute a line segment to approximate the curve at this point
///
/// ## Degenerate Case
///
/// If the curve requires no approximation (meaning it is a line), then per
/// convention, a degenerate line segment is returned, that collapses to the
/// provided point.
fn line_segment_at(
&self,
point_curve: Point<1>,
tolerance: Tolerance,
) -> LineSegment<D>;
/// # Generate a polyline within the provided boundary
fn generate_polyline(
&self,
boundary: CurveBoundary<Point<1>>,
tolerance: Tolerance,
) -> Vec<Point<1>>;
}
// This implementation is temporary, to ease the transition towards a curve
// geometry trait. Eventually, `CurveGeom2` is expected to replace `Path`.
impl<const D: usize> GenPolyline<D> for Path<D> {
fn origin(&self) -> Point<D> {
match self {
Self::Circle(circle) => circle.origin(),
Self::Line(line) => line.origin(),
}
}
fn line_segment_at(
&self,
point_curve: Point<1>,
tolerance: Tolerance,
) -> LineSegment<D> {
match self {
Self::Circle(circle) => {
circle.line_segment_at(point_curve, tolerance)
}
Self::Line(line) => line.line_segment_at(point_curve, tolerance),
}
}
fn generate_polyline(
&self,
boundary: CurveBoundary<Point<1>>,
tolerance: Tolerance,
) -> Vec<Point<1>> {
match self {
Self::Circle(circle) => {
circle.generate_polyline(boundary, tolerance)
}
Self::Line(line) => line.generate_polyline(boundary, tolerance),
}
}
}
/// # Generate triangle meshes, the uniform representation of surface geometry
pub trait GenTriMesh {
/// # Access the origin of the surface
fn origin(&self, geometry: &Geometry) -> Point<3>;
/// # Return the triangle at the provided point on the surface
///
/// Select a triangle of the surface's triangle mesh representation, the one
/// at the provided surface point. Return that triangle, as well as the
/// barycentric coordinates of the provided point on the triangle.
///
/// ## Triangle Size and Validity
///
/// If a surface is curved along both axes, the triangle's size is chosen
/// such, that it approximates the surface, with the maximum allowed
/// deviation of the actual surface defined by the provided tolerance
/// argument.
///
/// Otherwise, the size of the returned triangle is at least partially
/// arbitrary. Take the extreme case of a plane: Since it is not curved at
/// all, the returned triangle can be arbitrarily large.
///
/// However, since surfaces are infinite, and we can't represent infinite
/// triangles, there is no sensible upper bound for the size. Instead, to
/// prevent an arbitrary choice for the size of triangles, which would imply
/// properties of the surface that are not true, and might therefore be
/// confusing, the triangles returned by this function have a length of zero
/// along axes that do not require approximation.
///
/// The most extreme case would be a plane, for which the returned triangle
/// is collapsed to a point. For a cylinder, the triangle would have the
/// appropriate width to approximate the curved axis given the provided
/// tolerance, while having zero height.
///
/// ## Implementation Note
///
/// At the time this was written, there was no dedicated type to represent
/// barycentric coordinates. Nor any other code that used them, I think.
///
/// If this changes, and a special type for barycentric coordinates is
/// added, it would make sense to return that here.
fn triangle_at(
&self,
point_surface: Point<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> (Triangle<3>, [Scalar; 3]);
/// # Generated a triangle mesh within the provided boundary
fn generate_tri_mesh(
&self,
boundary: Aabb<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> Vec<Point<2>>;
}
impl<T> GenTriMesh for T
where
T: Deref,
T::Target: GenTriMesh,
{
fn origin(&self, geometry: &Geometry) -> Point<3> {
self.deref().origin(geometry)
}
fn triangle_at(
&self,
point_surface: Point<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> (Triangle<3>, [Scalar; 3]) {
self.deref().triangle_at(point_surface, tolerance, geometry)
}
fn generate_tri_mesh(
&self,
boundary: Aabb<2>,
tolerance: Tolerance,
geometry: &Geometry,
) -> Vec<Point<2>> {
self.deref()
.generate_tri_mesh(boundary, tolerance, geometry)
}
}

View File

@ -0,0 +1,41 @@
use std::collections::BTreeMap;
use fj_math::Point;
use crate::{storage::Handle, topology::Curve};
/// The geometric definition of a vertex
#[derive(Clone, Debug, Default)]
pub struct VertexGeom {
/// # The redundant local definitions of the vertex geometry
///
/// ## Implementation Note
///
/// Having multiple redundant definitions is undesirable. However, we can't
/// just use one global definition in 3D, as we need the local 1D
/// definitions to approximate curves, and we currently don't have the tools
/// to project a global definition into a local context.
///
/// Eventually, it should be possible to define the geometry of a vertex
/// once, either locally or globally, and then convert that single
/// definition into (other) local contexts, as needed. There currently is no
/// issue to track that specifically, but there is the following issue,
/// which is a prerequisite for making the required tooling practical:
///
/// <https://github.com/hannobraun/fornjot/issues/2118>
pub definitions: BTreeMap<Handle<Curve>, LocalVertexGeom>,
}
impl VertexGeom {
/// # Return the local definition on the provided curve
pub fn local_on(&self, curve: &Handle<Curve>) -> Option<&LocalVertexGeom> {
self.definitions.get(curve)
}
}
/// The geometric definition of a vertex, in 1D curve coordinates
#[derive(Clone, Debug)]
pub struct LocalVertexGeom {
/// The position of the vertex, in 1-dimensional curve coordinates
pub position: Point<1>,
}

View File

@ -1,48 +1,105 @@
//! Layer infrastructure for [`Geometry`]
use crate::{
geometry::{Geometry, HalfEdgeGeometry, SurfaceGeometry},
objects::{HalfEdge, Surface},
geometry::{
CurveGeom2, Geometry, LocalCurveGeom, LocalVertexGeom, SurfaceGeom,
surfaces::SweptCurve,
},
storage::Handle,
topology::{Curve, Surface, Vertex},
};
use super::{Command, Event, Layer};
impl Layer<Geometry> {
/// Define the geometry of the provided half-edge
pub fn define_half_edge(
/// Define the geometry of the provided curve
pub fn define_curve(
&mut self,
half_edge: Handle<HalfEdge>,
geometry: HalfEdgeGeometry,
curve: Handle<Curve>,
surface: Handle<Surface>,
geometry: LocalCurveGeom,
) {
let mut events = Vec::new();
self.process(
DefineHalfEdge {
half_edge,
geometry,
},
&mut events,
);
self.process_command(DefineCurve {
curve,
surface,
geometry,
});
}
/// Define the geometry of the provided surface
/// # Define the geometry of the provided curve
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry system. This
/// method defines new-style geometry. Its name is temporary, while the
/// method defining the old-style geometry is still taking up the more
/// concise name.
pub fn define_curve_2(
&mut self,
curve: Handle<Curve>,
geometry: CurveGeom2,
) {
self.process_command(DefineCurve2 { curve, geometry });
}
/// # Define the geometry of the provided surface
///
/// ## Panics
///
/// Panics, if the surface is a special pre-defined plane, like the basis
/// planes (xy-, xz-, or yz-plane).
pub fn define_surface(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeometry,
geometry: SweptCurve,
) {
let mut events = Vec::new();
self.process(DefineSurface { surface, geometry }, &mut events);
self.process_command(DefineSurface { surface, geometry });
}
/// # Define the geometry of the provided surface
///
/// ## Panics
///
/// Panics, if the surface is a special pre-defined plane, like the basis
/// planes (xy-, xz-, or yz-plane).
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry system. This
/// method defines new-style geometry. Its name is temporary, while the
/// method defining the old-style geometry is still taking up the more
/// concise name.
pub fn define_surface_2(
&mut self,
surface: Handle<Surface>,
geometry: SurfaceGeom,
) {
self.process_command(DefineSurface2 { surface, geometry });
}
/// Define the geometry of the provided vertex
pub fn define_vertex(
&mut self,
vertex: Handle<Vertex>,
curve: Handle<Curve>,
geometry: LocalVertexGeom,
) {
self.process_command(DefineVertex {
vertex,
curve,
geometry,
});
}
}
/// Define the geometry of a half-edge
pub struct DefineHalfEdge {
half_edge: Handle<HalfEdge>,
geometry: HalfEdgeGeometry,
/// Define the geometry of a curve
pub struct DefineCurve {
curve: Handle<Curve>,
surface: Handle<Surface>,
geometry: LocalCurveGeom,
}
impl Command<Geometry> for DefineHalfEdge {
impl Command<Geometry> for DefineCurve {
type Result = ();
type Event = Self;
@ -55,16 +112,48 @@ impl Command<Geometry> for DefineHalfEdge {
}
}
impl Event<Geometry> for DefineHalfEdge {
fn evolve(&self, state: &mut Geometry) {
state.define_half_edge_inner(self.half_edge.clone(), self.geometry);
impl Event<Geometry> for DefineCurve {
fn evolve(self, state: &mut Geometry) {
state.define_curve_inner(self.curve, self.surface, self.geometry);
}
}
/// # Define the geometry of a curve
///
/// ## Implementation Note
///
/// There currently is an ongoing transition to a new geometry representation.
/// This type is involved in defining the new-style geometry. Its name is
/// temporary, while the respective type that defines old-style geometry is
/// still taking up the more compact name.
pub struct DefineCurve2 {
curve: Handle<Curve>,
geometry: CurveGeom2,
}
impl Command<Geometry> for DefineCurve2 {
type Result = ();
type Event = Self;
fn decide(
self,
_: &Geometry,
events: &mut Vec<Self::Event>,
) -> Self::Result {
events.push(self);
}
}
impl Event<Geometry> for DefineCurve2 {
fn evolve(self, state: &mut Geometry) {
state.define_curve_inner_2(self.curve, self.geometry);
}
}
/// Define the geometry of a surface
pub struct DefineSurface {
surface: Handle<Surface>,
geometry: SurfaceGeometry,
geometry: SweptCurve,
}
impl Command<Geometry> for DefineSurface {
@ -81,7 +170,58 @@ impl Command<Geometry> for DefineSurface {
}
impl Event<Geometry> for DefineSurface {
fn evolve(&self, state: &mut Geometry) {
state.define_surface_inner(self.surface.clone(), self.geometry);
fn evolve(self, state: &mut Geometry) {
state.define_surface_inner(self.surface, self.geometry);
}
}
/// Define the geometry of a surface
pub struct DefineSurface2 {
surface: Handle<Surface>,
geometry: SurfaceGeom,
}
impl Command<Geometry> for DefineSurface2 {
type Result = ();
type Event = Self;
fn decide(
self,
_: &Geometry,
events: &mut Vec<Self::Event>,
) -> Self::Result {
events.push(self);
}
}
impl Event<Geometry> for DefineSurface2 {
fn evolve(self, state: &mut Geometry) {
state.define_surface_inner_2(self.surface, self.geometry);
}
}
/// Define the geometry of a curve
pub struct DefineVertex {
vertex: Handle<Vertex>,
curve: Handle<Curve>,
geometry: LocalVertexGeom,
}
impl Command<Geometry> for DefineVertex {
type Result = ();
type Event = Self;
fn decide(
self,
_: &Geometry,
events: &mut Vec<Self::Event>,
) -> Self::Result {
events.push(self);
}
}
impl Event<Geometry> for DefineVertex {
fn evolve(self, state: &mut Geometry) {
state.define_vertex_inner(self.vertex, self.curve, self.geometry);
}
}

View File

@ -7,8 +7,8 @@ use std::ops::Deref;
/// direct write access.
///
/// Instead, each write access to state is reified as a command, which are
/// processed by [`Layer::process`]. Processing a command can result in any
/// number of events, which can then be used as commands for other layers.
/// processed by [`Layer::process_command`]. Processing a command can result in
/// any number of events, which can then be used as commands for other layers.
///
/// This design takes inspiration from, and uses the nomenclature of, this
/// article:
@ -23,21 +23,40 @@ impl<S> Layer<S> {
Self { state }
}
/// Process a command
/// # Process a command without capturing any events
///
/// The command is processed synchronously. When this method returns, the
/// state has been updated.
pub fn process<C>(
pub fn process_command<C>(&mut self, command: C) -> C::Result
where
C: Command<S>,
{
let mut events = Vec::new();
let result = command.decide(&self.state, &mut events);
for event in events {
event.evolve(&mut self.state);
}
result
}
/// # Process a command and capture the events that produces
///
/// The command is processed synchronously. When this method returns, the
/// state has been updated.
pub fn process_command_and_capture_events<C>(
&mut self,
command: C,
events: &mut Vec<C::Event>,
) -> C::Result
where
C: Command<S>,
C::Event: Clone,
{
let result = command.decide(&self.state, events);
for event in events {
for event in events.iter().cloned() {
event.evolve(&mut self.state);
}
@ -100,5 +119,5 @@ pub trait Event<S> {
/// Implementations of this method are supposed to be relatively dumb. Any
/// decisions that go into updating the state should be made in
/// [`Command::decide`], and encoded into the event.
fn evolve(&self, state: &mut S);
fn evolve(self, state: &mut S);
}

View File

@ -1,7 +1,7 @@
use crate::{
geometry::Geometry,
objects::Objects,
presentation::Presentation,
topology::Topology,
validation::{Validation, ValidationConfig},
};
@ -22,11 +22,10 @@ use super::Layer;
/// For now, there is no need for this, and all layers are just hardcoded here.
/// That can be changed, once necessary.
pub struct Layers {
/// The objects layer
/// The topology layer
///
/// Manages the stores of topological and geometric objects that make up
/// shapes.
pub objects: Layer<Objects>,
/// Manages the stores of topological objects.
pub topology: Layer<Topology>,
/// The geometry layer
///
@ -47,11 +46,11 @@ pub struct Layers {
impl Layers {
/// Construct an instance of `Layers`
pub fn new() -> Self {
let objects = Objects::new();
let geometry = Geometry::new(&objects);
let topology = Topology::new();
let geometry = Geometry::new(&topology);
Self {
objects: Layer::new(objects),
topology: Layer::new(topology),
geometry: Layer::new(geometry),
validation: Layer::default(),
presentation: Layer::default(),

View File

@ -3,8 +3,8 @@
//! See [`Layers`].
pub mod geometry;
pub mod objects;
pub mod presentation;
pub mod topology;
pub mod validation;
mod layer;

View File

@ -3,9 +3,9 @@
use fj_interop::Color;
use crate::{
objects::{AnyObject, Region, Stored},
presentation::Presentation,
storage::Handle,
topology::{AnyObject, Region, Stored},
};
use super::{Command, Event, Layer};
@ -13,8 +13,7 @@ use super::{Command, Event, Layer};
impl Layer<Presentation> {
/// Set the color of a region
pub fn set_color(&mut self, region: Handle<Region>, color: Color) {
let mut events = Vec::new();
self.process(SetColor { region, color }, &mut events);
self.process_command(SetColor { region, color });
}
/// Mark an object as being derived from another
@ -23,8 +22,7 @@ impl Layer<Presentation> {
original: AnyObject<Stored>,
derived: AnyObject<Stored>,
) {
let mut events = Vec::new();
self.process(DeriveObject { original, derived }, &mut events);
self.process_command(DeriveObject { original, derived });
}
}
@ -51,7 +49,7 @@ impl Command<Presentation> for SetColor {
}
impl Event<Presentation> for SetColor {
fn evolve(&self, state: &mut Presentation) {
fn evolve(self, state: &mut Presentation) {
state.color.insert(self.region.clone(), self.color);
}
}
@ -77,9 +75,9 @@ impl Command<Presentation> for DeriveObject {
if let (AnyObject::Region(original), AnyObject::Region(derived)) =
(self.original, self.derived)
{
if let Some(color) = state.color.get(&original.0).cloned() {
if let Some(color) = state.color.get(&original).cloned() {
events.push(SetColor {
region: derived.into(),
region: derived,
color,
});
}

View File

@ -1,32 +1,34 @@
//! Layer infrastructure for [`Objects`]
//! Layer infrastructure for [`Topology`]
use crate::{
geometry::Geometry,
objects::{AboutToBeStored, AnyObject, Objects},
topology::{AboutToBeStored, AnyObject, Topology},
validation::Validation,
};
use super::{validation::ValidateObject, Command, Event, Layer};
use super::{Command, Event, Layer, validation::ValidateObject};
impl Layer<Objects> {
impl Layer<Topology> {
/// Insert an object into the stores
///
/// Passes any events produced to the validation layer.
pub fn insert(
&mut self,
object: AnyObject<AboutToBeStored>,
geometry: &Geometry,
geometry: &mut Layer<Geometry>,
validation: &mut Layer<Validation>,
) {
let mut events = Vec::new();
self.process(InsertObject { object }, &mut events);
self.process_command_and_capture_events(
InsertObject { object },
&mut events,
);
for event in events {
let event = ValidateObject {
validation.process_command(ValidateObject {
object: event.object.into(),
geometry,
};
validation.process(event, &mut Vec::new());
});
}
}
}
@ -38,17 +40,17 @@ pub struct InsertObject {
pub object: AnyObject<AboutToBeStored>,
}
impl Command<Objects> for InsertObject {
impl Command<Topology> for InsertObject {
type Result = ();
type Event = InsertObject;
fn decide(self, _: &Objects, events: &mut Vec<Self::Event>) {
fn decide(self, _: &Topology, events: &mut Vec<Self::Event>) {
events.push(self);
}
}
impl Event<Objects> for InsertObject {
fn evolve(&self, state: &mut Objects) {
impl Event<Topology> for InsertObject {
fn evolve(self, state: &mut Topology) {
self.object.clone().insert(state);
}
}

View File

@ -2,7 +2,7 @@
use crate::{
geometry::Geometry,
objects::{AnyObject, Stored},
topology::{AnyObject, Stored},
validation::{Validation, ValidationError, ValidationErrors},
};
@ -11,7 +11,7 @@ use super::{Command, Event, Layer};
impl Layer<Validation> {
/// Take all errors stored in the validation layer
pub fn take_errors(&mut self) -> Result<(), ValidationErrors> {
self.process(TakeErrors, &mut Vec::new())
self.process_command(TakeErrors)
}
}
@ -34,10 +34,11 @@ impl Command<Validation> for ValidateObject<'_> {
.validate(&state.config, &mut errors, self.geometry);
for err in errors {
events.push(ValidationFailed {
object: self.object.clone(),
err,
});
if state.config.panic_on_error {
panic!("{:#?}", err);
}
events.push(ValidationFailed { err });
}
}
}
@ -56,7 +57,7 @@ impl Command<Validation> for TakeErrors {
state: &Validation,
events: &mut Vec<Self::Event>,
) -> Self::Result {
let errors = ValidationErrors(state.errors.values().cloned().collect());
let errors = ValidationErrors(state.errors.to_vec());
events.push(self);
@ -69,7 +70,7 @@ impl Command<Validation> for TakeErrors {
}
impl Event<Validation> for TakeErrors {
fn evolve(&self, state: &mut Validation) {
fn evolve(self, state: &mut Validation) {
state.errors.clear();
}
}
@ -79,15 +80,12 @@ impl Event<Validation> for TakeErrors {
/// Event produced by `Layer<Validation>`.
#[derive(Clone)]
pub struct ValidationFailed {
/// The object for which validation failed
pub object: AnyObject<Stored>,
/// The validation error
pub err: ValidationError,
}
impl Event<Validation> for ValidationFailed {
fn evolve(&self, state: &mut Validation) {
state.errors.insert(self.object.id(), self.err.clone());
fn evolve(self, state: &mut Validation) {
state.errors.push(self.err.clone());
}
}

View File

@ -81,14 +81,38 @@
//!
//! [Fornjot]: https://www.fornjot.app/
// This Clippy lint warns about keys in maps and sets whose types have interior
// mutability. This applies to `Handle`, which is why this lint triggers in
// multiple places in this crate.
//
// These are false positives, however. As per the documentation of the lint[1],
// These types are specifically okay to use, if their `Hash` and `Ord`
// implementations do not rely on any fields that are not mutable. And for
// `Handle`, those implementations only rely on the `Handle`s ID, which is
// constant.
//
// I don't think I have ever personally encountered a bug that this lint would
// have warned against. So I think it makes sense to, as a matter of
// convenience, just disable the lint for the whole crate, instead of doing so
// for every single false positive.
//
// It might be an even better option to configure Clippy to ignore `Handle`
// specifically for this lint, which should be possible according to the lint
// documentation.[1] For some reason this didn't work when I tried it, and I
// couldn't figure out why. In the end, I decided it wasn't worth spending more
// time on this, so this is the situation I ended up with.
//
// [1] https://rust-lang.github.io/rust-clippy/master/index.html#/mutable_key_type
#![allow(clippy::mutable_key_type)]
pub mod algorithms;
pub mod geometry;
pub mod layers;
pub mod objects;
pub mod operations;
pub mod presentation;
pub mod queries;
pub mod storage;
pub mod topology;
pub mod validate;
pub mod validation;

View File

@ -1,89 +0,0 @@
use fj_math::Point;
use crate::{
geometry::{CurveBoundary, SurfacePath},
objects::{Curve, Vertex},
storage::{Handle, HandleWrapper},
};
/// # A directed half-edge, defined in a surface's 2D space
///
/// ## Structure
///
/// A `HalfEdge` is defined by the [`Curve`] it is on, its boundary on the
/// curve, and the [`Vertex`] instances that bound it on the curve. To keep the
/// data structures simple (by avoiding redundancy), each `HalfEdge` only refers
/// to its start vertex. The vertex where it ends is referred to by the next
/// `HalfEdge` in the [`Cycle`] that the `HalfEdge` is a part of.
///
///
/// ## Validity
///
/// A valid `HalfEdge` must have a non-zero length, meaning its bounding
/// vertices must not be coincident.
///
/// In a valid [`Shell`], `HalfEdge`s form coincident pairs, where the faces of
/// the shell touch. The other `HalfEdge` in such a pair is called the sibling.
///
/// A `HalfEdge` and its sibling are equal but opposite. Specifically this means
/// that both refer to the same curve; that the sibling has the same, but
/// inverted, boundary; and that both are bound by the same vertices, though
/// their start vertices are different.
///
///
/// [`Cycle`]: crate::objects::Cycle
/// [`Shell`]: crate::objects::Shell
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct HalfEdge {
path: SurfacePath,
boundary: CurveBoundary<Point<1>>,
curve: HandleWrapper<Curve>,
start_vertex: HandleWrapper<Vertex>,
}
impl HalfEdge {
/// Create an instance of `Edge`
pub fn new(
path: SurfacePath,
boundary: impl Into<CurveBoundary<Point<1>>>,
curve: Handle<Curve>,
start_vertex: Handle<Vertex>,
) -> Self {
Self {
path,
boundary: boundary.into(),
curve: curve.into(),
start_vertex: start_vertex.into(),
}
}
/// Access the curve that defines the edge's geometry
pub fn path(&self) -> SurfacePath {
self.path
}
/// Access the boundary points of the edge on the curve
pub fn boundary(&self) -> CurveBoundary<Point<1>> {
self.boundary
}
/// Access the curve of the edge
pub fn curve(&self) -> &Handle<Curve> {
&self.curve
}
/// Access the vertex from where this edge starts
pub fn start_vertex(&self) -> &Handle<Vertex> {
&self.start_vertex
}
/// Compute the surface position where the edge starts
pub fn start_position(&self) -> Point<2> {
// Computing the surface position from the curve position is fine.
// `Edge` "owns" its start position. There is no competing code that
// could compute the surface position from slightly different data.
let [start, _] = self.boundary.inner;
self.path.point_from_path_coords(start)
}
}

View File

@ -0,0 +1,29 @@
use crate::{
Core,
geometry::Path,
operations::{geometry::UpdateCurveGeometry, insert::Insert},
storage::Handle,
topology::{Curve, Surface},
};
/// Build a [`Curve`]
///
/// See [module-level documentation] for context.
///
/// [module-level documentation]: super
pub trait BuildCurve {
/// Build a curve from the provided path and surface
fn from_path_and_surface(
path: Path<2>,
surface: Handle<Surface>,
core: &mut Core,
) -> Handle<Curve> {
Curve::new().insert(core).make_path_on_surface(
path,
surface,
&mut core.layers.geometry,
)
}
}
impl BuildCurve for Curve {}

View File

@ -1,10 +1,12 @@
use fj_math::{Point, Scalar};
use fj_math::{Point, Scalar, Vector};
use itertools::Itertools;
use crate::{
objects::{Cycle, HalfEdge},
operations::{build::BuildHalfEdge, update::UpdateCycle},
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::build::BuildHalfEdge,
storage::Handle,
topology::{Cycle, HalfEdge, Surface},
};
/// Build a [`Cycle`]
@ -18,32 +20,104 @@ pub trait BuildCycle {
Cycle::new([])
}
/// Build a circle
/// # Build a cycle from half-edges and associated curve boundaries
fn from_half_edges_and_boundaries<I>(
half_edges_and_boundaries: I,
core: &mut Core,
) -> Cycle
where
I: IntoIterator<Item = (Handle<HalfEdge>, CurveBoundary<Point<1>>)>,
I::IntoIter: Clone + ExactSizeIterator,
{
let half_edges = half_edges_and_boundaries
.into_iter()
.circular_tuple_windows()
.map(|((half_edge, boundary), (next_half_edge, _))| {
let [start, end] = boundary.inner;
core.layers.geometry.define_vertex(
half_edge.start_vertex().clone(),
half_edge.curve().clone(),
LocalVertexGeom { position: start },
);
core.layers.geometry.define_vertex(
next_half_edge.start_vertex().clone(),
half_edge.curve().clone(),
LocalVertexGeom { position: end },
);
half_edge
});
Cycle::new(half_edges)
}
/// # Build a circle
///
/// This circle is built out of 4 distinct arcs.
///
/// ## Implementation Note
///
/// The cycle can't be built out of a single half-edge. That would be
/// invalid although there's no validation check to document and enforce
/// that yet. Please refer to the following issue for more information:
/// <https://github.com/hannobraun/fornjot/issues/2374>
///
/// The cycle is built out of 4 arcs specifically, because that's easier to
/// implement than three, and building it out of two creates geometry that
/// the cycle winding code can't handle right now. The following issue has
/// more information on the cycle winding problems:
/// <https://github.com/hannobraun/fornjot/issues/2130>
fn circle(
center: impl Into<Point<2>>,
radius: impl Into<Scalar>,
surface: Handle<Surface>,
core: &mut Core,
) -> Cycle {
let circle = HalfEdge::circle(center, radius, core);
Cycle::empty().add_half_edges([circle], core)
let center = center.into();
let radius = radius.into();
let radius_right = Vector::from([radius, Scalar::ZERO]);
let radius_up = Vector::from([Scalar::ZERO, radius]);
let a = center + radius_right;
let b = center + radius_up;
let c = center - radius_right;
let d = center - radius_up;
let angle = Scalar::TAU / 4.;
let half_edges_and_boundaries = [[a, b], [b, c], [c, d], [d, a]]
.into_iter()
.map(|[start, end]| {
HalfEdge::arc(start, end, angle, surface.clone(), core)
})
.collect::<Vec<_>>();
Self::from_half_edges_and_boundaries(half_edges_and_boundaries, core)
}
/// Build a polygon
fn polygon<P, Ps>(points: Ps, core: &mut Core) -> Cycle
fn polygon<P, Ps>(
points: Ps,
surface: Handle<Surface>,
core: &mut Core,
) -> Cycle
where
P: Into<Point<2>>,
Ps: IntoIterator<Item = P>,
Ps::IntoIter: Clone + ExactSizeIterator,
{
let edges = points
let half_edges_and_boundaries = points
.into_iter()
.map(Into::into)
.circular_tuple_windows()
.map(|(start, end)| {
HalfEdge::line_segment([start, end], None, core)
});
HalfEdge::line_segment([start, end], surface.clone(), core)
})
.collect::<Vec<_>>();
Cycle::new(edges)
Self::from_half_edges_and_boundaries(half_edges_and_boundaries, core)
}
}

View File

@ -1,16 +1,15 @@
use std::{array, borrow::Borrow};
use fj_interop::ext::ArrayExt;
use fj_math::{Point, Scalar};
use crate::{
objects::{Cycle, Face, HalfEdge, Region, Surface, Vertex},
Core,
operations::{
build::{BuildCycle, BuildRegion, BuildSurface},
insert::{Insert, IsInserted, IsInsertedNo},
},
storage::Handle,
Core,
topology::{Cycle, Face, HalfEdge, Region, Surface, Vertex},
};
/// Build a [`Face`]
@ -33,7 +32,8 @@ pub trait BuildFace {
radius: impl Into<Scalar>,
core: &mut Core,
) -> Face {
let region = Region::circle(center, radius, core).insert(core);
let region =
Region::circle(center, radius, surface.clone(), core).insert(core);
Face::new(surface, region)
}
@ -60,7 +60,7 @@ pub trait BuildFace {
array
};
let vertices = half_edges
.each_ref_ext()
.each_ref()
.map(|edge: &Handle<HalfEdge>| edge.start_vertex().clone());
Polygon {
@ -81,7 +81,8 @@ pub trait BuildFace {
Ps: IntoIterator<Item = P>,
Ps::IntoIter: Clone + ExactSizeIterator,
{
let region = Region::polygon(points, core).insert(core);
let region =
Region::polygon(points, surface.clone(), core).insert(core);
Face::new(surface, region)
}
}

View File

@ -1,12 +1,11 @@
use fj_interop::ext::ArrayExt;
use fj_math::{Arc, Point, Scalar};
use crate::{
geometry::{CurveBoundary, HalfEdgeGeometry, SurfacePath},
objects::{Curve, HalfEdge, Vertex},
operations::insert::Insert,
storage::Handle,
Core,
geometry::{CurveBoundary, LocalCurveGeom, Path},
operations::{geometry::UpdateCurveGeometry, insert::Insert},
storage::Handle,
topology::{Curve, HalfEdge, Surface, Vertex},
};
/// Build a [`HalfEdge`]
@ -16,15 +15,11 @@ use crate::{
/// [module-level documentation]: super
pub trait BuildHalfEdge {
/// Create a half-edge that is not joined to a sibling
fn unjoined(
path: SurfacePath,
boundary: impl Into<CurveBoundary<Point<1>>>,
core: &mut Core,
) -> HalfEdge {
fn unjoined(core: &mut Core) -> HalfEdge {
let curve = Curve::new().insert(core);
let start_vertex = Vertex::new().insert(core);
HalfEdge::new(path, boundary, curve, start_vertex)
HalfEdge::new(curve, start_vertex)
}
/// Create a half-edge from its sibling
@ -33,22 +28,7 @@ pub trait BuildHalfEdge {
start_vertex: Handle<Vertex>,
core: &mut Core,
) -> Handle<HalfEdge> {
let half_edge = HalfEdge::new(
core.layers.geometry.of_half_edge(sibling).path,
sibling.boundary().reverse(),
sibling.curve().clone(),
start_vertex,
)
.insert(core);
core.layers.geometry.define_half_edge(
half_edge.clone(),
HalfEdgeGeometry {
path: core.layers.geometry.of_half_edge(sibling).path,
},
);
half_edge
HalfEdge::new(sibling.curve().clone(), start_vertex).insert(core)
}
/// Create an arc
@ -60,8 +40,9 @@ pub trait BuildHalfEdge {
start: impl Into<Point<2>>,
end: impl Into<Point<2>>,
angle_rad: impl Into<Scalar>,
surface: Handle<Surface>,
core: &mut Core,
) -> Handle<HalfEdge> {
) -> (Handle<HalfEdge>, CurveBoundary<Point<1>>) {
let angle_rad = angle_rad.into();
if angle_rad <= -Scalar::TAU || angle_rad >= Scalar::TAU {
panic!("arc angle must be in the range (-2pi, 2pi) radians");
@ -69,55 +50,41 @@ pub trait BuildHalfEdge {
let arc = Arc::from_endpoints_and_angle(start, end, angle_rad);
let path =
SurfacePath::circle_from_center_and_radius(arc.center, arc.radius);
let boundary =
[arc.start_angle, arc.end_angle].map(|coord| Point::from([coord]));
let path = Path::circle_from_center_and_radius(arc.center, arc.radius);
let boundary = CurveBoundary {
inner: [arc.start_angle, arc.end_angle]
.map(|coord| Point::from([coord])),
};
let half_edge = HalfEdge::unjoined(path, boundary, core).insert(core);
core.layers
.geometry
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
let half_edge = HalfEdge::unjoined(core).insert(core);
half_edge
}
core.layers.geometry.define_curve(
half_edge.curve().clone(),
surface,
LocalCurveGeom { path },
);
/// Create a circle
fn circle(
center: impl Into<Point<2>>,
radius: impl Into<Scalar>,
core: &mut Core,
) -> Handle<HalfEdge> {
let path = SurfacePath::circle_from_center_and_radius(center, radius);
let boundary =
[Scalar::ZERO, Scalar::TAU].map(|coord| Point::from([coord]));
let half_edge = HalfEdge::unjoined(path, boundary, core).insert(core);
core.layers
.geometry
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
half_edge
(half_edge, boundary)
}
/// Create a line segment
fn line_segment(
points_surface: [impl Into<Point<2>>; 2],
boundary: Option<[Point<1>; 2]>,
surface: Handle<Surface>,
core: &mut Core,
) -> Handle<HalfEdge> {
let boundary =
boundary.unwrap_or_else(|| [[0.], [1.]].map(Point::from));
let path = SurfacePath::line_from_points_with_coords(
boundary.zip_ext(points_surface),
) -> (Handle<HalfEdge>, CurveBoundary<Point<1>>) {
let boundary = CurveBoundary::default();
let half_edge = HalfEdge::unjoined(core).insert(core);
half_edge.curve().clone().make_line_on_surface(
points_surface,
boundary,
surface.clone(),
&mut core.layers.geometry,
);
let half_edge = HalfEdge::unjoined(path, boundary, core).insert(core);
core.layers
.geometry
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
half_edge
(half_edge, boundary)
}
}

View File

@ -17,6 +17,7 @@
//! the top-level object itself, but also to the other objects that make up its
//! components.
mod curve;
mod cycle;
mod face;
mod half_edge;
@ -27,6 +28,7 @@ mod solid;
mod surface;
pub use self::{
curve::BuildCurve,
cycle::BuildCycle,
face::{BuildFace, Polygon},
half_edge::BuildHalfEdge,

View File

@ -1,9 +1,10 @@
use fj_math::{Point, Scalar};
use crate::{
objects::{Cycle, Region},
operations::{build::BuildCycle, insert::Insert},
Core,
operations::{build::BuildCycle, insert::Insert},
storage::Handle,
topology::{Cycle, Region, Surface},
};
/// Build a [`Region`]
@ -24,20 +25,26 @@ pub trait BuildRegion {
fn circle(
center: impl Into<Point<2>>,
radius: impl Into<Scalar>,
surface: Handle<Surface>,
core: &mut Core,
) -> Region {
let exterior = Cycle::circle(center, radius, core).insert(core);
let exterior =
Cycle::circle(center, radius, surface, core).insert(core);
Region::new(exterior, [])
}
/// Build a polygon
fn polygon<P, Ps>(points: Ps, core: &mut Core) -> Region
fn polygon<P, Ps>(
points: Ps,
surface: Handle<Surface>,
core: &mut Core,
) -> Region
where
P: Into<Point<2>>,
Ps: IntoIterator<Item = P>,
Ps::IntoIter: Clone + ExactSizeIterator,
{
let exterior = Cycle::polygon(points, core).insert(core);
let exterior = Cycle::polygon(points, surface, core).insert(core);
Region::new(exterior, [])
}
}

View File

@ -4,11 +4,11 @@ use fj_interop::ext::ArrayExt;
use fj_math::Point;
use crate::{
geometry::CurveBoundary,
objects::{Curve, Face, HalfEdge, Shell, Surface, Vertex},
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::{
build::{BuildFace, BuildHalfEdge, BuildSurface, Polygon},
geometry::UpdateHalfEdgeGeometry,
geometry::UpdateCurveGeometry,
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
join::JoinCycle,
reverse::ReverseCurveCoordinateSystems,
@ -16,7 +16,7 @@ use crate::{
UpdateCycle, UpdateFace, UpdateHalfEdge, UpdateRegion, UpdateShell,
},
},
Core,
topology::{Curve, Face, HalfEdge, Shell, Surface, Vertex},
};
/// Build a [`Shell`]
@ -70,11 +70,7 @@ pub trait BuildShell {
.cloned()
.unwrap_or_else(|| {
let curve = Curve::new().insert(core);
let boundary =
CurveBoundary::<Point<1>>::from([
[0.],
[1.],
]);
let boundary = CurveBoundary::default();
curves.insert(
vertices,
@ -86,29 +82,49 @@ pub trait BuildShell {
});
let half_edges = {
let vertices = [a, b, c].map(Clone::clone);
let vertices = [[a, b], [b, c], [c, a]];
let [a, b, c] = [[0., 0.], [1., 0.], [0., 1.]];
vertices
.zip_ext([[a, b], [b, c], [c, a]])
.zip_ext(curves_and_boundaries)
.map(|((vertex, positions), (curve, boundary))| {
let half_edge = HalfEdge::line_segment(
positions,
Some(boundary.reverse().inner),
core,
);
half_edge
.update_start_vertex(|_, _| vertex, core)
.update_curve(|_, _| curve, core)
.insert(core)
.set_path(
core.layers
.geometry
.of_half_edge(&half_edge)
.path,
.map(
|(
([vertex, vertex_next], positions),
(curve, boundary),
)| {
let boundary = boundary.reverse();
let curve = curve.make_line_on_surface(
positions,
boundary,
surface.clone(),
&mut core.layers.geometry,
)
})
);
core.layers.geometry.define_vertex(
vertex.clone(),
curve.clone(),
LocalVertexGeom {
position: boundary.inner[0],
},
);
core.layers.geometry.define_vertex(
vertex_next.clone(),
curve.clone(),
LocalVertexGeom {
position: boundary.inner[1],
},
);
HalfEdge::unjoined(core)
.update_start_vertex(
|_, _| vertex.clone(),
core,
)
.update_curve(|_, _| curve.clone(), core)
.insert(core)
},
)
};
Face::unbound(surface, core).update_region(
@ -153,123 +169,192 @@ pub trait BuildShell {
let [a, b, c, d] = points.map(Into::into);
let abc = Face::triangle([a, b, c], core);
let bad = Face::triangle([b, a, d], core).update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(0),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.join_to(
abc.face.region().exterior(),
0..=0,
0..=0,
core,
)
},
core,
)
},
core,
);
let dac = Face::triangle([d, a, c], core).update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(1),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.join_to(
abc.face.region().exterior(),
1..=1,
2..=2,
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(0),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.join_to(
bad.face.region().exterior(),
0..=0,
1..=1,
core,
)
},
core,
)
},
core,
);
let cbd = Face::triangle([c, b, d], core).update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(0),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(1),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(2),
|edge, core| {
[edge
.reverse_curve_coordinate_systems(core)]
},
core,
)
.join_to(
abc.face.region().exterior(),
0..=0,
1..=1,
core,
)
.join_to(
bad.face.region().exterior(),
1..=1,
2..=2,
core,
)
.join_to(
dac.face.region().exterior(),
2..=2,
2..=2,
core,
)
},
core,
)
},
core,
);
let bad = {
let bad = Face::triangle([b, a, d], core);
bad.update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(0),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(1)
.start_vertex(),
bad.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.join_to(
abc.face.region().exterior(),
0..=0,
0..=0,
bad.face.surface().clone(),
core,
)
},
core,
)
},
core,
)
};
let dac = {
let dac = Face::triangle([d, a, c], core);
dac.update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(1),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(2)
.start_vertex(),
dac.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.join_to(
abc.face.region().exterior(),
1..=1,
2..=2,
dac.face.surface().clone(),
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(0),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(1)
.start_vertex(),
dac.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.join_to(
bad.face.region().exterior(),
0..=0,
1..=1,
dac.face.surface().clone(),
core,
)
},
core,
)
},
core,
)
};
let cbd = {
let cbd = Face::triangle([c, b, d], core);
cbd.update_region(
|region, core| {
region.update_exterior(
|cycle, core| {
cycle
.update_half_edge(
cycle.half_edges().nth_circular(0),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(1)
.start_vertex(),
cbd.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(1),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(2)
.start_vertex(),
cbd.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.update_half_edge(
cycle.half_edges().nth_circular(2),
|half_edge, core| {
[(
half_edge,
cycle
.half_edges()
.nth_circular(3)
.start_vertex(),
cbd.face.surface(),
)
.reverse_curve_coordinate_systems(
core,
)]
},
core,
)
.join_to(
abc.face.region().exterior(),
0..=0,
1..=1,
cbd.face.surface().clone(),
core,
)
.join_to(
bad.face.region().exterior(),
1..=1,
2..=2,
cbd.face.surface().clone(),
core,
)
.join_to(
dac.face.region().exterior(),
2..=2,
2..=2,
cbd.face.surface().clone(),
core,
)
},
core,
)
},
core,
)
};
let triangles =
[abc, bad, dac, cbd].map(|triangle| triangle.insert(core));

View File

@ -1,4 +1,12 @@
use crate::objects::Sketch;
use fj_math::{Point, Scalar};
use crate::{
Core,
operations::update::UpdateSketch,
topology::{Region, Sketch, Topology},
};
use super::BuildRegion;
/// Build a [`Sketch`]
///
@ -7,8 +15,40 @@ use crate::objects::Sketch;
/// [module-level documentation]: super
pub trait BuildSketch {
/// Create a sketch with no regions
fn empty() -> Sketch {
Sketch::new([])
fn empty(topology: &Topology) -> Sketch {
Sketch::new(topology.surfaces.space_2d(), [])
}
/// Build a circle
fn circle(
center: impl Into<Point<2>>,
radius: impl Into<Scalar>,
core: &mut Core,
) -> Sketch {
let sketch = Sketch::empty(&core.layers.topology);
sketch.add_regions(
[Region::circle(
center,
radius,
sketch.surface().clone(),
core,
)],
core,
)
}
/// Build a polygon
fn polygon<P, Ps>(points: Ps, core: &mut Core) -> Sketch
where
P: Into<Point<2>>,
Ps: IntoIterator<Item = P>,
Ps::IntoIter: Clone + ExactSizeIterator,
{
let sketch = Sketch::empty(&core.layers.topology);
sketch.add_regions(
[Region::polygon(points, sketch.surface().clone(), core)],
core,
)
}
}

View File

@ -1,13 +1,13 @@
use fj_math::Point;
use crate::{
objects::{Shell, Solid},
Core,
operations::{
build::{BuildShell, TetrahedronShell},
insert::{Insert, IsInsertedYes},
update::UpdateSolid,
},
Core,
topology::{Shell, Solid},
};
/// Build a [`Solid`]

View File

@ -1,11 +1,13 @@
use fj_math::{Point, Scalar, Vector};
use crate::{
geometry::{GlobalPath, SurfaceGeometry},
objects::Surface,
Core,
geometry::{
Path, SurfaceGeom, repr::tri_mesh::TriMesh, surfaces::SweptCurve,
},
operations::insert::Insert,
storage::Handle,
Core,
topology::Surface,
};
/// Build a [`Surface`]
@ -14,6 +16,42 @@ use crate::{
///
/// [module-level documentation]: super
pub trait BuildSurface {
/// Build a surface from the provided geometry
fn from_geometry(
generator: SweptCurve,
core: &mut Core,
) -> Handle<Surface> {
let surface = Surface::new().insert(core);
core.layers
.geometry
.define_surface(surface.clone(), generator);
core.layers.geometry.define_surface_2(
surface.clone(),
SurfaceGeom {
generator: Box::new(generator),
geometry: TriMesh::empty(),
},
);
surface
}
/// Build a surface from the provided `u` and `v`
fn from_uv(
u: impl Into<Path<3>>,
v: impl Into<Vector<3>>,
core: &mut Core,
) -> Handle<Surface> {
Self::from_geometry(
SweptCurve {
u: u.into(),
v: v.into(),
},
core,
)
}
/// Build a plane from the provided points
fn plane_from_points(
points: [impl Into<Point<3>>; 3],
@ -21,10 +59,10 @@ pub trait BuildSurface {
) -> (Handle<Surface>, [Point<2>; 3]) {
let [a, b, c] = points.map(Into::into);
let (u, u_line) = GlobalPath::line_from_points([a, b]);
let (u, u_line) = Path::line_from_points([a, b]);
let v = c - a;
let surface = Surface::surface_from_uv(u, v, core);
let surface = Surface::from_uv(u, v, core);
let points_surface = {
let [a, b] =
@ -36,25 +74,6 @@ pub trait BuildSurface {
(surface, points_surface)
}
/// Build a plane from the provided `u` and `v`
fn surface_from_uv(
u: impl Into<GlobalPath>,
v: impl Into<Vector<3>>,
core: &mut Core,
) -> Handle<Surface> {
let surface = Surface::new().insert(core);
core.layers.geometry.define_surface(
surface.clone(),
SurfaceGeometry {
u: u.into(),
v: v.into(),
},
);
surface
}
}
impl BuildSurface for Surface {}

View File

@ -3,9 +3,9 @@
//! See [`DeriveFrom`].
use crate::{
objects::{AnyObject, Stored},
storage::Handle,
Core,
storage::Handle,
topology::{AnyObject, Stored},
};
/// Mark a store object as derived from another

View File

@ -0,0 +1,84 @@
use fj_interop::ext::ArrayExt;
use fj_math::Point;
use crate::{
geometry::{CurveBoundary, Geometry, LocalCurveGeom, Path},
layers::Layer,
storage::Handle,
topology::{Curve, Surface},
};
/// Update the geometry of a [`Curve`]
pub trait UpdateCurveGeometry {
/// Copy the geometry of the provided curve
fn copy_geometry_from(
self,
curve: &Handle<Curve>,
geometry: &mut Layer<Geometry>,
) -> Self;
/// Define the geometry as a path on a surface
fn make_path_on_surface(
self,
path: Path<2>,
surface: Handle<Surface>,
geometry: &mut Layer<Geometry>,
) -> Self;
/// Define the geometry as a line
///
/// The line is constructed from two points on the provided surface.
///
/// Optionally the coordinates of those points on the curve can be supplied.
/// If those are not provided, it is assumed that the provided surface
/// points have the curve coordinates `0` and `1`.
fn make_line_on_surface(
self,
points_surface: [impl Into<Point<2>>; 2],
points_curve: CurveBoundary<Point<1>>,
surface: Handle<Surface>,
geometry: &mut Layer<Geometry>,
) -> Self;
}
impl UpdateCurveGeometry for Handle<Curve> {
fn copy_geometry_from(
self,
curve: &Handle<Curve>,
geometry: &mut Layer<Geometry>,
) -> Self {
let curve_geom = geometry.of_curve(curve).cloned();
if let Some(curve_geom) = curve_geom {
for (surface, local_definition) in curve_geom.definitions {
geometry.define_curve(self.clone(), surface, local_definition);
}
}
self
}
fn make_path_on_surface(
self,
path: Path<2>,
surface: Handle<Surface>,
geometry: &mut Layer<Geometry>,
) -> Self {
geometry.define_curve(self.clone(), surface, LocalCurveGeom { path });
self
}
fn make_line_on_surface(
self,
points_surface: [impl Into<Point<2>>; 2],
points_curve: CurveBoundary<Point<1>>,
surface: Handle<Surface>,
geometry: &mut Layer<Geometry>,
) -> Self {
let path = Path::line_from_points_with_coords(
points_curve.inner.zip_ext(points_surface),
);
self.make_path_on_surface(path, surface, geometry)
}
}

View File

@ -1,83 +0,0 @@
use fj_math::Point;
use crate::{
geometry::{CurveBoundary, Geometry, HalfEdgeGeometry, SurfacePath},
layers::Layer,
objects::HalfEdge,
operations::insert::Insert,
storage::Handle,
Core,
};
/// Update the geometry of a [`HalfEdge`]
pub trait UpdateHalfEdgeGeometry {
/// Set the path of the half-edge
fn set_path(
self,
path: SurfacePath,
geometry: &mut Layer<Geometry>,
) -> Self;
/// Update the path of the half-edge
#[must_use]
fn update_path(
&self,
update: impl FnOnce(SurfacePath) -> SurfacePath,
core: &mut Core,
) -> Self;
/// Update the boundary of the half-edge
#[must_use]
fn update_boundary(
&self,
update: impl FnOnce(CurveBoundary<Point<1>>) -> CurveBoundary<Point<1>>,
core: &mut Core,
) -> Self;
}
impl UpdateHalfEdgeGeometry for Handle<HalfEdge> {
fn set_path(
self,
path: SurfacePath,
geometry: &mut Layer<Geometry>,
) -> Self {
geometry.define_half_edge(self.clone(), HalfEdgeGeometry { path });
self
}
fn update_path(
&self,
update: impl FnOnce(SurfacePath) -> SurfacePath,
core: &mut Core,
) -> Self {
let path = update(core.layers.geometry.of_half_edge(self).path);
let half_edge = HalfEdge::new(
path,
self.boundary(),
self.curve().clone(),
self.start_vertex().clone(),
)
.insert(core);
core.layers
.geometry
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
half_edge
}
fn update_boundary(
&self,
update: impl FnOnce(CurveBoundary<Point<1>>) -> CurveBoundary<Point<1>>,
core: &mut Core,
) -> Self {
HalfEdge::new(
core.layers.geometry.of_half_edge(self).path,
update(self.boundary()),
self.curve().clone(),
self.start_vertex().clone(),
)
.insert(core)
}
}

View File

@ -1,5 +1,5 @@
//! Operations to update the geometry of objects
mod half_edge;
mod curve;
pub use self::half_edge::UpdateHalfEdgeGeometry;
pub use self::curve::UpdateCurveGeometry;

View File

@ -3,16 +3,16 @@
use fj_math::{Point, Scalar, Vector};
use crate::{
objects::{Cycle, Face, HalfEdge, Region, Shell},
storage::Handle,
Core,
geometry::repr::tri_mesh::convert_point_surface_to_global,
storage::Handle,
topology::{Cycle, Face, Region, Shell},
};
use super::{
build::{BuildCycle, BuildHalfEdge, BuildRegion},
join::JoinCycle,
build::{BuildCycle, BuildRegion},
sweep::{SweepCache, SweepRegion},
update::{UpdateCycle, UpdateFace, UpdateRegion, UpdateShell},
update::{UpdateFace, UpdateRegion, UpdateShell},
};
/// Add a hole to a [`Shell`]
@ -43,14 +43,16 @@ impl AddHole for Shell {
path: impl Into<Vector<3>>,
core: &mut Core,
) -> Self {
let entry = HalfEdge::circle(location.position, radius, core);
let entry = Cycle::circle(
location.position,
radius,
location.face.surface().clone(),
core,
);
let hole = Region::empty(core)
.update_exterior(
|_, core| Cycle::empty().add_half_edges([entry.clone()], core),
core,
)
.update_exterior(|_, _| entry.clone(), core)
.sweep_region(
location.face.surface(),
location.face.surface().clone(),
None,
path,
&mut SweepCache::default(),
@ -63,22 +65,7 @@ impl AddHole for Shell {
location.face,
|face, core| {
[face.update_region(
|region, core| {
region.add_interiors(
[Cycle::empty().add_joined_edges(
[(
entry.clone(),
core.layers
.geometry
.of_half_edge(&entry)
.path,
entry.boundary(),
)],
core,
)],
core,
)
},
|region, core| region.add_interiors([entry], core),
core,
)]
},
@ -95,14 +82,26 @@ impl AddHole for Shell {
) -> Self {
let radius = radius.into();
let entry = HalfEdge::circle(entry_location.position, radius, core);
let entry = Cycle::circle(
entry_location.position,
radius,
entry_location.face.surface().clone(),
core,
);
let path = {
let point = |location: &HoleLocation| {
core.layers
.geometry
.of_surface(location.face.surface())
.point_from_surface_coords(location.position)
convert_point_surface_to_global(
&core
.layers
.geometry
.of_surface_2(location.face.surface())
.unwrap()
.generator,
location.position,
core.tolerance(),
&core.layers.geometry,
)
};
let entry_point = point(&entry_location);
@ -112,12 +111,9 @@ impl AddHole for Shell {
};
let swept_region = Region::empty(core)
.update_exterior(
|_, core| Cycle::empty().add_half_edges([entry.clone()], core),
core,
)
.update_exterior(|_, _| entry.clone(), core)
.sweep_region(
entry_location.face.surface(),
entry_location.face.surface().clone(),
None,
path,
&mut SweepCache::default(),
@ -126,33 +122,13 @@ impl AddHole for Shell {
let hole = swept_region.side_faces.into_iter().collect::<Vec<_>>();
let exit = swept_region
.top_face
.region()
.exterior()
.half_edges()
.only();
let exit = swept_region.top_face.region().exterior();
self.update_face(
entry_location.face,
|face, core| {
[face.update_region(
|region, core| {
region.add_interiors(
[Cycle::empty().add_joined_edges(
[(
entry.clone(),
core.layers
.geometry
.of_half_edge(&entry)
.path,
entry.boundary(),
)],
core,
)],
core,
)
},
|region, core| region.add_interiors([entry], core),
core,
)]
},
@ -163,20 +139,21 @@ impl AddHole for Shell {
|face, core| {
[face.update_region(
|region, core| {
region.add_interiors(
[Cycle::empty().add_joined_edges(
[(
exit.clone(),
core.layers
.geometry
.of_half_edge(exit)
.path,
exit.boundary(),
)],
core,
)],
core,
)
for half_edge in exit.half_edges() {
let geometry = core
.layers
.geometry
.of_curve(half_edge.curve())
.unwrap()
.local_on(swept_region.top_face.surface())
.unwrap();
core.layers.geometry.define_curve(
half_edge.curve().clone(),
exit_location.face.surface().clone(),
geometry.clone(),
);
}
region.add_interiors([exit.clone()], core)
},
core,
)]

View File

@ -1,11 +1,11 @@
use crate::{
objects::{
Core,
operations::build::{Polygon, TetrahedronShell},
storage::Handle,
topology::{
Curve, Cycle, Face, HalfEdge, Region, Shell, Sketch, Solid, Surface,
Vertex,
},
operations::build::{Polygon, TetrahedronShell},
storage::Handle,
Core,
};
use super::{IsInsertedNo, IsInsertedYes};
@ -38,11 +38,11 @@ macro_rules! impl_insert {
type Inserted = Handle<Self>;
fn insert(self, core: &mut Core) -> Self::Inserted {
let handle = core.layers.objects.$store.reserve();
let handle = core.layers.topology.$store.reserve();
let object = (handle.clone(), self).into();
core.layers.objects.insert(
core.layers.topology.insert(
object,
&core.layers.geometry,
&mut core.layers.geometry,
&mut core.layers.validation,
);
handle

View File

@ -1,30 +1,43 @@
use std::ops::RangeInclusive;
use fj_math::Point;
use itertools::Itertools;
use crate::{
geometry::{CurveBoundary, HalfEdgeGeometry, SurfacePath},
objects::{Cycle, HalfEdge},
Core,
geometry::LocalCurveGeom,
operations::{
build::BuildHalfEdge,
geometry::UpdateHalfEdgeGeometry,
insert::Insert,
update::{UpdateCycle, UpdateHalfEdge},
},
storage::Handle,
Core,
topology::{Cycle, HalfEdge, Surface},
};
/// Join a [`Cycle`] to another
pub trait JoinCycle {
/// Add half-edges to the cycle that are joined to the provided ones
/// Add new half-edges to the cycle that are joined to the provided ones
///
/// This method creates a new half-edge for each half-edge that is provided,
/// joins the new half-edge to the provided one, and adds the new half-edge
/// to the cycle.
///
/// Expects the provided half-edges to be in an unnatural order:
///
/// - This is the opposite order that they would appear in, in a cycle.
/// - Meaning each half-edge ends where the _previous_ one starts.
///
/// The geometry for each new half-edge needs to be provided as well. Also
/// requires the surface that the cycle is defined in.
#[must_use]
fn add_joined_edges<Es>(&self, edges: Es, core: &mut Core) -> Self
fn add_joined_half_edges<Es>(
&self,
half_edges: Es,
surface: Handle<Surface>,
core: &mut Core,
) -> Self
where
Es: IntoIterator<
Item = (Handle<HalfEdge>, SurfacePath, CurveBoundary<Point<1>>),
>,
Es: IntoIterator<Item = (Handle<HalfEdge>, LocalCurveGeom)>,
Es::IntoIter: Clone + ExactSizeIterator;
/// Join the cycle to another
@ -74,33 +87,42 @@ pub trait JoinCycle {
other: &Cycle,
range: RangeInclusive<usize>,
other_range: RangeInclusive<usize>,
surface_self: Handle<Surface>,
core: &mut Core,
) -> Self;
}
impl JoinCycle for Cycle {
fn add_joined_edges<Es>(&self, edges: Es, core: &mut Core) -> Self
fn add_joined_half_edges<Es>(
&self,
half_edges: Es,
surface: Handle<Surface>,
core: &mut Core,
) -> Self
where
Es: IntoIterator<
Item = (Handle<HalfEdge>, SurfacePath, CurveBoundary<Point<1>>),
>,
Es: IntoIterator<Item = (Handle<HalfEdge>, LocalCurveGeom)>,
Es::IntoIter: Clone + ExactSizeIterator,
{
let half_edges = edges
let half_edges = half_edges
.into_iter()
.circular_tuple_windows()
.map(|((prev_half_edge, _, _), (half_edge, path, boundary))| {
let half_edge = HalfEdge::unjoined(path, boundary, core)
// If you're confused about the naming of `next_half_edge` and/or
// the relative order of `half_edge`/`next_half_edge`, please refer
// to the documentation of this method. This matches the order it
// expects half-edges in.
.map(|((next_half_edge, _), (half_edge, curve_geom))| {
let half_edge = HalfEdge::unjoined(core)
.update_curve(|_, _| half_edge.curve().clone(), core)
.update_start_vertex(
|_, _| prev_half_edge.start_vertex().clone(),
|_, _| next_half_edge.start_vertex().clone(),
core,
)
.insert(core);
core.layers.geometry.define_half_edge(
half_edge.clone(),
HalfEdgeGeometry { path },
core.layers.geometry.define_curve(
half_edge.curve().clone(),
surface.clone(),
curve_geom,
);
half_edge
@ -114,6 +136,7 @@ impl JoinCycle for Cycle {
other: &Cycle,
range: RangeInclusive<usize>,
range_other: RangeInclusive<usize>,
surface_self: Handle<Surface>,
core: &mut Core,
) -> Self {
assert_eq!(
@ -125,54 +148,145 @@ impl JoinCycle for Cycle {
range.zip(range_other).fold(
self.clone(),
|cycle, (index, index_other)| {
let edge_other = other.half_edges().nth_circular(index_other);
let half_edge = self.half_edges().nth_circular(index);
let half_edge_next = self.half_edges().nth_circular(index + 1);
let half_edge_other =
other.half_edges().nth_circular(index_other);
let half_edge_other_next =
other.half_edges().nth_circular(index_other + 1);
cycle
.update_half_edge(
self.half_edges().nth_circular(index),
half_edge,
|half_edge, core| {
// The curve of the other half-edge we're joining
// this one to already has a curve geometry,
// presumably. But it might not have a local
// definition for the surface that *this* half-edge
// is in.
//
// We need to make sure that any local definition
// that our current curve already has, moves over to
// the new one.
let curve_geom = core
.layers
.geometry
.of_curve(half_edge.curve())
.and_then(|curve_geom| {
curve_geom.local_on(&surface_self)
});
if let Some(curve_geom) = curve_geom {
core.layers.geometry.define_curve(
half_edge_other.curve().clone(),
surface_self.clone(),
curve_geom.clone(),
);
}
// The same goes for vertices. We have to move over
// any local definitions we have to the other
// vertices.
let vertex_geom_prev_end = core
.layers
.geometry
.of_vertex(half_edge.start_vertex())
.and_then(|vertex_geom| {
vertex_geom.local_on(
self.half_edges()
.before(half_edge)
.unwrap()
.curve(),
)
})
.cloned();
let vertex_geom_start = core
.layers
.geometry
.of_vertex(half_edge.start_vertex())
.and_then(|vertex_geom| {
vertex_geom.local_on(half_edge.curve())
})
.cloned();
let vertex_geom_end = core
.layers
.geometry
.of_vertex(half_edge_next.start_vertex())
.and_then(|vertex_geom| {
vertex_geom.local_on(half_edge.curve())
})
.cloned();
if let Some(vertex_geom) = vertex_geom_prev_end {
core.layers.geometry.define_vertex(
half_edge_other_next.start_vertex().clone(),
self.half_edges()
.before(half_edge)
.unwrap()
.curve()
.clone(),
vertex_geom,
);
}
if let Some(vertex_geom_start) = vertex_geom_start {
core.layers.geometry.define_vertex(
half_edge_other_next.start_vertex().clone(),
half_edge_other.curve().clone(),
vertex_geom_start,
);
}
if let Some(vertex_geom_end) = vertex_geom_end {
core.layers.geometry.define_vertex(
half_edge_other.start_vertex().clone(),
half_edge_other.curve().clone(),
vertex_geom_end,
);
}
[half_edge
.update_curve(
|_, _| edge_other.curve().clone(),
|_, _| half_edge_other.curve().clone(),
core,
)
.update_start_vertex(
|_, _| {
other
.half_edges()
.nth_circular(index_other + 1)
half_edge_other_next
.start_vertex()
.clone()
},
core,
)
.insert(core)
.set_path(
core.layers
.geometry
.of_half_edge(half_edge)
.path,
&mut core.layers.geometry,
)]
.insert(core)]
},
core,
)
.update_half_edge(
self.half_edges().nth_circular(index + 1),
half_edge_next,
|half_edge, core| {
// And we need to move over the geometry for this
// vertex too.
let vertex_geom = core
.layers
.geometry
.of_vertex(half_edge_next.start_vertex())
.and_then(|vertex_geom| {
vertex_geom.local_on(half_edge_next.curve())
})
.cloned();
if let Some(vertex_geom) = vertex_geom {
core.layers.geometry.define_vertex(
half_edge_other.start_vertex().clone(),
half_edge.curve().clone(),
vertex_geom,
);
}
[half_edge
.update_start_vertex(
|_, _| edge_other.start_vertex().clone(),
|_, _| {
half_edge_other.start_vertex().clone()
},
core,
)
.insert(core)
.set_path(
core.layers
.geometry
.of_half_edge(half_edge)
.path,
&mut core.layers.geometry,
)]
.insert(core)]
},
core,
)

View File

@ -3,7 +3,7 @@
//! See [`Merge`], which is currently the only trait in this module, for more
//! information.
use crate::{objects::Solid, Core};
use crate::{Core, topology::Solid};
use super::update::UpdateSolid;

View File

@ -2,7 +2,7 @@
use fj_interop::Color;
use crate::{objects::Region, storage::Handle, Core};
use crate::{Core, storage::Handle, topology::Region};
/// Get the color of an object
pub trait GetColor {

View File

@ -1,12 +1,12 @@
use std::ops::Deref;
use crate::{
objects::{
Curve, Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid,
},
Core,
operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge},
storage::Handle,
Core,
topology::{
Curve, Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid,
},
};
use super::ReplaceOutput;
@ -151,7 +151,7 @@ impl ReplaceCurve for Sketch {
}
if replacement_happened {
ReplaceOutput::Updated(Sketch::new(regions))
ReplaceOutput::Updated(Sketch::new(self.surface().clone(), regions))
} else {
ReplaceOutput::Original(self.clone())
}

View File

@ -1,10 +1,10 @@
use std::ops::Deref;
use crate::{
objects::{Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid},
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
Core,
topology::{Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid},
};
use super::ReplaceOutput;
@ -117,7 +117,7 @@ impl ReplaceHalfEdge for Sketch {
}
if replacement_happened {
ReplaceOutput::Updated(Sketch::new(regions))
ReplaceOutput::Updated(Sketch::new(self.surface().clone(), regions))
} else {
ReplaceOutput::Original(self.clone())
}

View File

@ -1,12 +1,12 @@
use std::ops::Deref;
use crate::{
objects::{
Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, Vertex,
},
Core,
operations::{derive::DeriveFrom, insert::Insert, update::UpdateHalfEdge},
storage::Handle,
Core,
topology::{
Cycle, Face, HalfEdge, IsObject, Region, Shell, Sketch, Solid, Vertex,
},
};
use super::ReplaceOutput;
@ -153,7 +153,7 @@ impl ReplaceVertex for Sketch {
}
if replacement_happened {
ReplaceOutput::Updated(Sketch::new(regions))
ReplaceOutput::Updated(Sketch::new(self.surface().clone(), regions))
} else {
ReplaceOutput::Original(self.clone())
}
@ -317,7 +317,7 @@ impl ReplaceVertex for Handle<Sketch> {
}
if replacement_happened {
ReplaceOutput::Updated(Sketch::new(regions))
ReplaceOutput::Updated(Sketch::new(self.surface().clone(), regions))
} else {
ReplaceOutput::Original(self.clone())
}

View File

@ -0,0 +1,54 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Curve, Surface},
};
use super::ReverseCurveCoordinateSystems;
impl ReverseCurveCoordinateSystems for (&Handle<Curve>, &Handle<Surface>) {
type Reversed = Handle<Curve>;
fn reverse_curve_coordinate_systems(
self,
core: &mut Core,
) -> Self::Reversed {
// We don't *actually* need a surface here, because *all* local
// definitions need to be reversed in sync anyway. However, then this
// method couldn't be called in `HalfEdge`'s implementation, meaning the
// way this trait works had to change completely.
//
// At this point it's probably not worth it to re-architect the trait,
// since eventually, redundant geometry definitions shouldn't exist any
// more, and then the existence of this trait, at least in its current
// form, is in question anyway.
//
// Once the dust has settled, we can figure out what needs to happen
// here. In the meantime, we can have this weird implementation, and
// rely on the callers to make sure everything stays consistent.
//
// [1]: https://github.com/hannobraun/fornjot/issues/2290
let (curve, surface) = self;
let mut curve_geom = core
.layers
.geometry
.of_curve(curve)
.unwrap()
.local_on(surface)
.unwrap()
.clone();
curve_geom.path = curve_geom.path.reverse();
let curve = Curve::new().insert(core).derive_from(curve, core);
core.layers.geometry.define_curve(
curve.clone(),
surface.clone(),
curve_geom,
);
curve
}
}

View File

@ -1,11 +1,10 @@
use crate::{
geometry::HalfEdgeGeometry,
objects::{Cycle, HalfEdge},
operations::{derive::DeriveFrom, insert::Insert},
Core,
operations::{derive::DeriveFrom, insert::Insert},
topology::{Cycle, HalfEdge},
};
use super::{Reverse, ReverseCurveCoordinateSystems};
use super::Reverse;
impl Reverse for Cycle {
fn reverse(&self, core: &mut Core) -> Self {
@ -13,23 +12,12 @@ impl Reverse for Cycle {
.half_edges()
.pairs()
.map(|(current, next)| {
let half_edge = HalfEdge::new(
core.layers.geometry.of_half_edge(current).path,
current.boundary().reverse(),
HalfEdge::new(
current.curve().clone(),
next.start_vertex().clone(),
)
.insert(core)
.derive_from(current, core);
core.layers.geometry.define_half_edge(
half_edge.clone(),
HalfEdgeGeometry {
path: core.layers.geometry.of_half_edge(current).path,
},
);
half_edge
.derive_from(current, core)
})
.collect::<Vec<_>>();
@ -38,14 +26,3 @@ impl Reverse for Cycle {
Cycle::new(edges)
}
}
impl ReverseCurveCoordinateSystems for Cycle {
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let edges = self
.half_edges()
.iter()
.map(|edge| edge.reverse_curve_coordinate_systems(core));
Cycle::new(edges)
}
}

View File

@ -1,31 +0,0 @@
use crate::{
geometry::HalfEdgeGeometry,
objects::HalfEdge,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
Core,
};
use super::ReverseCurveCoordinateSystems;
impl ReverseCurveCoordinateSystems for Handle<HalfEdge> {
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let path = core.layers.geometry.of_half_edge(self).path.reverse();
let boundary = self.boundary().reverse();
let half_edge = HalfEdge::new(
path,
boundary,
self.curve().clone(),
self.start_vertex().clone(),
)
.insert(core)
.derive_from(self, core);
core.layers
.geometry
.define_half_edge(half_edge.clone(), HalfEdgeGeometry { path });
half_edge
}
}

View File

@ -1,16 +1,16 @@
use std::borrow::Borrow;
use crate::{
objects::Face,
Core,
operations::{
build::Polygon,
derive::DeriveFrom,
insert::{Insert, IsInsertedNo, IsInsertedYes},
},
Core,
topology::Face,
};
use super::{Reverse, ReverseCurveCoordinateSystems};
use super::Reverse;
impl Reverse for Face {
fn reverse(&self, core: &mut Core) -> Self {
@ -41,37 +41,3 @@ impl<const D: usize> Reverse for Polygon<D, IsInsertedYes> {
self.replace_face(face)
}
}
impl ReverseCurveCoordinateSystems for Face {
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let region = self
.region()
.reverse_curve_coordinate_systems(core)
.insert(core)
.derive_from(self.region(), core);
Face::new(self.surface().clone(), region)
}
}
impl<const D: usize> ReverseCurveCoordinateSystems
for Polygon<D, IsInsertedNo>
{
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let face = self.face.borrow().reverse_curve_coordinate_systems(core);
self.replace_face(face)
}
}
impl<const D: usize> ReverseCurveCoordinateSystems
for Polygon<D, IsInsertedYes>
{
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let face: &Face = self.face.borrow();
let face = face
.reverse_curve_coordinate_systems(core)
.insert(core)
.derive_from(&self.face, core);
self.replace_face(face)
}
}

View File

@ -0,0 +1,58 @@
use crate::{
Core,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{HalfEdge, Surface, Vertex},
};
use super::ReverseCurveCoordinateSystems;
impl ReverseCurveCoordinateSystems
for (&Handle<HalfEdge>, &Handle<Vertex>, &Handle<Surface>)
{
type Reversed = Handle<HalfEdge>;
fn reverse_curve_coordinate_systems(
self,
core: &mut Core,
) -> Self::Reversed {
let (half_edge, end_vertex, surface) = self;
let vertex_geom_start = core
.layers
.geometry
.of_vertex(half_edge.start_vertex())
.unwrap()
.local_on(half_edge.curve())
.unwrap()
.clone();
let vertex_geom_end = core
.layers
.geometry
.of_vertex(end_vertex)
.unwrap()
.local_on(half_edge.curve())
.unwrap()
.clone();
let curve =
(half_edge.curve(), surface).reverse_curve_coordinate_systems(core);
let half_edge = HalfEdge::new(curve, half_edge.start_vertex().clone())
.insert(core)
.derive_from(half_edge, core);
core.layers.geometry.define_vertex(
half_edge.start_vertex().clone(),
half_edge.curve().clone(),
vertex_geom_end,
);
core.layers.geometry.define_vertex(
end_vertex.clone(),
half_edge.curve().clone(),
vertex_geom_start,
);
half_edge
}
}

View File

@ -2,9 +2,10 @@
use crate::Core;
mod curve;
mod cycle;
mod edge;
mod face;
mod half_edge;
mod region;
/// Reverse the direction/orientation of an object
@ -16,9 +17,15 @@ pub trait Reverse {
/// Reverse the direction of the curve coordinate systems within an object
pub trait ReverseCurveCoordinateSystems {
/// The type of the reversed object
type Reversed;
/// Reverse the direction of the curve coordinate systems within an object
///
/// This will not have any effect on object positions in global coordinates.
#[must_use]
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self;
fn reverse_curve_coordinate_systems(
self,
core: &mut Core,
) -> Self::Reversed;
}

View File

@ -1,10 +1,10 @@
use crate::{
objects::Region,
operations::{derive::DeriveFrom, insert::Insert},
Core,
operations::{derive::DeriveFrom, insert::Insert},
topology::Region,
};
use super::{Reverse, ReverseCurveCoordinateSystems};
use super::Reverse;
impl Reverse for Region {
fn reverse(&self, core: &mut Core) -> Self {
@ -20,21 +20,3 @@ impl Reverse for Region {
Region::new(exterior, interiors)
}
}
impl ReverseCurveCoordinateSystems for Region {
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self {
let exterior = self
.exterior()
.reverse_curve_coordinate_systems(core)
.insert(core)
.derive_from(self.exterior(), core);
let interiors = self.interiors().iter().map(|cycle| {
cycle
.reverse_curve_coordinate_systems(core)
.insert(core)
.derive_from(cycle, core)
});
Region::new(exterior, interiors)
}
}

View File

@ -1,14 +1,14 @@
use fj_math::Point;
use crate::{
objects::{HalfEdge, Shell},
operations::{
derive::DeriveFrom, geometry::UpdateHalfEdgeGeometry, insert::Insert,
replace::ReplaceHalfEdge, split::SplitHalfEdge, update::UpdateHalfEdge,
},
queries::SiblingOfHalfEdge,
storage::Handle,
Core,
operations::{
insert::Insert, replace::ReplaceHalfEdge, split::SplitHalfEdge,
update::UpdateHalfEdge,
},
queries::{CycleOfHalfEdge, SiblingOfHalfEdge},
storage::Handle,
topology::{HalfEdge, Shell},
};
/// Split a pair of [`HalfEdge`]s into two
@ -40,35 +40,23 @@ impl SplitEdge for Shell {
.get_sibling_of(half_edge)
.expect("Expected half-edge and its sibling to be part of shell");
let [half_edge_a, half_edge_b] = half_edge
.split_half_edge(point, core)
.map(|half_edge_part| {
half_edge_part.insert(core).derive_from(half_edge, core)
});
let [half_edge_a, half_edge_b] = self
.find_cycle_of_half_edge(half_edge)
.expect("Expected half-edge to be part of shell")
.split_half_edge(half_edge, point, core);
let siblings = {
let [sibling_a, sibling_b] = sibling.split_half_edge(point, core);
let [sibling_a, sibling_b] =
sibling.cycle.split_half_edge(&sibling.sibling, point, core);
let sibling_b = sibling_b
.update_start_vertex(
|_, _| half_edge_b.start_vertex().clone(),
core,
)
.insert(core);
[sibling_a, sibling_b].map(|half_edge| {
half_edge.insert(core).derive_from(&sibling, core).set_path(
core.layers.geometry.of_half_edge(&sibling).path,
&mut core.layers.geometry,
)
})
};
let [half_edge_a, half_edge_b] =
[half_edge_a, half_edge_b].map(|half_edge_part| {
half_edge_part.set_path(
core.layers.geometry.of_half_edge(half_edge).path,
&mut core.layers.geometry,
)
});
[sibling_a, sibling_b]
};
let shell = self
.replace_half_edge(
@ -77,7 +65,7 @@ impl SplitEdge for Shell {
core,
)
.into_inner()
.replace_half_edge(&sibling, siblings.clone(), core)
.replace_half_edge(&sibling.sibling, siblings.clone(), core)
.into_inner();
(shell, [[half_edge_a, half_edge_b], siblings])

View File

@ -1,13 +1,12 @@
use fj_interop::ext::ArrayExt;
use fj_math::Point;
use itertools::Itertools;
use crate::{
objects::{Cycle, Face, HalfEdge, Shell},
Core,
geometry::LocalVertexGeom,
operations::{
build::{BuildCycle, BuildHalfEdge},
derive::DeriveFrom,
geometry::UpdateHalfEdgeGeometry,
insert::Insert,
split::SplitEdge,
update::{
@ -15,7 +14,7 @@ use crate::{
},
},
storage::Handle,
Core,
topology::{Cycle, Face, HalfEdge, Shell},
};
/// Split a face into two
@ -63,7 +62,7 @@ impl SplitFace for Shell {
//
// Something to think about though!
{
let [(a, _), (b, _)] = line.each_ref_ext();
let [(a, _), (b, _)] = line.each_ref();
let exterior = face.region().exterior();
@ -103,18 +102,65 @@ impl SplitFace for Shell {
// Build the edge that's going to divide the new faces.
let dividing_half_edge_a_to_d = {
let half_edge = HalfEdge::line_segment(
[b.start_position(), d.start_position()],
None,
let start = core
.layers
.geometry
.of_curve(b.curve())
.unwrap()
.local_on(face.surface())
.unwrap()
.path
.point_from_path_coords(
core.layers
.geometry
.of_vertex(b.start_vertex())
.unwrap()
.local_on(b.curve())
.unwrap()
.position,
);
let end = core
.layers
.geometry
.of_curve(d.curve())
.unwrap()
.local_on(face.surface())
.unwrap()
.path
.point_from_path_coords(
core.layers
.geometry
.of_vertex(d.start_vertex())
.unwrap()
.local_on(d.curve())
.unwrap()
.position,
);
let (half_edge, boundary) = HalfEdge::line_segment(
[start, end],
face.surface().clone(),
core,
);
core.layers.geometry.define_vertex(
b.start_vertex().clone(),
half_edge.curve().clone(),
LocalVertexGeom {
position: boundary.inner[0],
},
);
core.layers.geometry.define_vertex(
d.start_vertex().clone(),
half_edge.curve().clone(),
LocalVertexGeom {
position: boundary.inner[1],
},
);
half_edge
.update_start_vertex(|_, _| b.start_vertex().clone(), core)
.insert(core)
.set_path(
core.layers.geometry.of_half_edge(&half_edge).path,
&mut core.layers.geometry,
)
};
let dividing_half_edge_c_to_b = HalfEdge::from_sibling(
&dividing_half_edge_a_to_d,
@ -201,13 +247,13 @@ mod tests {
use fj_interop::Color;
use crate::{
objects::Shell,
Core,
operations::{
build::BuildShell,
presentation::{GetColor, SetColor},
split::SplitFace,
},
Core,
topology::Shell,
};
#[test]

View File

@ -1,11 +1,11 @@
use fj_math::Point;
use crate::{
geometry::HalfEdgeGeometry,
objects::{HalfEdge, Vertex},
operations::insert::Insert,
storage::Handle,
Core,
geometry::LocalVertexGeom,
operations::{derive::DeriveFrom, insert::Insert},
storage::Handle,
topology::{Cycle, HalfEdge, Vertex},
};
/// Split a [`HalfEdge`] into two
@ -28,47 +28,38 @@ pub trait SplitHalfEdge {
#[must_use]
fn split_half_edge(
&self,
half_edge: &Handle<HalfEdge>,
point: impl Into<Point<1>>,
core: &mut Core,
) -> [Handle<HalfEdge>; 2];
}
impl SplitHalfEdge for Handle<HalfEdge> {
impl SplitHalfEdge for Cycle {
fn split_half_edge(
&self,
half_edge: &Handle<HalfEdge>,
point: impl Into<Point<1>>,
core: &mut Core,
) -> [Handle<HalfEdge>; 2] {
let point = point.into();
let [start, end] = self.boundary().inner;
let a = HalfEdge::new(
core.layers.geometry.of_half_edge(self).path,
[start, point],
self.curve().clone(),
self.start_vertex().clone(),
half_edge.curve().clone(),
half_edge.start_vertex().clone(),
)
.insert(core);
.insert(core)
.derive_from(half_edge, core);
let b = HalfEdge::new(
core.layers.geometry.of_half_edge(self).path,
[point, end],
self.curve().clone(),
half_edge.curve().clone(),
Vertex::new().insert(core),
)
.insert(core);
.insert(core)
.derive_from(half_edge, core);
core.layers.geometry.define_half_edge(
a.clone(),
HalfEdgeGeometry {
path: core.layers.geometry.of_half_edge(self).path,
},
);
core.layers.geometry.define_half_edge(
b.clone(),
HalfEdgeGeometry {
path: core.layers.geometry.of_half_edge(self).path,
},
core.layers.geometry.define_vertex(
b.start_vertex().clone(),
b.curve().clone(),
LocalVertexGeom { position: point },
);
[a, b]

View File

@ -1,13 +1,15 @@
use fj_interop::Color;
use fj_math::Vector;
use itertools::Itertools;
use crate::{
geometry::SurfaceGeometry,
objects::{Cycle, Face},
Core,
geometry::LocalVertexGeom,
operations::{
build::BuildCycle, join::JoinCycle, sweep::half_edge::SweepHalfEdge,
},
Core,
storage::Handle,
topology::{Cycle, Face, Surface},
};
use super::SweepCache;
@ -38,7 +40,8 @@ pub trait SweepCycle {
/// operation is called in, and therefore falls outside of its scope.
fn sweep_cycle(
&self,
surface: &SurfaceGeometry,
bottom_surface: Handle<Surface>,
top_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -49,7 +52,8 @@ pub trait SweepCycle {
impl SweepCycle for Cycle {
fn sweep_cycle(
&self,
surface: &SurfaceGeometry,
bottom_surface: Handle<Surface>,
top_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -58,31 +62,89 @@ impl SweepCycle for Cycle {
let path = path.into();
let mut faces = Vec::new();
let mut top_edges = Vec::new();
let mut top_half_edges = Vec::new();
for bottom_half_edge_pair in self.half_edges().pairs() {
let (bottom_half_edge, bottom_half_edge_next) =
bottom_half_edge_pair;
let (side_face, top_edge) = bottom_half_edge.sweep_half_edge(
let swept_half_edge = bottom_half_edge.sweep_half_edge(
bottom_half_edge_next.start_vertex().clone(),
surface,
bottom_surface.clone(),
color,
path,
cache,
core,
);
faces.push(side_face);
faces.push(swept_half_edge.face);
top_edges.push((
top_edge,
core.layers.geometry.of_half_edge(bottom_half_edge).path,
bottom_half_edge.boundary(),
// The order of these top half-edges is going to be important later,
// so let's make sure we understand what's going on:
//
// - We are iterating through the bottom half-edges here. That means
// the order of those bottom half-edges is natural, as we'd expect
// it:
// - We see them in the order that they appear in the cycle.
// - Each half-edge we see ends where the next one starts.
// - By sweeping the bottom half-edges, we are creating a top half-
// edges that have opposite orientation.
// - And yet we're adding them to a list, in the same order that we
// iterate over the bottom half-edges.
// - As a result, the order of the list is unnatural, going against
// expectations:
// - This is the opposite order than the one in which they'll
// appear within a cycle eventually.
// - Each half-edge ends where the _previous_ one (in the list)
// starts.
top_half_edges.push((
swept_half_edge.top_half_edge,
swept_half_edge.top_boundary,
core.layers
.geometry
.of_curve(bottom_half_edge.curve())
.unwrap()
.local_on(&bottom_surface)
.unwrap()
.clone(),
));
}
let top_cycle = Cycle::empty().add_joined_edges(top_edges, core);
let top_half_edges = top_half_edges
.into_iter()
.circular_tuple_windows()
.map(
|(
(half_edge, boundary, curve_geom),
(next_half_edge, _, _),
)| {
let [start, end] = boundary.inner;
for (point, vertex) in [
(start, half_edge.start_vertex()),
(end, next_half_edge.start_vertex()),
] {
core.layers.geometry.define_vertex(
vertex.clone(),
half_edge.curve().clone(),
LocalVertexGeom { position: point },
);
}
(half_edge, curve_geom)
},
)
.collect::<Vec<_>>();
// The half-edges within `top_half_edges` which we're passing into
// `add_joined_edges` are in unnatural order, as per the comment above.
// This happens to be exactly the order that `add_joined_edges` wants
// them to be in, so it works out.
let top_cycle = Cycle::empty().add_joined_half_edges(
top_half_edges,
top_surface,
core,
);
SweptCycle { faces, top_cycle }
}

View File

@ -1,10 +1,10 @@
use fj_math::Vector;
use crate::{
objects::{Face, Shell},
Core,
operations::{insert::Insert, presentation::GetColor},
storage::Handle,
Core,
topology::{Face, Shell},
};
use super::{SweepCache, SweepRegion};
@ -50,14 +50,14 @@ impl SweepFace for Handle<Face> {
let other_faces = bottom_face
.region()
.sweep_region(
bottom_face.surface(),
bottom_face.surface().clone(),
bottom_face.region().get_color(core),
path,
cache,
core,
)
.all_faces()
.map(|side_face| side_face.insert(core));
.map(|face| face.insert(core));
let mut faces = Vec::new();
faces.push(bottom_face.clone());

View File

@ -1,21 +1,21 @@
use fj_interop::{ext::ArrayExt, Color};
use fj_interop::{Color, ext::ArrayExt};
use fj_math::{Point, Scalar, Vector};
use crate::{
geometry::SurfaceGeometry,
objects::{Cycle, Face, HalfEdge, Region, Vertex},
Core,
geometry::{CurveBoundary, LocalVertexGeom},
operations::{
build::{BuildCycle, BuildHalfEdge},
geometry::UpdateHalfEdgeGeometry,
geometry::UpdateCurveGeometry,
insert::Insert,
presentation::SetColor,
update::{UpdateCycle, UpdateHalfEdge},
},
storage::Handle,
Core,
topology::{Curve, Cycle, Face, HalfEdge, Region, Surface, Vertex},
};
use super::{vertex::SweepVertex, SweepCache, SweepSurfacePath};
use super::{SweepCache, SweepSurfacePath, vertex::SweepVertex};
/// # Sweep a [`HalfEdge`]
///
@ -39,32 +39,55 @@ pub trait SweepHalfEdge {
fn sweep_half_edge(
&self,
end_vertex: Handle<Vertex>,
surface: &SurfaceGeometry,
surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
core: &mut Core,
) -> (Face, Handle<HalfEdge>);
) -> SweptHalfEdge;
}
impl SweepHalfEdge for Handle<HalfEdge> {
fn sweep_half_edge(
&self,
end_vertex: Handle<Vertex>,
surface: &SurfaceGeometry,
surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
core: &mut Core,
) -> (Face, Handle<HalfEdge>) {
) -> SweptHalfEdge {
let path = path.into();
let surface = core
let boundary = [
core.layers
.geometry
.of_vertex(self.start_vertex())
.unwrap()
.local_on(self.curve())
.unwrap()
.position,
core.layers
.geometry
.of_vertex(&end_vertex)
.unwrap()
.local_on(self.curve())
.unwrap()
.position,
];
let curve_geom = core
.layers
.geometry
.of_half_edge(self)
.path
.sweep_surface_path(surface, path, core);
.of_curve(self.curve())
.unwrap()
.local_on(&surface)
.unwrap()
.clone();
let surface_geom = *core.layers.geometry.of_surface(&surface);
let surface =
curve_geom
.path
.sweep_surface_path(&surface_geom, path, core);
// Next, we need to define the boundaries of the face. Let's start with
// the global vertices and edges.
@ -86,7 +109,7 @@ impl SweepHalfEdge for Handle<HalfEdge> {
// Let's figure out the surface coordinates of the edge vertices.
let surface_points = {
let [a, b] = self.boundary().inner;
let [a, b] = boundary;
[
[a.t, Scalar::ZERO],
@ -104,46 +127,71 @@ impl SweepHalfEdge for Handle<HalfEdge> {
// Now, the boundaries of each edge.
let boundaries = {
let [a, b] = self.boundary().inner;
let [a, b] = boundary;
let [c, d] = [0., 1.].map(|coord| Point::from([coord]));
[[a, b], [c, d], [b, a], [d, c]]
};
let vertices_pairs = {
let [a, b, c, d] = vertices;
[
[a.clone(), b.clone()],
[b, c.clone()],
[c, d.clone()],
[d, a],
]
};
let mut exterior = Cycle::empty();
// Armed with all of that, we're ready to create the edges.
let [_edge_bottom, _edge_up, edge_top, _edge_down] = boundaries
.zip_ext(surface_points)
.zip_ext(surface_points_next)
.zip_ext(vertices)
.zip_ext(vertices_pairs)
.zip_ext(curves)
.map(|((((boundary, start), end), start_vertex), curve)| {
let half_edge = {
let line_segment = HalfEdge::line_segment(
[start, end],
Some(boundary),
core,
);
let half_edge = line_segment
.update_start_vertex(|_, _| start_vertex, core);
.map(
|(
(((boundary, start), end), [start_vertex, end_vertex]),
curve,
)| {
let boundary = CurveBoundary { inner: boundary };
let half_edge = if let Some(curve) = curve {
half_edge.update_curve(|_, _| curve, core)
} else {
half_edge
};
let curve = curve
.unwrap_or_else(|| Curve::new().insert(core))
.make_line_on_surface(
[start, end],
boundary,
surface.clone(),
&mut core.layers.geometry,
);
half_edge.insert(core).set_path(
core.layers.geometry.of_half_edge(&line_segment).path,
&mut core.layers.geometry,
)
};
{
let [start, end] = boundary.inner;
exterior = exterior.add_half_edges([half_edge.clone()], core);
for (point, vertex) in
[(start, start_vertex.clone()), (end, end_vertex)]
{
core.layers.geometry.define_vertex(
vertex,
curve.clone(),
LocalVertexGeom { position: point },
);
}
}
half_edge
});
let half_edge = HalfEdge::unjoined(core)
.update_start_vertex(|_, _| start_vertex, core)
.update_curve(|_, _| curve.clone(), core)
.insert(core);
exterior =
exterior.add_half_edges([half_edge.clone()], core);
half_edge
},
);
let exterior = exterior.insert(core);
let region = Region::new(exterior, []).insert(core);
@ -153,7 +201,28 @@ impl SweepHalfEdge for Handle<HalfEdge> {
}
let face = Face::new(surface, region);
let [_, _, top_boundary, _] = boundaries;
(face, edge_top)
SweptHalfEdge {
face,
top_half_edge: edge_top,
top_boundary: CurveBoundary {
inner: top_boundary,
},
}
}
}
/// The result of sweeping a [`HalfEdge`]
///
/// See [`SweepHalfEdge`].
pub struct SweptHalfEdge {
/// The face created by sweeping the half-edge
pub face: Face,
/// The top half-edge of the created face
pub top_half_edge: Handle<HalfEdge>,
/// The boundary of the top half-edge
pub top_boundary: CurveBoundary<Point<1>>,
}

View File

@ -15,7 +15,7 @@ mod vertex;
pub use self::{
cycle::{SweepCycle, SweptCycle},
face::SweepFace,
half_edge::SweepHalfEdge,
half_edge::{SweepHalfEdge, SweptHalfEdge},
path::SweepSurfacePath,
region::{SweepRegion, SweptRegion},
shell_face::{ShellExtendedBySweep, SweepFaceOfShell},
@ -26,8 +26,8 @@ pub use self::{
use std::collections::BTreeMap;
use crate::{
objects::{Curve, Vertex},
storage::{Handle, ObjectId},
topology::{Curve, Vertex},
};
/// A cache used for sweeping

View File

@ -1,14 +1,20 @@
use fj_math::{Circle, Line, Vector};
use crate::{
geometry::{GlobalPath, SurfaceGeometry, SurfacePath},
objects::Surface,
Core,
geometry::{
Path,
repr::tri_mesh::{
convert_point_surface_to_global, convert_vector_surface_to_global,
},
surfaces::SweptCurve,
},
operations::build::BuildSurface,
storage::Handle,
Core,
topology::Surface,
};
/// # Sweep a [`SurfacePath`]
/// # Sweep a [`Path`]
///
/// See [module documentation] for more information.
///
@ -26,30 +32,31 @@ pub trait SweepSurfacePath {
/// <https://github.com/hannobraun/fornjot/issues/1112>
fn sweep_surface_path(
&self,
surface: &SurfaceGeometry,
surface: &SweptCurve,
path: impl Into<Vector<3>>,
core: &mut Core,
) -> Handle<Surface>;
}
impl SweepSurfacePath for SurfacePath {
impl SweepSurfacePath for Path<2> {
fn sweep_surface_path(
&self,
surface: &SurfaceGeometry,
surface: &SweptCurve,
path: impl Into<Vector<3>>,
core: &mut Core,
) -> Handle<Surface> {
match surface.u {
GlobalPath::Circle(_) => {
let SweptCurve { u, .. } = surface;
match u {
Path::Circle(_) => {
// Sweeping a `Curve` creates a `Surface`. The u-axis of that
// `Surface` is a `GlobalPath`, which we are computing below.
// That computation might or might not work with an arbitrary
// `Surface` is a `Path<3>`, which we are computing below. That
// computation might or might not work with an arbitrary
// surface. Probably not, but I'm not sure.
//
// What definitely won't work, is computing the bottom edge of
// the sweep. The edge sweeping code currently assumes that the
// bottom edge is a line (which is true when sweeping from a
// flat surface). But is the surface we're sweeping from is
// flat surface). But if the surface we're sweeping from is
// curved, there's simply no way to represent the curve of the
// resulting bottom edge.
todo!(
@ -57,33 +64,57 @@ impl SweepSurfacePath for SurfacePath {
not supported yet."
)
}
GlobalPath::Line(_) => {
Path::Line(_) => {
// We're sweeping from a curve on a flat surface, which is
// supported. Carry on.
}
}
let u = match self {
SurfacePath::Circle(circle) => {
let center = surface.point_from_surface_coords(circle.center());
let a = surface.vector_from_surface_coords(circle.a());
let b = surface.vector_from_surface_coords(circle.b());
Path::Circle(circle) => {
let center = convert_point_surface_to_global(
surface,
circle.center(),
core.tolerance(),
&core.layers.geometry,
);
let a = convert_vector_surface_to_global(
surface,
circle.a(),
core.tolerance(),
&core.layers.geometry,
);
let b = convert_vector_surface_to_global(
surface,
circle.b(),
core.tolerance(),
&core.layers.geometry,
);
let circle = Circle::new(center, a, b);
GlobalPath::Circle(circle)
Path::Circle(circle)
}
SurfacePath::Line(line) => {
let origin = surface.point_from_surface_coords(line.origin());
let direction =
surface.vector_from_surface_coords(line.direction());
Path::Line(line) => {
let origin = convert_point_surface_to_global(
surface,
line.origin(),
core.tolerance(),
&core.layers.geometry,
);
let direction = convert_vector_surface_to_global(
surface,
line.direction(),
core.tolerance(),
&core.layers.geometry,
);
let line = Line::from_origin_and_direction(origin, direction);
GlobalPath::Line(line)
Path::Line(line)
}
};
Surface::surface_from_uv(u, path, core)
Surface::from_uv(u, path, core)
}
}

View File

@ -2,13 +2,12 @@ use fj_interop::Color;
use fj_math::Vector;
use crate::{
geometry::SurfaceGeometry,
objects::{Cycle, Face, Region, Surface},
Core,
operations::{
insert::Insert, reverse::Reverse, transform::TransformObject,
},
storage::Handle,
Core,
topology::{Cycle, Face, Region, Surface},
};
use super::{SweepCache, SweepCycle};
@ -32,7 +31,7 @@ pub trait SweepRegion {
/// operation's scope.
fn sweep_region(
&self,
surface: &Handle<Surface>,
bottom_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -43,7 +42,7 @@ pub trait SweepRegion {
impl SweepRegion for Region {
fn sweep_region(
&self,
surface: &Handle<Surface>,
bottom_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
@ -53,9 +52,13 @@ impl SweepRegion for Region {
let mut faces = Vec::new();
let top_surface =
bottom_surface.clone().translate(path, core).insert(core);
let top_exterior = sweep_cycle(
self.exterior(),
&core.layers.geometry.of_surface(surface),
bottom_surface.clone(),
top_surface.clone(),
color,
&mut faces,
path,
@ -69,7 +72,8 @@ impl SweepRegion for Region {
.map(|bottom_cycle| {
sweep_cycle(
bottom_cycle,
&core.layers.geometry.of_surface(surface),
bottom_surface.clone(),
top_surface.clone(),
color,
&mut faces,
path,
@ -80,7 +84,6 @@ impl SweepRegion for Region {
.collect::<Vec<_>>();
let top_face = {
let top_surface = surface.translate(path, core).insert(core);
let top_region =
Region::new(top_exterior, top_interiors).insert(core);
@ -94,9 +97,11 @@ impl SweepRegion for Region {
}
}
#[allow(clippy::too_many_arguments)]
fn sweep_cycle(
bottom_cycle: &Cycle,
bottom_surface: &SurfaceGeometry,
bottom_surface: Handle<Surface>,
top_surface: Handle<Surface>,
color: Option<Color>,
faces: &mut Vec<Face>,
path: Vector<3>,
@ -105,6 +110,7 @@ fn sweep_cycle(
) -> Handle<Cycle> {
let swept_cycle = bottom_cycle.reverse(core).sweep_cycle(
bottom_surface,
top_surface,
color,
path,
cache,

View File

@ -1,7 +1,7 @@
use fj_math::Vector;
use crate::{
objects::{Face, Region, Shell},
Core,
operations::{
derive::DeriveFrom,
insert::Insert,
@ -11,7 +11,7 @@ use crate::{
update::UpdateShell,
},
storage::Handle,
Core,
topology::{Face, Region, Shell},
};
/// # Sweep a [`Face`] that is part of a [`Shell`]
@ -66,7 +66,7 @@ impl SweepFaceOfShell for Shell {
.derive_from(face.region().exterior(), core);
let region = Region::new(exterior, []);
let swept_region = region.sweep_region(
face.surface(),
face.surface().clone(),
face.region().get_color(core),
path,
&mut cache,

View File

@ -1,14 +1,13 @@
use fj_math::{Scalar, Vector};
use fj_math::Vector;
use crate::{
geometry::GlobalPath,
objects::{Face, Sketch, Solid, Surface},
operations::{derive::DeriveFrom, insert::Insert, reverse::Reverse},
storage::Handle,
Core,
operations::insert::Insert,
storage::Handle,
topology::{Face, Sketch, Solid, Surface},
};
use super::{face::SweepFace, SweepCache};
use super::{SweepCache, face::SweepFace};
/// # Sweep a [`Sketch`]
///
@ -17,6 +16,27 @@ use super::{face::SweepFace, SweepCache};
/// [module documentation]: super
pub trait SweepSketch {
/// # Sweep the [`Sketch`]
///
/// Requires `path` to point towards the back of `surface`. If one of them
/// is fixed, make sure to adapt the other one accordingly.
///
/// Not following this requirement will produce an invalid shape that
/// _should_ fail validation.
///
/// ## Implementation Note
///
/// The above requirement is a bit draconian. It would be much nicer, if
/// this operation just worked, regardless of the relation of `path` and
/// `surface`, and in fact, a previous version of it did.
///
/// However, this previous version also made some undocumented assumption
/// that didn't hold in the general case. It was also getting in the way of
/// introducing the new geometry system.
///
/// The decision was made that, for now, simplifying this operation and
/// putting more requirements on the caller, was the right call. Once the
/// new geometry system is in place, we'll hopefully be in a position to
/// improve the sweep operation substantially.
fn sweep_sketch(
&self,
surface: Handle<Surface>,
@ -37,35 +57,23 @@ impl SweepSketch for Sketch {
let mut shells = Vec::new();
for region in self.regions() {
let region = {
// The following code assumes that the sketch is winded counter-
// clockwise. Let's check that real quick.
assert!(region
.exterior()
.winding(&core.layers.geometry)
.is_ccw());
for cycle in region.all_cycles() {
for half_edge in cycle.half_edges() {
let curve_geom = core
.layers
.geometry
.of_curve(half_edge.curve())
.unwrap()
.local_on(self.surface())
.unwrap();
let is_negative_sweep = {
let u = match core.layers.geometry.of_surface(&surface).u {
GlobalPath::Circle(_) => todo!(
"Sweeping sketch from a rounded surfaces is not \
supported"
),
GlobalPath::Line(line) => line.direction(),
};
let v = core.layers.geometry.of_surface(&surface).v;
let normal = u.cross(&v);
normal.dot(&path) < Scalar::ZERO
};
if is_negative_sweep {
region.clone()
} else {
region.reverse(core).insert(core).derive_from(region, core)
core.layers.geometry.define_curve(
half_edge.curve().clone(),
surface.clone(),
curve_geom.clone(),
);
}
};
}
let face = Face::new(surface.clone(), region.clone()).insert(core);
let shell = face.sweep_face(path, &mut cache, core).insert(core);

View File

@ -1,8 +1,8 @@
use crate::{
objects::{Curve, Vertex},
Core,
operations::insert::Insert,
storage::Handle,
Core,
topology::{Curve, Vertex},
};
use super::SweepCache;

Some files were not shown because too many files have changed in this diff Show More