mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 18:45:55 +00:00
cargo fmt: the format-40 change and the rebase's export list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,8 +70,8 @@ pub mod text_params;
|
||||
pub mod thread_forms;
|
||||
|
||||
pub use assembly::{
|
||||
IDENTITY, MAX_PLACEMENT_DEPTH, MAX_PLACEMENTS, Mat, Occurrence, WorldNames, apply_point, apply_vector, is_identity, is_placement,
|
||||
map_point_expr, mat_inverse, mat_mul, rigid,
|
||||
IDENTITY, MAX_PLACEMENT_DEPTH, MAX_PLACEMENTS, Mat, Occurrence, WorldNames, apply_point, apply_vector, is_identity, is_placement, map_point_expr,
|
||||
mat_inverse, mat_mul, rigid,
|
||||
};
|
||||
pub use document::*;
|
||||
pub use eval::KeptResults;
|
||||
|
||||
@@ -720,9 +720,7 @@ fn a_format_39_left_hand_thread_and_tapped_hole_open_left_handed() {
|
||||
run(&mut s, "solid.hole", json!({"position": [20, 30, 12], "thread": "M6", "depth": 8, "hand": "left"}));
|
||||
run(&mut s, "solid.cylinder", json!({"radius": 5, "height": 9, "base": [80, 0, 0], "body_name": "Shaft", "operation": "new"}));
|
||||
run(&mut s, "solid.thread", json!({"face": [85, 0, 4.5], "designation": "M10", "hand": "left"}));
|
||||
let hands = |s: &Session| -> Vec<solidcraft_doc::thread_forms::ThreadHand> {
|
||||
s.model.state().threads.iter().map(|t| t.hand).collect()
|
||||
};
|
||||
let hands = |s: &Session| -> Vec<solidcraft_doc::thread_forms::ThreadHand> { s.model.state().threads.iter().map(|t| t.hand).collect() };
|
||||
let left = solidcraft_doc::thread_forms::ThreadHand::Left;
|
||||
assert_eq!(hands(&s), [left, left]);
|
||||
// What format 39 wrote: the direction as `handedness`, no pending changes.
|
||||
|
||||
@@ -266,8 +266,11 @@ impl Preset {
|
||||
opts.thread.clone_from(&self.thread);
|
||||
opts.custom_thread = None;
|
||||
opts.thread_full_depth = self.thread_options.full_length;
|
||||
opts.hand =
|
||||
if self.thread_options.handedness == "left" { solidcraft_engine::doc::thread_forms::ThreadHand::Left } else { solidcraft_engine::doc::thread_forms::ThreadHand::Right };
|
||||
opts.hand = if self.thread_options.handedness == "left" {
|
||||
solidcraft_engine::doc::thread_forms::ThreadHand::Left
|
||||
} else {
|
||||
solidcraft_engine::doc::thread_forms::ThreadHand::Right
|
||||
};
|
||||
opts.thread_depth = self.thread_options.depth.clone().unwrap_or_else(|| crate::dialogs::HoleOpts::default().thread_depth);
|
||||
// Existing placement picks stay with this dialog. To Object stores its mode only:
|
||||
// recalling it always asks for a fresh destination in the current design.
|
||||
|
||||
Reference in New Issue
Block a user