Change default tolerance value to not depend on units (#6055)

This commit is contained in:
Jonathan Tran
2025-03-31 15:28:15 -04:00
committed by GitHub
parent 0b1e79871f
commit d8e84cb5e3
5 changed files with 15 additions and 24 deletions

View File

@ -7,11 +7,12 @@ use kittycad_modeling_cmds::{self as kcmc};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use super::DEFAULT_TOLERANCE;
use crate::{
errors::KclError,
execution::{types::RuntimeType, ExecState, Helix, KclValue, Sketch, Solid},
parsing::ast::types::TagNode,
std::{extrude::do_post_extrude, fillet::default_tolerance, Args},
std::{extrude::do_post_extrude, Args},
};
/// A path to sweep along.
@ -191,7 +192,7 @@ async fn inner_sweep(
target: sketch.id.into(),
trajectory,
sectional: sectional.unwrap_or(false),
tolerance: LengthUnit(tolerance.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into()))),
tolerance: LengthUnit(tolerance.unwrap_or(DEFAULT_TOLERANCE)),
}),
)
.await?;