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

+1 -1
View File
@@ -40,7 +40,7 @@
use std::collections::{BTreeMap, BTreeSet, VecDeque};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::decompose::{Budget, Decomposition, enqueue};
use crate::loci::{MAX_LOCI, Reading, Rel, View, place, radii, read};
+1 -1
View File
@@ -5,7 +5,7 @@
//! and its sweep, every line its direction, every point its side of its lines.
//! Deterministic (fixed LCG seeds), no timing.
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::construct::{Placement, seed};
use crate::decompose::Budget;
+1 -1
View File
@@ -2,7 +2,7 @@
//! points that keep a degree of freedom, drag continuity, and hostile input. Deterministic
//! (fixed LCG seeds), no timing.
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::construct::{Placement, seed};
use crate::decompose::Budget;
+1 -1
View File
@@ -2,7 +2,7 @@
//! triangles joined by three links, left to the iteration by the construction) under random
//! dimension edits from its previous solved state, with every failure that remains proven
//! infeasible; and the solve without continuation when nothing it could help with changed.
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::construct::switch;
use crate::model::{ConstraintKind, Sketch};
+1 -1
View File
@@ -4,7 +4,7 @@
use std::f64::consts::TAU;
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
/// Polyline samples per spline span / conic / ellipse quarter.
const SPAN_SAMPLES: usize = 24;
+1 -1
View File
@@ -58,7 +58,7 @@
use std::collections::btree_map::Entry;
use std::collections::{BTreeMap, BTreeSet, VecDeque};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::loci::{Locus, Reading, Rel, Span, View, crossing, mag, place, side};
use crate::union_find::{find, union};
+3 -3
View File
@@ -8,7 +8,7 @@
//!
//! [`Constraint::text`]: crate::Constraint::text
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::model::{ConstraintKind, CurveKind, Sketch};
use crate::union_find::{find, union};
@@ -70,7 +70,7 @@ pub fn dim_frame(sk: &Sketch, k: &ConstraintKind) -> Option<DimFrame> {
}
}
ArcSweep { c, .. } => match sk.segs(c).first()? {
solvecraft_geom::Seg2::Arc { center, start, sweep, .. } => {
solidcraft_geom::Seg2::Arc { center, start, sweep, .. } => {
DimFrame::Angular { vertex: *center, d0: Vec2::from_angle(*start), sweep: *sweep }
}
_ => return None,
@@ -96,7 +96,7 @@ pub fn dim_frame(sk: &Sketch, k: &ConstraintKind) -> Option<DimFrame> {
DimFrame::Radial { center: sk.center(c)?, radius, diameter: matches!(k, Diameter { .. }) }
}
ArcLength { c, .. } => match sk.segs(c).first()? {
solvecraft_geom::Seg2::Arc { center, radius, start, sweep } => {
solidcraft_geom::Seg2::Arc { center, radius, start, sweep } => {
DimFrame::ArcLength { center: *center, radius: *radius, start: *start, sweep: *sweep }
}
_ => return None,
+1 -1
View File
@@ -4,7 +4,7 @@
//! bounds their distance everywhere, rather than just at selected samples.
use crate::{CurveKind, Sketch, SketchError, fit_beziers_mode};
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Seg2, Vec2};
use solidcraft_geom::{Seg2, Vec2};
pub const OFFSET_TOLERANCE: f64 = 0.002;
const MAX_PIECES: usize = 256;
+1 -1
View File
@@ -7,7 +7,7 @@
//! constants; they still bound profiles and take constraints and dimensions like any curve.
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Vec2, Vec3};
use solidcraft_geom::{Vec2, Vec3};
use crate::model::{Curve, CurveKind, Result, Sketch, SketchError, in_range, radius_in_range};
+1 -1
View File
@@ -2,7 +2,7 @@
//! Endpoint walks exclude support centres. Crossings/touches refuse before nesting.
use super::{LCurve, curve_points};
use crate::{Shape, intersections};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use std::f64::consts::TAU;
struct Boundary {
+1 -1
View File
@@ -32,7 +32,7 @@
//! Tolerances are relative to the loci's own size plus the rounding of the coordinates they
//! are computed from, so a construction far from the origin behaves like the same one near it.
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::model::{ConstraintKind, CurveKind, MAX_COORD, Sketch, in_range, radius_in_range};
use crate::union_find::{find, union};
+4 -4
View File
@@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Seg2, Vec2, Vec3};
use solidcraft_geom::{Seg2, Vec2, Vec3};
use crate::union_find::{find, union};
@@ -1120,7 +1120,7 @@ impl Sketch {
_ => Vec::new(),
},
CurveKind::Circle { c, r } => match self.point(c) {
Some(c) => solvecraft_geom::Loop2::circle(c, r).segs,
Some(c) => solidcraft_geom::Loop2::circle(c, r).segs,
None => Vec::new(),
},
CurveKind::Arc { c, a, b } => match (self.point(c), self.point(a), self.point(b)) {
@@ -1167,10 +1167,10 @@ impl Sketch {
crate::curves::fit_beziers_mode(&p, *periodic).ok()?.into_iter().map(|[p0, p1, p2, p3]| Seg2::Cubic { p0, p1, p2, p3 }).collect(),
)
}
CurveKind::Spline { pts, control: true, degree, .. } if (*degree as usize) <= solvecraft_geom::MAX_BEZIER_DEGREE => {
CurveKind::Spline { pts, control: true, degree, .. } if (*degree as usize) <= solidcraft_geom::MAX_BEZIER_DEGREE => {
let p: Vec<Vec2> = pts.iter().map(pt).collect::<Option<_>>()?;
let k = (*degree as usize).min(p.len().saturating_sub(1)).max(1);
Some(crate::curves::bspline_beziers(&p, k).iter().filter_map(|c| solvecraft_geom::bezier(c)).collect())
Some(crate::curves::bspline_beziers(&p, k).iter().filter_map(|c| solidcraft_geom::bezier(c)).collect())
}
_ => None,
}
+1 -1
View File
@@ -1,7 +1,7 @@
//! Associative offsets keep their output entity ids while their source curves move.
use crate::{CurveKind, Shape, Sketch, SketchError, intersections};
use serde::{Deserialize, Serialize};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct OffsetChain {
+1 -1
View File
@@ -3,7 +3,7 @@ use std::collections::{BTreeMap, BTreeSet};
use std::f64::consts::TAU;
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Seg2, Vec2};
use solidcraft_geom::{Seg2, Vec2};
use crate::{Curve, CurveKind, OffsetChain, Sketch, SketchError};
type Result<T> = std::result::Result<T, SketchError>;
+1 -1
View File
@@ -1,7 +1,7 @@
//! Explicit cyclic C2 fit splines. Missing periodic markers retain natural interpolation.
use crate::model::in_range;
use crate::{MAX_SPLINE_POINTS, Sketch, SketchError};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
type Result<T> = std::result::Result<T, SketchError>;
fn bad() -> SketchError {
+1 -1
View File
@@ -10,7 +10,7 @@
use std::f64::consts::TAU;
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Loop2, Region2, Seg2, Vec2};
use solidcraft_geom::{Loop2, Region2, Seg2, Vec2};
use crate::model::{CurveKind, Sketch};
use crate::shape::{Shape, intersections};
+1 -1
View File
@@ -2,7 +2,7 @@
use std::f64::consts::TAU;
use solvecraft_geom::{Seg2, Vec2};
use solidcraft_geom::{Seg2, Vec2};
use crate::model::{CurveKind, Sketch};
+3 -3
View File
@@ -14,7 +14,7 @@
//! analysis runs only on what remains.
use serde::{Deserialize, Serialize};
use solvecraft_geom::{Seg2, Vec2};
use solidcraft_geom::{Seg2, Vec2};
use crate::decompose::Budget;
use crate::linalg::{Mat, determined_vars, solve as lin_solve};
@@ -256,8 +256,8 @@ impl State<'_> {
return q.dist(p.first().copied().unwrap_or_default());
}
if *control {
let k = (*degree as usize).min(solvecraft_geom::MAX_BEZIER_DEGREE).min(p.len().saturating_sub(1)).max(1);
crate::curves::bspline_beziers(&p, k).iter().filter_map(|span| solvecraft_geom::bezier(span)).collect()
let k = (*degree as usize).min(solidcraft_geom::MAX_BEZIER_DEGREE).min(p.len().saturating_sub(1)).max(1);
crate::curves::bspline_beziers(&p, k).iter().filter_map(|span| solidcraft_geom::bezier(span)).collect()
} else {
crate::curves::fit_beziers_mode(&p, *periodic)
.unwrap_or_default()
+6 -6
View File
@@ -1,6 +1,6 @@
use std::f64::consts::{FRAC_PI_2, PI};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::*;
@@ -323,12 +323,12 @@ fn profiles_split_at_crossings_and_touch_points() {
#[test]
fn merging_adjacent_regions() {
let a =
solvecraft_geom::Region2 { outer: solvecraft_geom::Loop2::polygon(&[v(0.0, 0.0), v(10.0, 0.0), v(10.0, 10.0), v(0.0, 10.0)]), holes: vec![] };
let b = solvecraft_geom::Region2 {
outer: solvecraft_geom::Loop2::polygon(&[v(10.0, 0.0), v(20.0, 0.0), v(20.0, 10.0), v(10.0, 10.0)]),
solidcraft_geom::Region2 { outer: solidcraft_geom::Loop2::polygon(&[v(0.0, 0.0), v(10.0, 0.0), v(10.0, 10.0), v(0.0, 10.0)]), holes: vec![] };
let b = solidcraft_geom::Region2 {
outer: solidcraft_geom::Loop2::polygon(&[v(10.0, 0.0), v(20.0, 0.0), v(20.0, 10.0), v(10.0, 10.0)]),
holes: vec![],
};
let c = solvecraft_geom::Region2 { outer: solvecraft_geom::Loop2::polygon(&[v(50.0, 0.0), v(60.0, 0.0), v(60.0, 10.0)]), holes: vec![] };
let c = solidcraft_geom::Region2 { outer: solidcraft_geom::Loop2::polygon(&[v(50.0, 0.0), v(60.0, 0.0), v(60.0, 10.0)]), holes: vec![] };
let m = merge_regions(&[a, b, c]);
assert_eq!(m.len(), 2);
let mut areas: Vec<f64> = m.iter().map(|r| r.area()).collect();
@@ -446,7 +446,7 @@ fn long_connected_chain_solves() {
/// cut in two by a line through it (each side gets an exact sub-curve ending on the line).
#[test]
fn exact_profiles_for_high_degree_and_cut_free_form_curves() {
use solvecraft_geom::Seg2;
use solidcraft_geom::Seg2;
let exact_loop = |p: &Profile| p.region.outer.segs.iter().all(|s| !matches!(s, Seg2::Line { .. }) || s.length() > 1.0);
let closed = |p: &Profile| {
let s = &p.region.outer.segs;
+1 -1
View File
@@ -2,7 +2,7 @@
//! `fonts/OFL.txt` and ATTRIBUTION.md) as lines and conics (TrueType quadratic Béziers are
//! conics with rho = 0.5), so text closes into profiles that can be extruded.
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
use crate::link::LinkGeom;
use crate::model::{Result, SketchError};
+1 -1
View File
@@ -1,7 +1,7 @@
#![allow(clippy::unwrap_used, clippy::panic)]
use crate::{Constraint, ConstraintKind, CurveKind, Sketch};
use solvecraft_geom::Vec2;
use solidcraft_geom::Vec2;
fn point(sk: &mut Sketch, x: f64, y: f64) -> usize {
sk.add_point(Vec2::new(x, y), None).unwrap()
+1 -1
View File
@@ -3,7 +3,7 @@
//! They are reference geometry: drawn and usable as paths, not part of profiles or the solver.
use serde::{Deserialize, Serialize};
use solvecraft_geom::Vec3;
use solidcraft_geom::Vec3;
use crate::link::{Link, LinkGeom, LinkKind, LinkSource};
use crate::model::{Result, Sketch, SketchError, in_range3};