Change tolerance to use the module units
This commit is contained in:
@ -167,7 +167,7 @@ async fn inner_fillet(
|
|||||||
edge_id,
|
edge_id,
|
||||||
object_id: solid.id,
|
object_id: solid.id,
|
||||||
radius: LengthUnit(radius),
|
radius: LengthUnit(radius),
|
||||||
tolerance: LengthUnit(tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
|
tolerance: LengthUnit(tolerance.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into()))),
|
||||||
cut_type: CutType::Fillet,
|
cut_type: CutType::Fillet,
|
||||||
// We make this a none so that we can remove it in the future.
|
// We make this a none so that we can remove it in the future.
|
||||||
face_id: None,
|
face_id: None,
|
||||||
|
@ -149,7 +149,7 @@ async fn inner_loft(
|
|||||||
section_ids: sketches.iter().map(|group| group.id).collect(),
|
section_ids: sketches.iter().map(|group| group.id).collect(),
|
||||||
base_curve_index,
|
base_curve_index,
|
||||||
bez_approximate_rational,
|
bez_approximate_rational,
|
||||||
tolerance: LengthUnit(tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
|
tolerance: LengthUnit(tolerance.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into()))),
|
||||||
v_degree,
|
v_degree,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -239,7 +239,10 @@ async fn inner_revolve(
|
|||||||
target: sketch.id.into(),
|
target: sketch.id.into(),
|
||||||
axis,
|
axis,
|
||||||
origin,
|
origin,
|
||||||
tolerance: LengthUnit(data.tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
|
tolerance: LengthUnit(
|
||||||
|
data.tolerance
|
||||||
|
.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into())),
|
||||||
|
),
|
||||||
axis_is_2d: true,
|
axis_is_2d: true,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
@ -253,7 +256,10 @@ async fn inner_revolve(
|
|||||||
angle,
|
angle,
|
||||||
target: sketch.id.into(),
|
target: sketch.id.into(),
|
||||||
edge_id,
|
edge_id,
|
||||||
tolerance: LengthUnit(data.tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
|
tolerance: LengthUnit(
|
||||||
|
data.tolerance
|
||||||
|
.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into())),
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
@ -163,7 +163,7 @@ async fn inner_sweep(
|
|||||||
target: sketch.id.into(),
|
target: sketch.id.into(),
|
||||||
trajectory,
|
trajectory,
|
||||||
sectional: sectional.unwrap_or(false),
|
sectional: sectional.unwrap_or(false),
|
||||||
tolerance: LengthUnit(tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
|
tolerance: LengthUnit(tolerance.unwrap_or_else(|| default_tolerance(&exec_state.length_unit().into()))),
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
Reference in New Issue
Block a user