Skip to content

[WIP] Extract to File keeps placements and joints on a STEP component (#26837) - #26917

Draft
MarkusReichart wants to merge 4 commits into
tangency-labs:mainfrom
MarkusReichart:fix/26837-extract-inserted-component
Draft

MarkusReichart wants to merge 4 commits into
tangency-labs:mainfrom
MarkusReichart:fix/26837-extract-inserted-component

Conversation

@MarkusReichart

@MarkusReichart MarkusReichart commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Change

Extract to File links a component inserted from STEP to its new design file and keeps its placements and joints.

Deleting the original Import feature also deleted the component tree it created. The extraction now keeps the component when it removes that history.

Fixes #26837

Changes a default: no

Validation

  • cargo test --locked --profile ci -p solidcraft-engine --lib extract_keeps_inserted_step_placements_and_joint -- --nocapture reproduced the would look different without the history of rig error on 45e13d987e.
  • The same regression passed in the App gate on 63da0b2a80. It checks three placements, one rigid joint, and 19 bodies in the assembly. The extracted file opens with six bodies at the expected positions.
  • The App gate passed formatting, repository checks, and Clippy. Nextest ran 11,017 Engine tests. 11,010 passed and seven matched the known failure list.

Not run: the full local gate is pending independent review. The kernel rig, cargo xtask ci, and tests of dependent crates are left to CI.

Integration status

Tested against upstream main at b12f47c008. A merge check against 5e1a380dea found no conflicts.

Co-written and tested with Codex (AI)

Co-Authored-By: Codex (AI)
@coderabbitai

coderabbitai Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor
Pre-merge checks: Passed 1

Check name Status Explanation
Existing Defaults Unchanged Passed The check fails only if the PR changes a UX default a user already relies on: a default setting or preference, the usual-use behaviour of a command or tool, UI layout or behaviour, or shortcuts. Addit…
Full details: Existing Defaults Unchanged

Explanation

The check fails only if the PR changes a UX default a user already relies on: a default setting or preference, the usual-use behaviour of a command or tool, UI layout or behaviour, or shortcuts. Additive changes pass, and kernel or geometry results (including anything under solidcore/, such as a case that now builds or is now refused) are not UX defaults. Evidence: - The PR (#26917, author MarkusReichart, base main, head fix/26837-extract-inserted-component) adds two commits of its own, 45e13d9 and 74c5409. Relative to the upstream-merge parent b12f47c, the merge commit 63da0b2 changes only crates/engine/src/cmd/component_extract.rs, with 98 insertions. The other repository changes come from upstream main, not from this PR. - The code change is 7 lines in clear_history (lines 641–676 of component_extract.rs): - It clears the inserted flag on the component's own import feature before the history is deleted. This matches the case the issue describes. - It adds a.rigid_groups.retain(|g| !sc.subtree.contains(&g.component)), which removes rigid groups owned by the extracted tree. - The other 91 lines are a new test, extract_keeps_inserted_step_placements_and_joint. - No preference, default setting, UI layout, shortcut, or command-line default is touched. - The user-visible effect is that Extract to File now succeeds for a component inserted from STEP. It was previously refused with "would look different without the history". This is a fix to a refused case, which the check's exemption for "a case that now builds or is now refused" covers. It is not a default users rely on. - The rigid-group removal runs for every extraction, not only inserted STEP components. It removes assembly state for components that leave the design. It is not a UX default. The linked issue asks for this group to move with the extracted parts. Judgment note: the check's exemption for changed kernel results is written for geometry. This PR changes an engine command outcome. I treated the outcome as a bug fix in a refused case, not a changed default. A reviewer who reads "what a command does when used the usual way" more strictly could disagree, but no default value, preference, layout, or shortcut changes. The description's Changes a default: no agrees with the code.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Based on the reproduction by aw113sgte in tangency-labs#26837.

Co-Authored-By: Codex (AI)
Based on the fix described by aw113sgte in tangency-labs#26837.

Co-Authored-By: Codex (AI)

This branch has not been deployed

No deployments
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.

Extract to File: a component inserted from a STEP file is refused with "would look different without the history"

1 participant