Merge fixes from the first SMLib test pass

Model cache key covers the crates develop's kernel adds under doc (profile, smlib, step).
A piece taking a name also takes the feature that made it: SMLib lists a cut's pieces in another
order, and the swap left the name on a piece of the wrong feature.
A replaced analysis keeps its status slot. A command with no world picks does not place the model
first, so assembly.mass_properties answers for a flattening placement. FeatureCommon loses the
touching key the merge added; only the contracts that read it take it.
Two of main's tests listed as failing on SMLib, with why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk
This commit is contained in:
brett19
2026-10-31 18:44:56 -07:00
parent 51d7ad09e2
commit 11a89713c7
6 changed files with 13 additions and 8 deletions
+5 -2
View File
@@ -749,10 +749,13 @@ pub(crate) fn order_lumps(bodies: &mut [crate::ModelBody], origin: &Arc<crate::n
let keys: Option<Vec<(String, usize)>> = members.iter().map(|i| bodies.get(*i).and_then(least).map(|k| (k, *i))).collect();
let Some(mut keys) = keys else { continue };
keys.sort();
let names: Vec<String> = members.iter().filter_map(|i| bodies.get(*i).map(|b| b.name.clone())).collect();
for (name, (_, i)) in names.into_iter().zip(keys) {
// A name goes with the feature that made it: the piece taking the first name is the body
// the feature was given, whichever piece the kernel lists first.
let names: Vec<(String, u64)> = members.iter().filter_map(|i| bodies.get(*i).map(|b| (b.name.clone(), b.feature))).collect();
for ((name, feature), (_, i)) in names.into_iter().zip(keys) {
if let Some(b) = bodies.get_mut(i) {
b.name = name;
b.feature = feature;
}
}
}
+2 -1
View File
@@ -167,8 +167,9 @@ fn set(s: &mut Session, p: &Value, a: SurfaceAnalysis) -> Result<Value> {
if bool_(p, "clear").unwrap_or(false) {
s.analysis = None;
} else {
s.analyses_off(Some(a.command()));
// In this order: a replaced analysis keeps its status slot.
s.analysis = Some(a);
s.analyses_off(Some(a.command()));
}
s.status_analysis_changed((!bool_(p, "clear").unwrap_or(false)).then_some(crate::status_items::StatusId::SurfaceAnalysis));
s.revision += 1;
+3 -1
View File
@@ -425,7 +425,9 @@ impl Drop for Nested {
/// `params` with world picks mapped into component frames (`None`: nothing to change). A model
/// that cannot be placed is the error.
pub fn to_local(s: &Session, id: &str, params: &Value) -> crate::Result<Option<Value>> {
if !placed(s) {
// A command with no world picks has nothing to map, and may not need the bodies placed.
let picks = !table(id).is_empty() || matches!(id, "library.apply" | "timeline.redefine" | "sketch.redefine");
if !picks || !placed(s) {
return Ok(None);
}
let world = s.world_state()?;
-3
View File
@@ -1180,9 +1180,6 @@ pub struct FeatureCommon {
/// feature.
#[serde(default)]
pub participants: Option<StringList>,
/// What a join makes of pieces that share no face. Default: separate.
#[serde(default)]
pub touching: Option<TouchingParam>,
}
/// Deserializes a flattened [`FeatureCommon`] (or [`ConstructionCommon`], [`PlaneCommon`]) from
+1 -1
View File
@@ -13,7 +13,7 @@ use std::process::Command;
/// The workspace crates a design's model is computed from: `doc` and every workspace crate it
/// depends on (a test checks the list against their manifests).
const EVALUATION_CRATES: [&str; 6] = ["geom", "sketch", "kernel", "render", "derive", "doc"];
const EVALUATION_CRATES: [&str; 9] = ["geom", "profile", "smlib", "step", "sketch", "kernel", "render", "derive", "doc"];
/// The other files the saved model depends on, relative to the workspace root.
const EVALUATION_FILES: [&str; 3] = ["crates/io/build.rs", "crates/io/src/design/native_cache.rs", ".cargo/config.toml"];
/// What under `vendor/` does not compute models: notes, and the interface's renderer.
+2
View File
@@ -10,6 +10,8 @@
# Baseline: develop 38fd4a4f6 (CI run 41157648345, x86_64 Linux), after the SMLib eaa998a pin.
solidcraft-cli::action_matrix::action_matrix_sample 3 baseline actions fail on SMLib: 2 shells (Bad Loop Orient on issue-616-lid-ribs; status 1001 on filleted-shelled-box, shelled again open at an inner wall), 1 fillet (SmSurfOfRevolution Test #7 on oblique_cut_of_cylinder)
solidcraft-cli::naming_corpus::corpus_designs_name_alike_every_build_and_fail_where_a_reference_is_gone oracle/83-boundary-loop-thicken does not load: step 8, SMLib thicken status 1001
solidcraft-engine::cmd::sketch::face::tests::a_sketch_on_the_ring_of_a_lid_underside_parted_by_its_lip_keeps_the_cap main's test: on SMLib the ring is named F14:start#[...], the lid's own start, not F2:top, the case's top it rests on, so the lookup finds no ring
solidcraft-engine::cmd::sketch::ids_tests::a_curve_id_that_cannot_be_written_into_a_name_is_refused main's test: an extruded circle on SMLib has a seam edge, the side face on both its sides, named F2:side:c1 with no second face
solidcraft-engine::tests::fillet_fit_taper_closes_to_a_point SMLib fillet status 1001 on the taper fit (radius 16 closing to 0)
solidcraft-kernel::blend::corner_tests::a_round_ending_in_an_earlier_round_matches_both_together SMLib fillet status 1001 on the round that ends in the earlier one
solidcraft-kernel::blend::corner_tests::corner_blends_hold_at_any_scale at 0.01x the arc case's rounds remove 72.783 (scaled back) against 72.713 at 1x (9.6e-4 off, 1e-4 allowed)