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:
1 parent
27415e4dd7
commit
296683229d
464 files changed
+3408
-2956
No files matched your search
+13
-13
@@ -1,5 +1,5 @@
|
||||
use serde::Serialize;
|
||||
use solvecraft_geom::{Mesh, Vec3};
|
||||
use solidcraft_geom::{Mesh, Vec3};
|
||||
use truck_meshalgo::prelude::*;
|
||||
use truck_modeling as mt;
|
||||
|
||||
@@ -42,12 +42,12 @@ pub struct Body {
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum FaceSource {
|
||||
ExtrudeSide { segment: solvecraft_geom::Seg2, plane: Option<solvecraft_geom::Plane>, coalesced: bool },
|
||||
CertifiedExtrudeSide { producer: u64, sketch: u64, curve: String, plane: Option<solvecraft_geom::Plane> },
|
||||
ExtrudeCap { high: bool, region: solvecraft_geom::Region2, plane: solvecraft_geom::Plane },
|
||||
CertifiedExtrudeCap { producer: u64, sketch: u64, high: bool, outer: Vec<String>, holes: Vec<Vec<String>>, plane: solvecraft_geom::Plane },
|
||||
Box { producer: Option<u64>, axis: u8, high: bool, plane: solvecraft_geom::Plane },
|
||||
ShellPlanar { producer: Option<u64>, source: Box<FaceSource>, inner: bool, plane: solvecraft_geom::Plane },
|
||||
ExtrudeSide { segment: solidcraft_geom::Seg2, plane: Option<solidcraft_geom::Plane>, coalesced: bool },
|
||||
CertifiedExtrudeSide { producer: u64, sketch: u64, curve: String, plane: Option<solidcraft_geom::Plane> },
|
||||
ExtrudeCap { high: bool, region: solidcraft_geom::Region2, plane: solidcraft_geom::Plane },
|
||||
CertifiedExtrudeCap { producer: u64, sketch: u64, high: bool, outer: Vec<String>, holes: Vec<Vec<String>>, plane: solidcraft_geom::Plane },
|
||||
Box { producer: Option<u64>, axis: u8, high: bool, plane: solidcraft_geom::Plane },
|
||||
ShellPlanar { producer: Option<u64>, source: Box<FaceSource>, inner: bool, plane: solidcraft_geom::Plane },
|
||||
Imported { item: u64, face: u64, payload_sha256: Option<String>, producer: Option<u64> },
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ pub type CapSignature = (Vec<String>, Vec<Vec<String>>);
|
||||
type FaceSources = std::sync::Arc<Vec<Option<FaceSource>>>;
|
||||
|
||||
impl FaceSource {
|
||||
fn plane_mut(&mut self) -> Option<&mut solvecraft_geom::Plane> {
|
||||
fn plane_mut(&mut self) -> Option<&mut solidcraft_geom::Plane> {
|
||||
match self {
|
||||
Self::ExtrudeSide { plane, .. } | Self::CertifiedExtrudeSide { plane, .. } => plane.as_mut(),
|
||||
Self::ExtrudeCap { plane, .. } | Self::CertifiedExtrudeCap { plane, .. } | Self::Box { plane, .. } | Self::ShellPlanar { plane, .. } => {
|
||||
@@ -494,7 +494,7 @@ impl Body {
|
||||
}
|
||||
|
||||
/// An exact construction/import plane; never inferred from tessellation.
|
||||
pub fn face_plane(&self, index: usize) -> Option<solvecraft_geom::Plane> {
|
||||
pub fn face_plane(&self, index: usize) -> Option<solidcraft_geom::Plane> {
|
||||
if index >= 50_000 {
|
||||
return None;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ impl Body {
|
||||
}
|
||||
|
||||
/// Exact current planar surface for an explicitly fixed snapshot, without source lineage.
|
||||
pub fn planar_face(&self, index: usize) -> Option<solvecraft_geom::Plane> {
|
||||
pub fn planar_face(&self, index: usize) -> Option<solidcraft_geom::Plane> {
|
||||
if index >= 50_000 {
|
||||
return None;
|
||||
}
|
||||
@@ -519,7 +519,7 @@ impl Body {
|
||||
mt::Surface::Plane(plane) => {
|
||||
let u = plane.u_axis();
|
||||
let v = plane.v_axis();
|
||||
solvecraft_geom::Plane::new(from_p3(plane.origin()), Vec3::new(u.x, u.y, u.z), Vec3::new(v.x, v.y, v.z))
|
||||
solidcraft_geom::Plane::new(from_p3(plane.origin()), Vec3::new(u.x, u.y, u.z), Vec3::new(v.x, v.y, v.z))
|
||||
}
|
||||
_ => None,
|
||||
});
|
||||
@@ -610,7 +610,7 @@ impl Body {
|
||||
let mut sources = sources.as_ref().clone();
|
||||
for source in sources.iter_mut().flatten() {
|
||||
if let Some(plane) = source.plane_mut() {
|
||||
*plane = solvecraft_geom::Plane::new(
|
||||
*plane = solidcraft_geom::Plane::new(
|
||||
vector(plane.origin) + translation,
|
||||
vector(plane.x),
|
||||
vector(plane.y) * if reflected { -1. } else { 1. },
|
||||
@@ -741,7 +741,7 @@ impl Body {
|
||||
|
||||
/// Characteristic size (bounding box diagonal) for tolerances.
|
||||
pub fn size(&self) -> f64 {
|
||||
let mut b = solvecraft_geom::Aabb3::EMPTY;
|
||||
let mut b = solidcraft_geom::Aabb3::EMPTY;
|
||||
if let Some(m) = &self.mesh {
|
||||
for p in &m.positions {
|
||||
b.add(*p);
|
||||
|
||||
Reference in new issue
Block a user