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
@@ -2,7 +2,7 @@
|
||||
//! centre of mass of bodies.
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use solvecraft_geom::{Seg2, Vec2, Vec3};
|
||||
use solidcraft_geom::{Seg2, Vec2, Vec3};
|
||||
|
||||
use super::CommandSpec;
|
||||
use crate::params::{bad, num, string_list, vec3};
|
||||
@@ -147,7 +147,7 @@ fn min_of(teeth: &[(Vec3, f64, Vec3)]) -> Option<(f64, Vec3)> {
|
||||
}
|
||||
|
||||
/// The face of a body at `at` (nearest triangle): (body index, face index).
|
||||
fn face_at(st: &solvecraft_doc::ModelState, at: Vec3) -> Option<(usize, u32)> {
|
||||
fn face_at(st: &solidcraft_doc::ModelState, at: Vec3) -> Option<(usize, u32)> {
|
||||
let mut best: Option<(f64, usize, u32)> = None;
|
||||
for (bi, b) in st.bodies.iter().enumerate() {
|
||||
let m = b.mesh();
|
||||
@@ -184,7 +184,7 @@ fn closest_on_triangle(p: Vec3, a: Vec3, b: Vec3, c: Vec3) -> Vec3 {
|
||||
|
||||
/// Smallest radius of curvature over a face of a mesh, from the turn of the vertex normals
|
||||
/// along each triangle side: (radius, where).
|
||||
fn face_min_radius(m: &solvecraft_geom::Mesh, face: u32) -> Option<(f64, Vec3)> {
|
||||
fn face_min_radius(m: &solidcraft_geom::Mesh, face: u32) -> Option<(f64, Vec3)> {
|
||||
let mut best: Option<(f64, Vec3)> = None;
|
||||
for (ti, t) in m.triangles.iter().enumerate() {
|
||||
if m.tri_face.get(ti) != Some(&face) {
|
||||
@@ -294,7 +294,7 @@ fn isocurves(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let at = vec3(v).ok_or_else(|| bad(cmd, "`faces` must list points [x,y,z]"))?;
|
||||
let (bi, f) = face_at(&st, at).ok_or_else(|| bad(cmd, "no face there"))?;
|
||||
let m = st.bodies.get(bi).map(|b| b.mesh()).ok_or_else(|| bad(cmd, "body"))?;
|
||||
for w in solvecraft_doc::iso_grid(&m, f, at, count) {
|
||||
for w in solidcraft_doc::iso_grid(&m, f, at, count) {
|
||||
out.push(w.iter().map(|q| [q.x, q.y, q.z]).collect::<Vec<_>>());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user