Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3-point circle interactive component #4982

Merged
merged 11 commits into from
Jan 16, 2025
Merged

3-point circle interactive component #4982

merged 11 commits into from
Jan 16, 2025

Conversation

lf94
Copy link
Contributor

@lf94 lf94 commented Jan 9, 2025

2025-01-08_20-54-28.mp4

Copy link

qa-wolf bot commented Jan 9, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 16, 2025 2:07pm

@lf94 lf94 changed the title 3-point circle dragging 3-point circle component Jan 9, 2025
@lf94 lf94 changed the title 3-point circle component 3-point circle interactive component Jan 9, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 85.96%. Comparing base (c147a21) to head (87e578a).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/std/utils.rs 0.00% 7 Missing ⚠️
src/wasm-lib/kcl/src/std/args.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4982      +/-   ##
==========================================
- Coverage   85.99%   85.96%   -0.03%     
==========================================
  Files          88       88              
  Lines       31470    31480      +10     
==========================================
  Hits        27062    27062              
- Misses       4408     4418      +10     
Flag Coverage Δ
wasm-lib 85.96% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just a few notes:

  1. The click target for dragging seems very small, is there some way to make it more forgiving?
  2. The "snap to axis" draft points appear if the user mouses over the axes even after the circle has been added.
  3. I think we talked about adding the constraint overlays in a follow-up PR, just want to note it
  4. And I just want to note that it's a known issue that the circle button doesn't activate while this tool is active, same issue faced by center rectangle and will be addressed elsewhere

lf94 added 8 commits January 14, 2025 11:56
Uses our talked about technique of calling Rust functions to calculate new
geometry coordinates and parameters. It works very well!

Need to have the modeling app show "edit sketch" still.
@lf94
Copy link
Contributor Author

lf94 commented Jan 14, 2025

@franknoirot I fixed points 1 and 4 - I think 2 is related to a class of bugs around Circle in general which we can fix later (keeps axis indicator up).

Copy link
Collaborator

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing stands out for me in the code changes and it works great locally. Thank you!

@lf94 lf94 requested a review from jtran January 16, 2025 16:08
@lf94 lf94 merged commit 0a1a6e5 into main Jan 16, 2025
32 checks passed
@lf94 lf94 deleted the lf94/circle-3-point-drag branch January 16, 2025 16:10
TomPridham pushed a commit to TomPridham/modeling-app that referenced this pull request Feb 13, 2025
* Add dragging behavior to 3 point circle

Uses our talked about technique of calling Rust functions to calculate new
geometry coordinates and parameters. It works very well!

Need to have the modeling app show "edit sketch" still.

* Cargo fmt

* cargo fmt

* Address Jon's comments

* Fix clippy

* Dont use isNaN

* Make points easier to select (enlarge)

* Fix circle button not being activated

* Ensure efficiency of updating editor vs execution

* Make cargo clippy happy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants