You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Frames: move turn_to_parallel and tapered_flange_ends across solidcore layers (#21397) - #21525
Moves structural-frame-specific naming out of solidcore / solidcore-ops into SolidCraft's own frames profile module, and renames the general turn query to match the existing geometry query layer. Closes#21397 (part of #21392).
Moved solidcore::query::member_turn::{SquareTurnMeasure, measure_square_turn} into solidcore::query::edge_turn::{SquareTurnMeasure, turn_to_parallel} with domain-neutral docs and error op (query::edge_turn), and deleted solidcore/crates/solidcore/src/query/member_turn.rs.
Moved solidcore_ops::member_turn::{ParallelTurnError, parallel_turn} (and its unit test) into solidcore_ops::measure::{ParallelTurnError, turn_to_parallel}, deleted solidcore/crates/solidcore-ops/src/member_turn.rs, and re-exported turn_to_parallel / ParallelTurnError from crates/kernel/src/lib.rs for crates/engine/src/cmd/frame_rotate_member.rs.
Moved tapered_flange_ends out of solidcore::prism::profile (and its solidcore_ops::prism re-export) into crates/doc/src/frame.rs, and moved its unit test into crates/doc/src/frame_tests.rs.
Rotate Member produces the exact same turns through turn_to_parallel, and no kernel or ops name mentions a frame member or a flange.
Changes a default: no
Test change: moved a_tapered_flange_changes_by_half_its_length_times_the_slope_tangent from solidcore::prism::tests into crates/doc/src/frame_tests.rs alongside tapered_flange_ends (and moved parallel_turn_cases from solidcore_ops::member_turn::tests into solidcore_ops::measure::tests::turn_to_parallel_cases) per #21397; assertions and tolerance checks are unchanged.
Validation
cargo fmt --check (root workspace and solidcore/) — clean
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The turn calculation moves from the member-turn modules to the edge-turn and measure APIs, and Rotate Member uses the new API. The tapered-flange calculation moves from Solidcore to a private helper in the frame documentation crate.
edge_turn adds SquareTurnMeasure and turn_to_parallel. The member_turn query module is removed.
Measure API and validation solidcore/crates/solidcore-ops/src/measure.rs, solidcore/crates/solidcore-ops/src/member_turn.rs, solidcore/crates/solidcore-ops/src/lib.rs
The measure module adds ParallelTurnError, turn_to_parallel, and tests for turn results and error cases. The member_turn ops module is removed.
Rotate Member API wiring crates/kernel/src/lib.rs, crates/engine/src/cmd/frame_rotate_member.rs
The kernel re-exports the measure API. parallel_angle calls turn_to_parallel with the existing error mapping.
This is a refactor that moves frame-specific naming and a helper out of the kernel layers without changing behavior. No user-visible change or concrete merge risk was found.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names two real changes in the diff, the move of turn_to_parallel and the move of tapered_flange_ends across solidcore layers. It omits the rename of the member_turn query to edge_turn and th…
Description check
The description follows the template. It has a Change section that explains the move and the problem, a Changes a default line set to no, a Test change line with a reason, a Validation section with co…
Linked Issues check
Issue #21397 requires three things. (1) The turn query moves to query::edge_turn::turn_to_parallel. At head, solidcore/crates/solidcore/src/query/edge_turn.rs defines SquareTurnMeasure and `turn…
Out of Scope Changes check
Every changed file serves issue #21397. The kernel and ops files are renames, moves, and re-exports of the turn API, with the single call-site update in frame_rotate_member.rs. The crates/doc chan…
Existing Defaults Unchanged
The check asks whether the PR changes a user-facing UX default (settings, preferences, command behaviour in normal use, UI layout, shortcuts). Kernel or geometry changes under solidcore/ do not count.…
Full details: Title check
Explanation
The title names two real changes in the diff, the move of turn_to_parallel and the move of tapered_flange_ends across solidcore layers. It omits the rename of the member_turn query to edge_turn and the Rotate Member re-export, but it is specific and related to the main change.
Full details: Description check
Explanation
The description follows the template. It has a Change section that explains the move and the problem, a Changes a default line set to no, a Test change line with a reason, a Validation section with commands and results, a screenshots section that explains why they are omitted, and an Integration status section. The Change section names the issue and the moved APIs, but it does not explain in plain words who the tool is for. The Integration status section gives the base commit and diff stats, but it does not record the upstream PR status or the merge of main, which the template asks for.
Full details: Linked Issues check
Explanation
Issue #21397 requires three things. (1) The turn query moves to query::edge_turn::turn_to_parallel. At head, solidcore/crates/solidcore/src/query/edge_turn.rs defines SquareTurnMeasure and turn_to_parallel with domain-neutral docs and the query::edge_turn error op. Its logic matches the deleted query/member_turn.rs at merge base: the same finiteness check, unitization, normal_along_axis, line_off_axis folding, the 1e-9 and 1.0 - 1e-9 zero cases, and Vec3::square_turn. (2) Ops exposes solidcore_ops::measure::turn_to_parallel and ParallelTurnError. The kernel re-exports them in crates/kernel/src/lib.rs, and member_turn.rs is deleted (per the summary). I did not read the full ops function body, which the read truncated. Its equivalence to the old parallel_turn rests on the PR description, the summary, and the matching line counts. (3) tapered_flange_ends moves out of solidcore::prism::profile and solidcore_ops::prism into crates/doc/src/frame.rs, with its test in frame_tests.rs. The summary shows no remaining flange name in kernel or ops. Rotate Member (frame_rotate_member.rs) now calls turn_to_parallel. Tests for the moved code keep their assertions per the PR description and summary. The 'Done when' criterion is met by the reviewed code.
Full details: Out of Scope Changes check
Explanation
Every changed file serves issue #21397. The kernel and ops files are renames, moves, and re-exports of the turn API, with the single call-site update in frame_rotate_member.rs. The crates/doc changes move the tapered-flange helper and its test into the frames module, as the issue requires. The prism and query module edits only remove the moved items and their declarations. The moved tests keep their assertions, so no unrelated behavior change appears. The PR description and summary report no other changes.
Full details: Existing Defaults Unchanged
Explanation
The check asks whether the PR changes a user-facing UX default (settings, preferences, command behaviour in normal use, UI layout, shortcuts). Kernel or geometry changes under solidcore/ do not count. Evidence from the reviewed range (git diff --name-status over 13 files): - All changes are Rust refactors: renaming and moving member_turn::parallel_turn to measure::turn_to_parallel, moving query::member_turn to query::edge_turn, moving tapered_flange_ends into crates/doc/src/frame.rs, and updating the re-exports in crates/kernel/src/lib.rs. - crates/engine/src/cmd/frame_rotate_member.rs changes only the function it calls (parallel_turn to turn_to_parallel). Its error mapping and inputs are unchanged. - A search of the added lines for default, preference, shortcut, keybinding, config, or setting found no matches. - The PR description says Changes a default: no, and the code diff does not contradict it. No UX default is changed, and the PR is internal API refactoring. The check passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This conflicts with main in crates/doc/src/frame.rs only: #5312 (weldment trim and extend) and #18895 changed it since. Keep main's changes and re-apply yours on top.
git fetch https://github.com/tangency-labs/solidcraft.git main
git merge FETCH_HEAD
# resolve, then
git add -A && git commit --no-edit && git push
Merged main (6627970e4), resolved the conflicts in crates/doc/src/frame.rs, crates/kernel/src/lib.rs, and solidcore/crates/solidcore-ops/src/lib.rs, and re-verified cargo fmt --check, solidcore/solidcore-ops/solidcraft-doc tests, cargo xtask layers, and cargo xtask app-geometry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
approved-for-ciReviewed: run the full PR CI (build, tests, goldens, Clippy)area:doctimeline, components, parameters, namingarea:kernelB-rep kernel, booleans, blends, STEP/IGESready to mergereviewed, every ask addressed; merge once CI is green
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Moves structural-frame-specific naming out of
solidcore/solidcore-opsinto SolidCraft's own frames profile module, and renames the general turn query to match the existing geometry query layer. Closes #21397 (part of #21392).solidcore::query::member_turn::{SquareTurnMeasure, measure_square_turn}intosolidcore::query::edge_turn::{SquareTurnMeasure, turn_to_parallel}with domain-neutral docs and error op (query::edge_turn), and deletedsolidcore/crates/solidcore/src/query/member_turn.rs.solidcore_ops::member_turn::{ParallelTurnError, parallel_turn}(and its unit test) intosolidcore_ops::measure::{ParallelTurnError, turn_to_parallel}, deletedsolidcore/crates/solidcore-ops/src/member_turn.rs, and re-exportedturn_to_parallel/ParallelTurnErrorfromcrates/kernel/src/lib.rsforcrates/engine/src/cmd/frame_rotate_member.rs.tapered_flange_endsout ofsolidcore::prism::profile(and itssolidcore_ops::prismre-export) intocrates/doc/src/frame.rs, and moved its unit test intocrates/doc/src/frame_tests.rs.turn_to_parallel, and no kernel or ops name mentions a frame member or a flange.Changes a default: no
Test change: moved
a_tapered_flange_changes_by_half_its_length_times_the_slope_tangentfromsolidcore::prism::testsintocrates/doc/src/frame_tests.rsalongsidetapered_flange_ends(and movedparallel_turn_casesfromsolidcore_ops::member_turn::testsintosolidcore_ops::measure::tests::turn_to_parallel_cases) per #21397; assertions and tolerance checks are unchanged.Validation
cargo fmt --check(root workspace andsolidcore/) — clean(cd solidcore && cargo test -p solidcore -- edge_turn)— 2 passed, 0 failed(cd solidcore && cargo test -p solidcore-ops -- turn_to_parallel)— 1 passed (measure::tests::turn_to_parallel_cases), 0 failed(cd solidcore && cargo clippy -p solidcore -p solidcore-ops -- -D warnings -A clippy::needless_bool)— clean (theneedless_boolallow only suppresses 11 pre-existing Rust 1.100 lints in untouched files)cargo test --profile ci -p solidcraft-doc -- tapered_flange— 1 passed (frame::tests::a_tapered_flange_changes_by_half_its_length_times_the_slope_tangent), 0 failedcargo test --profile ci -p solidcraft-engine -- rotate_member— 7 passed, 0 failedcargo xtask layers—OK: 41 crates, no layering or solidcore seam violations.cargo xtask app-geometry—no new onesScreenshots of the behavior (when observable)
Internal API/layer refactor with no UI or observable geometry change; screenshots omitted.
Integration status
mainat4cf7c093(0 competing PRs on Frames: general names in solidcore, frame code in SolidCraft #21397).13 files changed, 150 insertions(+), 176 deletions(-)), all targeted crate tests andxtasklayer/geometry checks passing after final edit.Summary by CodeRabbit