Rename SolveCraft to SolidCraft everywhere, with compatibility shims (#389)

* WIP deep rename (not for push)

* WIP2

* WIP3

* WIP4 wxs fix

* rustfmt

* Rename the remaining identifiers in merged crash-report code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-12 17:17:01 -04:00
1 parent 27415e4dd7
commit 296683229d
464 files changed
+3408 -2956

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
//! Crate for operationg shapes. Provides boolean operations to Solid, and shape healing for importing shapes from other CAD systems.
// SolveCraft: warnings are not errors in the vendored copy (newer compilers flag more).
// SolidCraft: warnings are not errors in the vendored copy (newer compilers flag more).
#![allow(dead_code)]
#![warn(clippy::all, rust_2018_idioms)]
#![warn(
@@ -14,7 +14,7 @@
unused_qualifications
)]
/// SolveCraft: report where an operation gives up (set `SHAPEOPS_TRACE`).
/// SolidCraft: report where an operation gives up (set `SHAPEOPS_TRACE`).
macro_rules! tr {
($e:expr, $tag:expr) => {
match $e {
@@ -37,7 +37,7 @@ pub use transversal::{
and, and_with_history, or, or_with_history, EdgeOrigin, FaceIndex, FaceOrigin, History, ShapeOpsCurve,
ShapeOpsSurface,
};
// SolveCraft: exercised by kernel regressions in the workspace CI.
// SolidCraft: exercised by kernel regressions in the workspace CI.
#[doc(hidden)]
pub use transversal::IntersectionCurveWithParameters;
mod alternative;
+2 -2
View File
@@ -21,7 +21,7 @@ where
{
let surface = face.surface();
let pt = wire.front_vertex().unwrap().point();
// SolveCraft: intersection-curve points lie on the surface only within the tolerance; fall
// SolidCraft: intersection-curve points lie on the surface only within the tolerance; fall
// back to the nearest parameter when the exact search fails.
let p: Point2 = surface
.search_parameter(pt, None, 100)
@@ -87,7 +87,7 @@ where
}
negative_wires.into_iter().try_for_each(|chunk| {
let pt = chunk.poly.front();
// SolveCraft: the innermost piece that holds the loop (nested intersection loops, such
// SolidCraft: the innermost piece that holds the loop (nested intersection loops, such
// as both walls of a tube crossing one face), never the loop's own twin.
let hole = -chunk.poly.area();
let op = crate::tr!(
@@ -26,7 +26,7 @@ impl<P, C, S> FacesClassification<P, C, S> {
pub fn and_or_unknown(&self) -> [Shell<P, C, S>; 3] {
let [mut and, mut or, mut unknown] = <[Shell<P, C, S>; 3]>::default();
for face in &self.shell {
// SolveCraft: no panics (wasm can't catch them).
// SolidCraft: no panics (wasm can't catch them).
match self.status.get(&face.id()) {
Some(ShapesOpStatus::And) => and.push(face.clone()),
Some(ShapesOpStatus::Or) => or.push(face.clone()),
+1 -1
View File
@@ -1,4 +1,4 @@
//! SolveCraft: where each face and edge of a boolean's result came from, recorded by the code
//! SolidCraft: where each face and edge of a boolean's result came from, recorded by the code
//! that builds them (never reconstructed from geometry).
//!
//! Topology ids are addresses of shared data, so they identify a face or an edge only while it
+6 -6
View File
@@ -55,7 +55,7 @@ fn process_one_pair_of_shells<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
lineage: &mut Lineage<C, S>,
) -> Option<[Shell<Point3, C, S>; 2]> {
nonpositive_tolerance!(tol);
// SolveCraft: robust meshing (boundaries from earlier operations lie on surfaces only
// SolidCraft: robust meshing (boundaries from earlier operations lie on surfaces only
// within tolerance).
let poly_shell0 = shell0.robust_triangulation(tol);
let poly_shell1 = shell1.robust_triangulation(tol);
@@ -70,7 +70,7 @@ fn process_one_pair_of_shells<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
cls1.integrate_by_component();
let [mut and0, mut or0, unknown0] = cls0.and_or_unknown();
unknown0.into_iter().try_for_each(|face| {
// SolveCraft: no panics (wasm can't catch them).
// SolidCraft: no panics (wasm can't catch them).
let pt = face.boundaries().first()?.vertex_iter().next()?.point();
let dir = hash::take_one_unit(pt);
let count = poly_shell1.iter().try_fold(0, |count, face| {
@@ -86,7 +86,7 @@ fn process_one_pair_of_shells<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
})?;
let [mut and1, mut or1, unknown1] = cls1.and_or_unknown();
unknown1.into_iter().try_for_each(|face| {
// SolveCraft: no panics (wasm can't catch them).
// SolidCraft: no panics (wasm can't catch them).
let pt = face.boundaries().first()?.vertex_iter().next()?.point();
let dir = hash::take_one_unit(pt);
let count = poly_shell0.iter().try_fold(0, |count, face| {
@@ -123,7 +123,7 @@ pub fn or<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
boolean(solid0, solid1, tol, |[_, or]| or).map(|(solid, _)| solid)
}
/// SolveCraft: AND operation between two solids, with where each face and edge of the result
/// SolidCraft: AND operation between two solids, with where each face and edge of the result
/// came from (operand 0 is `solid0`, operand 1 is `solid1`): the same result as [`and`], and
/// its history, `None` when a face or edge of it was not recorded. The operands must not share
/// faces or edges.
@@ -135,7 +135,7 @@ pub fn and_with_history<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
boolean(solid0, solid1, tol, |[and, _]| and)
}
/// SolveCraft: OR operation between two solids, with where each face and edge of the result
/// SolidCraft: OR operation between two solids, with where each face and edge of the result
/// came from (operand 0 is `solid0`, operand 1 is `solid1`): the same result as [`or`], and
/// its history, `None` when a face or edge of it was not recorded. The operands must not share
/// faces or edges.
@@ -170,7 +170,7 @@ fn boolean<C: ShapeOpsCurve<S>, S: ShapeOpsSurface>(
Some((solid, history))
}
// SolveCraft: truck's connected components come out in hash order of face addresses, so the
// SolidCraft: truck's connected components come out in hash order of face addresses, so the
// result's face order changed from run to run. Keep the shell's own order instead.
fn components_in_order<C, S>(shell: &Shell<Point3, C, S>) -> Vec<Shell<Point3, C, S>> {
let pos: rustc_hash::FxHashMap<_, usize> = shell.face_iter().enumerate().map(|(i, f)| (f.id(), i)).collect();
+1 -1
View File
@@ -20,7 +20,7 @@ fn punched_cube() {
obj::write(&poly, file).unwrap();
}
// SolveCraft: boolean history.
// SolidCraft: boolean history.
use crate::{EdgeOrigin, FaceIndex, History};
@@ -19,14 +19,14 @@ impl<S> From<IntersectionCurveWithParameters<S>> for IntersectionCurve<PolylineC
impl<S> IntersectionCurveWithParameters<S>
where S: ParametricSurface3D + SearchNearestParameter<D2, Point = Point3>
{
/// SolveCraft: construct a projected curve, returning `None` for degenerate input.
/// SolidCraft: construct a projected curve, returning `None` for degenerate input.
pub fn try_new(
surface0: S,
surface1: S,
poly: PolylineCurve<Point3>,
tol: f64,
) -> Option<Self> {
// SolveCraft: a point contact is not a curve. Reject it before indexing the
// SolidCraft: a point contact is not a curve. Reject it before indexing the
// endpoints, and reject collapsed/non-finite segments before normalizing.
if poly.len() < 2 || poly.windows(2).any(|p| {
let length2 = (p[1] - p[0]).magnitude2();
+1 -1
View File
@@ -173,7 +173,7 @@ impl<P: Copy, C: Clone> Loops<P, C> {
})
}
// SolveCraft: `replaced(old, new)` is told of every edge rebuilt on the new vertex.
// SolidCraft: `replaced(old, new)` is told of every edge rebuilt on the new vertex.
fn change_vertex(
&mut self,
old_vertex: &Vertex<P>,
+1 -1
View File
@@ -3,7 +3,7 @@ mod faces_classification;
mod history;
mod integrate;
mod intersection_curve;
// SolveCraft: expose the constructor for workspace regression coverage of the vendored fix.
// SolidCraft: expose the constructor for workspace regression coverage of the vendored fix.
#[doc(hidden)]
pub use intersection_curve::IntersectionCurveWithParameters;
mod loops_store;