Track artifact commands and operations per-module (#7426)
* Change so that operations are stored per module * Refactor so that all modeling commands go through ExecState * Remove unneeded PartialOrd implementations * Remove artifact_commands from KclError since it was only for debugging --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -10,7 +10,8 @@ use super::{args::TyF64, DEFAULT_TOLERANCE};
|
||||
use crate::{
|
||||
errors::{KclError, KclErrorDetails},
|
||||
execution::{
|
||||
types::RuntimeType, EdgeCut, ExecState, ExtrudeSurface, FilletSurface, GeoMeta, KclValue, Solid, TagIdentifier,
|
||||
types::RuntimeType, EdgeCut, ExecState, ExtrudeSurface, FilletSurface, GeoMeta, KclValue, ModelingCmdMeta,
|
||||
Solid, TagIdentifier,
|
||||
},
|
||||
parsing::ast::types::TagNode,
|
||||
std::Args,
|
||||
@ -111,20 +112,21 @@ async fn inner_fillet(
|
||||
for _ in 0..num_extra_ids {
|
||||
extra_face_ids.push(exec_state.next_uuid());
|
||||
}
|
||||
args.batch_end_cmd(
|
||||
id,
|
||||
ModelingCmd::from(mcmd::Solid3dFilletEdge {
|
||||
edge_id: None,
|
||||
edge_ids: edge_ids.clone(),
|
||||
extra_face_ids,
|
||||
strategy: Default::default(),
|
||||
object_id: solid.id,
|
||||
radius: LengthUnit(radius.to_mm()),
|
||||
tolerance: LengthUnit(tolerance.as_ref().map(|t| t.to_mm()).unwrap_or(DEFAULT_TOLERANCE)),
|
||||
cut_type: CutType::Fillet,
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
exec_state
|
||||
.batch_end_cmd(
|
||||
ModelingCmdMeta::from_args_id(&args, id),
|
||||
ModelingCmd::from(mcmd::Solid3dFilletEdge {
|
||||
edge_id: None,
|
||||
edge_ids: edge_ids.clone(),
|
||||
extra_face_ids,
|
||||
strategy: Default::default(),
|
||||
object_id: solid.id,
|
||||
radius: LengthUnit(radius.to_mm()),
|
||||
tolerance: LengthUnit(tolerance.as_ref().map(|t| t.to_mm()).unwrap_or(DEFAULT_TOLERANCE)),
|
||||
cut_type: CutType::Fillet,
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let new_edge_cuts = edge_ids.into_iter().map(|edge_id| EdgeCut::Fillet {
|
||||
id,
|
||||
|
Reference in New Issue
Block a user