forked from 1b-agent/fieldcraft-upstream
Rename the project to FieldCraft
Crates fieldcraft-*, binaries fieldcraft and fieldcraft-cli, the .fieldcraft file (format tag fieldcraft/1, manifest fieldcraft.json), FIELDCRAFT_* environment variables, the MCP server name, egui widget ids (fc_*), the app icon document FieldCraft.icon and its generated family, docs and licences. No compatibility shim: no files of the earlier name exist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
9bc4e1b182
commit
d5bd74570f
268 files changed
+1666
-1666
No files matched your search
@@ -75,7 +75,7 @@ pub(crate) const CLEARANCE: f64 = 0.3;
|
||||
/// model's coordinate range.
|
||||
fn steiner_point(c: [f64; 2]) -> Option<Point2> {
|
||||
let c = [snap_to_domain(c[0]), snap_to_domain(c[1])];
|
||||
if !(c[0].abs() <= modelcraft_model::MAX_COORD && c[1].abs() <= modelcraft_model::MAX_COORD) {
|
||||
if !(c[0].abs() <= fieldcraft_model::MAX_COORD && c[1].abs() <= fieldcraft_model::MAX_COORD) {
|
||||
return None;
|
||||
}
|
||||
Point2::new(c[0], c[1]).ok()
|
||||
|
||||
@@ -39,7 +39,7 @@ pub(crate) fn bbox(pts: impl IntoIterator<Item = [f64; 2]>) -> ([f64; 2], [f64;
|
||||
/// Admissible exact-predicate point from user coordinates (finite, within the model limit; tiny
|
||||
/// magnitudes rounded to zero).
|
||||
pub(crate) fn admissible(c: [f64; 2]) -> Result<[f64; 2]> {
|
||||
modelcraft_model::check_coordinates(&c)?;
|
||||
fieldcraft_model::check_coordinates(&c)?;
|
||||
Ok([snap_to_domain(c[0]), snap_to_domain(c[1])])
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub(crate) fn mesh(loops: &[Vec<[f64; 2]>], size: &dyn SizeField, opts: &QuadOpt
|
||||
if l.len() % 2 == 1 {
|
||||
return Err(Error::Invalid(format!(
|
||||
"loop {k} has an odd number ({}) of boundary points; an all-quadrilateral mesh needs an even number on every loop \
|
||||
(choose the edge divisions with modelcraft_mesh::size::loop_divisions or even_divisions)",
|
||||
(choose the edge divisions with fieldcraft_mesh::size::loop_divisions or even_divisions)",
|
||||
l.len()
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ fn planar_quad_metrics() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "timing and quality report: cargo test --release -p modelcraft-mesh quad_report -- --ignored --nocapture"]
|
||||
#[ignore = "timing and quality report: cargo test --release -p fieldcraft-mesh quad_report -- --ignored --nocapture"]
|
||||
fn quad_report() {
|
||||
let cases: Vec<(&str, Vec<Vec<[f64; 2]>>, f64)> = vec![
|
||||
("rectangle", vec![rect(0.0, 0.0, 10.0, 5.0, 20, 10)], 0.5),
|
||||
|
||||
@@ -85,7 +85,7 @@ fn grid<const D: usize>(
|
||||
let count = (nu + 1).checked_mul(nv + 1).filter(|&c| c <= MAX_GRID_NODES);
|
||||
let count = count.ok_or_else(|| Error::Limit(format!("a {nu} × {nv} grid exceeds {MAX_GRID_NODES} nodes")))?;
|
||||
for side in [bottom, right, top, left] {
|
||||
modelcraft_model::check_coordinates(side.as_flattened())?;
|
||||
fieldcraft_model::check_coordinates(side.as_flattened())?;
|
||||
}
|
||||
let corner = |s: &[[f64; D]], last: bool| if last { s.last().copied() } else { s.first().copied() };
|
||||
let (p00, p10, p01, p11) = match (corner(bottom, false), corner(bottom, true), corner(top, false), corner(top, true)) {
|
||||
|
||||
Reference in new issue
Block a user