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

Point-and-click deletion of lofts, shells, and offset planes #4898

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

pierremtb
Copy link
Collaborator

@pierremtb pierremtb commented Jan 2, 2025

Closes #4662

Supports:

  • scene selection deletion of lofts
  • feature tree selection deletion of lofts
  • scene selection deletion of offset planes
  • feature tree selection deletion of offset planes
  • feature tree selection deletion of shells

Atm we can't select internal faces of a shell so scene selection deletion of shells is left out here.

TODO before merge:

  • fix kcl error
  • expand existing tests to include these new use cases

Review note:
As mentioned in the code there's a weird case were we can't delete a loft by selection right after we create it, will make a new issue about as I'm tired of over rotating on this PR and want it merged. In the same vein, I wanted to migrate the Delete selection command to a promise actor thing like we have for newer commands, but doing so (see commit history) had a side effect on a the error toast and something else that was breaking existing selection test. Also something for another PR, I'd like to have this merged 😅

Copy link

qa-wolf bot commented Jan 2, 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 2, 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 7, 2025 9:52pm

@pierremtb pierremtb changed the title WIP: Point-and-click deletion of lofts and offset planes Point-and-click deletion of lofts, shells, and offset planes Jan 2, 2025
@pierremtb pierremtb requested review from nadr0 and franknoirot January 2, 2025 21:35
@pierremtb
Copy link
Collaborator Author

@nadr0 @franknoirot this isn't 100% ready yet but I figured you'd want to be in the loop

@pierremtb pierremtb marked this pull request as ready for review January 7, 2025 15:20
@pierremtb pierremtb enabled auto-merge (squash) January 7, 2025 16:25
Comment on lines -154 to +160
}),
)
.await?;
let id: uuid::Uuid = exec_state.next_uuid();
let resp = args
.send_modeling_cmd(
id,
ModelingCmd::from(mcmd::Loft {
section_ids: sketches.iter().map(|group| group.id).collect(),
base_curve_index,
bez_approximate_rational,
tolerance: LengthUnit(tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
v_degree,
}),
)
.await?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discussion started with the engine team to see if we could get an explicit solid_id field as part of the Loft command, this way it we could keep batching this one. See c9f7336

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the PR we need merged https://github.com/KittyCAD/engine/pull/2969

@pierremtb
Copy link
Collaborator Author

Taking this back to draft until the changes started at KittyCAD/modeling-api@f95d35d cascade down to engine. See #4898 (comment)

@pierremtb pierremtb marked this pull request as draft January 8, 2025 16:40
auto-merge was automatically disabled January 8, 2025 16:40

Pull request was converted to draft

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.

Point-and-click deletion of Lofts and Offset Planes
1 participant