Turn on the tight box and low angle start flags, hold the rest with what was checked
`face_tight_box_searches_trim` goes on now that solidcore#1961 brings fork 326de73. `ssi_low_angle_start_on_probation` goes on: fork 30d25bf was rebased to 1f5c0f7, in SMLIB_REV. Three port fixes and the new `extent3d_contains_both_segment_endpoints` stay held: the defects are still in the fork's source at 2fc375f. `measure::check` no longer matches `check_brep`'s operation string. solidcore does not raise that error (a Caller body without keys is checked under arena identities), so the arm was dead; the refusal is decided on the typed `NamingScheme` alone, and a test holds it there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk
This commit is contained in:
1 parent
bdc9c8f1eb
commit
29134cfb80
3 files changed
+31
-16
No files matched your search
+10
-10
@@ -241,6 +241,8 @@ pub(crate) fn fixes() -> UpstreamFixes {
|
||||
f.fillet_mitre_gap_patch = true;
|
||||
f.fillet_run_on_past_far_end_only = true;
|
||||
f.good_drop_result_distances_in_order = true;
|
||||
f.face_tight_box_searches_trim = true;
|
||||
f.ssi_low_angle_start_on_probation = true;
|
||||
f
|
||||
}
|
||||
|
||||
@@ -266,17 +268,16 @@ pub(crate) fn fixes() -> UpstreamFixes {
|
||||
/// `fillet_half_degree_crease` (2e8758b), `fillet_split_edge_keeps_near_half` (ceb3272) and
|
||||
/// `curve_loop_normal_from_area` (be45e8d).
|
||||
///
|
||||
/// Held back though its fork commit is in `SMLIB_REV`, because solidcore has only half of the fork's
|
||||
/// fix: `face_tight_box_searches_trim` (beb6061) without 326de73 (solidcore#1961), which divides a
|
||||
/// cell at the surface's knots, so a screw thread's tight box overshoots (15 thread cases).
|
||||
///
|
||||
/// `geometric_g2_continuity`: no fork commit; the C++ still has the defect at SmGeomUtility.cpp:5822
|
||||
/// (crashes/2992: 183 faces against 831).
|
||||
///
|
||||
/// `fillet_corner_variable_radius_rail_on_opposite_fillet` (WR-645, #968),
|
||||
/// `sphere_from_arcs_common_centre` and `dupin_bottom_hyperbola_axis` (WR-69) are the port's fixes
|
||||
/// with no fork commit in `SMLIB_REV`, and `ssi_low_angle_start_on_probation` (WR-79, #396) ports
|
||||
/// fork 30d25bf, which is not in it.
|
||||
/// Upstream's defect is still in the fork's source at `SMLIB_REV` 2fc375f:
|
||||
/// `fillet_corner_variable_radius_rail_on_opposite_fillet` (WR-645: `MakeVariableRadiusFillet` has
|
||||
/// only the concave corner's rail-rail test before resetting the edges, no test of the rail against
|
||||
/// the opposite fillet), `sphere_from_arcs_common_centre` (WR-103: `CreateSphereFromArcs` compares
|
||||
/// `sRefFrame`'s origin with `rOrigin`, a reference to it), `dupin_bottom_hyperbola_axis` (WR-69:
|
||||
/// `MakeDupin`'s bottom hyperbola takes k2 for both axes) and
|
||||
/// `extent3d_contains_both_segment_endpoints` (WR-3: `ContainsLineSeg3d` ors its two points).
|
||||
#[cfg(test)]
|
||||
const HELD_BACK: &[&str] = &[
|
||||
"precise_properties_trim_base_v",
|
||||
@@ -287,7 +288,6 @@ const HELD_BACK: &[&str] = &[
|
||||
"ellipse_step_interval_checks",
|
||||
"perspective_sphere_offsets",
|
||||
"corner_patch_face_side_twist",
|
||||
"face_tight_box_searches_trim",
|
||||
"boolean_union_refuses_solid_leak",
|
||||
"curve_loop_start_after_previous_end",
|
||||
"loop_use_reports_open_gaps",
|
||||
@@ -299,7 +299,7 @@ const HELD_BACK: &[&str] = &[
|
||||
"fillet_corner_variable_radius_rail_on_opposite_fillet",
|
||||
"sphere_from_arcs_common_centre",
|
||||
"dupin_bottom_hyperbola_axis",
|
||||
"ssi_low_angle_start_on_probation",
|
||||
"extent3d_contains_both_segment_endpoints",
|
||||
];
|
||||
|
||||
fn fresh() -> Kernel {
|
||||
|
||||
@@ -284,8 +284,7 @@ enum Refusal {
|
||||
/// A test solidcore has not ported (its [`SolidError::Unported`]).
|
||||
Unported(&'static str, &'static str),
|
||||
/// A body whose geometry owners' identities the check cannot know: a
|
||||
/// [`NamingScheme::Unknown`] body, or a [`NamingScheme::Caller`] one whose maker did not
|
||||
/// record its keys (`check_brep`'s [`SolidError::InvalidInput`]).
|
||||
/// [`NamingScheme::Unknown`] body.
|
||||
Naming(NamingScheme),
|
||||
}
|
||||
|
||||
@@ -296,9 +295,10 @@ enum Refusal {
|
||||
///
|
||||
/// The geometry owners are named as the body's naming scheme names them: `check_brep` reads a
|
||||
/// [`NamingScheme::Caller`] body's keys from where its maker recorded them (solidcore#1585: an
|
||||
/// array import through `make_topology_from_data`, `api_brep_copy`). A [`NamingScheme::Unknown`]
|
||||
/// body, or a Caller one without recorded keys, would be checked under the arena identities, which
|
||||
/// no maker uses: every edge would fail `SmBrep` test 61 on the owner of its curve.
|
||||
/// array import through `make_topology_from_data`, `api_brep_copy`); where it recorded none, the
|
||||
/// arena identities the binders name such an entity by. A [`NamingScheme::Unknown`] body would be
|
||||
/// checked under arena identities no maker uses: every edge would fail `SmBrep` test 61 on the
|
||||
/// owner of its curve.
|
||||
///
|
||||
/// A test solidcore has not ported yet (its [`SolidError::Unported`]), or a body whose geometry
|
||||
/// owners' identities the check cannot know, fails the check with "not supported yet": the check
|
||||
@@ -316,7 +316,6 @@ pub(crate) fn check(body: &Body, level: CheckLevel) -> Result<CheckReport> {
|
||||
}
|
||||
match check_brep(k, b, lv) {
|
||||
Err(SolidError::Unported { upstream, unit }) => Ok(Err(Refusal::Unported(upstream, unit))),
|
||||
Err(SolidError::InvalidInput { operation: "topology::brep::validation::check_brep", .. }) => Ok(Err(Refusal::Naming(naming))),
|
||||
r => r.map(Ok),
|
||||
}
|
||||
})? {
|
||||
|
||||
@@ -93,6 +93,22 @@ fn checks_valid(name: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Refusing is decided on the body's naming scheme alone. An Unknown body is refused rather than
|
||||
/// reported invalid on every edge; a Caller one without recorded keys is checked under the arena
|
||||
/// identities (`check_brep` has no error for it, so no error of its can turn into a refusal).
|
||||
#[test]
|
||||
fn check_refuses_only_an_unknown_naming() {
|
||||
use solidcore::topology::NamingScheme;
|
||||
let name = |naming| {
|
||||
let (b, _) = case("box");
|
||||
b.0.lock().unwrap().set_naming(naming);
|
||||
check(&b, CheckLevel::All)
|
||||
};
|
||||
let refused = name(NamingScheme::Unknown).unwrap_err().to_string();
|
||||
assert!(refused.contains("not supported yet") && refused.contains("NamingScheme::Unknown"), "{refused}");
|
||||
name(NamingScheme::Caller).unwrap();
|
||||
}
|
||||
|
||||
/// The C++ kernel's body of the same primitive, built by its C API whatever `Op::Primitive`
|
||||
/// routes to: a body imported from solidcore's arrays is not the C++ kernel's own (its
|
||||
/// `edge_face_distance` measures to each face's surface over its domain, which the import sets).
|
||||
|
||||
Reference in new issue
Block a user