diff --git a/docs/kcl-lang/modules.md b/docs/kcl-lang/modules.md index 5e78a3e5c..0b9b53271 100644 --- a/docs/kcl-lang/modules.md +++ b/docs/kcl-lang/modules.md @@ -177,7 +177,7 @@ You can also import the whole module. This is useful if you want to use the result of a module as a variable, like a part. ```norun -import "tests/inputs/cube.kcl" as cube +import "cube.kcl" cube |> translate(x=10) ``` @@ -241,7 +241,7 @@ If you want to have multiple instances of the same object, you can use the [`clone`](/docs/kcl/clone) function. This will render a new instance of the object in memory. ```norun -import cube from "tests/inputs/cube.kcl" +import cube from "cube.kcl" cube |> translate(x=10) @@ -257,7 +257,7 @@ separate objects in memory, and can be manipulated independently. Here is an example with a file from another CAD system: ```kcl -import "tests/inputs/cube.step" as cube +import "tests/inputs/cube.step" cube |> translate(x=10) diff --git a/docs/kcl-std/functions/std-array-reduce.md b/docs/kcl-std/functions/std-array-reduce.md index 0dda341c1..d16443b51 100644 --- a/docs/kcl-std/functions/std-array-reduce.md +++ b/docs/kcl-std/functions/std-array-reduce.md @@ -12,7 +12,7 @@ reduce( @array: [any], initial: any, f: fn(any, accum: any): any, -): [any] +): any ``` Take a starting value. Then, for each element of an array, calculate the next value, @@ -28,7 +28,7 @@ using the previous value and the element. ### Returns -[`[any]`](/docs/kcl-std/types/std-types-any) +[`any`](/docs/kcl-std/types/std-types-any) ### Examples diff --git a/docs/kcl-std/functions/std-math-legLen.md b/docs/kcl-std/functions/std-math-legLen.md index 8e220ece0..ab3fb18dd 100644 --- a/docs/kcl-std/functions/std-math-legLen.md +++ b/docs/kcl-std/functions/std-math-legLen.md @@ -11,7 +11,7 @@ Compute the length of the given leg. legLen( hypotenuse: number(Length), leg: number(Length), -): number(deg) +): number(Length) ``` @@ -25,7 +25,7 @@ legLen( ### Returns -[`number(deg)`](/docs/kcl-std/types/std-types-number) - A number. +[`number(Length)`](/docs/kcl-std/types/std-types-number) - A number. ### Examples diff --git a/docs/kcl-std/functions/std-sketch-revolve.md b/docs/kcl-std/functions/std-sketch-revolve.md index c84dbbc5e..03eb68d59 100644 --- a/docs/kcl-std/functions/std-sketch-revolve.md +++ b/docs/kcl-std/functions/std-sketch-revolve.md @@ -17,7 +17,7 @@ revolve( bidirectionalAngle?: number(Angle), tagStart?: tag, tagEnd?: tag, -): Solid +): [Solid; 1+] ``` This, like extrude, is able to create a 3-dimensional solid from a @@ -46,7 +46,7 @@ revolved around the same axis. ### Returns -[`Solid`](/docs/kcl-std/types/std-types-Solid) - A solid is a collection of extruded surfaces. +[`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid) ### Examples diff --git a/public/kcl-samples/spinning-highrise-tower/main.kcl b/public/kcl-samples/spinning-highrise-tower/main.kcl index c90f7fe92..f548cd074 100644 --- a/public/kcl-samples/spinning-highrise-tower/main.kcl +++ b/public/kcl-samples/spinning-highrise-tower/main.kcl @@ -63,9 +63,9 @@ slabVoidStart = -slabWidth / 2 + handrailThickness slabVoidWidth = slabWidth - (handrailThickness * 2) slabVoidShape = startSketchOn(slabAndHandrailGeometry, face = END) |> startProfile(%, at = [slabVoidStart, slabVoidStart]) - |> line(%, end = [0, slabVoidWidth], %) - |> line(%, end = [slabVoidWidth, 0], %) - |> line(%, end = [0, -slabVoidWidth], %) + |> line(%, end = [0, slabVoidWidth]) + |> line(%, end = [slabVoidWidth, 0]) + |> line(%, end = [0, -slabVoidWidth]) |> line(endAbsolute = [profileStartX(%), profileStartY(%)]) |> close(%) diff --git a/rust/kcl-lib/src/execution/artifact.rs b/rust/kcl-lib/src/execution/artifact.rs index b11430d41..c85b4f2c5 100644 --- a/rust/kcl-lib/src/execution/artifact.rs +++ b/rust/kcl-lib/src/execution/artifact.rs @@ -2,18 +2,17 @@ use fnv::FnvHashMap; use indexmap::IndexMap; use kittycad_modeling_cmds::{ self as kcmc, - id::ModelingCmdId, ok_response::OkModelingCmdResponse, shared::ExtrusionFaceCapType, websocket::{BatchResponse, OkWebSocketResponseData, WebSocketResponse}, EnableSketchMode, ModelingCmd, }; -use schemars::JsonSchema; use serde::{ser::SerializeSeq, Serialize}; use uuid::Uuid; use crate::{ errors::KclErrorDetails, + execution::ArtifactId, parsing::ast::types::{Node, Program}, KclError, NodePath, SourceRange, }; @@ -58,52 +57,6 @@ impl PartialOrd for ArtifactCommand { } } -#[derive(Debug, Clone, Copy, Serialize, PartialEq, Eq, Ord, PartialOrd, Hash, ts_rs::TS, JsonSchema)] -#[ts(export_to = "Artifact.ts")] -pub struct ArtifactId(Uuid); - -impl ArtifactId { - pub fn new(uuid: Uuid) -> Self { - Self(uuid) - } -} - -impl From for ArtifactId { - fn from(uuid: Uuid) -> Self { - Self::new(uuid) - } -} - -impl From<&Uuid> for ArtifactId { - fn from(uuid: &Uuid) -> Self { - Self::new(*uuid) - } -} - -impl From for Uuid { - fn from(id: ArtifactId) -> Self { - id.0 - } -} - -impl From<&ArtifactId> for Uuid { - fn from(id: &ArtifactId) -> Self { - id.0 - } -} - -impl From for ArtifactId { - fn from(id: ModelingCmdId) -> Self { - Self::new(*id.as_ref()) - } -} - -impl From<&ModelingCmdId> for ArtifactId { - fn from(id: &ModelingCmdId) -> Self { - Self::new(*id.as_ref()) - } -} - pub type DummyPathToNode = Vec<()>; fn serialize_dummy_path_to_node(_path_to_node: &DummyPathToNode, serializer: S) -> Result diff --git a/rust/kcl-lib/src/execution/cad_op.rs b/rust/kcl-lib/src/execution/cad_op.rs index 0125253d6..e0db94b3f 100644 --- a/rust/kcl-lib/src/execution/cad_op.rs +++ b/rust/kcl-lib/src/execution/cad_op.rs @@ -3,7 +3,7 @@ use schemars::JsonSchema; use serde::Serialize; use super::{types::NumericType, ArtifactId, KclValue}; -use crate::{docs::StdLibFn, ModuleId, SourceRange}; +use crate::{ModuleId, SourceRange}; /// A CAD modeling operation for display in the feature tree, AKA operations /// timeline. @@ -13,21 +13,6 @@ use crate::{docs::StdLibFn, ModuleId, SourceRange}; pub enum Operation { #[serde(rename_all = "camelCase")] StdLibCall { - /// The standard library function being called. - #[serde(flatten)] - std_lib_fn: StdLibFnRef, - /// The unlabeled argument to the function. - unlabeled_arg: Option, - /// The labeled keyword arguments to the function. - labeled_args: IndexMap, - /// The source range of the operation in the source code. - source_range: SourceRange, - /// True if the operation resulted in an error. - #[serde(default, skip_serializing_if = "is_false")] - is_error: bool, - }, - #[serde(rename_all = "camelCase")] - KclStdLibCall { name: String, /// The unlabeled argument to the function. unlabeled_arg: Option, @@ -57,19 +42,12 @@ impl PartialOrd for Operation { fn partial_cmp(&self, other: &Self) -> Option { Some(match (self, other) { (Self::StdLibCall { source_range: a, .. }, Self::StdLibCall { source_range: b, .. }) => a.cmp(b), - (Self::StdLibCall { source_range: a, .. }, Self::KclStdLibCall { source_range: b, .. }) => a.cmp(b), (Self::StdLibCall { source_range: a, .. }, Self::GroupBegin { source_range: b, .. }) => a.cmp(b), (Self::StdLibCall { .. }, Self::GroupEnd) => std::cmp::Ordering::Less, - (Self::KclStdLibCall { source_range: a, .. }, Self::KclStdLibCall { source_range: b, .. }) => a.cmp(b), - (Self::KclStdLibCall { source_range: a, .. }, Self::StdLibCall { source_range: b, .. }) => a.cmp(b), - (Self::KclStdLibCall { source_range: a, .. }, Self::GroupBegin { source_range: b, .. }) => a.cmp(b), - (Self::KclStdLibCall { .. }, Self::GroupEnd) => std::cmp::Ordering::Less, (Self::GroupBegin { source_range: a, .. }, Self::GroupBegin { source_range: b, .. }) => a.cmp(b), (Self::GroupBegin { source_range: a, .. }, Self::StdLibCall { source_range: b, .. }) => a.cmp(b), - (Self::GroupBegin { source_range: a, .. }, Self::KclStdLibCall { source_range: b, .. }) => a.cmp(b), (Self::GroupBegin { .. }, Self::GroupEnd) => std::cmp::Ordering::Less, (Self::GroupEnd, Self::StdLibCall { .. }) => std::cmp::Ordering::Greater, - (Self::GroupEnd, Self::KclStdLibCall { .. }) => std::cmp::Ordering::Greater, (Self::GroupEnd, Self::GroupBegin { .. }) => std::cmp::Ordering::Greater, (Self::GroupEnd, Self::GroupEnd) => std::cmp::Ordering::Equal, }) @@ -81,7 +59,6 @@ impl Operation { pub(crate) fn set_std_lib_call_is_error(&mut self, is_err: bool) { match self { Self::StdLibCall { ref mut is_error, .. } => *is_error = is_err, - Self::KclStdLibCall { ref mut is_error, .. } => *is_error = is_err, Self::GroupBegin { .. } | Self::GroupEnd => {} } } @@ -107,6 +84,7 @@ pub enum Group { labeled_args: IndexMap, }, /// A whole-module import use. + #[allow(dead_code)] #[serde(rename_all = "camelCase")] ModuleInstance { /// The name of the module being used. @@ -135,54 +113,6 @@ impl OpArg { } } -/// A reference to a standard library function. This exists to implement -/// `PartialEq` and `Eq` for `Operation`. -#[derive(Debug, Clone, Serialize, ts_rs::TS, JsonSchema)] -#[ts(export_to = "Operation.ts")] -#[serde(rename_all = "camelCase")] -pub struct StdLibFnRef { - // The following doc comment gets inlined into Operation, overriding what's - // there, in the generated TS. We serialize to its name. Renaming the - // field to "name" allows it to match the other variant. - /// The standard library function being called. - #[serde( - rename = "name", - serialize_with = "std_lib_fn_name", - deserialize_with = "std_lib_fn_from_name" - )] - #[ts(type = "string", rename = "name")] - pub std_lib_fn: Box, -} - -impl StdLibFnRef { - pub(crate) fn new(std_lib_fn: Box) -> Self { - Self { std_lib_fn } - } -} - -impl From<&Box> for StdLibFnRef { - fn from(std_lib_fn: &Box) -> Self { - Self::new(std_lib_fn.clone()) - } -} - -impl PartialEq for StdLibFnRef { - fn eq(&self, other: &Self) -> bool { - self.std_lib_fn.name() == other.std_lib_fn.name() - } -} - -impl Eq for StdLibFnRef {} - -#[expect(clippy::borrowed_box, reason = "Explicit Box is needed for serde")] -fn std_lib_fn_name(std_lib_fn: &Box, serializer: S) -> Result -where - S: serde::Serializer, -{ - let name = std_lib_fn.name(); - serializer.serialize_str(&name) -} - fn is_false(b: &bool) -> bool { !*b } diff --git a/rust/kcl-lib/src/execution/exec_ast.rs b/rust/kcl-lib/src/execution/exec_ast.rs index 4e852dd04..a9949b673 100644 --- a/rust/kcl-lib/src/execution/exec_ast.rs +++ b/rust/kcl-lib/src/execution/exec_ast.rs @@ -1,42 +1,32 @@ use std::collections::HashMap; use async_recursion::async_recursion; -use indexmap::IndexMap; -#[cfg(feature = "artifact-graph")] -use crate::execution::cad_op::{Group, OpArg, OpKclValue, Operation}; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ annotations, + fn_call::Args, kcl_value::{FunctionSource, TypeDef}, memory, state::ModuleState, types::{NumericType, PrimitiveType, RuntimeType}, - BodyType, EnvironmentRef, ExecState, ExecutorContext, KclValue, Metadata, PlaneType, TagEngineInfo, + BodyType, EnvironmentRef, ExecState, ExecutorContext, KclValue, Metadata, PlaneType, StatementKind, TagIdentifier, }, fmt, modules::{ModuleId, ModulePath, ModuleRepr}, parsing::ast::types::{ Annotation, ArrayExpression, ArrayRangeExpression, AscribedExpression, BinaryExpression, BinaryOperator, - BinaryPart, BodyItem, CallExpressionKw, Expr, FunctionExpression, IfExpression, ImportPath, ImportSelector, - ItemVisibility, LiteralIdentifier, LiteralValue, MemberExpression, MemberObject, Name, Node, NodeRef, - ObjectExpression, PipeExpression, Program, TagDeclarator, Type, UnaryExpression, UnaryOperator, + BinaryPart, BodyItem, Expr, IfExpression, ImportPath, ImportSelector, ItemVisibility, LiteralIdentifier, + LiteralValue, MemberExpression, MemberObject, Name, Node, NodeRef, ObjectExpression, PipeExpression, Program, + TagDeclarator, Type, UnaryExpression, UnaryOperator, }, source_range::SourceRange, - std::{ - args::{Arg, Args, KwArgs, TyF64}, - FunctionKind, - }, + std::args::TyF64, CompilationError, }; -enum StatementKind<'a> { - Declaration { name: &'a str }, - Expression, -} - impl<'a> StatementKind<'a> { fn expect_name(&self) -> &'a str { match self { @@ -594,7 +584,7 @@ impl ExecutorContext { } #[async_recursion] - async fn execute_expr<'a: 'async_recursion>( + pub(super) async fn execute_expr<'a: 'async_recursion>( &self, init: &Expr, exec_state: &mut ExecState, @@ -787,7 +777,7 @@ impl BinaryPart { } impl Node { - async fn get_result<'a>( + pub(super) async fn get_result<'a>( &self, exec_state: &'a mut ExecState, ctx: &ExecutorContext, @@ -1305,300 +1295,6 @@ async fn inner_execute_pipe_body( Ok(final_output) } -impl Node { - #[async_recursion] - pub async fn execute(&self, exec_state: &mut ExecState, ctx: &ExecutorContext) -> Result { - let fn_name = &self.callee; - let callsite: SourceRange = self.into(); - - // Build a hashmap from argument labels to the final evaluated values. - let mut fn_args = IndexMap::with_capacity(self.arguments.len()); - let mut errors = Vec::new(); - for arg_expr in &self.arguments { - let source_range = SourceRange::from(arg_expr.arg.clone()); - let metadata = Metadata { source_range }; - let value = ctx - .execute_expr(&arg_expr.arg, exec_state, &metadata, &[], StatementKind::Expression) - .await?; - let arg = Arg::new(value, source_range); - match &arg_expr.label { - Some(l) => { - fn_args.insert(l.name.clone(), arg); - } - None => { - if let Some(id) = arg_expr.arg.ident_name() { - fn_args.insert(id.to_owned(), arg); - } else { - errors.push(arg); - } - } - } - } - - // Evaluate the unlabeled first param, if any exists. - let unlabeled = if let Some(ref arg_expr) = self.unlabeled { - let source_range = SourceRange::from(arg_expr.clone()); - let metadata = Metadata { source_range }; - let value = ctx - .execute_expr(arg_expr, exec_state, &metadata, &[], StatementKind::Expression) - .await?; - - let label = arg_expr.ident_name().map(str::to_owned); - - Some((label, Arg::new(value, source_range))) - } else { - None - }; - - let mut args = Args::new_kw( - KwArgs { - unlabeled, - labeled: fn_args, - errors, - }, - self.into(), - ctx.clone(), - exec_state.pipe_value().map(|v| Arg::new(v.clone(), callsite)), - ); - match ctx.stdlib.get_either(fn_name) { - FunctionKind::Core(func) => { - if func.deprecated() { - exec_state.warn(CompilationError::err( - self.callee.as_source_range(), - format!("`{fn_name}` is deprecated, see the docs for a recommended replacement"), - )); - } - - let formals = func.args(false); - - // If it's possible the input arg was meant to be labelled and we probably don't want to use - // it as the input arg, then treat it as labelled. - if let Some((Some(label), _)) = &args.kw_args.unlabeled { - if (formals.iter().all(|a| a.label_required) || exec_state.pipe_value().is_some()) - && formals.iter().any(|a| &a.name == label && a.label_required) - && !args.kw_args.labeled.contains_key(label) - { - let (label, arg) = args.kw_args.unlabeled.take().unwrap(); - args.kw_args.labeled.insert(label.unwrap(), arg); - } - } - - #[cfg(feature = "artifact-graph")] - let op = if func.feature_tree_operation() { - let op_labeled_args = args - .kw_args - .labeled - .iter() - .map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range))) - .collect(); - Some(Operation::StdLibCall { - std_lib_fn: (&func).into(), - unlabeled_arg: args - .unlabeled_kw_arg_unconverted() - .map(|arg| OpArg::new(OpKclValue::from(&arg.value), arg.source_range)), - labeled_args: op_labeled_args, - source_range: callsite, - is_error: false, - }) - } else { - None - }; - - for (label, arg) in &args.kw_args.labeled { - match formals.iter().find(|p| &p.name == label) { - Some(p) => { - if !p.label_required { - exec_state.err(CompilationError::err( - arg.source_range, - format!( - "The function `{fn_name}` expects an unlabeled first parameter (`{label}`), but it is labelled in the call" - ), - )); - } - } - None => { - exec_state.err(CompilationError::err( - arg.source_range, - format!("`{label}` is not an argument of `{fn_name}`"), - )); - } - } - } - - // Attempt to call the function. - let mut return_value = { - // Don't early-return in this block. - exec_state.mut_stack().push_new_env_for_rust_call(); - let result = func.std_lib_fn()(exec_state, args).await; - exec_state.mut_stack().pop_env(); - - #[cfg(feature = "artifact-graph")] - if let Some(mut op) = op { - op.set_std_lib_call_is_error(result.is_err()); - // Track call operation. We do this after the call - // since things like patternTransform may call user code - // before running, and we will likely want to use the - // return value. The call takes ownership of the args, - // so we need to build the op before the call. - exec_state.global.operations.push(op); - } - - result - }?; - - update_memory_for_tags_of_geometry(&mut return_value, exec_state)?; - - Ok(return_value) - } - FunctionKind::UserDefined => { - // Clone the function so that we can use a mutable reference to - // exec_state. - let func = fn_name.get_result(exec_state, ctx).await?.clone(); - - let Some(fn_src) = func.as_fn() else { - return Err(KclError::Semantic(KclErrorDetails { - message: "cannot call this because it isn't a function".to_string(), - source_ranges: vec![callsite], - })); - }; - - let return_value = fn_src - .call_kw(Some(fn_name.to_string()), exec_state, ctx, args, callsite) - .await - .map_err(|e| { - // Add the call expression to the source ranges. - e.add_source_ranges(vec![callsite]) - })?; - - let result = return_value.ok_or_else(move || { - let mut source_ranges: Vec = vec![callsite]; - // We want to send the source range of the original function. - if let KclValue::Function { meta, .. } = func { - source_ranges = meta.iter().map(|m| m.source_range).collect(); - }; - KclError::UndefinedValue(KclErrorDetails { - message: format!("Result of user-defined function {} is undefined", fn_name), - source_ranges, - }) - })?; - - Ok(result) - } - } - } -} - -fn update_memory_for_tags_of_geometry(result: &mut KclValue, exec_state: &mut ExecState) -> Result<(), KclError> { - // If the return result is a sketch or solid, we want to update the - // memory for the tags of the group. - // TODO: This could probably be done in a better way, but as of now this was my only idea - // and it works. - match result { - KclValue::Sketch { value } => { - for (name, tag) in value.tags.iter() { - if exec_state.stack().cur_frame_contains(name) { - exec_state.mut_stack().update(name, |v, _| { - v.as_mut_tag().unwrap().merge_info(tag); - }); - } else { - exec_state - .mut_stack() - .add( - name.to_owned(), - KclValue::TagIdentifier(Box::new(tag.clone())), - SourceRange::default(), - ) - .unwrap(); - } - } - } - KclValue::Solid { ref mut value } => { - for v in &value.value { - if let Some(tag) = v.get_tag() { - // Get the past tag and update it. - let tag_id = if let Some(t) = value.sketch.tags.get(&tag.name) { - let mut t = t.clone(); - let Some(info) = t.get_cur_info() else { - return Err(KclError::Internal(KclErrorDetails { - message: format!("Tag {} does not have path info", tag.name), - source_ranges: vec![tag.into()], - })); - }; - - let mut info = info.clone(); - info.surface = Some(v.clone()); - info.sketch = value.id; - t.info.push((exec_state.stack().current_epoch(), info)); - t - } else { - // It's probably a fillet or a chamfer. - // Initialize it. - TagIdentifier { - value: tag.name.clone(), - info: vec![( - exec_state.stack().current_epoch(), - TagEngineInfo { - id: v.get_id(), - surface: Some(v.clone()), - path: None, - sketch: value.id, - }, - )], - meta: vec![Metadata { - source_range: tag.clone().into(), - }], - } - }; - - // update the sketch tags. - value.sketch.merge_tags(Some(&tag_id).into_iter()); - - if exec_state.stack().cur_frame_contains(&tag.name) { - exec_state.mut_stack().update(&tag.name, |v, _| { - v.as_mut_tag().unwrap().merge_info(&tag_id); - }); - } else { - exec_state - .mut_stack() - .add( - tag.name.clone(), - KclValue::TagIdentifier(Box::new(tag_id)), - SourceRange::default(), - ) - .unwrap(); - } - } - } - - // Find the stale sketch in memory and update it. - if !value.sketch.tags.is_empty() { - let sketches_to_update: Vec<_> = exec_state - .stack() - .find_keys_in_current_env(|v| match v { - KclValue::Sketch { value: sk } => sk.original_id == value.sketch.original_id, - _ => false, - }) - .cloned() - .collect(); - - for k in sketches_to_update { - exec_state.mut_stack().update(&k, |v, _| { - let sketch = v.as_mut_sketch().unwrap(); - sketch.merge_tags(value.sketch.tags.values()); - }); - } - } - } - KclValue::Tuple { value, .. } | KclValue::HomArray { value, .. } => { - for v in value { - update_memory_for_tags_of_geometry(v, exec_state)?; - } - } - _ => {} - } - Ok(()) -} - impl Node { pub async fn execute(&self, exec_state: &mut ExecState) -> Result { let memory_item = KclValue::TagIdentifier(Box::new(TagIdentifier { @@ -1893,409 +1589,6 @@ impl Node { } } -fn type_check_params_kw( - fn_name: Option<&str>, - function_expression: NodeRef<'_, FunctionExpression>, - args: &mut KwArgs, - exec_state: &mut ExecState, -) -> Result<(), KclError> { - // If it's possible the input arg was meant to be labelled and we probably don't want to use - // it as the input arg, then treat it as labelled. - if let Some((Some(label), _)) = &args.unlabeled { - if (function_expression.params.iter().all(|p| p.labeled) || exec_state.pipe_value().is_some()) - && function_expression - .params - .iter() - .any(|p| &p.identifier.name == label && p.labeled) - && !args.labeled.contains_key(label) - { - let (label, arg) = args.unlabeled.take().unwrap(); - args.labeled.insert(label.unwrap(), arg); - } - } - - for (label, arg) in &mut args.labeled { - match function_expression.params.iter().find(|p| &p.identifier.name == label) { - Some(p) => { - if !p.labeled { - exec_state.err(CompilationError::err( - arg.source_range, - format!( - "{} expects an unlabeled first parameter (`{label}`), but it is labelled in the call", - fn_name - .map(|n| format!("The function `{}`", n)) - .unwrap_or_else(|| "This function".to_owned()), - ), - )); - } - - if let Some(ty) = &p.type_ { - arg.value = arg - .value - .coerce( - &RuntimeType::from_parsed(ty.inner.clone(), exec_state, arg.source_range).map_err(|e| KclError::Semantic(e.into()))?, - exec_state, - ) - .map_err(|e| { - let mut message = format!( - "{label} requires a value with type `{}`, but found {}", - ty.inner, - arg.value.human_friendly_type(), - ); - if let Some(ty) = e.explicit_coercion { - // TODO if we have access to the AST for the argument we could choose which example to suggest. - message = format!("{message}\n\nYou may need to add information about the type of the argument, for example:\n using a numeric suffix: `42{ty}`\n or using type ascription: `foo(): number({ty})`"); - } - KclError::Semantic(KclErrorDetails { - message, - source_ranges: vec![arg.source_range], - }) - })?; - } - } - None => { - exec_state.err(CompilationError::err( - arg.source_range, - format!( - "`{label}` is not an argument of {}", - fn_name - .map(|n| format!("`{}`", n)) - .unwrap_or_else(|| "this function".to_owned()), - ), - )); - } - } - } - - if !args.errors.is_empty() { - let actuals = args.labeled.keys(); - let formals: Vec<_> = function_expression - .params - .iter() - .filter_map(|p| { - if !p.labeled { - return None; - } - - let name = &p.identifier.name; - if actuals.clone().any(|a| a == name) { - return None; - } - - Some(format!("`{name}`")) - }) - .collect(); - - let suggestion = if formals.is_empty() { - String::new() - } else { - format!("; suggested labels: {}", formals.join(", ")) - }; - - let mut errors = args.errors.iter().map(|e| { - CompilationError::err( - e.source_range, - format!("This argument needs a label, but it doesn't have one{suggestion}"), - ) - }); - - let first = errors.next().unwrap(); - errors.for_each(|e| exec_state.err(e)); - - return Err(KclError::Semantic(first.into())); - } - - if let Some(arg) = &mut args.unlabeled { - if let Some(p) = function_expression.params.iter().find(|p| !p.labeled) { - if let Some(ty) = &p.type_ { - arg.1.value = arg - .1 - .value - .coerce( - &RuntimeType::from_parsed(ty.inner.clone(), exec_state, arg.1.source_range) - .map_err(|e| KclError::Semantic(e.into()))?, - exec_state, - ) - .map_err(|_| { - KclError::Semantic(KclErrorDetails { - message: format!( - "The input argument of {} requires a value with type `{}`, but found {}", - fn_name - .map(|n| format!("`{}`", n)) - .unwrap_or_else(|| "this function".to_owned()), - ty.inner, - arg.1.value.human_friendly_type() - ), - source_ranges: vec![arg.1.source_range], - }) - })?; - } - } - } - - Ok(()) -} - -fn assign_args_to_params_kw( - fn_name: Option<&str>, - function_expression: NodeRef<'_, FunctionExpression>, - mut args: Args, - exec_state: &mut ExecState, -) -> Result<(), KclError> { - type_check_params_kw(fn_name, function_expression, &mut args.kw_args, exec_state)?; - - // Add the arguments to the memory. A new call frame should have already - // been created. - let source_ranges = vec![function_expression.into()]; - - for param in function_expression.params.iter() { - if param.labeled { - let arg = args.kw_args.labeled.get(¶m.identifier.name); - let arg_val = match arg { - Some(arg) => arg.value.clone(), - None => match param.default_value { - Some(ref default_val) => KclValue::from_default_param(default_val.clone(), exec_state), - None => { - return Err(KclError::Semantic(KclErrorDetails { - source_ranges, - message: format!( - "This function requires a parameter {}, but you haven't passed it one.", - param.identifier.name - ), - })); - } - }, - }; - exec_state - .mut_stack() - .add(param.identifier.name.clone(), arg_val, (¶m.identifier).into())?; - } else { - let unlabelled = args.unlabeled_kw_arg_unconverted(); - - let Some(unlabeled) = unlabelled else { - let param_name = ¶m.identifier.name; - return Err(if args.kw_args.labeled.contains_key(param_name) { - KclError::Semantic(KclErrorDetails { - source_ranges, - message: format!("The function does declare a parameter named '{param_name}', but this parameter doesn't use a label. Try removing the `{param_name}:`"), - }) - } else { - KclError::Semantic(KclErrorDetails { - source_ranges, - message: "This function expects an unlabeled first parameter, but you haven't passed it one." - .to_owned(), - }) - }); - }; - exec_state.mut_stack().add( - param.identifier.name.clone(), - unlabeled.value.clone(), - (¶m.identifier).into(), - )?; - } - } - - Ok(()) -} - -fn coerce_result_type( - result: Result, KclError>, - function_expression: NodeRef<'_, FunctionExpression>, - exec_state: &mut ExecState, -) -> Result, KclError> { - if let Ok(Some(val)) = result { - if let Some(ret_ty) = &function_expression.return_type { - let ty = RuntimeType::from_parsed(ret_ty.inner.clone(), exec_state, ret_ty.as_source_range()) - .map_err(|e| KclError::Semantic(e.into()))?; - let val = val.coerce(&ty, exec_state).map_err(|_| { - KclError::Semantic(KclErrorDetails { - message: format!( - "This function requires its result to be of type `{}`, but found {}", - ty.human_friendly_type(), - val.human_friendly_type(), - ), - source_ranges: ret_ty.as_source_ranges(), - }) - })?; - Ok(Some(val)) - } else { - Ok(Some(val)) - } - } else { - result - } -} - -async fn call_user_defined_function_kw( - fn_name: Option<&str>, - args: Args, - memory: EnvironmentRef, - function_expression: NodeRef<'_, FunctionExpression>, - exec_state: &mut ExecState, - ctx: &ExecutorContext, -) -> Result, KclError> { - // Create a new environment to execute the function body in so that local - // variables shadow variables in the parent scope. The new environment's - // parent should be the environment of the closure. - exec_state.mut_stack().push_new_env_for_call(memory); - if let Err(e) = assign_args_to_params_kw(fn_name, function_expression, args, exec_state) { - exec_state.mut_stack().pop_env(); - return Err(e); - } - - // Execute the function body using the memory we just created. - let result = ctx - .exec_block(&function_expression.body, exec_state, BodyType::Block) - .await; - let mut result = result.map(|_| { - exec_state - .stack() - .get(memory::RETURN_NAME, function_expression.as_source_range()) - .ok() - .cloned() - }); - - result = coerce_result_type(result, function_expression, exec_state); - - // Restore the previous memory. - exec_state.mut_stack().pop_env(); - - result -} - -impl FunctionSource { - pub async fn call_kw( - &self, - fn_name: Option, - exec_state: &mut ExecState, - ctx: &ExecutorContext, - mut args: Args, - callsite: SourceRange, - ) -> Result, KclError> { - match self { - FunctionSource::Std { func, ast, props } => { - if props.deprecated { - exec_state.warn(CompilationError::err( - callsite, - format!( - "`{}` is deprecated, see the docs for a recommended replacement", - props.name - ), - )); - } - - type_check_params_kw(Some(&props.name), ast, &mut args.kw_args, exec_state)?; - - if let Some(arg) = &mut args.kw_args.unlabeled { - if let Some(p) = ast.params.iter().find(|p| !p.labeled) { - if let Some(ty) = &p.type_ { - arg.1.value = arg - .1 - .value - .coerce( - &RuntimeType::from_parsed(ty.inner.clone(), exec_state, arg.1.source_range) - .map_err(|e| KclError::Semantic(e.into()))?, - exec_state, - ) - .map_err(|_| { - KclError::Semantic(KclErrorDetails { - message: format!( - "The input argument of {} requires a value with type `{}`, but found {}", - props.name, - ty.inner, - arg.1.value.human_friendly_type(), - ), - source_ranges: vec![callsite], - }) - })?; - } - } - } - - #[cfg(feature = "artifact-graph")] - let op = if props.include_in_feature_tree { - let op_labeled_args = args - .kw_args - .labeled - .iter() - .map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range))) - .collect(); - Some(Operation::KclStdLibCall { - name: fn_name.unwrap_or_default(), - unlabeled_arg: args - .unlabeled_kw_arg_unconverted() - .map(|arg| OpArg::new(OpKclValue::from(&arg.value), arg.source_range)), - labeled_args: op_labeled_args, - source_range: callsite, - is_error: false, - }) - } else { - None - }; - - // Attempt to call the function. - exec_state.mut_stack().push_new_env_for_rust_call(); - let mut result = { - // Don't early-return in this block. - let result = func(exec_state, args).await; - exec_state.mut_stack().pop_env(); - - #[cfg(feature = "artifact-graph")] - if let Some(mut op) = op { - op.set_std_lib_call_is_error(result.is_err()); - // Track call operation. We do this after the call - // since things like patternTransform may call user code - // before running, and we will likely want to use the - // return value. The call takes ownership of the args, - // so we need to build the op before the call. - exec_state.global.operations.push(op); - } - result - }?; - - update_memory_for_tags_of_geometry(&mut result, exec_state)?; - - Ok(Some(result)) - } - FunctionSource::User { ast, memory, .. } => { - // Track call operation. - #[cfg(feature = "artifact-graph")] - { - let op_labeled_args = args - .kw_args - .labeled - .iter() - .map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range))) - .collect(); - exec_state.global.operations.push(Operation::GroupBegin { - group: Group::FunctionCall { - name: fn_name.clone(), - function_source_range: ast.as_source_range(), - unlabeled_arg: args - .kw_args - .unlabeled - .as_ref() - .map(|arg| OpArg::new(OpKclValue::from(&arg.1.value), arg.1.source_range)), - labeled_args: op_labeled_args, - }, - source_range: callsite, - }); - } - - let result = - call_user_defined_function_kw(fn_name.as_deref(), args, *memory, ast, exec_state, ctx).await; - - // Track return operation. - #[cfg(feature = "artifact-graph")] - exec_state.global.operations.push(Operation::GroupEnd); - - result - } - FunctionSource::None => unreachable!(), - } - } -} - #[cfg(test)] mod test { use std::sync::Arc; @@ -2305,151 +1598,10 @@ mod test { use super::*; use crate::{ exec::UnitType, - execution::{memory::Stack, parse_execute, ContextType}, - parsing::ast::types::{DefaultParamVal, Identifier, Parameter}, + execution::{parse_execute, ContextType}, ExecutorSettings, UnitLen, }; - #[tokio::test(flavor = "multi_thread")] - async fn test_assign_args_to_params() { - // Set up a little framework for this test. - fn mem(number: usize) -> KclValue { - KclValue::Number { - value: number as f64, - ty: NumericType::count(), - meta: Default::default(), - } - } - fn ident(s: &'static str) -> Node { - Node::no_src(Identifier { - name: s.to_owned(), - digest: None, - }) - } - fn opt_param(s: &'static str) -> Parameter { - Parameter { - identifier: ident(s), - type_: None, - default_value: Some(DefaultParamVal::none()), - labeled: true, - digest: None, - } - } - fn req_param(s: &'static str) -> Parameter { - Parameter { - identifier: ident(s), - type_: None, - default_value: None, - labeled: true, - digest: None, - } - } - fn additional_program_memory(items: &[(String, KclValue)]) -> Stack { - let mut program_memory = Stack::new_for_tests(); - for (name, item) in items { - program_memory - .add(name.clone(), item.clone(), SourceRange::default()) - .unwrap(); - } - program_memory - } - // Declare the test cases. - for (test_name, params, args, expected) in [ - ("empty", Vec::new(), Vec::new(), Ok(additional_program_memory(&[]))), - ( - "all params required, and all given, should be OK", - vec![req_param("x")], - vec![("x", mem(1))], - Ok(additional_program_memory(&[("x".to_owned(), mem(1))])), - ), - ( - "all params required, none given, should error", - vec![req_param("x")], - vec![], - Err(KclError::Semantic(KclErrorDetails { - source_ranges: vec![SourceRange::default()], - message: "This function requires a parameter x, but you haven't passed it one.".to_owned(), - })), - ), - ( - "all params optional, none given, should be OK", - vec![opt_param("x")], - vec![], - Ok(additional_program_memory(&[("x".to_owned(), KclValue::none())])), - ), - ( - "mixed params, too few given", - vec![req_param("x"), opt_param("y")], - vec![], - Err(KclError::Semantic(KclErrorDetails { - source_ranges: vec![SourceRange::default()], - message: "This function requires a parameter x, but you haven't passed it one.".to_owned(), - })), - ), - ( - "mixed params, minimum given, should be OK", - vec![req_param("x"), opt_param("y")], - vec![("x", mem(1))], - Ok(additional_program_memory(&[ - ("x".to_owned(), mem(1)), - ("y".to_owned(), KclValue::none()), - ])), - ), - ( - "mixed params, maximum given, should be OK", - vec![req_param("x"), opt_param("y")], - vec![("x", mem(1)), ("y", mem(2))], - Ok(additional_program_memory(&[ - ("x".to_owned(), mem(1)), - ("y".to_owned(), mem(2)), - ])), - ), - ] { - // Run each test. - let func_expr = &Node::no_src(FunctionExpression { - params, - body: Program::empty(), - return_type: None, - digest: None, - }); - let labeled = args - .iter() - .map(|(name, value)| { - let arg = Arg::new(value.clone(), SourceRange::default()); - ((*name).to_owned(), arg) - }) - .collect::>(); - let exec_ctxt = ExecutorContext { - engine: Arc::new(Box::new( - crate::engine::conn_mock::EngineConnection::new().await.unwrap(), - )), - fs: Arc::new(crate::fs::FileManager::new()), - stdlib: Arc::new(crate::std::StdLib::new()), - settings: Default::default(), - context_type: ContextType::Mock, - }; - let mut exec_state = ExecState::new(&exec_ctxt); - exec_state.mod_local.stack = Stack::new_for_tests(); - - let args = Args::new_kw( - KwArgs { - unlabeled: None, - labeled, - errors: Vec::new(), - }, - SourceRange::default(), - exec_ctxt, - None, - ); - let actual = - assign_args_to_params_kw(None, func_expr, args, &mut exec_state).map(|_| exec_state.mod_local.stack); - assert_eq!( - actual, expected, - "failed test '{test_name}':\ngot {actual:?}\nbut expected\n{expected:?}" - ); - } - } - #[tokio::test(flavor = "multi_thread")] async fn ascription() { let program = r#" diff --git a/rust/kcl-lib/src/execution/fn_call.rs b/rust/kcl-lib/src/execution/fn_call.rs new file mode 100644 index 000000000..c2986fda9 --- /dev/null +++ b/rust/kcl-lib/src/execution/fn_call.rs @@ -0,0 +1,979 @@ +use async_recursion::async_recursion; +use indexmap::IndexMap; + +use crate::execution::cad_op::{Group, OpArg, OpKclValue, Operation}; +use crate::{ + docs::StdLibFn, + errors::{KclError, KclErrorDetails}, + execution::{ + kcl_value::FunctionSource, memory, types::RuntimeType, BodyType, ExecState, ExecutorContext, KclValue, + Metadata, StatementKind, TagEngineInfo, TagIdentifier, + }, + parsing::ast::types::{CallExpressionKw, DefaultParamVal, FunctionExpression, Node, Program, Type}, + source_range::SourceRange, + std::StdFn, + CompilationError, +}; + +use super::types::ArrayLen; +use super::EnvironmentRef; + +#[derive(Debug, Clone)] +pub struct Args { + /// Positional args. + pub args: Vec, + /// Keyword arguments + pub kw_args: KwArgs, + pub source_range: SourceRange, + pub ctx: ExecutorContext, + /// If this call happens inside a pipe (|>) expression, this holds the LHS of that |>. + /// Otherwise it's None. + pub pipe_value: Option, +} + +impl Args { + pub fn new(args: Vec, source_range: SourceRange, ctx: ExecutorContext, pipe_value: Option) -> Self { + Self { + args, + kw_args: Default::default(), + source_range, + ctx, + pipe_value, + } + } + + /// Collect the given keyword arguments. + pub fn new_kw(kw_args: KwArgs, source_range: SourceRange, ctx: ExecutorContext, pipe_value: Option) -> Self { + Self { + args: Default::default(), + kw_args, + source_range, + ctx, + pipe_value, + } + } + + /// Get the unlabeled keyword argument. If not set, returns None. + pub(crate) fn unlabeled_kw_arg_unconverted(&self) -> Option<&Arg> { + self.kw_args + .unlabeled + .as_ref() + .map(|(_, a)| a) + .or(self.args.first()) + .or(self.pipe_value.as_ref()) + } +} + +#[derive(Debug, Clone)] +pub struct Arg { + /// The evaluated argument. + pub value: KclValue, + /// The source range of the unevaluated argument. + pub source_range: SourceRange, +} + +impl Arg { + pub fn new(value: KclValue, source_range: SourceRange) -> Self { + Self { value, source_range } + } + + pub fn synthetic(value: KclValue) -> Self { + Self { + value, + source_range: SourceRange::synthetic(), + } + } + + pub fn source_ranges(&self) -> Vec { + vec![self.source_range] + } +} + +#[derive(Debug, Clone, Default)] +pub struct KwArgs { + /// Unlabeled keyword args. Currently only the first arg can be unlabeled. + /// If the argument was a local variable, then the first element of the tuple is its name + /// which may be used to treat this arg as a labelled arg. + pub unlabeled: Option<(Option, Arg)>, + /// Labeled args. + pub labeled: IndexMap, + pub errors: Vec, +} + +impl KwArgs { + /// How many arguments are there? + pub fn len(&self) -> usize { + self.labeled.len() + if self.unlabeled.is_some() { 1 } else { 0 } + } + /// Are there no arguments? + pub fn is_empty(&self) -> bool { + self.labeled.len() == 0 && self.unlabeled.is_none() + } +} + +struct FunctionDefinition<'a> { + input_arg: Option<(String, Option)>, + named_args: IndexMap, Option)>, + return_type: Option>, + deprecated: bool, + include_in_feature_tree: bool, + is_std: bool, + body: FunctionBody<'a>, +} + +#[derive(Debug)] +enum FunctionBody<'a> { + Rust(StdFn), + Kcl(&'a Node, EnvironmentRef), +} + +impl<'a> From<&'a FunctionSource> for FunctionDefinition<'a> { + fn from(value: &'a FunctionSource) -> Self { + #[allow(clippy::type_complexity)] + fn args_from_ast( + ast: &FunctionExpression, + ) -> ( + Option<(String, Option)>, + IndexMap, Option)>, + ) { + let mut input_arg = None; + let mut named_args = IndexMap::new(); + for p in &ast.params { + if !p.labeled { + input_arg = Some((p.identifier.name.clone(), p.type_.as_ref().map(|t| t.inner.clone()))); + continue; + } + + named_args.insert( + p.identifier.name.clone(), + (p.default_value.clone(), p.type_.as_ref().map(|t| t.inner.clone())), + ); + } + + (input_arg, named_args) + } + + match value { + FunctionSource::Std { func, ast, props } => { + let (input_arg, named_args) = args_from_ast(ast); + FunctionDefinition { + input_arg, + named_args, + return_type: ast.return_type.clone(), + deprecated: props.deprecated, + include_in_feature_tree: props.include_in_feature_tree, + is_std: true, + body: FunctionBody::Rust(*func), + } + } + FunctionSource::User { ast, memory, .. } => { + let (input_arg, named_args) = args_from_ast(ast); + FunctionDefinition { + input_arg, + named_args, + return_type: ast.return_type.clone(), + deprecated: false, + include_in_feature_tree: true, + // TODO I think this might be wrong for pure Rust std functions + is_std: false, + body: FunctionBody::Kcl(&ast.body, *memory), + } + } + FunctionSource::None => unreachable!(), + } + } +} + +impl From<&dyn StdLibFn> for FunctionDefinition<'static> { + fn from(value: &dyn StdLibFn) -> Self { + let mut input_arg = None; + let mut named_args = IndexMap::new(); + for a in value.args(false) { + if !a.label_required { + input_arg = Some((a.name.clone(), None)); + continue; + } + + named_args.insert( + a.name.clone(), + ( + if a.required { + None + } else { + Some(DefaultParamVal::none()) + }, + None, + ), + ); + } + FunctionDefinition { + input_arg, + named_args, + return_type: None, + deprecated: value.deprecated(), + include_in_feature_tree: value.feature_tree_operation(), + is_std: true, + body: FunctionBody::Rust(value.std_lib_fn()), + } + } +} + +impl Node { + #[async_recursion] + pub async fn execute(&self, exec_state: &mut ExecState, ctx: &ExecutorContext) -> Result { + let fn_name = &self.callee; + let callsite: SourceRange = self.into(); + + // Build a hashmap from argument labels to the final evaluated values. + let mut fn_args = IndexMap::with_capacity(self.arguments.len()); + let mut errors = Vec::new(); + for arg_expr in &self.arguments { + let source_range = SourceRange::from(arg_expr.arg.clone()); + let metadata = Metadata { source_range }; + let value = ctx + .execute_expr(&arg_expr.arg, exec_state, &metadata, &[], StatementKind::Expression) + .await?; + let arg = Arg::new(value, source_range); + match &arg_expr.label { + Some(l) => { + fn_args.insert(l.name.clone(), arg); + } + None => { + if let Some(id) = arg_expr.arg.ident_name() { + fn_args.insert(id.to_owned(), arg); + } else { + errors.push(arg); + } + } + } + } + + // Evaluate the unlabeled first param, if any exists. + let unlabeled = if let Some(ref arg_expr) = self.unlabeled { + let source_range = SourceRange::from(arg_expr.clone()); + let metadata = Metadata { source_range }; + let value = ctx + .execute_expr(arg_expr, exec_state, &metadata, &[], StatementKind::Expression) + .await?; + + let label = arg_expr.ident_name().map(str::to_owned); + + Some((label, Arg::new(value, source_range))) + } else { + None + }; + + let args = Args::new_kw( + KwArgs { + unlabeled, + labeled: fn_args, + errors, + }, + self.into(), + ctx.clone(), + exec_state.pipe_value().map(|v| Arg::new(v.clone(), callsite)), + ); + + match ctx.stdlib.get_rust_function(fn_name) { + Some(func) => { + let def: FunctionDefinition = (&*func).into(); + // All std lib functions return a value, so the unwrap is safe. + def.call_kw(Some(func.name()), exec_state, ctx, args, callsite) + .await + .map(Option::unwrap) + } + None => { + // Clone the function so that we can use a mutable reference to + // exec_state. + let func = fn_name.get_result(exec_state, ctx).await?.clone(); + + let Some(fn_src) = func.as_fn() else { + return Err(KclError::Semantic(KclErrorDetails { + message: "cannot call this because it isn't a function".to_string(), + source_ranges: vec![callsite], + })); + }; + + let return_value = fn_src + .call_kw(Some(fn_name.to_string()), exec_state, ctx, args, callsite) + .await + .map_err(|e| { + // Add the call expression to the source ranges. + e.add_source_ranges(vec![callsite]) + })?; + + let result = return_value.ok_or_else(move || { + let mut source_ranges: Vec = vec![callsite]; + // We want to send the source range of the original function. + if let KclValue::Function { meta, .. } = func { + source_ranges = meta.iter().map(|m| m.source_range).collect(); + }; + KclError::UndefinedValue(KclErrorDetails { + message: format!("Result of user-defined function {} is undefined", fn_name), + source_ranges, + }) + })?; + + Ok(result) + } + } + } +} + +impl FunctionDefinition<'_> { + pub async fn call_kw( + &self, + fn_name: Option, + exec_state: &mut ExecState, + ctx: &ExecutorContext, + mut args: Args, + callsite: SourceRange, + ) -> Result, KclError> { + if self.deprecated { + exec_state.warn(CompilationError::err( + callsite, + format!( + "{} is deprecated, see the docs for a recommended replacement", + match &fn_name { + Some(n) => format!("`{n}`"), + None => "This function".to_owned(), + } + ), + )); + } + + type_check_params_kw(fn_name.as_deref(), self, &mut args.kw_args, exec_state)?; + + // Don't early return until the stack frame is popped! + self.body.prep_mem(exec_state); + + let op = if self.include_in_feature_tree { + let op_labeled_args = args + .kw_args + .labeled + .iter() + .map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range))) + .collect(); + + if self.is_std { + Some(Operation::StdLibCall { + name: fn_name.clone().unwrap_or_else(|| "unknown function".to_owned()), + unlabeled_arg: args + .unlabeled_kw_arg_unconverted() + .map(|arg| OpArg::new(OpKclValue::from(&arg.value), arg.source_range)), + labeled_args: op_labeled_args, + source_range: callsite, + is_error: false, + }) + } else { + exec_state.push_op(Operation::GroupBegin { + group: Group::FunctionCall { + name: fn_name.clone(), + function_source_range: self.as_source_range().unwrap(), + unlabeled_arg: args + .kw_args + .unlabeled + .as_ref() + .map(|arg| OpArg::new(OpKclValue::from(&arg.1.value), arg.1.source_range)), + labeled_args: op_labeled_args, + }, + source_range: callsite, + }); + + None + } + } else { + None + }; + + let mut result = match &self.body { + FunctionBody::Rust(f) => f(exec_state, args).await.map(Some), + FunctionBody::Kcl(f, _) => { + if let Err(e) = assign_args_to_params_kw(self, args, exec_state) { + exec_state.mut_stack().pop_env(); + return Err(e); + } + + ctx.exec_block(f, exec_state, BodyType::Block).await.map(|_| { + exec_state + .stack() + .get(memory::RETURN_NAME, f.as_source_range()) + .ok() + .cloned() + }) + } + }; + + exec_state.mut_stack().pop_env(); + + if let Some(mut op) = op { + op.set_std_lib_call_is_error(result.is_err()); + // Track call operation. We do this after the call + // since things like patternTransform may call user code + // before running, and we will likely want to use the + // return value. The call takes ownership of the args, + // so we need to build the op before the call. + exec_state.push_op(op); + } else if !self.is_std { + exec_state.push_op(Operation::GroupEnd); + } + + if self.is_std { + if let Ok(Some(result)) = &mut result { + update_memory_for_tags_of_geometry(result, exec_state)?; + } + } + + coerce_result_type(result, self, exec_state) + } + + // Postcondition: result.is_some() if function is not in the standard library. + fn as_source_range(&self) -> Option { + match &self.body { + FunctionBody::Rust(_) => None, + FunctionBody::Kcl(p, _) => Some(p.as_source_range()), + } + } +} + +impl FunctionBody<'_> { + fn prep_mem(&self, exec_state: &mut ExecState) { + match self { + FunctionBody::Rust(_) => exec_state.mut_stack().push_new_env_for_rust_call(), + FunctionBody::Kcl(_, memory) => exec_state.mut_stack().push_new_env_for_call(*memory), + } + } +} + +impl FunctionSource { + pub async fn call_kw( + &self, + fn_name: Option, + exec_state: &mut ExecState, + ctx: &ExecutorContext, + args: Args, + callsite: SourceRange, + ) -> Result, KclError> { + let def: FunctionDefinition = self.into(); + def.call_kw(fn_name, exec_state, ctx, args, callsite).await + } +} + +fn update_memory_for_tags_of_geometry(result: &mut KclValue, exec_state: &mut ExecState) -> Result<(), KclError> { + // If the return result is a sketch or solid, we want to update the + // memory for the tags of the group. + // TODO: This could probably be done in a better way, but as of now this was my only idea + // and it works. + match result { + KclValue::Sketch { value } => { + for (name, tag) in value.tags.iter() { + if exec_state.stack().cur_frame_contains(name) { + exec_state.mut_stack().update(name, |v, _| { + v.as_mut_tag().unwrap().merge_info(tag); + }); + } else { + exec_state + .mut_stack() + .add( + name.to_owned(), + KclValue::TagIdentifier(Box::new(tag.clone())), + SourceRange::default(), + ) + .unwrap(); + } + } + } + KclValue::Solid { ref mut value } => { + for v in &value.value { + if let Some(tag) = v.get_tag() { + // Get the past tag and update it. + let tag_id = if let Some(t) = value.sketch.tags.get(&tag.name) { + let mut t = t.clone(); + let Some(info) = t.get_cur_info() else { + return Err(KclError::Internal(KclErrorDetails { + message: format!("Tag {} does not have path info", tag.name), + source_ranges: vec![tag.into()], + })); + }; + + let mut info = info.clone(); + info.surface = Some(v.clone()); + info.sketch = value.id; + t.info.push((exec_state.stack().current_epoch(), info)); + t + } else { + // It's probably a fillet or a chamfer. + // Initialize it. + TagIdentifier { + value: tag.name.clone(), + info: vec![( + exec_state.stack().current_epoch(), + TagEngineInfo { + id: v.get_id(), + surface: Some(v.clone()), + path: None, + sketch: value.id, + }, + )], + meta: vec![Metadata { + source_range: tag.clone().into(), + }], + } + }; + + // update the sketch tags. + value.sketch.merge_tags(Some(&tag_id).into_iter()); + + if exec_state.stack().cur_frame_contains(&tag.name) { + exec_state.mut_stack().update(&tag.name, |v, _| { + v.as_mut_tag().unwrap().merge_info(&tag_id); + }); + } else { + exec_state + .mut_stack() + .add( + tag.name.clone(), + KclValue::TagIdentifier(Box::new(tag_id)), + SourceRange::default(), + ) + .unwrap(); + } + } + } + + // Find the stale sketch in memory and update it. + if !value.sketch.tags.is_empty() { + let sketches_to_update: Vec<_> = exec_state + .stack() + .find_keys_in_current_env(|v| match v { + KclValue::Sketch { value: sk } => sk.original_id == value.sketch.original_id, + _ => false, + }) + .cloned() + .collect(); + + for k in sketches_to_update { + exec_state.mut_stack().update(&k, |v, _| { + let sketch = v.as_mut_sketch().unwrap(); + sketch.merge_tags(value.sketch.tags.values()); + }); + } + } + } + KclValue::Tuple { value, .. } | KclValue::HomArray { value, .. } => { + for v in value { + update_memory_for_tags_of_geometry(v, exec_state)?; + } + } + _ => {} + } + Ok(()) +} + +fn type_check_params_kw( + fn_name: Option<&str>, + fn_def: &FunctionDefinition<'_>, + args: &mut KwArgs, + exec_state: &mut ExecState, +) -> Result<(), KclError> { + // If it's possible the input arg was meant to be labelled and we probably don't want to use + // it as the input arg, then treat it as labelled. + if let Some((Some(label), _)) = &args.unlabeled { + if (fn_def.input_arg.is_none() || exec_state.pipe_value().is_some()) + && fn_def.named_args.iter().any(|p| p.0 == label) + && !args.labeled.contains_key(label) + { + let (label, arg) = args.unlabeled.take().unwrap(); + args.labeled.insert(label.unwrap(), arg); + } + } + + for (label, arg) in &mut args.labeled { + match fn_def.named_args.get(label) { + Some((_, ty)) => { + if let Some(ty) = ty { + arg.value = arg + .value + .coerce( + &RuntimeType::from_parsed(ty.clone(), exec_state, arg.source_range).map_err(|e| KclError::Semantic(e.into()))?, + exec_state, + ) + .map_err(|e| { + let mut message = format!( + "{label} requires a value with type `{}`, but found {}", + ty, + arg.value.human_friendly_type(), + ); + if let Some(ty) = e.explicit_coercion { + // TODO if we have access to the AST for the argument we could choose which example to suggest. + message = format!("{message}\n\nYou may need to add information about the type of the argument, for example:\n using a numeric suffix: `42{ty}`\n or using type ascription: `foo(): number({ty})`"); + } + KclError::Semantic(KclErrorDetails { + message, + source_ranges: vec![arg.source_range], + }) + })?; + } + } + None => { + exec_state.err(CompilationError::err( + arg.source_range, + format!( + "`{label}` is not an argument of {}", + fn_name + .map(|n| format!("`{}`", n)) + .unwrap_or_else(|| "this function".to_owned()), + ), + )); + } + } + } + + if !args.errors.is_empty() { + let actuals = args.labeled.keys(); + let formals: Vec<_> = fn_def + .named_args + .keys() + .filter_map(|name| { + if actuals.clone().any(|a| a == name) { + return None; + } + + Some(format!("`{name}`")) + }) + .collect(); + + let suggestion = if formals.is_empty() { + String::new() + } else { + format!("; suggested labels: {}", formals.join(", ")) + }; + + let mut errors = args.errors.iter().map(|e| { + CompilationError::err( + e.source_range, + format!("This argument needs a label, but it doesn't have one{suggestion}"), + ) + }); + + let first = errors.next().unwrap(); + errors.for_each(|e| exec_state.err(e)); + + return Err(KclError::Semantic(first.into())); + } + + if let Some(arg) = &mut args.unlabeled { + if let Some((_, Some(ty))) = &fn_def.input_arg { + arg.1.value = arg + .1 + .value + .coerce( + &RuntimeType::from_parsed(ty.clone(), exec_state, arg.1.source_range) + .map_err(|e| KclError::Semantic(e.into()))?, + exec_state, + ) + .map_err(|_| { + KclError::Semantic(KclErrorDetails { + message: format!( + "The input argument of {} requires a value with type `{}`, but found {}", + fn_name + .map(|n| format!("`{}`", n)) + .unwrap_or_else(|| "this function".to_owned()), + ty, + arg.1.value.human_friendly_type() + ), + source_ranges: vec![arg.1.source_range], + }) + })?; + } + } else if let Some((name, _)) = &fn_def.input_arg { + if let Some(arg) = args.labeled.get(name) { + exec_state.err(CompilationError::err( + arg.source_range, + format!( + "{} expects an unlabeled first parameter (`@{name}`), but it is labelled in the call", + fn_name + .map(|n| format!("The function `{}`", n)) + .unwrap_or_else(|| "This function".to_owned()), + ), + )); + } + } + + Ok(()) +} + +fn assign_args_to_params_kw( + fn_def: &FunctionDefinition<'_>, + args: Args, + exec_state: &mut ExecState, +) -> Result<(), KclError> { + // Add the arguments to the memory. A new call frame should have already + // been created. + let source_ranges = fn_def.as_source_range().into_iter().collect(); + + for (name, (default, _)) in fn_def.named_args.iter() { + let arg = args.kw_args.labeled.get(name); + match arg { + Some(arg) => { + exec_state.mut_stack().add( + name.clone(), + arg.value.clone(), + arg.source_ranges().pop().unwrap_or(SourceRange::synthetic()), + )?; + } + None => match default { + Some(ref default_val) => { + let value = KclValue::from_default_param(default_val.clone(), exec_state); + exec_state + .mut_stack() + .add(name.clone(), value, default_val.source_range())?; + } + None => { + return Err(KclError::Semantic(KclErrorDetails { + source_ranges, + message: format!( + "This function requires a parameter {}, but you haven't passed it one.", + name + ), + })); + } + }, + } + } + + if let Some((param_name, _)) = &fn_def.input_arg { + let unlabelled = args.unlabeled_kw_arg_unconverted(); + + let Some(unlabeled) = unlabelled else { + return Err(if args.kw_args.labeled.contains_key(param_name) { + KclError::Semantic(KclErrorDetails { + source_ranges, + message: format!("The function does declare a parameter named '{param_name}', but this parameter doesn't use a label. Try removing the `{param_name}:`"), + }) + } else { + KclError::Semantic(KclErrorDetails { + source_ranges, + message: "This function expects an unlabeled first parameter, but you haven't passed it one." + .to_owned(), + }) + }); + }; + exec_state.mut_stack().add( + param_name.clone(), + unlabeled.value.clone(), + unlabeled.source_ranges().pop().unwrap_or(SourceRange::synthetic()), + )?; + } + + Ok(()) +} + +fn coerce_result_type( + result: Result, KclError>, + fn_def: &FunctionDefinition<'_>, + exec_state: &mut ExecState, +) -> Result, KclError> { + if let Ok(Some(val)) = result { + if let Some(ret_ty) = &fn_def.return_type { + let mut ty = RuntimeType::from_parsed(ret_ty.inner.clone(), exec_state, ret_ty.as_source_range()) + .map_err(|e| KclError::Semantic(e.into()))?; + // Treat `[T; 1+]` as `T | [T; 1+]` (which can't yet be expressed in our syntax of types). + // This is a very specific hack which exists because some std functions can produce arrays + // but usually only make a singleton and the frontend expects the singleton. + // If we can make the frontend work on arrays (or at least arrays of length 1), then this + // can be removed. + // I believe this is safe, since anywhere which requires an array should coerce the singleton + // to an array and we only do this hack for return values. + if let RuntimeType::Array(inner, ArrayLen::NonEmpty) = &ty { + ty = RuntimeType::Union(vec![(**inner).clone(), ty]); + } + let val = val.coerce(&ty, exec_state).map_err(|_| { + KclError::Semantic(KclErrorDetails { + message: format!( + "This function requires its result to be of type `{}`, but found {}", + ty.human_friendly_type(), + val.human_friendly_type(), + ), + source_ranges: ret_ty.as_source_ranges(), + }) + })?; + Ok(Some(val)) + } else { + Ok(Some(val)) + } + } else { + result + } +} + +#[cfg(test)] +mod test { + use std::sync::Arc; + + use super::*; + use crate::{ + execution::{memory::Stack, parse_execute, types::NumericType, ContextType}, + parsing::ast::types::{DefaultParamVal, Identifier, Parameter}, + }; + + #[tokio::test(flavor = "multi_thread")] + async fn test_assign_args_to_params() { + // Set up a little framework for this test. + fn mem(number: usize) -> KclValue { + KclValue::Number { + value: number as f64, + ty: NumericType::count(), + meta: Default::default(), + } + } + fn ident(s: &'static str) -> Node { + Node::no_src(Identifier { + name: s.to_owned(), + digest: None, + }) + } + fn opt_param(s: &'static str) -> Parameter { + Parameter { + identifier: ident(s), + type_: None, + default_value: Some(DefaultParamVal::none()), + labeled: true, + digest: None, + } + } + fn req_param(s: &'static str) -> Parameter { + Parameter { + identifier: ident(s), + type_: None, + default_value: None, + labeled: true, + digest: None, + } + } + fn additional_program_memory(items: &[(String, KclValue)]) -> Stack { + let mut program_memory = Stack::new_for_tests(); + for (name, item) in items { + program_memory + .add(name.clone(), item.clone(), SourceRange::default()) + .unwrap(); + } + program_memory + } + // Declare the test cases. + for (test_name, params, args, expected) in [ + ("empty", Vec::new(), Vec::new(), Ok(additional_program_memory(&[]))), + ( + "all params required, and all given, should be OK", + vec![req_param("x")], + vec![("x", mem(1))], + Ok(additional_program_memory(&[("x".to_owned(), mem(1))])), + ), + ( + "all params required, none given, should error", + vec![req_param("x")], + vec![], + Err(KclError::Semantic(KclErrorDetails { + source_ranges: vec![SourceRange::default()], + message: "This function requires a parameter x, but you haven't passed it one.".to_owned(), + })), + ), + ( + "all params optional, none given, should be OK", + vec![opt_param("x")], + vec![], + Ok(additional_program_memory(&[("x".to_owned(), KclValue::none())])), + ), + ( + "mixed params, too few given", + vec![req_param("x"), opt_param("y")], + vec![], + Err(KclError::Semantic(KclErrorDetails { + source_ranges: vec![SourceRange::default()], + message: "This function requires a parameter x, but you haven't passed it one.".to_owned(), + })), + ), + ( + "mixed params, minimum given, should be OK", + vec![req_param("x"), opt_param("y")], + vec![("x", mem(1))], + Ok(additional_program_memory(&[ + ("x".to_owned(), mem(1)), + ("y".to_owned(), KclValue::none()), + ])), + ), + ( + "mixed params, maximum given, should be OK", + vec![req_param("x"), opt_param("y")], + vec![("x", mem(1)), ("y", mem(2))], + Ok(additional_program_memory(&[ + ("x".to_owned(), mem(1)), + ("y".to_owned(), mem(2)), + ])), + ), + ] { + // Run each test. + let func_expr = Node::no_src(FunctionExpression { + params, + body: Program::empty(), + return_type: None, + digest: None, + }); + let func_src = FunctionSource::User { + ast: Box::new(func_expr), + settings: Default::default(), + memory: EnvironmentRef::dummy(), + }; + let labeled = args + .iter() + .map(|(name, value)| { + let arg = Arg::new(value.clone(), SourceRange::default()); + ((*name).to_owned(), arg) + }) + .collect::>(); + let exec_ctxt = ExecutorContext { + engine: Arc::new(Box::new( + crate::engine::conn_mock::EngineConnection::new().await.unwrap(), + )), + fs: Arc::new(crate::fs::FileManager::new()), + stdlib: Arc::new(crate::std::StdLib::new()), + settings: Default::default(), + context_type: ContextType::Mock, + }; + let mut exec_state = ExecState::new(&exec_ctxt); + exec_state.mod_local.stack = Stack::new_for_tests(); + + let args = Args::new_kw( + KwArgs { + unlabeled: None, + labeled, + errors: Vec::new(), + }, + SourceRange::default(), + exec_ctxt, + None, + ); + let actual = assign_args_to_params_kw(&(&func_src).into(), args, &mut exec_state) + .map(|_| exec_state.mod_local.stack); + assert_eq!( + actual, expected, + "failed test '{test_name}':\ngot {actual:?}\nbut expected\n{expected:?}" + ); + } + } + + #[tokio::test(flavor = "multi_thread")] + async fn type_check_user_args() { + let program = r#"fn makeMessage(prefix: string, suffix: string) { + return prefix + suffix +} + +msg1 = makeMessage(prefix = "world", suffix = " hello") +msg2 = makeMessage(prefix = 1, suffix = 3)"#; + let err = parse_execute(program).await.unwrap_err(); + assert_eq!( + err.message(), + "prefix requires a value with type `string`, but found number(default units)" + ) + } +} diff --git a/rust/kcl-lib/src/execution/geometry.rs b/rust/kcl-lib/src/execution/geometry.rs index 00818ef0c..4945d0400 100644 --- a/rust/kcl-lib/src/execution/geometry.rs +++ b/rust/kcl-lib/src/execution/geometry.rs @@ -8,12 +8,12 @@ use parse_display::{Display, FromStr}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -#[cfg(feature = "artifact-graph")] -use crate::execution::ArtifactId; use crate::{ engine::{PlaneName, DEFAULT_PLANE_INFO}, errors::{KclError, KclErrorDetails}, - execution::{types::NumericType, ExecState, ExecutorContext, Metadata, TagEngineInfo, TagIdentifier, UnitLen}, + execution::{ + types::NumericType, ArtifactId, ExecState, ExecutorContext, Metadata, TagEngineInfo, TagIdentifier, UnitLen, + }, parsing::ast::types::{Node, NodeRef, TagDeclarator, TagNode}, std::{args::TyF64, sketch::PlaneData}, }; @@ -256,7 +256,6 @@ pub struct Helix { /// The id of the helix. pub value: uuid::Uuid, /// The artifact ID. - #[cfg(feature = "artifact-graph")] pub artifact_id: ArtifactId, /// Number of revolutions. pub revolutions: f64, @@ -278,7 +277,6 @@ pub struct Plane { /// The id of the plane. pub id: uuid::Uuid, /// The artifact ID. - #[cfg(feature = "artifact-graph")] pub artifact_id: ArtifactId, // The code for the plane either a string or custom. pub value: PlaneType, @@ -508,7 +506,6 @@ impl Plane { let id = exec_state.next_uuid(); Ok(Plane { id, - #[cfg(feature = "artifact-graph")] artifact_id: id.into(), info: PlaneInfo::try_from(value.clone())?, value: value.into(), @@ -530,7 +527,6 @@ pub struct Face { /// The id of the face. pub id: uuid::Uuid, /// The artifact ID. - #[cfg(feature = "artifact-graph")] pub artifact_id: ArtifactId, /// The tag of the face. pub value: String, @@ -584,7 +580,6 @@ pub struct Sketch { pub tags: IndexMap, /// The original id of the sketch. This stays the same even if the sketch is /// is sketched on face etc. - #[cfg(feature = "artifact-graph")] pub artifact_id: ArtifactId, #[ts(skip)] pub original_id: uuid::Uuid, @@ -748,7 +743,6 @@ pub struct Solid { /// The id of the solid. pub id: uuid::Uuid, /// The artifact ID of the solid. Unlike `id`, this doesn't change. - #[cfg(feature = "artifact-graph")] pub artifact_id: ArtifactId, /// The extrude surfaces. pub value: Vec, diff --git a/rust/kcl-lib/src/execution/kcl_value.rs b/rust/kcl-lib/src/execution/kcl_value.rs index 29bb19628..8a960321e 100644 --- a/rust/kcl-lib/src/execution/kcl_value.rs +++ b/rust/kcl-lib/src/execution/kcl_value.rs @@ -352,8 +352,8 @@ impl KclValue { pub(crate) fn from_default_param(param: DefaultParamVal, exec_state: &mut ExecState) -> Self { match param { DefaultParamVal::Literal(lit) => Self::from_literal(lit, exec_state), - DefaultParamVal::KclNone(none) => KclValue::KclNone { - value: none, + DefaultParamVal::KclNone(value) => KclValue::KclNone { + value, meta: Default::default(), }, } diff --git a/rust/kcl-lib/src/execution/memory.rs b/rust/kcl-lib/src/execution/memory.rs index 484d4173f..084ebe200 100644 --- a/rust/kcl-lib/src/execution/memory.rs +++ b/rust/kcl-lib/src/execution/memory.rs @@ -820,7 +820,7 @@ impl PartialEq for Stack { pub struct EnvironmentRef(usize, usize); impl EnvironmentRef { - fn dummy() -> Self { + pub fn dummy() -> Self { Self(usize::MAX, 0) } diff --git a/rust/kcl-lib/src/execution/mod.rs b/rust/kcl-lib/src/execution/mod.rs index b1ad06108..2d1346c13 100644 --- a/rust/kcl-lib/src/execution/mod.rs +++ b/rust/kcl-lib/src/execution/mod.rs @@ -4,9 +4,7 @@ use std::sync::Arc; use anyhow::Result; #[cfg(feature = "artifact-graph")] -pub use artifact::{ - Artifact, ArtifactCommand, ArtifactGraph, ArtifactId, CodeRef, StartSketchOnFace, StartSketchOnPlane, -}; +pub use artifact::{Artifact, ArtifactCommand, ArtifactGraph, CodeRef, StartSketchOnFace, StartSketchOnPlane}; use cache::OldAstState; pub use cache::{bust_cache, clear_mem_cache}; #[cfg(feature = "artifact-graph")] @@ -22,11 +20,12 @@ use kcmc::{ websocket::{ModelingSessionData, OkWebSocketResponseData}, ImageFormat, ModelingCmd, }; -use kittycad_modeling_cmds as kcmc; +use kittycad_modeling_cmds::{self as kcmc, id::ModelingCmdId}; pub use memory::EnvironmentRef; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; pub use state::{ExecState, MetaSettings}; +use uuid::Uuid; #[cfg(feature = "artifact-graph")] use crate::execution::artifact::build_artifact_graph; @@ -51,9 +50,9 @@ pub(crate) mod annotations; #[cfg(feature = "artifact-graph")] mod artifact; pub(crate) mod cache; -#[cfg(feature = "artifact-graph")] mod cad_op; mod exec_ast; +pub mod fn_call; mod geometry; mod id_generator; mod import; @@ -63,6 +62,11 @@ mod state; pub mod typed_path; pub(crate) mod types; +enum StatementKind<'a> { + Declaration { name: &'a str }, + Expression, +} + /// Outcome of executing a program. This is used in TS. #[derive(Debug, Clone, Serialize, ts_rs::TS, PartialEq)] #[ts(export)] @@ -1324,6 +1328,51 @@ impl ExecutorContext { } } +#[derive(Debug, Clone, Copy, Serialize, PartialEq, Eq, Ord, PartialOrd, Hash, ts_rs::TS, JsonSchema)] +pub struct ArtifactId(Uuid); + +impl ArtifactId { + pub fn new(uuid: Uuid) -> Self { + Self(uuid) + } +} + +impl From for ArtifactId { + fn from(uuid: Uuid) -> Self { + Self::new(uuid) + } +} + +impl From<&Uuid> for ArtifactId { + fn from(uuid: &Uuid) -> Self { + Self::new(*uuid) + } +} + +impl From for Uuid { + fn from(id: ArtifactId) -> Self { + id.0 + } +} + +impl From<&ArtifactId> for Uuid { + fn from(id: &ArtifactId) -> Self { + id.0 + } +} + +impl From for ArtifactId { + fn from(id: ModelingCmdId) -> Self { + Self::new(*id.as_ref()) + } +} + +impl From<&ModelingCmdId> for ArtifactId { + fn from(id: &ModelingCmdId) -> Self { + Self::new(*id.as_ref()) + } +} + #[cfg(test)] pub(crate) async fn parse_execute(code: &str) -> Result { parse_execute_with_project_dir(code, None).await diff --git a/rust/kcl-lib/src/execution/state.rs b/rust/kcl-lib/src/execution/state.rs index 2f1333063..a6305474b 100644 --- a/rust/kcl-lib/src/execution/state.rs +++ b/rust/kcl-lib/src/execution/state.rs @@ -9,11 +9,12 @@ use serde::{Deserialize, Serialize}; use uuid::Uuid; #[cfg(feature = "artifact-graph")] -use crate::execution::{Artifact, ArtifactCommand, ArtifactGraph, ArtifactId, Operation}; +use crate::execution::{Artifact, ArtifactCommand, ArtifactGraph, ArtifactId}; use crate::{ errors::{KclError, KclErrorDetails, Severity}, execution::{ annotations, + cad_op::Operation, id_generator::IdGenerator, memory::{ProgramMemory, Stack}, types, @@ -201,6 +202,13 @@ impl ExecState { self.global.artifacts.insert(id, artifact); } + pub(crate) fn push_op(&mut self, op: Operation) { + #[cfg(feature = "artifact-graph")] + self.global.operations.push(op); + #[cfg(not(feature = "artifact-graph"))] + drop(op); + } + pub(super) fn next_module_id(&self) -> ModuleId { ModuleId::from_usize(self.global.path_to_source_id.len()) } diff --git a/rust/kcl-lib/src/execution/types.rs b/rust/kcl-lib/src/execution/types.rs index 7643975b5..09847da4e 100644 --- a/rust/kcl-lib/src/execution/types.rs +++ b/rust/kcl-lib/src/execution/types.rs @@ -1112,7 +1112,6 @@ impl KclValue { let id = exec_state.mod_local.id_generator.next_uuid(); let plane = Plane { id, - #[cfg(feature = "artifact-graph")] artifact_id: id.into(), info: PlaneInfo { origin, diff --git a/rust/kcl-lib/src/parsing/ast/types/mod.rs b/rust/kcl-lib/src/parsing/ast/types/mod.rs index e6c321470..6a445f750 100644 --- a/rust/kcl-lib/src/parsing/ast/types/mod.rs +++ b/rust/kcl-lib/src/parsing/ast/types/mod.rs @@ -3374,6 +3374,13 @@ impl DefaultParamVal { pub(crate) fn none() -> Self { Self::KclNone(KclNone::default()) } + + pub(crate) fn source_range(&self) -> SourceRange { + match self { + DefaultParamVal::Literal(l) => l.as_source_range(), + DefaultParamVal::KclNone(_) => SourceRange::default(), + } + } } /// Parameter of a KCL function. diff --git a/rust/kcl-lib/src/std/args.rs b/rust/kcl-lib/src/std/args.rs index 005b12270..8c500f7f5 100644 --- a/rust/kcl-lib/src/std/args.rs +++ b/rust/kcl-lib/src/std/args.rs @@ -1,7 +1,6 @@ use std::num::NonZeroU32; use anyhow::Result; -use indexmap::IndexMap; use kcmc::{ websocket::{ModelingCmdReq, OkWebSocketResponseData}, ModelingCmd, @@ -15,8 +14,8 @@ use crate::{ execution::{ kcl_value::FunctionSource, types::{NumericType, PrimitiveType, RuntimeType, UnitAngle, UnitLen, UnitType}, - ExecState, ExecutorContext, ExtrudeSurface, Helix, KclObjectFields, KclValue, Metadata, PlaneInfo, Sketch, - SketchSurface, Solid, TagIdentifier, + ExecState, ExtrudeSurface, Helix, KclObjectFields, KclValue, Metadata, PlaneInfo, Sketch, SketchSurface, Solid, + TagIdentifier, }, parsing::ast::types::TagNode, source_range::SourceRange, @@ -28,56 +27,11 @@ use crate::{ ModuleId, }; +pub use crate::execution::fn_call::Args; + const ERROR_STRING_SKETCH_TO_SOLID_HELPER: &str = "You can convert a sketch (2D) into a Solid (3D) by calling a function like `extrude` or `revolve`"; -#[derive(Debug, Clone)] -pub struct Arg { - /// The evaluated argument. - pub value: KclValue, - /// The source range of the unevaluated argument. - pub source_range: SourceRange, -} - -impl Arg { - pub fn new(value: KclValue, source_range: SourceRange) -> Self { - Self { value, source_range } - } - - pub fn synthetic(value: KclValue) -> Self { - Self { - value, - source_range: SourceRange::synthetic(), - } - } - - pub fn source_ranges(&self) -> Vec { - vec![self.source_range] - } -} - -#[derive(Debug, Clone, Default)] -pub struct KwArgs { - /// Unlabeled keyword args. Currently only the first arg can be unlabeled. - /// If the argument was a local variable, then the first element of the tuple is its name - /// which may be used to treat this arg as a labelled arg. - pub unlabeled: Option<(Option, Arg)>, - /// Labeled args. - pub labeled: IndexMap, - pub errors: Vec, -} - -impl KwArgs { - /// How many arguments are there? - pub fn len(&self) -> usize { - self.labeled.len() + if self.unlabeled.is_some() { 1 } else { 0 } - } - /// Are there no arguments? - pub fn is_empty(&self) -> bool { - self.labeled.len() == 0 && self.unlabeled.is_none() - } -} - #[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS)] #[ts(export)] #[serde(rename_all = "camelCase")] @@ -153,41 +107,7 @@ impl JsonSchema for TyF64 { } } -#[derive(Debug, Clone)] -pub struct Args { - /// Positional args. - pub args: Vec, - /// Keyword arguments - pub kw_args: KwArgs, - pub source_range: SourceRange, - pub ctx: ExecutorContext, - /// If this call happens inside a pipe (|>) expression, this holds the LHS of that |>. - /// Otherwise it's None. - pub pipe_value: Option, -} - impl Args { - pub fn new(args: Vec, source_range: SourceRange, ctx: ExecutorContext, pipe_value: Option) -> Self { - Self { - args, - kw_args: Default::default(), - source_range, - ctx, - pipe_value, - } - } - - /// Collect the given keyword arguments. - pub fn new_kw(kw_args: KwArgs, source_range: SourceRange, ctx: ExecutorContext, pipe_value: Option) -> Self { - Self { - args: Default::default(), - kw_args, - source_range, - ctx, - pipe_value, - } - } - /// Get a keyword argument. If not set, returns None. pub(crate) fn get_kw_arg_opt<'a, T>(&'a self, label: &str) -> Result, KclError> where @@ -339,16 +259,6 @@ impl Args { .collect::, _>>() } - /// Get the unlabeled keyword argument. If not set, returns None. - pub(crate) fn unlabeled_kw_arg_unconverted(&self) -> Option<&Arg> { - self.kw_args - .unlabeled - .as_ref() - .map(|(_, a)| a) - .or(self.args.first()) - .or(self.pipe_value.as_ref()) - } - /// Get the unlabeled keyword argument. If not set, returns Err. If it /// can't be converted to the given type, returns Err. pub(crate) fn get_unlabeled_kw_arg<'a, T>(&'a self, label: &str) -> Result diff --git a/rust/kcl-lib/src/std/array.rs b/rust/kcl-lib/src/std/array.rs index ef6fe7e88..abb9ad15b 100644 --- a/rust/kcl-lib/src/std/array.rs +++ b/rust/kcl-lib/src/std/array.rs @@ -1,12 +1,9 @@ use indexmap::IndexMap; -use super::{ - args::{Arg, KwArgs}, - Args, -}; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ + fn_call::{Arg, Args, KwArgs}, kcl_value::{FunctionSource, KclValue}, types::RuntimeType, ExecState, diff --git a/rust/kcl-lib/src/std/clone.rs b/rust/kcl-lib/src/std/clone.rs index 57651eaa0..9f659aaba 100644 --- a/rust/kcl-lib/src/std/clone.rs +++ b/rust/kcl-lib/src/std/clone.rs @@ -59,10 +59,7 @@ async fn inner_clone( let mut new_sketch = sketch.clone(); new_sketch.id = new_id; new_sketch.original_id = new_id; - #[cfg(feature = "artifact-graph")] - { - new_sketch.artifact_id = new_id.into(); - } + new_sketch.artifact_id = new_id.into(); GeometryWithImportedGeometry::Sketch(new_sketch) } GeometryWithImportedGeometry::Solid(solid) => { @@ -72,10 +69,7 @@ async fn inner_clone( let mut new_solid = solid.clone(); new_solid.id = new_id; new_solid.sketch.original_id = new_id; - #[cfg(feature = "artifact-graph")] - { - new_solid.artifact_id = new_id.into(); - } + new_solid.artifact_id = new_id.into(); GeometryWithImportedGeometry::Solid(new_solid) } }; @@ -118,10 +112,7 @@ async fn fix_tags_and_references( // Make the sketch id the new geometry id. solid.sketch.id = new_geometry_id; solid.sketch.original_id = new_geometry_id; - #[cfg(feature = "artifact-graph")] - { - solid.sketch.artifact_id = new_geometry_id.into(); - } + solid.sketch.artifact_id = new_geometry_id.into(); fix_sketch_tags_and_references(&mut solid.sketch, &entity_id_map, exec_state).await?; @@ -148,7 +139,6 @@ async fn fix_tags_and_references( // information. let new_solid = do_post_extrude( &solid.sketch, - #[cfg(feature = "artifact-graph")] new_geometry_id.into(), crate::std::args::TyF64::new( solid.height, @@ -332,10 +322,8 @@ clonedCube = clone(cube) assert_ne!(cube.id, cloned_cube.id); assert_ne!(cube.original_id, cloned_cube.original_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.artifact_id, cloned_cube.artifact_id); - #[cfg(feature = "artifact-graph")] assert_eq!(cloned_cube.artifact_id, cloned_cube.id.into()); assert_eq!(cloned_cube.original_id, cloned_cube.id); @@ -384,12 +372,9 @@ clonedCube = clone(cube) assert_ne!(cube.id, cloned_cube.id); assert_ne!(cube.sketch.id, cloned_cube.sketch.id); assert_ne!(cube.sketch.original_id, cloned_cube.sketch.original_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.artifact_id, cloned_cube.artifact_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.sketch.artifact_id, cloned_cube.sketch.artifact_id); - #[cfg(feature = "artifact-graph")] assert_eq!(cloned_cube.artifact_id, cloned_cube.id.into()); for (path, cloned_path) in cube.sketch.paths.iter().zip(cloned_cube.sketch.paths.iter()) { @@ -501,12 +486,9 @@ clonedCube = clone(cube) assert_ne!(cube.id, cloned_cube.id); assert_ne!(cube.sketch.id, cloned_cube.sketch.id); assert_ne!(cube.sketch.original_id, cloned_cube.sketch.original_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.artifact_id, cloned_cube.artifact_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.sketch.artifact_id, cloned_cube.sketch.artifact_id); - #[cfg(feature = "artifact-graph")] assert_eq!(cloned_cube.artifact_id, cloned_cube.id.into()); for (path, cloned_path) in cube.sketch.paths.iter().zip(cloned_cube.sketch.paths.iter()) { @@ -576,12 +558,9 @@ clonedCube = clone(cube) assert_ne!(cube.id, cloned_cube.id); assert_ne!(cube.sketch.id, cloned_cube.sketch.id); assert_ne!(cube.sketch.original_id, cloned_cube.sketch.original_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.artifact_id, cloned_cube.artifact_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.sketch.artifact_id, cloned_cube.sketch.artifact_id); - #[cfg(feature = "artifact-graph")] assert_eq!(cloned_cube.artifact_id, cloned_cube.id.into()); for (path, cloned_path) in cube.sketch.paths.iter().zip(cloned_cube.sketch.paths.iter()) { @@ -679,12 +658,9 @@ clonedCube = clone(cube) assert_ne!(cube.id, cloned_cube.id); assert_ne!(cube.sketch.id, cloned_cube.sketch.id); assert_ne!(cube.sketch.original_id, cloned_cube.sketch.original_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.artifact_id, cloned_cube.artifact_id); - #[cfg(feature = "artifact-graph")] assert_ne!(cube.sketch.artifact_id, cloned_cube.sketch.artifact_id); - #[cfg(feature = "artifact-graph")] assert_eq!(cloned_cube.artifact_id, cloned_cube.id.into()); for (value, cloned_value) in cube.value.iter().zip(cloned_cube.value.iter()) { diff --git a/rust/kcl-lib/src/std/extrude.rs b/rust/kcl-lib/src/std/extrude.rs index d06d787df..746710b19 100644 --- a/rust/kcl-lib/src/std/extrude.rs +++ b/rust/kcl-lib/src/std/extrude.rs @@ -17,11 +17,12 @@ use kittycad_modeling_cmds::{self as kcmc}; use uuid::Uuid; use super::args::TyF64; -#[cfg(feature = "artifact-graph")] -use crate::execution::ArtifactId; use crate::{ errors::{KclError, KclErrorDetails}, - execution::{types::RuntimeType, ExecState, ExtrudeSurface, GeoMeta, KclValue, Path, Sketch, SketchSurface, Solid}, + execution::{ + types::RuntimeType, ArtifactId, ExecState, ExtrudeSurface, GeoMeta, KclValue, Path, Sketch, SketchSurface, + Solid, + }, parsing::ast::types::TagNode, std::Args, }; @@ -210,7 +211,6 @@ async fn inner_extrude( solids.push( do_post_extrude( sketch, - #[cfg(feature = "artifact-graph")] id.into(), length.clone(), false, @@ -238,7 +238,7 @@ pub(crate) struct NamedCapTags<'a> { #[allow(clippy::too_many_arguments)] pub(crate) async fn do_post_extrude<'a>( sketch: &Sketch, - #[cfg(feature = "artifact-graph")] solid_id: ArtifactId, + solid_id: ArtifactId, length: TyF64, sectional: bool, named_cap_tags: &'a NamedCapTags<'a>, @@ -431,7 +431,6 @@ pub(crate) async fn do_post_extrude<'a>( // that we passed in to the function, but it's actually the id of the // sketch. id: sketch.id, - #[cfg(feature = "artifact-graph")] artifact_id: solid_id, value: new_value, meta: sketch.meta.clone(), diff --git a/rust/kcl-lib/src/std/helix.rs b/rust/kcl-lib/src/std/helix.rs index dcbf2b0a8..e8fc0ed20 100644 --- a/rust/kcl-lib/src/std/helix.rs +++ b/rust/kcl-lib/src/std/helix.rs @@ -110,7 +110,6 @@ async fn inner_helix( let helix_result = Box::new(HelixValue { value: id, - #[cfg(feature = "artifact-graph")] artifact_id: id.into(), revolutions, angle_start, diff --git a/rust/kcl-lib/src/std/loft.rs b/rust/kcl-lib/src/std/loft.rs index a4237d3ae..5fb9afbda 100644 --- a/rust/kcl-lib/src/std/loft.rs +++ b/rust/kcl-lib/src/std/loft.rs @@ -177,7 +177,6 @@ async fn inner_loft( Ok(Box::new( do_post_extrude( &sketch, - #[cfg(feature = "artifact-graph")] id.into(), TyF64::new(0.0, NumericType::mm()), false, diff --git a/rust/kcl-lib/src/std/mod.rs b/rust/kcl-lib/src/std/mod.rs index bb54166c8..19a867084 100644 --- a/rust/kcl-lib/src/std/mod.rs +++ b/rust/kcl-lib/src/std/mod.rs @@ -328,14 +328,14 @@ impl StdLib { self.fns.get(name).cloned() } - pub fn get_either(&self, name: &Name) -> FunctionKind { + pub fn get_rust_function(&self, name: &Name) -> Option> { if let Some(name) = name.local_ident() { if let Some(f) = self.get(name.inner) { - return FunctionKind::Core(f); + return Some(f); } } - FunctionKind::UserDefined + None } pub fn contains_key(&self, key: &str) -> bool { @@ -349,11 +349,5 @@ impl Default for StdLib { } } -#[derive(Debug)] -pub enum FunctionKind { - Core(Box), - UserDefined, -} - /// The default tolerance for modeling commands in [`kittycad_modeling_cmds::length_unit::LengthUnit`]. const DEFAULT_TOLERANCE: f64 = 0.0000001; diff --git a/rust/kcl-lib/src/std/patterns.rs b/rust/kcl-lib/src/std/patterns.rs index 4bd91c5cb..744814aa2 100644 --- a/rust/kcl-lib/src/std/patterns.rs +++ b/rust/kcl-lib/src/std/patterns.rs @@ -18,15 +18,15 @@ use uuid::Uuid; use crate::{ errors::{KclError, KclErrorDetails}, execution::{ + fn_call::{Arg, Args, KwArgs}, kcl_value::FunctionSource, types::{NumericType, PrimitiveType, RuntimeType}, ExecState, Geometries, Geometry, KclObjectFields, KclValue, Sketch, Solid, }, std::{ - args::{Arg, KwArgs, TyF64}, + args::TyF64, axis_or_reference::Axis2dOrPoint2d, utils::{point_3d_to_mm, point_to_mm}, - Args, }, ExecutorContext, SourceRange, }; diff --git a/rust/kcl-lib/src/std/revolve.rs b/rust/kcl-lib/src/std/revolve.rs index 16bdca022..4a5e65249 100644 --- a/rust/kcl-lib/src/std/revolve.rs +++ b/rust/kcl-lib/src/std/revolve.rs @@ -196,7 +196,6 @@ async fn inner_revolve( solids.push( do_post_extrude( sketch, - #[cfg(feature = "artifact-graph")] id.into(), TyF64::new(0.0, NumericType::mm()), false, diff --git a/rust/kcl-lib/src/std/sketch.rs b/rust/kcl-lib/src/std/sketch.rs index ad3fd9c20..614368e71 100644 --- a/rust/kcl-lib/src/std/sketch.rs +++ b/rust/kcl-lib/src/std/sketch.rs @@ -1233,7 +1233,6 @@ async fn start_sketch_on_face( Ok(Box::new(Face { id: extrude_plane_id, - #[cfg(feature = "artifact-graph")] artifact_id: extrude_plane_id.into(), value: tag.to_string(), // TODO: get this from the extrude plane data. @@ -1414,7 +1413,6 @@ pub(crate) async fn inner_start_profile( let sketch = Sketch { id: path_id, original_id: path_id, - #[cfg(feature = "artifact-graph")] artifact_id: path_id.into(), on: sketch_surface.clone(), paths: vec![], diff --git a/rust/kcl-lib/src/std/sweep.rs b/rust/kcl-lib/src/std/sweep.rs index 732c8fd77..facb1edce 100644 --- a/rust/kcl-lib/src/std/sweep.rs +++ b/rust/kcl-lib/src/std/sweep.rs @@ -218,7 +218,6 @@ async fn inner_sweep( solids.push( do_post_extrude( sketch, - #[cfg(feature = "artifact-graph")] id.into(), TyF64::new(0.0, NumericType::mm()), sectional.unwrap_or(false), diff --git a/rust/kcl-lib/std/array.kcl b/rust/kcl-lib/std/array.kcl index 473705160..64a6f21a6 100644 --- a/rust/kcl-lib/std/array.kcl +++ b/rust/kcl-lib/std/array.kcl @@ -133,7 +133,7 @@ export fn reduce( initial: any, /// Run once per item in the input `array`. This function takes an item from the array, and the previous output from `f` (or `initial` on the very first run). The final time `f` is run, its output is returned as the final output from `reduce`. f: fn(any, accum: any): any, -): [any] {} +): any {} /// Append an element to the end of an array. /// diff --git a/rust/kcl-lib/std/math.kcl b/rust/kcl-lib/std/math.kcl index 02659e553..14b3787de 100644 --- a/rust/kcl-lib/std/math.kcl +++ b/rust/kcl-lib/std/math.kcl @@ -448,7 +448,7 @@ export fn legLen( hypotenuse: number(Length), /// The length of one of the triangle's legs (i.e. non-hypotenuse side). leg: number(Length), -): number(deg) {} +): number(Length) {} /// Compute the angle of the given leg for x. /// diff --git a/rust/kcl-lib/std/sketch.kcl b/rust/kcl-lib/std/sketch.kcl index cebb53dad..e3a8314a6 100644 --- a/rust/kcl-lib/std/sketch.kcl +++ b/rust/kcl-lib/std/sketch.kcl @@ -277,4 +277,4 @@ export fn revolve( tagStart?: tag, /// A named tag for the face at the end of the revolve. tagEnd?: tag, -): Solid {} +): [Solid; 1+] {} diff --git a/rust/kcl-lib/tests/angled_line/ops.snap b/rust/kcl-lib/tests/angled_line/ops.snap index d0f5288e8..18fd4e995 100644 --- a/rust/kcl-lib/tests/angled_line/ops.snap +++ b/rust/kcl-lib/tests/angled_line/ops.snap @@ -4,19 +4,30 @@ description: Operations executed angled_line.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed angled_line.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/array_elem_pop_empty_fail/execution_error.snap b/rust/kcl-lib/tests/array_elem_pop_empty_fail/execution_error.snap index b13eaf373..de1f7061c 100644 --- a/rust/kcl-lib/tests/array_elem_pop_empty_fail/execution_error.snap +++ b/rust/kcl-lib/tests/array_elem_pop_empty_fail/execution_error.snap @@ -4,8 +4,8 @@ description: Error from executing array_elem_pop_empty_fail.kcl --- KCL Semantic error - × semantic: The input argument of `std::array::pop` requires a value with - │ type `[any; 1+]`, but found [any; 0] + × semantic: The input argument of `pop` requires a value with type `[any; + │ 1+]`, but found [any; 0] ╭─[2:8] 1 │ arr = [] 2 │ fail = pop(arr) @@ -15,8 +15,8 @@ KCL Semantic error ╰──── ╰─▶ KCL Semantic error - × semantic: The input argument of `std::array::pop` requires a value - │ with type `[any; 1+]`, but found [any; 0] + × semantic: The input argument of `pop` requires a value with type + │ `[any; 1+]`, but found [any; 0] ╭─[2:12] 1 │ arr = [] 2 │ fail = pop(arr) diff --git a/rust/kcl-lib/tests/artifact_graph_example_code1/ops.snap b/rust/kcl-lib/tests/artifact_graph_example_code1/ops.snap index 673a53eca..463227ccd 100644 --- a/rust/kcl-lib/tests/artifact_graph_example_code1/ops.snap +++ b/rust/kcl-lib/tests/artifact_graph_example_code1/ops.snap @@ -4,19 +4,30 @@ description: Operations executed artifact_graph_example_code1.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed artifact_graph_example_code1.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -94,6 +94,17 @@ description: Operations executed artifact_graph_example_code1.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -104,20 +115,20 @@ description: Operations executed artifact_graph_example_code1.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -136,17 +147,6 @@ description: Operations executed artifact_graph_example_code1.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/artifact_graph_example_code_no_3d/ops.snap b/rust/kcl-lib/tests/artifact_graph_example_code_no_3d/ops.snap index abb95dde1..6425c8757 100644 --- a/rust/kcl-lib/tests/artifact_graph_example_code_no_3d/ops.snap +++ b/rust/kcl-lib/tests/artifact_graph_example_code_no_3d/ops.snap @@ -4,29 +4,29 @@ description: Operations executed artifact_graph_example_code_no_3d.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/ops.snap b/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/ops.snap index a434a917f..056dd3210 100644 --- a/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/ops.snap +++ b/rust/kcl-lib/tests/artifact_graph_example_code_offset_planes/ops.snap @@ -4,7 +4,7 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl --- [ { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -34,7 +34,7 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -64,7 +64,7 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -94,16 +94,16 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/artifact_graph_sketch_on_face_etc/ops.snap b/rust/kcl-lib/tests/artifact_graph_sketch_on_face_etc/ops.snap index 1e43ac525..bd6c11368 100644 --- a/rust/kcl-lib/tests/artifact_graph_sketch_on_face_etc/ops.snap +++ b/rust/kcl-lib/tests/artifact_graph_sketch_on_face_etc/ops.snap @@ -4,19 +4,30 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,20 +70,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -91,20 +102,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -114,20 +125,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -146,20 +157,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -170,20 +181,20 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -202,17 +213,6 @@ description: Operations executed artifact_graph_sketch_on_face_etc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/basic_fillet_cube_close_opposite/ops.snap b/rust/kcl-lib/tests/basic_fillet_cube_close_opposite/ops.snap index 38d90c27a..ef20d0a2b 100644 --- a/rust/kcl-lib/tests/basic_fillet_cube_close_opposite/ops.snap +++ b/rust/kcl-lib/tests/basic_fillet_cube_close_opposite/ops.snap @@ -4,19 +4,30 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/basic_fillet_cube_end/ops.snap b/rust/kcl-lib/tests/basic_fillet_cube_end/ops.snap index 6b1327ecd..c4496592f 100644 --- a/rust/kcl-lib/tests/basic_fillet_cube_end/ops.snap +++ b/rust/kcl-lib/tests/basic_fillet_cube_end/ops.snap @@ -4,19 +4,30 @@ description: Operations executed basic_fillet_cube_end.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed basic_fillet_cube_end.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/basic_fillet_cube_next_adjacent/ops.snap b/rust/kcl-lib/tests/basic_fillet_cube_next_adjacent/ops.snap index 55d386186..d4056bfdd 100644 --- a/rust/kcl-lib/tests/basic_fillet_cube_next_adjacent/ops.snap +++ b/rust/kcl-lib/tests/basic_fillet_cube_next_adjacent/ops.snap @@ -4,19 +4,30 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/basic_fillet_cube_previous_adjacent/ops.snap b/rust/kcl-lib/tests/basic_fillet_cube_previous_adjacent/ops.snap index 6945175de..00e35c051 100644 --- a/rust/kcl-lib/tests/basic_fillet_cube_previous_adjacent/ops.snap +++ b/rust/kcl-lib/tests/basic_fillet_cube_previous_adjacent/ops.snap @@ -4,19 +4,30 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/basic_fillet_cube_start/ops.snap b/rust/kcl-lib/tests/basic_fillet_cube_start/ops.snap index 5571e0399..a4c0e7f5a 100644 --- a/rust/kcl-lib/tests/basic_fillet_cube_start/ops.snap +++ b/rust/kcl-lib/tests/basic_fillet_cube_start/ops.snap @@ -4,19 +4,30 @@ description: Operations executed basic_fillet_cube_start.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed basic_fillet_cube_start.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/basic_revolve_circle/ops.snap b/rust/kcl-lib/tests/basic_revolve_circle/ops.snap index df2de0483..6dd6139ba 100644 --- a/rust/kcl-lib/tests/basic_revolve_circle/ops.snap +++ b/rust/kcl-lib/tests/basic_revolve_circle/ops.snap @@ -4,20 +4,20 @@ description: Operations executed basic_revolve_circle.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/circle_three_point/ops.snap b/rust/kcl-lib/tests/circle_three_point/ops.snap index 3ce6a1a75..a568a3e0b 100644 --- a/rust/kcl-lib/tests/circle_three_point/ops.snap +++ b/rust/kcl-lib/tests/circle_three_point/ops.snap @@ -4,19 +4,30 @@ description: Operations executed circle_three_point.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed circle_three_point.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/circular_pattern3d_a_pattern/ops.snap b/rust/kcl-lib/tests/circular_pattern3d_a_pattern/ops.snap index eae9693c6..bf009d67b 100644 --- a/rust/kcl-lib/tests/circular_pattern3d_a_pattern/ops.snap +++ b/rust/kcl-lib/tests/circular_pattern3d_a_pattern/ops.snap @@ -4,19 +4,30 @@ description: Operations executed circular_pattern3d_a_pattern.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed circular_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -130,20 +141,61 @@ description: Operations executed circular_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -279,58 +331,6 @@ description: Operations executed circular_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/clone_w_fillets/ops.snap b/rust/kcl-lib/tests/clone_w_fillets/ops.snap deleted file mode 100644 index 98695a9f7..000000000 --- a/rust/kcl-lib/tests/clone_w_fillets/ops.snap +++ /dev/null @@ -1,122 +0,0 @@ ---- -source: kcl-lib/src/simulation_tests.rs -description: Operations executed clone_w_fillets.kcl ---- -[ - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "type": "KclStdLibCall", - "name": "fillet", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - }, - "labeledArgs": { - "radius": { - "value": { - "type": "Number", - "value": 2.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - }, - "tags": { - "value": { - "type": "Array", - "value": [ - { - "type": "Uuid", - "value": "[uuid]" - }, - { - "type": "Uuid", - "value": "[uuid]" - }, - { - "type": "Uuid", - "value": "[uuid]" - }, - { - "type": "Uuid", - "value": "[uuid]" - } - ] - }, - "sourceRange": [] - } - }, - "sourceRange": [] - }, - { - "type": "KclStdLibCall", - "name": "clone", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - }, - "labeledArgs": {}, - "sourceRange": [] - } -] diff --git a/rust/kcl-lib/tests/clone_w_shell/ops.snap b/rust/kcl-lib/tests/clone_w_shell/ops.snap deleted file mode 100644 index a95957194..000000000 --- a/rust/kcl-lib/tests/clone_w_shell/ops.snap +++ /dev/null @@ -1,115 +0,0 @@ ---- -source: kcl-lib/src/simulation_tests.rs -description: Operations executed clone_w_shell.kcl ---- -[ - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 6.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "type": "KclStdLibCall", - "name": "shell", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - }, - "labeledArgs": { - "faces": { - "value": { - "type": "Array", - "value": [ - { - "type": "String", - "value": "end" - } - ] - }, - "sourceRange": [] - }, - "thickness": { - "value": { - "type": "Number", - "value": 0.25, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "sourceRange": [] - }, - { - "type": "KclStdLibCall", - "name": "clone", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - }, - "labeledArgs": {}, - "sourceRange": [] - } -] diff --git a/rust/kcl-lib/tests/crazy_multi_profile/ops.snap b/rust/kcl-lib/tests/crazy_multi_profile/ops.snap index 04e843e52..e520d1a77 100644 --- a/rust/kcl-lib/tests/crazy_multi_profile/ops.snap +++ b/rust/kcl-lib/tests/crazy_multi_profile/ops.snap @@ -4,19 +4,30 @@ description: Operations executed crazy_multi_profile.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed crazy_multi_profile.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,21 +70,10 @@ description: Operations executed crazy_multi_profile.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -117,6 +117,17 @@ description: Operations executed crazy_multi_profile.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -135,9 +146,24 @@ description: Operations executed crazy_multi_profile.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -146,22 +172,7 @@ description: Operations executed crazy_multi_profile.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -180,21 +191,10 @@ description: Operations executed crazy_multi_profile.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/cube/ops.snap b/rust/kcl-lib/tests/cube/ops.snap index c1122cba7..13be3091f 100644 --- a/rust/kcl-lib/tests/cube/ops.snap +++ b/rust/kcl-lib/tests/cube/ops.snap @@ -4,19 +4,30 @@ description: Operations executed cube.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/cube_with_error/ops.snap b/rust/kcl-lib/tests/cube_with_error/ops.snap index 0fcfd2119..e6a6cb879 100644 --- a/rust/kcl-lib/tests/cube_with_error/ops.snap +++ b/rust/kcl-lib/tests/cube_with_error/ops.snap @@ -4,19 +4,30 @@ description: Operations executed cube_with_error.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed cube_with_error.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/error_inside_fn_also_has_source_range_of_call_site_recursive/ops.snap b/rust/kcl-lib/tests/error_inside_fn_also_has_source_range_of_call_site_recursive/ops.snap index e6766cee4..bea869654 100644 --- a/rust/kcl-lib/tests/error_inside_fn_also_has_source_range_of_call_site_recursive/ops.snap +++ b/rust/kcl-lib/tests/error_inside_fn_also_has_source_range_of_call_site_recursive/ops.snap @@ -4,18 +4,18 @@ description: Operations executed error_inside_fn_also_has_source_range_of_call_s --- [ { - "isError": true, - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "String", "value": "INVALID" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [], + "isError": true }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/error_revolve_on_edge_get_edge/ops.snap b/rust/kcl-lib/tests/error_revolve_on_edge_get_edge/ops.snap index 600e4f088..efbfebba4 100644 --- a/rust/kcl-lib/tests/error_revolve_on_edge_get_edge/ops.snap +++ b/rust/kcl-lib/tests/error_revolve_on_edge_get_edge/ops.snap @@ -4,19 +4,30 @@ description: Operations executed error_revolve_on_edge_get_edge.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed error_revolve_on_edge_get_edge.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,21 +70,10 @@ description: Operations executed error_revolve_on_edge_get_edge.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/execute_engine_error_return/ops.snap b/rust/kcl-lib/tests/execute_engine_error_return/ops.snap index 33459f64b..6fdc1b1e3 100644 --- a/rust/kcl-lib/tests/execute_engine_error_return/ops.snap +++ b/rust/kcl-lib/tests/execute_engine_error_return/ops.snap @@ -4,20 +4,30 @@ description: Operations executed execute_engine_error_return.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "isError": true, + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -36,17 +46,7 @@ description: Operations executed execute_engine_error_return.kcl "sourceRange": [] } }, - "name": "extrude", "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "isError": true } ] diff --git a/rust/kcl-lib/tests/fillet-and-shell/ops.snap b/rust/kcl-lib/tests/fillet-and-shell/ops.snap index 54d3c0dc4..9b69acf17 100644 --- a/rust/kcl-lib/tests/fillet-and-shell/ops.snap +++ b/rust/kcl-lib/tests/fillet-and-shell/ops.snap @@ -4,32 +4,43 @@ description: Operations executed fillet-and-shell.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,21 +59,10 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -118,58 +118,69 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -181,9 +192,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -192,9 +205,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -206,9 +217,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -217,9 +230,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -231,9 +242,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -242,9 +255,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -256,9 +267,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -267,9 +280,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -288,9 +299,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -299,9 +312,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -320,9 +331,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -331,9 +344,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -352,9 +363,11 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -363,9 +376,7 @@ description: Operations executed fillet-and-shell.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -384,18 +395,7 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -638,7 +638,7 @@ description: Operations executed fillet-and-shell.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/fillet_duplicate_tags/ops.snap b/rust/kcl-lib/tests/fillet_duplicate_tags/ops.snap index 9f9b2811f..3d6faf99b 100644 --- a/rust/kcl-lib/tests/fillet_duplicate_tags/ops.snap +++ b/rust/kcl-lib/tests/fillet_duplicate_tags/ops.snap @@ -4,19 +4,30 @@ description: Operations executed fillet_duplicate_tags.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed fillet_duplicate_tags.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/flush_batch_on_end/ops.snap b/rust/kcl-lib/tests/flush_batch_on_end/ops.snap index c664728fb..cdcdeeea3 100644 --- a/rust/kcl-lib/tests/flush_batch_on_end/ops.snap +++ b/rust/kcl-lib/tests/flush_batch_on_end/ops.snap @@ -4,19 +4,30 @@ description: Operations executed flush_batch_on_end.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed flush_batch_on_end.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed flush_batch_on_end.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,17 +71,6 @@ description: Operations executed flush_batch_on_end.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/function_sketch/ops.snap b/rust/kcl-lib/tests/function_sketch/ops.snap index de65352ea..9c2b713cb 100644 --- a/rust/kcl-lib/tests/function_sketch/ops.snap +++ b/rust/kcl-lib/tests/function_sketch/ops.snap @@ -4,19 +4,30 @@ description: Operations executed function_sketch.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed function_sketch.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/function_sketch_with_position/ops.snap b/rust/kcl-lib/tests/function_sketch_with_position/ops.snap index cd890108a..983c1aaf5 100644 --- a/rust/kcl-lib/tests/function_sketch_with_position/ops.snap +++ b/rust/kcl-lib/tests/function_sketch_with_position/ops.snap @@ -4,19 +4,30 @@ description: Operations executed function_sketch_with_position.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed function_sketch_with_position.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/helix_ccw/ops.snap b/rust/kcl-lib/tests/helix_ccw/ops.snap index 590f06399..9270c97c0 100644 --- a/rust/kcl-lib/tests/helix_ccw/ops.snap +++ b/rust/kcl-lib/tests/helix_ccw/ops.snap @@ -4,19 +4,30 @@ description: Operations executed helix_ccw.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed helix_ccw.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "helix", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/helix_simple/ops.snap b/rust/kcl-lib/tests/helix_simple/ops.snap index f8b9d69e0..0bd8bd803 100644 --- a/rust/kcl-lib/tests/helix_simple/ops.snap +++ b/rust/kcl-lib/tests/helix_simple/ops.snap @@ -4,20 +4,20 @@ description: Operations executed helix_simple.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "helix", "unlabeledArg": null, "labeledArgs": { diff --git a/rust/kcl-lib/tests/i_shape/ops.snap b/rust/kcl-lib/tests/i_shape/ops.snap index 4a5e202d1..6f1195cf6 100644 --- a/rust/kcl-lib/tests/i_shape/ops.snap +++ b/rust/kcl-lib/tests/i_shape/ops.snap @@ -4,32 +4,43 @@ description: Operations executed i_shape.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -41,9 +52,11 @@ description: Operations executed i_shape.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -52,9 +65,7 @@ description: Operations executed i_shape.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -73,17 +84,6 @@ description: Operations executed i_shape.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/import_async/ops.snap b/rust/kcl-lib/tests/import_async/ops.snap index c9ebdf851..64225e5f6 100644 --- a/rust/kcl-lib/tests/import_async/ops.snap +++ b/rust/kcl-lib/tests/import_async/ops.snap @@ -13,59 +13,59 @@ description: Operations executed import_async.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -95,7 +95,7 @@ description: Operations executed import_async.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -125,7 +125,7 @@ description: Operations executed import_async.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -515,6 +515,17 @@ description: Operations executed import_async.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -526,20 +537,20 @@ description: Operations executed import_async.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -551,20 +562,20 @@ description: Operations executed import_async.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -576,18 +587,7 @@ description: Operations executed import_async.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -674,10 +674,8 @@ description: Operations executed import_async.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -703,7 +701,9 @@ description: Operations executed import_async.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/import_mesh_clone/ops.snap b/rust/kcl-lib/tests/import_mesh_clone/ops.snap index 2fb6173c9..44263293e 100644 --- a/rust/kcl-lib/tests/import_mesh_clone/ops.snap +++ b/rust/kcl-lib/tests/import_mesh_clone/ops.snap @@ -13,7 +13,7 @@ description: Operations executed import_mesh_clone.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -26,7 +26,7 @@ description: Operations executed import_mesh_clone.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -39,7 +39,7 @@ description: Operations executed import_mesh_clone.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/intersect_cubes/ops.snap b/rust/kcl-lib/tests/intersect_cubes/ops.snap index 0251b53b2..853dfe5c8 100644 --- a/rust/kcl-lib/tests/intersect_cubes/ops.snap +++ b/rust/kcl-lib/tests/intersect_cubes/ops.snap @@ -4,32 +4,43 @@ description: Operations executed intersect_cubes.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,9 +59,11 @@ description: Operations executed intersect_cubes.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -59,9 +72,7 @@ description: Operations executed intersect_cubes.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,18 +91,7 @@ description: Operations executed intersect_cubes.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -218,10 +218,8 @@ description: Operations executed intersect_cubes.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -241,7 +239,9 @@ description: Operations executed intersect_cubes.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/involute_circular_units/ops.snap b/rust/kcl-lib/tests/involute_circular_units/ops.snap index 34e6c7ccb..d816428a1 100644 --- a/rust/kcl-lib/tests/involute_circular_units/ops.snap +++ b/rust/kcl-lib/tests/involute_circular_units/ops.snap @@ -4,17 +4,17 @@ description: Operations executed involute_circular_units.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -27,15 +27,11 @@ description: Operations executed involute_circular_units.kcl "angle": { "value": { "type": "Number", - "value": 17.1429, + "value": 0.2992, "ty": { - "type": "Default", - "len": { - "type": "Cm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -61,6 +57,17 @@ description: Operations executed involute_circular_units.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -72,9 +79,11 @@ description: Operations executed involute_circular_units.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -83,9 +92,7 @@ description: Operations executed involute_circular_units.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -104,18 +111,7 @@ description: Operations executed involute_circular_units.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/80-20-rail/ops.snap b/rust/kcl-lib/tests/kcl_samples/80-20-rail/ops.snap index caf0c6c0a..3a77f2904 100644 --- a/rust/kcl-lib/tests/kcl_samples/80-20-rail/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/80-20-rail/ops.snap @@ -4,19 +4,30 @@ description: Operations executed 80-20-rail.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed 80-20-rail.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed 80-20-rail.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,21 +71,10 @@ description: Operations executed 80-20-rail.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -178,7 +178,7 @@ description: Operations executed 80-20-rail.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_graph_flowchart.snap.md index 6b429b3cb..c1f5261cc 100644 --- a/rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/kcl_samples/axial-fan/artifact_graph_flowchart.snap.md @@ -661,19 +661,19 @@ flowchart LR 84 --- 144 84 --- 237 86 --- 168 - 86 x--> 189 + 86 x--> 188 86 --- 212 86 --- 256 88 --- 169 - 88 x--> 189 + 88 x--> 188 88 --- 213 88 --- 257 90 --- 167 - 90 x--> 189 + 90 x--> 188 90 --- 214 90 --- 258 92 --- 170 - 92 x--> 189 + 92 x--> 188 92 --- 215 92 --- 259 119 --- 133 @@ -955,10 +955,10 @@ flowchart LR 218 <--x 186 219 <--x 186 194 <--x 187 - 212 <--x 188 - 213 <--x 188 - 214 <--x 188 - 215 <--x 188 + 212 <--x 189 + 213 <--x 189 + 214 <--x 189 + 215 <--x 189 220 <--x 275 223 <--x 270 224 <--x 274 diff --git a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap index 87aaaef2e..bea904ba6 100644 --- a/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/ball-bearing/ops.snap @@ -4,20 +4,20 @@ description: Operations executed ball-bearing.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -47,6 +47,17 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -58,9 +69,11 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -69,9 +82,7 @@ description: Operations executed ball-bearing.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,34 +101,23 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -208,6 +208,17 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -343,34 +354,23 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -461,6 +461,17 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -596,34 +607,23 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -730,6 +730,17 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -865,34 +876,23 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -922,6 +922,17 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -933,9 +944,11 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -944,9 +957,7 @@ description: Operations executed ball-bearing.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -965,17 +976,6 @@ description: Operations executed ball-bearing.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/bench/ops.snap b/rust/kcl-lib/tests/kcl_samples/bench/ops.snap index b60135672..4b9f3e80a 100644 --- a/rust/kcl-lib/tests/kcl_samples/bench/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/bench/ops.snap @@ -47,7 +47,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -94,7 +94,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -158,7 +158,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -222,7 +222,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -286,7 +286,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -384,82 +384,82 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -513,6 +513,17 @@ description: Operations executed bench.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -531,9 +542,11 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -542,9 +555,7 @@ description: Operations executed bench.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -563,9 +574,11 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -574,9 +587,7 @@ description: Operations executed bench.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -595,18 +606,7 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -660,6 +660,17 @@ description: Operations executed bench.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -678,9 +689,11 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -689,9 +702,7 @@ description: Operations executed bench.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -710,9 +721,11 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -721,9 +734,7 @@ description: Operations executed bench.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -742,21 +753,10 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -805,7 +805,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -854,7 +854,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -903,177 +903,177 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", - "name": "shell", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - }, - "labeledArgs": { - "faces": { - "value": { - "type": "Array", - "value": [ - { - "type": "String", - "value": "start" - } - ] - }, - "sourceRange": [] - }, - "thickness": { - "value": { - "type": "Number", - "value": 1.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "sourceRange": [] - }, - { - "type": "KclStdLibCall", - "name": "shell", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - }, - "labeledArgs": { - "faces": { - "value": { - "type": "Array", - "value": [ - { - "type": "String", - "value": "start" - } - ] - }, - "sourceRange": [] - }, - "thickness": { - "value": { - "type": "Number", - "value": 1.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "sourceRange": [] - }, - { - "type": "KclStdLibCall", - "name": "shell", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - }, - "labeledArgs": { - "faces": { - "value": { - "type": "Array", - "value": [ - { - "type": "String", - "value": "start" - } - ] - }, - "sourceRange": [] - }, - "thickness": { - "value": { - "type": "Number", - "value": 1.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "sourceRange": [] - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "shell", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, + "labeledArgs": { + "faces": { + "value": { + "type": "Array", + "value": [ + { + "type": "String", + "value": "start" + } + ] + }, + "sourceRange": [] + }, + "thickness": { + "value": { + "type": "Number", + "value": 1.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "shell", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, + "labeledArgs": { + "faces": { + "value": { + "type": "Array", + "value": [ + { + "type": "String", + "value": "start" + } + ] + }, + "sourceRange": [] + }, + "thickness": { + "value": { + "type": "Number", + "value": 1.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "shell", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, + "labeledArgs": { + "faces": { + "value": { + "type": "Array", + "value": [ + { + "type": "String", + "value": "start" + } + ] + }, + "sourceRange": [] + }, + "thickness": { + "value": { + "type": "Number", + "value": 1.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1128,6 +1128,17 @@ description: Operations executed bench.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1146,18 +1157,7 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1212,6 +1212,17 @@ description: Operations executed bench.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1230,31 +1241,20 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1274,27 +1274,8 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 60.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -1320,20 +1301,39 @@ description: Operations executed bench.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 60.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1353,27 +1353,8 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 60.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -1393,59 +1374,78 @@ description: Operations executed bench.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 60.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1482,7 +1482,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1512,7 +1512,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1610,7 +1610,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1640,7 +1640,7 @@ description: Operations executed bench.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1670,6 +1670,17 @@ description: Operations executed bench.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -1681,20 +1692,20 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -1706,18 +1717,7 @@ description: Operations executed bench.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/bone-plate/ops.snap b/rust/kcl-lib/tests/kcl_samples/bone-plate/ops.snap index da0b87192..d8d3b3d41 100644 --- a/rust/kcl-lib/tests/kcl_samples/bone-plate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/bone-plate/ops.snap @@ -4,20 +4,20 @@ description: Operations executed bone-plate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -126,19 +126,30 @@ description: Operations executed bone-plate.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -157,9 +168,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -168,9 +181,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -189,9 +200,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -200,9 +213,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -221,9 +232,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -232,9 +245,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -253,9 +264,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -264,9 +277,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -285,9 +296,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -296,9 +309,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -317,9 +328,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -328,9 +341,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -349,9 +360,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -360,9 +373,7 @@ description: Operations executed bone-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -381,34 +392,11 @@ description: Operations executed bone-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, + "type": "StdLibCall", "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Array", @@ -422,13 +410,23 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -448,23 +446,13 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -478,13 +466,23 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -504,23 +502,13 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -534,13 +522,23 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -560,23 +558,13 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -590,13 +578,23 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -616,6 +614,8 @@ description: Operations executed bone-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/bottle/ops.snap b/rust/kcl-lib/tests/kcl_samples/bottle/ops.snap index b71e3d51e..764882965 100644 --- a/rust/kcl-lib/tests/kcl_samples/bottle/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/bottle/ops.snap @@ -4,19 +4,30 @@ description: Operations executed bottle.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed bottle.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,20 +69,20 @@ description: Operations executed bottle.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,21 +101,10 @@ description: Operations executed bottle.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/bracket/ops.snap b/rust/kcl-lib/tests/kcl_samples/bracket/ops.snap index 6cc7bcd2b..ee6d1062d 100644 --- a/rust/kcl-lib/tests/kcl_samples/bracket/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/bracket/ops.snap @@ -4,19 +4,30 @@ description: Operations executed bracket.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,20 +70,43 @@ description: Operations executed bracket.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -91,25 +125,39 @@ description: Operations executed bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "TagIdentifier", + "value": "seg04", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, { "type": "Sketch", "value": { @@ -125,33 +173,7 @@ description: Operations executed bracket.kcl ] }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "TagIdentifier", - "value": "seg04", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -170,32 +192,10 @@ description: Operations executed bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -239,7 +239,7 @@ description: Operations executed bracket.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -283,7 +283,7 @@ description: Operations executed bracket.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/car-wheel-assembly/ops.snap b/rust/kcl-lib/tests/kcl_samples/car-wheel-assembly/ops.snap index beb537cc8..92c20d77a 100644 --- a/rust/kcl-lib/tests/kcl_samples/car-wheel-assembly/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/car-wheel-assembly/ops.snap @@ -49,6 +49,17 @@ description: Operations executed car-wheel-assembly.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -184,18 +195,7 @@ description: Operations executed car-wheel-assembly.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/cold-plate/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/kcl_samples/cold-plate/artifact_graph_flowchart.snap.md index a529c5064..98222a695 100644 --- a/rust/kcl-lib/tests/kcl_samples/cold-plate/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/kcl_samples/cold-plate/artifact_graph_flowchart.snap.md @@ -172,7 +172,7 @@ flowchart LR 11 --- 42 11 ---- 47 34 --- 48 - 34 x--> 55 + 34 x--> 54 34 --- 57 34 --- 62 36 --- 49 @@ -224,7 +224,7 @@ flowchart LR 52 --- 58 52 --- 63 64 <--x 52 - 57 <--x 54 + 57 <--x 55 58 <--x 56 59 <--x 56 60 <--x 56 diff --git a/rust/kcl-lib/tests/kcl_samples/cold-plate/ops.snap b/rust/kcl-lib/tests/kcl_samples/cold-plate/ops.snap index eec2206d1..870e41b92 100644 --- a/rust/kcl-lib/tests/kcl_samples/cold-plate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/cold-plate/ops.snap @@ -4,19 +4,30 @@ description: Operations executed cold-plate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -42,34 +53,23 @@ description: Operations executed cold-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -99,20 +99,20 @@ description: Operations executed cold-plate.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -142,6 +142,17 @@ description: Operations executed cold-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -153,9 +164,11 @@ description: Operations executed cold-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -164,9 +177,7 @@ description: Operations executed cold-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -178,9 +189,24 @@ description: Operations executed cold-plate.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -189,22 +215,7 @@ description: Operations executed cold-plate.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -230,20 +241,20 @@ description: Operations executed cold-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -325,17 +336,6 @@ description: Operations executed cold-plate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/color-cube/ops.snap b/rust/kcl-lib/tests/kcl_samples/color-cube/ops.snap index 1e1efa4bc..86f13e16b 100644 --- a/rust/kcl-lib/tests/kcl_samples/color-cube/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/color-cube/ops.snap @@ -4,7 +4,7 @@ description: Operations executed color-cube.kcl --- [ { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -34,7 +34,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -64,7 +64,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -94,7 +94,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -124,7 +124,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -154,7 +154,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -184,6 +184,17 @@ description: Operations executed color-cube.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -202,20 +213,20 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -234,20 +245,20 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -266,20 +277,20 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -298,20 +309,20 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -330,20 +341,20 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -362,18 +373,7 @@ description: Operations executed color-cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/counterdrilled-weldment/ops.snap b/rust/kcl-lib/tests/kcl_samples/counterdrilled-weldment/ops.snap index dce9a62b0..10861420a 100644 --- a/rust/kcl-lib/tests/kcl_samples/counterdrilled-weldment/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/counterdrilled-weldment/ops.snap @@ -4,19 +4,30 @@ description: Operations executed counterdrilled-weldment.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,21 +71,10 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -130,6 +130,17 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -139,9 +150,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -150,9 +163,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -162,9 +173,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -173,9 +186,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -185,9 +196,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -196,9 +209,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -208,20 +219,20 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -240,9 +251,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -251,9 +264,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -272,9 +283,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -283,9 +296,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -304,9 +315,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -315,9 +328,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -336,9 +347,103 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -347,101 +452,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -460,9 +471,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -471,9 +484,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -492,9 +503,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -503,9 +516,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -524,9 +535,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -535,9 +548,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -556,21 +567,10 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -615,7 +615,7 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -660,7 +660,7 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -705,7 +705,7 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -926,19 +926,30 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -957,34 +968,23 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1014,6 +1014,17 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1025,9 +1036,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1036,9 +1049,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1057,20 +1068,20 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tools": { "value": { @@ -1087,24 +1098,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1244,13 +1242,13 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1390,9 +1388,22 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1418,9 +1429,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1429,9 +1442,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1457,20 +1468,20 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -1606,9 +1617,11 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { "type": "Solid", @@ -1617,9 +1630,7 @@ description: Operations executed counterdrilled-weldment.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -1755,18 +1766,7 @@ description: Operations executed counterdrilled-weldment.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ops.snap b/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ops.snap index 8560b39ce..682d8af3f 100644 --- a/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/countersunk-plate/ops.snap @@ -4,17 +4,17 @@ description: Operations executed countersunk-plate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -57,6 +57,17 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -68,9 +79,11 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -79,9 +92,7 @@ description: Operations executed countersunk-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -100,9 +111,57 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -111,55 +170,7 @@ description: Operations executed countersunk-plate.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -178,9 +189,11 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -189,9 +202,7 @@ description: Operations executed countersunk-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -210,21 +221,10 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -269,7 +269,7 @@ description: Operations executed countersunk-plate.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap index 8c42c3e8c..ddbf1c7d4 100644 --- a/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/cpu-cooler/ops.snap @@ -67,90 +67,8 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] }, { - "labeledArgs": { - "axis": { - "value": { - "type": "Array", - "value": [ - { - "type": "Number", - "value": -1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - } - ] - }, - "sourceRange": [] - }, - "distance": { - "value": { - "type": "Number", - "value": 80.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - }, - "instances": { - "value": { - "type": "Number", - "value": 2.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "patternLinear3d", - "sourceRange": [], "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -159,9 +77,7 @@ description: Operations executed cpu-cooler.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -243,9 +159,11 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", @@ -265,9 +183,7 @@ description: Operations executed cpu-cooler.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -349,9 +265,11 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", @@ -419,7 +337,89 @@ description: Operations executed cpu-cooler.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "axis": { + "value": { + "type": "Array", + "value": [ + { + "type": "Number", + "value": -1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + } + ] + }, + "sourceRange": [] + }, + "distance": { + "value": { + "type": "Number", + "value": 80.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + }, + "instances": { + "value": { + "type": "Number", + "value": 2.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupBegin", @@ -555,6 +555,40 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -690,13 +724,39 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -724,9 +784,7 @@ description: Operations executed cpu-cooler.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -862,65 +920,7 @@ description: Operations executed cpu-cooler.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/curtain-wall-anchor-plate/ops.snap b/rust/kcl-lib/tests/kcl_samples/curtain-wall-anchor-plate/ops.snap index 4e75c7ca4..428c735ae 100644 --- a/rust/kcl-lib/tests/kcl_samples/curtain-wall-anchor-plate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/curtain-wall-anchor-plate/ops.snap @@ -4,20 +4,20 @@ description: Operations executed curtain-wall-anchor-plate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -47,6 +47,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -65,21 +76,10 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -123,7 +123,7 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -167,17 +167,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -215,6 +215,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -233,20 +244,20 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -256,20 +267,20 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -288,34 +299,23 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -345,6 +345,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -363,20 +374,20 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -386,18 +397,7 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -435,6 +435,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -453,18 +464,7 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -511,10 +511,8 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -534,7 +532,9 @@ description: Operations executed curtain-wall-anchor-plate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -613,19 +613,30 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -644,21 +655,10 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -673,6 +673,22 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -689,25 +705,25 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -724,23 +740,7 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -803,6 +803,17 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -884,18 +895,7 @@ description: Operations executed curtain-wall-anchor-plate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ops.snap index 563a4bb06..8efb0daa6 100644 --- a/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/cycloidal-gear/ops.snap @@ -4,46 +4,46 @@ description: Operations executed cycloidal-gear.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -73,7 +73,7 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -103,7 +103,7 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -133,6 +133,17 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -144,9 +155,11 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -155,9 +168,7 @@ description: Operations executed cycloidal-gear.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -169,9 +180,11 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -180,9 +193,7 @@ description: Operations executed cycloidal-gear.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -194,24 +205,11 @@ description: Operations executed cycloidal-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, + "type": "StdLibCall", "name": "loft", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Array", @@ -237,7 +235,9 @@ description: Operations executed cycloidal-gear.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -362,13 +362,9 @@ description: Operations executed cycloidal-gear.kcl "type": "Number", "value": -80.0, "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Degrees" } }, "sourceRange": [] diff --git a/rust/kcl-lib/tests/kcl_samples/dodecahedron/ops.snap b/rust/kcl-lib/tests/kcl_samples/dodecahedron/ops.snap index cda0ac1ec..43d20ce59 100644 --- a/rust/kcl-lib/tests/kcl_samples/dodecahedron/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/dodecahedron/ops.snap @@ -4,162 +4,173 @@ description: Operations executed dodecahedron.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -178,9 +189,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -189,9 +202,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -210,9 +221,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -221,9 +234,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -242,9 +253,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -253,9 +266,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -274,9 +285,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -285,9 +298,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -306,9 +317,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -317,9 +330,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -338,9 +349,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -349,9 +362,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -370,9 +381,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -381,9 +394,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -402,9 +413,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -413,9 +426,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -434,9 +445,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -445,9 +458,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -466,9 +477,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -477,9 +490,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -498,9 +509,11 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -509,9 +522,7 @@ description: Operations executed dodecahedron.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -530,18 +541,7 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2128,10 +2128,8 @@ description: Operations executed dodecahedron.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2151,13 +2149,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2177,13 +2175,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2203,13 +2201,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2229,13 +2227,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2255,13 +2253,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2281,13 +2279,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2307,13 +2305,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2333,13 +2331,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2359,13 +2357,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2385,13 +2383,13 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -2411,7 +2409,9 @@ description: Operations executed dodecahedron.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/enclosure/ops.snap b/rust/kcl-lib/tests/kcl_samples/enclosure/ops.snap index eaf6649e9..fac11e149 100644 --- a/rust/kcl-lib/tests/kcl_samples/enclosure/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/enclosure/ops.snap @@ -4,19 +4,30 @@ description: Operations executed enclosure.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -105,7 +105,7 @@ description: Operations executed enclosure.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -149,10 +149,8 @@ description: Operations executed enclosure.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -336,13 +334,13 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -526,13 +524,13 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -716,13 +714,13 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -906,9 +904,22 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -920,9 +931,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -931,9 +944,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -945,9 +956,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -956,9 +969,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -970,9 +981,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -981,9 +994,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -995,9 +1006,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1006,9 +1019,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1027,9 +1038,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1038,9 +1051,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1059,9 +1070,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1070,9 +1083,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1091,9 +1102,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1102,9 +1115,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1123,18 +1134,7 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1313,19 +1313,30 @@ description: Operations executed enclosure.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1337,9 +1348,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1348,9 +1361,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1362,9 +1373,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1373,9 +1386,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1387,9 +1398,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1398,9 +1411,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1412,9 +1423,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1423,9 +1436,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1444,21 +1455,10 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1514,6 +1514,17 @@ description: Operations executed enclosure.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -1523,20 +1534,20 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1548,9 +1559,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1559,9 +1572,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1573,9 +1584,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1584,9 +1597,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1598,9 +1609,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1609,9 +1622,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1623,9 +1634,11 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1634,9 +1647,7 @@ description: Operations executed enclosure.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1655,21 +1666,10 @@ description: Operations executed enclosure.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/enclosure/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/enclosure/program_memory.snap index 4985d5492..d21f41d17 100644 --- a/rust/kcl-lib/tests/kcl_samples/enclosure/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/enclosure/program_memory.snap @@ -4,343 +4,348 @@ description: Variables in memory after executing enclosure.kcl --- { "extrude001": { - "type": "Solid", - "value": { - "type": "Solid", - "id": "[uuid]", - "artifactId": "[uuid]", - "value": [ - { - "faceId": "[uuid]", + "type": "HomArray", + "value": [ + { + "type": "Solid", + "value": { + "type": "Solid", "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 380, - "end": 401, - "start": 380, - "type": "TagDeclarator", - "value": "rectangleSegmentA001" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 476, - "end": 497, - "start": 476, - "type": "TagDeclarator", - "value": "rectangleSegmentB001" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 599, - "end": 620, - "start": 599, - "type": "TagDeclarator", - "value": "rectangleSegmentC001" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 690, - "end": 711, - "start": 690, - "type": "TagDeclarator", - "value": "rectangleSegmentD001" - }, - "type": "extrudePlane" - } - ], - "sketch": { - "type": "Sketch", - "id": "[uuid]", - "paths": [ - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 0.0 - ], - "tag": { - "commentStart": 380, - "end": 401, - "start": 380, - "type": "TagDeclarator", - "value": "rectangleSegmentA001" - }, - "to": [ - 125.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 125.0, - 0.0 - ], - "tag": { - "commentStart": 476, - "end": 497, - "start": 476, - "type": "TagDeclarator", - "value": "rectangleSegmentB001" - }, - "to": [ - 125.0, - 175.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 125.0, - 175.0 - ], - "tag": { - "commentStart": 599, - "end": 620, - "start": 599, - "type": "TagDeclarator", - "value": "rectangleSegmentC001" - }, - "to": [ - 0.0, - 175.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 175.0 - ], - "tag": { - "commentStart": 690, - "end": 711, - "start": 690, - "type": "TagDeclarator", - "value": "rectangleSegmentD001" - }, - "to": [ - 0.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 0.0 - ], - "tag": null, - "to": [ - 0.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - } - ], - "on": { "artifactId": "[uuid]", - "id": "[uuid]", - "origin": { - "x": 0.0, - "y": 0.0, - "z": 0.0, + "value": [ + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 380, + "end": 401, + "start": 380, + "type": "TagDeclarator", + "value": "rectangleSegmentA001" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 476, + "end": 497, + "start": 476, + "type": "TagDeclarator", + "value": "rectangleSegmentB001" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 599, + "end": 620, + "start": 599, + "type": "TagDeclarator", + "value": "rectangleSegmentC001" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 690, + "end": 711, + "start": 690, + "type": "TagDeclarator", + "value": "rectangleSegmentD001" + }, + "type": "extrudePlane" + } + ], + "sketch": { + "type": "Sketch", + "id": "[uuid]", + "paths": [ + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 0.0 + ], + "tag": { + "commentStart": 380, + "end": 401, + "start": 380, + "type": "TagDeclarator", + "value": "rectangleSegmentA001" + }, + "to": [ + 125.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 125.0, + 0.0 + ], + "tag": { + "commentStart": 476, + "end": 497, + "start": 476, + "type": "TagDeclarator", + "value": "rectangleSegmentB001" + }, + "to": [ + 125.0, + 175.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 125.0, + 175.0 + ], + "tag": { + "commentStart": 599, + "end": 620, + "start": 599, + "type": "TagDeclarator", + "value": "rectangleSegmentC001" + }, + "to": [ + 0.0, + 175.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 175.0 + ], + "tag": { + "commentStart": 690, + "end": 711, + "start": 690, + "type": "TagDeclarator", + "value": "rectangleSegmentD001" + }, + "to": [ + 0.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 0.0 + ], + "tag": null, + "to": [ + 0.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + } + ], + "on": { + "artifactId": "[uuid]", + "id": "[uuid]", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Mm" + } + }, + "type": "plane", + "value": "XY", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + } + }, + "start": { + "from": [ + 0.0, + 0.0 + ], + "to": [ + 0.0, + 0.0 + ], + "units": { + "type": "Mm" + }, + "tag": null, + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + } + }, + "tags": { + "rectangleSegmentA001": { + "type": "TagIdentifier", + "value": "rectangleSegmentA001" + }, + "rectangleSegmentB001": { + "type": "TagIdentifier", + "value": "rectangleSegmentB001" + }, + "rectangleSegmentC001": { + "type": "TagIdentifier", + "value": "rectangleSegmentC001" + }, + "rectangleSegmentD001": { + "type": "TagIdentifier", + "value": "rectangleSegmentD001" + } + }, + "artifactId": "[uuid]", + "originalId": "[uuid]", "units": { "type": "Mm" } }, - "type": "plane", - "value": "XY", - "xAxis": { - "x": 1.0, - "y": 0.0, - "z": 0.0, - "units": { - "type": "Unknown" + "height": 70.0, + "startCapId": "[uuid]", + "endCapId": "[uuid]", + "edgeCuts": [ + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 12.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 12.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 12.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 12.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null } - }, - "yAxis": { - "x": 0.0, - "y": 1.0, - "z": 0.0, - "units": { - "type": "Unknown" - } - } - }, - "start": { - "from": [ - 0.0, - 0.0 - ], - "to": [ - 0.0, - 0.0 ], "units": { "type": "Mm" }, - "tag": null, - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - } - }, - "tags": { - "rectangleSegmentA001": { - "type": "TagIdentifier", - "value": "rectangleSegmentA001" - }, - "rectangleSegmentB001": { - "type": "TagIdentifier", - "value": "rectangleSegmentB001" - }, - "rectangleSegmentC001": { - "type": "TagIdentifier", - "value": "rectangleSegmentC001" - }, - "rectangleSegmentD001": { - "type": "TagIdentifier", - "value": "rectangleSegmentD001" - } - }, - "artifactId": "[uuid]", - "originalId": "[uuid]", - "units": { - "type": "Mm" + "sectional": false } - }, - "height": 70.0, - "startCapId": "[uuid]", - "endCapId": "[uuid]", - "edgeCuts": [ - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 12.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 12.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 12.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 12.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - } - ], - "units": { - "type": "Mm" - }, - "sectional": false - } + } + ] }, "extrude003": { "type": "Solid", diff --git a/rust/kcl-lib/tests/kcl_samples/engine-valve/ops.snap b/rust/kcl-lib/tests/kcl_samples/engine-valve/ops.snap index b05cb3aef..b529cc60b 100644 --- a/rust/kcl-lib/tests/kcl_samples/engine-valve/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/engine-valve/ops.snap @@ -4,20 +4,20 @@ description: Operations executed engine-valve.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,20 +124,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -167,6 +167,17 @@ description: Operations executed engine-valve.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -185,20 +196,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -208,20 +219,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -240,20 +251,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -263,20 +274,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -295,20 +306,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -318,20 +329,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -350,20 +361,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -373,20 +384,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -405,20 +416,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -428,20 +439,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -460,20 +471,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -483,20 +494,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -515,20 +526,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -538,20 +549,20 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -577,21 +588,10 @@ description: Operations executed engine-valve.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap index ef6898d50..ebb54be99 100644 --- a/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/exhaust-manifold/ops.snap @@ -4,10 +4,8 @@ description: Operations executed exhaust-manifold.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -181,13 +179,13 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -361,13 +359,13 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -541,13 +539,13 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -721,61 +719,74 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -787,9 +798,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -798,9 +811,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -812,9 +823,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -823,9 +836,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -837,9 +848,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -848,9 +861,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -862,9 +873,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -873,9 +886,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -887,9 +898,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -898,9 +911,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -912,9 +923,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -923,9 +936,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -937,9 +948,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -948,9 +961,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -962,18 +973,7 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1344,19 +1344,30 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1368,9 +1379,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1379,9 +1392,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1393,9 +1404,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1404,9 +1417,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1418,9 +1429,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1429,9 +1442,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1443,9 +1454,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1454,9 +1467,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1468,9 +1479,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1479,9 +1492,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1493,9 +1504,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1504,9 +1517,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1518,9 +1529,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1529,9 +1542,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1543,9 +1554,11 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1554,9 +1567,7 @@ description: Operations executed exhaust-manifold.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1575,21 +1586,10 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1637,7 +1637,7 @@ description: Operations executed exhaust-manifold.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/flange/ops.snap b/rust/kcl-lib/tests/kcl_samples/flange/ops.snap index 18c195db8..a41e9c620 100644 --- a/rust/kcl-lib/tests/kcl_samples/flange/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/flange/ops.snap @@ -4,32 +4,43 @@ description: Operations executed flange.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -64,9 +75,11 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -75,9 +88,7 @@ description: Operations executed flange.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -96,20 +107,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -119,20 +130,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -151,20 +162,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -174,20 +185,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -206,20 +217,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -229,20 +240,20 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -261,17 +272,6 @@ description: Operations executed flange.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/focusrite-scarlett-mounting-bracket/ops.snap b/rust/kcl-lib/tests/kcl_samples/focusrite-scarlett-mounting-bracket/ops.snap index aad804c9b..e08e8882b 100644 --- a/rust/kcl-lib/tests/kcl_samples/focusrite-scarlett-mounting-bracket/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/focusrite-scarlett-mounting-bracket/ops.snap @@ -4,10 +4,8 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -191,7 +189,9 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -254,6 +254,17 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -272,21 +283,10 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -342,10 +342,8 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -529,9 +527,22 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -543,9 +554,11 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -554,9 +567,7 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -575,21 +586,10 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -637,6 +637,17 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -718,24 +729,11 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -919,9 +917,22 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -933,9 +944,11 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -944,9 +957,7 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -965,21 +976,10 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1027,6 +1027,17 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1108,24 +1119,11 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1309,9 +1307,22 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1330,24 +1341,11 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1531,9 +1529,22 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1552,18 +1563,7 @@ description: Operations executed focusrite-scarlett-mounting-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap index d6a04ec6c..e1fe1db6b 100644 --- a/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/food-service-spatula/ops.snap @@ -70,17 +70,17 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -392,6 +392,17 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -403,9 +414,11 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -414,9 +427,7 @@ description: Operations executed food-service-spatula.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -428,9 +439,11 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -439,9 +452,7 @@ description: Operations executed food-service-spatula.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -453,9 +464,11 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -464,9 +477,7 @@ description: Operations executed food-service-spatula.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -485,21 +496,10 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -547,20 +547,20 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -590,6 +590,17 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -608,21 +619,10 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -670,10 +670,8 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -857,9 +855,22 @@ description: Operations executed food-service-spatula.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -878,20 +889,20 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -902,18 +913,7 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1019,6 +1019,17 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1037,18 +1048,7 @@ description: Operations executed food-service-spatula.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap b/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap index 1c6bb6148..2638e27c9 100644 --- a/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/french-press/ops.snap @@ -4,20 +4,20 @@ description: Operations executed french-press.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -119,10 +119,8 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -306,9 +304,22 @@ description: Operations executed french-press.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -327,20 +338,20 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -476,34 +487,23 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -533,6 +533,17 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -551,20 +562,20 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -574,41 +585,11 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.05, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -634,23 +615,42 @@ description: Operations executed french-press.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.05, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -736,20 +736,20 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -835,20 +835,20 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -878,6 +878,17 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -889,9 +900,11 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -900,9 +913,7 @@ description: Operations executed french-press.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -921,9 +932,204 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.05, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.05, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -932,202 +1138,7 @@ description: Operations executed french-press.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.05, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.05, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -1146,21 +1157,10 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -1204,20 +1204,20 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -1303,20 +1303,20 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1346,6 +1346,17 @@ description: Operations executed french-press.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1364,17 +1375,6 @@ description: Operations executed french-press.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap index d554dfcd0..47402d7ec 100644 --- a/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/french-press/program_memory.snap @@ -3629,112 +3629,117 @@ description: Variables in memory after executing french-press.kcl ] }, "extrude006": { - "type": "Solid", - "value": { - "type": "Solid", - "id": "[uuid]", - "artifactId": "[uuid]", - "value": [ - { - "faceId": "[uuid]", + "type": "HomArray", + "value": [ + { + "type": "Solid", + "value": { + "type": "Solid", "id": "[uuid]", - "sourceRange": [], - "tag": null, - "type": "extrudeArc" - } - ], - "sketch": { - "type": "Sketch", - "id": "[uuid]", - "paths": [ - { - "__geoMeta": { + "artifactId": "[uuid]", + "value": [ + { + "faceId": "[uuid]", "id": "[uuid]", - "sourceRange": [] + "sourceRange": [], + "tag": null, + "type": "extrudeArc" + } + ], + "sketch": { + "type": "Sketch", + "id": "[uuid]", + "paths": [ + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "ccw": true, + "center": [ + 0.0, + 0.0 + ], + "from": [ + 2.205, + 0.0 + ], + "radius": 2.205, + "tag": null, + "to": [ + 2.205, + 0.0 + ], + "type": "Circle", + "units": { + "type": "Inches" + } + } + ], + "on": { + "artifactId": "[uuid]", + "id": "[uuid]", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Mm" + } + }, + "type": "plane", + "value": "XY", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + } }, - "ccw": true, - "center": [ - 0.0, - 0.0 - ], - "from": [ - 2.205, - 0.0 - ], - "radius": 2.205, - "tag": null, - "to": [ - 2.205, - 0.0 - ], - "type": "Circle", + "start": { + "from": [ + 2.205, + 0.0 + ], + "to": [ + 2.205, + 0.0 + ], + "units": { + "type": "Inches" + }, + "tag": null, + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + } + }, + "artifactId": "[uuid]", + "originalId": "[uuid]", "units": { "type": "Inches" } - } - ], - "on": { - "artifactId": "[uuid]", - "id": "[uuid]", - "origin": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "units": { - "type": "Mm" - } }, - "type": "plane", - "value": "XY", - "xAxis": { - "x": 1.0, - "y": 0.0, - "z": 0.0, - "units": { - "type": "Unknown" - } - }, - "yAxis": { - "x": 0.0, - "y": 1.0, - "z": 0.0, - "units": { - "type": "Unknown" - } - } - }, - "start": { - "from": [ - 2.205, - 0.0 - ], - "to": [ - 2.205, - 0.0 - ], + "height": 7.32, + "startCapId": "[uuid]", + "endCapId": "[uuid]", "units": { "type": "Inches" }, - "tag": null, - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - } - }, - "artifactId": "[uuid]", - "originalId": "[uuid]", - "units": { - "type": "Inches" + "sectional": false } - }, - "height": 7.32, - "startCapId": "[uuid]", - "endCapId": "[uuid]", - "units": { - "type": "Inches" - }, - "sectional": false - } + } + ] }, "extrude007": { "type": "Solid", diff --git a/rust/kcl-lib/tests/kcl_samples/gear-rack/ops.snap b/rust/kcl-lib/tests/kcl_samples/gear-rack/ops.snap index f7950a5b1..3d0257242 100644 --- a/rust/kcl-lib/tests/kcl_samples/gear-rack/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/gear-rack/ops.snap @@ -4,19 +4,30 @@ description: Operations executed gear-rack.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,9 +46,24 @@ description: Operations executed gear-rack.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -46,22 +72,7 @@ description: Operations executed gear-rack.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,18 +91,7 @@ description: Operations executed gear-rack.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -105,6 +105,17 @@ description: Operations executed gear-rack.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -186,33 +197,33 @@ description: Operations executed gear-rack.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -231,9 +242,24 @@ description: Operations executed gear-rack.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -242,22 +268,7 @@ description: Operations executed gear-rack.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -276,18 +287,7 @@ description: Operations executed gear-rack.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate-magnets/ops.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate-magnets/ops.snap index ee058577a..d086920fd 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate-magnets/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate-magnets/ops.snap @@ -4,32 +4,43 @@ description: Operations executed gridfinity-baseplate-magnets.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,18 +59,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,7 +79,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -109,6 +109,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -244,21 +255,10 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -382,7 +382,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -412,6 +412,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -547,20 +558,43 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -642,13 +676,39 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -676,9 +736,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -760,37 +818,15 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, { "type": "Solid", "value": { @@ -818,9 +854,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -902,13 +936,39 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -936,9 +996,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1020,119 +1078,72 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1144,9 +1155,11 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -1155,9 +1168,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -1169,18 +1180,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1217,17 +1217,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1247,6 +1247,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1281,9 +1292,11 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1292,9 +1305,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1313,21 +1324,10 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1400,7 +1400,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1430,6 +1430,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1448,21 +1459,10 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1518,6 +1518,17 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1599,20 +1610,31 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1694,31 +1716,20 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1800,20 +1811,31 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1895,29 +1917,7 @@ description: Operations executed gridfinity-baseplate-magnets.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate/ops.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate/ops.snap index f16ecf5bb..64cd83d49 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-baseplate/ops.snap @@ -4,32 +4,43 @@ description: Operations executed gridfinity-baseplate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,18 +59,7 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,7 +79,7 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -109,6 +109,17 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -244,21 +255,10 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -382,7 +382,7 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -412,6 +412,17 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -547,20 +558,43 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -642,13 +676,39 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -676,9 +736,7 @@ description: Operations executed gridfinity-baseplate.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -760,37 +818,15 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, { "type": "Solid", "value": { @@ -818,9 +854,7 @@ description: Operations executed gridfinity-baseplate.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -902,13 +936,39 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -936,9 +996,7 @@ description: Operations executed gridfinity-baseplate.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1020,65 +1078,7 @@ description: Operations executed gridfinity-baseplate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/ops.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/ops.snap index 33b222cdf..cb9b701bd 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/ops.snap @@ -4,32 +4,43 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,18 +59,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,7 +79,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -109,6 +109,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -244,21 +255,10 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -382,7 +382,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -412,6 +412,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -547,33 +558,33 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -592,21 +603,10 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -662,6 +662,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -671,20 +682,43 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -703,33 +737,35 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } @@ -737,9 +773,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -821,13 +855,39 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -855,9 +915,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -939,37 +997,15 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, { "type": "Solid", "value": { @@ -997,9 +1033,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1081,13 +1115,39 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -1115,9 +1175,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1199,151 +1257,11 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "axis": { - "value": { - "type": "Array", - "value": [ - { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - } - ] - }, - "sourceRange": [] - }, - "distance": { - "value": { - "type": "Number", - "value": 42.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - }, - "instances": { - "value": { - "type": "Number", - "value": 2.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "patternLinear3d", - "sourceRange": [], "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -1352,9 +1270,113 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": { + "axis": { + "value": { + "type": "Array", + "value": [ + { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + } + ] + }, + "sourceRange": [] + }, + "distance": { + "value": { + "type": "Number", + "value": 42.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + }, + "instances": { + "value": { + "type": "Number", + "value": 2.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1436,45 +1458,23 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1504,6 +1504,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1522,21 +1533,10 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1592,7 +1592,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { @@ -1636,10 +1636,8 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1779,13 +1777,13 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1925,13 +1923,13 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2071,13 +2069,13 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2217,9 +2215,22 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -2238,18 +2249,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2402,6 +2402,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -2420,18 +2431,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2584,6 +2584,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -2719,9 +2730,11 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { "type": "Solid", @@ -2730,9 +2743,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -2868,21 +2879,10 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -3139,7 +3139,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -3396,6 +3396,17 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -3531,20 +3542,20 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -3680,18 +3691,7 @@ description: Operations executed gridfinity-bins-stacking-lip.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/program_memory.snap index bf3add7f8..ae1fc76bb 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins-stacking-lip/program_memory.snap @@ -12943,324 +12943,329 @@ description: Variables in memory after executing gridfinity-bins-stacking-lip.kc } }, "binTop": { - "type": "Solid", - "value": { - "type": "Solid", - "id": "[uuid]", - "artifactId": "[uuid]", - "value": [ - { - "faceId": "[uuid]", + "type": "HomArray", + "value": [ + { + "type": "Solid", + "value": { + "type": "Solid", "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4704, - "end": 4712, - "start": 4704, - "type": "TagDeclarator", - "value": "line010" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4783, - "end": 4791, - "start": 4783, - "type": "TagDeclarator", - "value": "line011" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4842, - "end": 4850, - "start": 4842, - "type": "TagDeclarator", - "value": "line012" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4869, - "end": 4877, - "start": 4869, - "type": "TagDeclarator", - "value": "line013" - }, - "type": "extrudePlane" - } - ], - "sketch": { - "type": "Sketch", - "id": "[uuid]", - "paths": [ - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 0.0 - ], - "tag": { - "commentStart": 4704, - "end": 4712, - "start": 4704, - "type": "TagDeclarator", - "value": "line010" - }, - "to": [ - 84.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 84.0, - 0.0 - ], - "tag": { - "commentStart": 4783, - "end": 4791, - "start": 4783, - "type": "TagDeclarator", - "value": "line011" - }, - "to": [ - 84.0, - 126.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 84.0, - 126.0 - ], - "tag": { - "commentStart": 4842, - "end": 4850, - "start": 4842, - "type": "TagDeclarator", - "value": "line012" - }, - "to": [ - 0.0, - 126.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 126.0 - ], - "tag": { - "commentStart": 4869, - "end": 4877, - "start": 4869, - "type": "TagDeclarator", - "value": "line013" - }, - "to": [ - 0.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - } - ], - "on": { "artifactId": "[uuid]", - "id": "[uuid]", - "origin": { - "x": 0.0, - "y": 0.0, - "z": 4.75, + "value": [ + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4704, + "end": 4712, + "start": 4704, + "type": "TagDeclarator", + "value": "line010" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4783, + "end": 4791, + "start": 4783, + "type": "TagDeclarator", + "value": "line011" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4842, + "end": 4850, + "start": 4842, + "type": "TagDeclarator", + "value": "line012" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4869, + "end": 4877, + "start": 4869, + "type": "TagDeclarator", + "value": "line013" + }, + "type": "extrudePlane" + } + ], + "sketch": { + "type": "Sketch", + "id": "[uuid]", + "paths": [ + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 0.0 + ], + "tag": { + "commentStart": 4704, + "end": 4712, + "start": 4704, + "type": "TagDeclarator", + "value": "line010" + }, + "to": [ + 84.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 84.0, + 0.0 + ], + "tag": { + "commentStart": 4783, + "end": 4791, + "start": 4783, + "type": "TagDeclarator", + "value": "line011" + }, + "to": [ + 84.0, + 126.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 84.0, + 126.0 + ], + "tag": { + "commentStart": 4842, + "end": 4850, + "start": 4842, + "type": "TagDeclarator", + "value": "line012" + }, + "to": [ + 0.0, + 126.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 126.0 + ], + "tag": { + "commentStart": 4869, + "end": 4877, + "start": 4869, + "type": "TagDeclarator", + "value": "line013" + }, + "to": [ + 0.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + } + ], + "on": { + "artifactId": "[uuid]", + "id": "[uuid]", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 4.75, + "units": { + "type": "Mm" + } + }, + "type": "plane", + "value": "Custom", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + } + }, + "start": { + "from": [ + 0.0, + 0.0 + ], + "to": [ + 0.0, + 0.0 + ], + "units": { + "type": "Mm" + }, + "tag": null, + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + } + }, + "tags": { + "line010": { + "type": "TagIdentifier", + "value": "line010" + }, + "line011": { + "type": "TagIdentifier", + "value": "line011" + }, + "line012": { + "type": "TagIdentifier", + "value": "line012" + }, + "line013": { + "type": "TagIdentifier", + "value": "line013" + } + }, + "artifactId": "[uuid]", + "originalId": "[uuid]", "units": { "type": "Mm" } }, - "type": "plane", - "value": "Custom", - "xAxis": { - "x": 1.0, - "y": 0.0, - "z": 0.0, - "units": { - "type": "Unknown" + "height": 7.0, + "startCapId": "[uuid]", + "endCapId": "[uuid]", + "edgeCuts": [ + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null } - }, - "yAxis": { - "x": 0.0, - "y": 1.0, - "z": 0.0, - "units": { - "type": "Unknown" - } - } - }, - "start": { - "from": [ - 0.0, - 0.0 - ], - "to": [ - 0.0, - 0.0 ], "units": { "type": "Mm" }, - "tag": null, - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - } - }, - "tags": { - "line010": { - "type": "TagIdentifier", - "value": "line010" - }, - "line011": { - "type": "TagIdentifier", - "value": "line011" - }, - "line012": { - "type": "TagIdentifier", - "value": "line012" - }, - "line013": { - "type": "TagIdentifier", - "value": "line013" - } - }, - "artifactId": "[uuid]", - "originalId": "[uuid]", - "units": { - "type": "Mm" + "sectional": false } - }, - "height": 7.0, - "startCapId": "[uuid]", - "endCapId": "[uuid]", - "edgeCuts": [ - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - } - ], - "units": { - "type": "Mm" - }, - "sectional": false - } + } + ] }, "cornerRadius": { "type": "Number", diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/ops.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/ops.snap index d888fdb79..1d9e61858 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/ops.snap @@ -4,32 +4,43 @@ description: Operations executed gridfinity-bins.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,18 +59,7 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,7 +79,7 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -109,6 +109,17 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -244,21 +255,10 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -382,7 +382,7 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -412,6 +412,17 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -547,33 +558,33 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -592,21 +603,10 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -662,6 +662,17 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -671,20 +682,43 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -703,33 +737,35 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } @@ -737,9 +773,7 @@ description: Operations executed gridfinity-bins.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -821,13 +855,39 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -855,9 +915,7 @@ description: Operations executed gridfinity-bins.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -939,37 +997,15 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, { "type": "Solid", "value": { @@ -997,9 +1033,7 @@ description: Operations executed gridfinity-bins.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1081,13 +1115,39 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Array", "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, { "type": "Solid", "value": { @@ -1115,9 +1175,7 @@ description: Operations executed gridfinity-bins.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1199,151 +1257,11 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "axis": { - "value": { - "type": "Array", - "value": [ - { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - { - "type": "Number", - "value": 0.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - } - ] - }, - "sourceRange": [] - }, - "distance": { - "value": { - "type": "Number", - "value": 42.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - }, - "instances": { - "value": { - "type": "Number", - "value": 2.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "patternLinear3d", - "sourceRange": [], "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -1352,9 +1270,113 @@ description: Operations executed gridfinity-bins.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": { + "axis": { + "value": { + "type": "Array", + "value": [ + { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + { + "type": "Number", + "value": 0.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + } + ] + }, + "sourceRange": [] + }, + "distance": { + "value": { + "type": "Number", + "value": 42.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + }, + "instances": { + "value": { + "type": "Number", + "value": 2.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1436,45 +1458,23 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1504,6 +1504,17 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1522,21 +1533,10 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1592,7 +1592,7 @@ description: Operations executed gridfinity-bins.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "shell", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/program_memory.snap b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/program_memory.snap index 0886e0e8d..603666b76 100644 --- a/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/program_memory.snap +++ b/rust/kcl-lib/tests/kcl_samples/gridfinity-bins/program_memory.snap @@ -12871,324 +12871,329 @@ description: Variables in memory after executing gridfinity-bins.kcl } }, "binTop": { - "type": "Solid", - "value": { - "type": "Solid", - "id": "[uuid]", - "artifactId": "[uuid]", - "value": [ - { - "faceId": "[uuid]", + "type": "HomArray", + "value": [ + { + "type": "Solid", + "value": { + "type": "Solid", "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4474, - "end": 4482, - "start": 4474, - "type": "TagDeclarator", - "value": "line010" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4553, - "end": 4561, - "start": 4553, - "type": "TagDeclarator", - "value": "line011" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4612, - "end": 4620, - "start": 4612, - "type": "TagDeclarator", - "value": "line012" - }, - "type": "extrudePlane" - }, - { - "faceId": "[uuid]", - "id": "[uuid]", - "sourceRange": [], - "tag": { - "commentStart": 4639, - "end": 4647, - "start": 4639, - "type": "TagDeclarator", - "value": "line013" - }, - "type": "extrudePlane" - } - ], - "sketch": { - "type": "Sketch", - "id": "[uuid]", - "paths": [ - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 0.0 - ], - "tag": { - "commentStart": 4474, - "end": 4482, - "start": 4474, - "type": "TagDeclarator", - "value": "line010" - }, - "to": [ - 84.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 84.0, - 0.0 - ], - "tag": { - "commentStart": 4553, - "end": 4561, - "start": 4553, - "type": "TagDeclarator", - "value": "line011" - }, - "to": [ - 84.0, - 126.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 84.0, - 126.0 - ], - "tag": { - "commentStart": 4612, - "end": 4620, - "start": 4612, - "type": "TagDeclarator", - "value": "line012" - }, - "to": [ - 0.0, - 126.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - }, - { - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - }, - "from": [ - 0.0, - 126.0 - ], - "tag": { - "commentStart": 4639, - "end": 4647, - "start": 4639, - "type": "TagDeclarator", - "value": "line013" - }, - "to": [ - 0.0, - 0.0 - ], - "type": "ToPoint", - "units": { - "type": "Mm" - } - } - ], - "on": { "artifactId": "[uuid]", - "id": "[uuid]", - "origin": { - "x": 0.0, - "y": 0.0, - "z": 4.75, + "value": [ + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4474, + "end": 4482, + "start": 4474, + "type": "TagDeclarator", + "value": "line010" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4553, + "end": 4561, + "start": 4553, + "type": "TagDeclarator", + "value": "line011" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4612, + "end": 4620, + "start": 4612, + "type": "TagDeclarator", + "value": "line012" + }, + "type": "extrudePlane" + }, + { + "faceId": "[uuid]", + "id": "[uuid]", + "sourceRange": [], + "tag": { + "commentStart": 4639, + "end": 4647, + "start": 4639, + "type": "TagDeclarator", + "value": "line013" + }, + "type": "extrudePlane" + } + ], + "sketch": { + "type": "Sketch", + "id": "[uuid]", + "paths": [ + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 0.0 + ], + "tag": { + "commentStart": 4474, + "end": 4482, + "start": 4474, + "type": "TagDeclarator", + "value": "line010" + }, + "to": [ + 84.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 84.0, + 0.0 + ], + "tag": { + "commentStart": 4553, + "end": 4561, + "start": 4553, + "type": "TagDeclarator", + "value": "line011" + }, + "to": [ + 84.0, + 126.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 84.0, + 126.0 + ], + "tag": { + "commentStart": 4612, + "end": 4620, + "start": 4612, + "type": "TagDeclarator", + "value": "line012" + }, + "to": [ + 0.0, + 126.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + }, + { + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + }, + "from": [ + 0.0, + 126.0 + ], + "tag": { + "commentStart": 4639, + "end": 4647, + "start": 4639, + "type": "TagDeclarator", + "value": "line013" + }, + "to": [ + 0.0, + 0.0 + ], + "type": "ToPoint", + "units": { + "type": "Mm" + } + } + ], + "on": { + "artifactId": "[uuid]", + "id": "[uuid]", + "origin": { + "x": 0.0, + "y": 0.0, + "z": 4.75, + "units": { + "type": "Mm" + } + }, + "type": "plane", + "value": "Custom", + "xAxis": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + }, + "yAxis": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "units": { + "type": "Unknown" + } + } + }, + "start": { + "from": [ + 0.0, + 0.0 + ], + "to": [ + 0.0, + 0.0 + ], + "units": { + "type": "Mm" + }, + "tag": null, + "__geoMeta": { + "id": "[uuid]", + "sourceRange": [] + } + }, + "tags": { + "line010": { + "type": "TagIdentifier", + "value": "line010" + }, + "line011": { + "type": "TagIdentifier", + "value": "line011" + }, + "line012": { + "type": "TagIdentifier", + "value": "line012" + }, + "line013": { + "type": "TagIdentifier", + "value": "line013" + } + }, + "artifactId": "[uuid]", + "originalId": "[uuid]", "units": { "type": "Mm" } }, - "type": "plane", - "value": "Custom", - "xAxis": { - "x": 1.0, - "y": 0.0, - "z": 0.0, - "units": { - "type": "Unknown" + "height": 14.0, + "startCapId": "[uuid]", + "endCapId": "[uuid]", + "edgeCuts": [ + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null + }, + { + "type": "fillet", + "id": "[uuid]", + "radius": { + "n": 3.75, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "edgeId": "[uuid]", + "tag": null } - }, - "yAxis": { - "x": 0.0, - "y": 1.0, - "z": 0.0, - "units": { - "type": "Unknown" - } - } - }, - "start": { - "from": [ - 0.0, - 0.0 - ], - "to": [ - 0.0, - 0.0 ], "units": { "type": "Mm" }, - "tag": null, - "__geoMeta": { - "id": "[uuid]", - "sourceRange": [] - } - }, - "tags": { - "line010": { - "type": "TagIdentifier", - "value": "line010" - }, - "line011": { - "type": "TagIdentifier", - "value": "line011" - }, - "line012": { - "type": "TagIdentifier", - "value": "line012" - }, - "line013": { - "type": "TagIdentifier", - "value": "line013" - } - }, - "artifactId": "[uuid]", - "originalId": "[uuid]", - "units": { - "type": "Mm" + "sectional": false } - }, - "height": 14.0, - "startCapId": "[uuid]", - "endCapId": "[uuid]", - "edgeCuts": [ - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - }, - { - "type": "fillet", - "id": "[uuid]", - "radius": { - "n": 3.75, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "edgeId": "[uuid]", - "tag": null - } - ], - "units": { - "type": "Mm" - }, - "sectional": false - } + } + ] }, "cornerRadius": { "type": "Number", diff --git a/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap b/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap index 66e7752d4..0ba2f1ca7 100644 --- a/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/hammer/ops.snap @@ -4,19 +4,30 @@ description: Operations executed hammer.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -42,34 +53,23 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -99,6 +99,17 @@ description: Operations executed hammer.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -117,9 +128,11 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -128,9 +141,7 @@ description: Operations executed hammer.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -149,9 +160,11 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -160,9 +173,7 @@ description: Operations executed hammer.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -181,20 +192,25 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -211,29 +227,11 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -253,13 +251,13 @@ description: Operations executed hammer.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -279,22 +277,35 @@ description: Operations executed hammer.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, + "type": "StdLibCall", "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -313,34 +324,23 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -370,6 +370,17 @@ description: Operations executed hammer.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -395,21 +406,10 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -453,10 +453,8 @@ description: Operations executed hammer.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -476,9 +474,22 @@ description: Operations executed hammer.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -495,34 +506,23 @@ description: Operations executed hammer.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap index 124338532..9b5f0cc99 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-gear/ops.snap @@ -4,59 +4,59 @@ description: Operations executed helical-gear.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -86,7 +86,7 @@ description: Operations executed helical-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -116,7 +116,7 @@ description: Operations executed helical-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -506,6 +506,17 @@ description: Operations executed helical-gear.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -517,20 +528,20 @@ description: Operations executed helical-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -542,20 +553,20 @@ description: Operations executed helical-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -567,18 +578,7 @@ description: Operations executed helical-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -665,10 +665,8 @@ description: Operations executed helical-gear.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -694,7 +692,9 @@ description: Operations executed helical-gear.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap index b52ccdb49..23f9ba57e 100644 --- a/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helical-planetary-gearset/ops.snap @@ -4,111 +4,111 @@ description: Operations executed helical-planetary-gearset.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -138,7 +138,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -168,7 +168,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -198,7 +198,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -228,7 +228,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -258,7 +258,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1008,6 +1008,17 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1019,20 +1030,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1044,20 +1055,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1069,20 +1080,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1094,20 +1105,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1119,20 +1130,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1144,18 +1155,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1326,10 +1326,8 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -1355,13 +1353,13 @@ description: Operations executed helical-planetary-gearset.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -1387,49 +1385,51 @@ description: Operations executed helical-planetary-gearset.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1459,7 +1459,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1489,7 +1489,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1879,46 +1879,46 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1948,7 +1948,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1978,7 +1978,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -2008,6 +2008,17 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -2019,20 +2030,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -2044,20 +2055,20 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -2069,18 +2080,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2167,10 +2167,8 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -2196,7 +2194,9 @@ description: Operations executed helical-planetary-gearset.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -2475,6 +2475,17 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -2610,18 +2621,7 @@ description: Operations executed helical-planetary-gearset.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap b/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap index 4c61313b1..609aec208 100644 --- a/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/helium-tank/ops.snap @@ -4,20 +4,20 @@ description: Operations executed helium-tank.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,20 +124,20 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -163,6 +163,17 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -188,21 +199,10 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -246,19 +246,30 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -270,9 +281,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -281,9 +294,7 @@ description: Operations executed helium-tank.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -302,24 +313,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -339,23 +337,25 @@ description: Operations executed helium-tank.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -381,20 +381,20 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -420,6 +420,17 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -431,9 +442,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -442,9 +455,7 @@ description: Operations executed helium-tank.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -470,34 +481,23 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -523,6 +523,17 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -534,9 +545,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -545,9 +558,7 @@ description: Operations executed helium-tank.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -573,20 +584,25 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -603,39 +619,23 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -665,6 +665,17 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -683,34 +694,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -724,13 +712,23 @@ description: Operations executed helium-tank.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -750,9 +748,22 @@ description: Operations executed helium-tank.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -834,34 +845,23 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -887,6 +887,17 @@ description: Operations executed helium-tank.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -898,9 +909,11 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -909,9 +922,7 @@ description: Operations executed helium-tank.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -937,20 +948,31 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1028,28 +1050,6 @@ description: Operations executed helium-tank.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap index e81ebe8a7..b75fc11b5 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-gear/ops.snap @@ -4,33 +4,33 @@ description: Operations executed herringbone-gear.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -60,7 +60,7 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -330,6 +330,17 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -341,20 +352,20 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -366,18 +377,7 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -436,7 +436,7 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -451,27 +451,8 @@ description: Operations executed herringbone-gear.kcl "sourceRange": [] }, { - "labeledArgs": { - "vDegree": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -497,7 +478,26 @@ description: Operations executed herringbone-gear.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "vDegree": { + "value": { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap index 3edb7e3fd..8bd999ff7 100644 --- a/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/herringbone-planetary-gearset/ops.snap @@ -4,59 +4,59 @@ description: Operations executed herringbone-planetary-gearset.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -86,7 +86,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -116,7 +116,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -146,7 +146,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -656,6 +656,17 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -667,20 +678,20 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -692,20 +703,20 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -717,20 +728,20 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -742,18 +753,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -868,57 +868,38 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", - "name": "clone", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - }, - "labeledArgs": {}, - "sourceRange": [] - }, - { - "type": "KclStdLibCall", - "name": "clone", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - }, - "labeledArgs": {}, - "sourceRange": [] - }, - { - "labeledArgs": { - "vDegree": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "clone", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "clone", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -944,9 +925,7 @@ description: Operations executed herringbone-planetary-gearset.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "vDegree": { "value": { @@ -965,9 +944,11 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "loft", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -993,36 +974,55 @@ description: Operations executed herringbone-planetary-gearset.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "vDegree": { + "value": { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1052,7 +1052,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1322,33 +1322,33 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1378,7 +1378,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1408,6 +1408,17 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1419,20 +1430,20 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -1444,18 +1455,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1514,7 +1514,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -1529,27 +1529,8 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { - "labeledArgs": { - "vDegree": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -1575,7 +1556,26 @@ description: Operations executed herringbone-planetary-gearset.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "vDegree": { + "value": { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupBegin", @@ -1854,6 +1854,17 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -1989,18 +2000,7 @@ description: Operations executed herringbone-planetary-gearset.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/hex-nut/ops.snap b/rust/kcl-lib/tests/kcl_samples/hex-nut/ops.snap index f87ac71d1..b45d2102c 100644 --- a/rust/kcl-lib/tests/kcl_samples/hex-nut/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/hex-nut/ops.snap @@ -4,19 +4,30 @@ description: Operations executed hex-nut.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed hex-nut.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed hex-nut.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,18 +71,7 @@ description: Operations executed hex-nut.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/i-beam/ops.snap b/rust/kcl-lib/tests/kcl_samples/i-beam/ops.snap index 325fc2373..e1908aebe 100644 --- a/rust/kcl-lib/tests/kcl_samples/i-beam/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/i-beam/ops.snap @@ -4,19 +4,30 @@ description: Operations executed i-beam.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -31,17 +42,6 @@ description: Operations executed i-beam.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/keyboard/ops.snap b/rust/kcl-lib/tests/kcl_samples/keyboard/ops.snap index 646609932..9c919a2a8 100644 --- a/rust/kcl-lib/tests/kcl_samples/keyboard/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/keyboard/ops.snap @@ -4,19 +4,30 @@ description: Operations executed keyboard.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -107,6 +107,17 @@ description: Operations executed keyboard.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -117,41 +128,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 0.15, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -183,13 +164,30 @@ description: Operations executed keyboard.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 0.15, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -368,13 +366,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -553,13 +551,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -738,13 +736,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -923,13 +921,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1108,13 +1106,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1293,13 +1291,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1478,13 +1476,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1663,13 +1661,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1848,13 +1846,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2033,13 +2031,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2218,13 +2216,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2403,13 +2401,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2588,13 +2586,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2773,13 +2771,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -2958,13 +2956,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -3143,13 +3141,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -3328,13 +3326,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -3513,13 +3511,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -3698,13 +3696,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -3883,13 +3881,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -4068,9 +4066,22 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -4089,9 +4100,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4100,9 +4113,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4121,9 +4132,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4132,9 +4145,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4153,9 +4164,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4164,9 +4177,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4185,9 +4196,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4196,9 +4209,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4217,9 +4228,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4228,9 +4241,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4249,9 +4260,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4260,9 +4273,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4281,9 +4292,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4292,9 +4305,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4313,9 +4324,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4324,9 +4337,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4345,9 +4356,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4356,9 +4369,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4377,9 +4388,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4388,9 +4401,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4409,9 +4420,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4420,9 +4433,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4441,9 +4452,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4452,9 +4465,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4473,9 +4484,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4484,9 +4497,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4505,9 +4516,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4516,9 +4529,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4537,9 +4548,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4548,9 +4561,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4569,9 +4580,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4580,9 +4593,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4601,9 +4612,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4612,9 +4625,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4633,9 +4644,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4644,9 +4657,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4665,9 +4676,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4676,9 +4689,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4697,9 +4708,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4708,9 +4721,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4729,20 +4740,20 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -4824,9 +4835,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -4835,9 +4848,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -4919,9 +4930,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -4930,9 +4943,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5014,9 +5025,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5025,9 +5038,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5109,9 +5120,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5120,9 +5133,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5204,9 +5215,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5215,9 +5228,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5299,9 +5310,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5310,9 +5323,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5394,9 +5405,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5405,9 +5418,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5489,9 +5500,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5500,9 +5513,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5584,9 +5595,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5595,9 +5608,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5679,9 +5690,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5690,9 +5703,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5774,9 +5785,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5785,9 +5798,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5869,9 +5880,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5880,9 +5893,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -5964,9 +5975,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -5975,9 +5988,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6059,9 +6070,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6070,9 +6083,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6154,9 +6165,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6165,9 +6178,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6249,9 +6260,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6260,9 +6273,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6344,9 +6355,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6355,9 +6368,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6439,9 +6450,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6450,9 +6463,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6534,9 +6545,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6545,9 +6558,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6629,9 +6640,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { "type": "Solid", @@ -6640,9 +6653,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -6724,18 +6735,7 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -8859,10 +8859,8 @@ description: Operations executed keyboard.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -9041,9 +9039,22 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -9062,24 +9073,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -9258,13 +9256,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -9443,77 +9441,77 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.03, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.03, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.03, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.03, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -9692,13 +9690,13 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -9877,9 +9875,22 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -9898,9 +9909,11 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -9909,9 +9922,7 @@ description: Operations executed keyboard.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -9930,18 +9941,7 @@ description: Operations executed keyboard.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/kitt/ops.snap b/rust/kcl-lib/tests/kcl_samples/kitt/ops.snap index 4adad6eac..0ebedf9f0 100644 --- a/rust/kcl-lib/tests/kcl_samples/kitt/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/kitt/ops.snap @@ -4,6 +4,17 @@ description: Operations executed kitt.kcl --- [ { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -13,9 +24,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -24,9 +37,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -36,9 +47,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -47,9 +60,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,9 +70,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -70,9 +83,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -82,9 +93,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -93,9 +106,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -105,9 +116,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -116,9 +129,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -128,9 +139,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -139,9 +152,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -151,9 +162,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -162,9 +175,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -174,9 +185,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -185,9 +198,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -197,9 +208,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -208,9 +221,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -220,9 +231,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -231,9 +244,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -243,9 +254,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -254,9 +267,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -266,9 +277,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -277,9 +290,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -289,9 +300,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -300,9 +313,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -312,9 +323,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -323,9 +336,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -335,9 +346,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -346,9 +359,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -358,9 +369,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -369,9 +382,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -381,9 +392,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -392,9 +405,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -404,9 +415,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -415,9 +428,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -427,9 +438,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -438,9 +451,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -450,9 +461,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -461,9 +474,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -474,9 +485,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -485,9 +498,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -497,9 +508,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -508,9 +521,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -520,9 +531,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -531,9 +544,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -543,9 +554,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -554,9 +567,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -567,9 +578,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -578,9 +591,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -590,9 +601,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -601,9 +614,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -613,9 +624,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -624,9 +637,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -636,9 +647,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -647,9 +660,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -660,9 +671,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -671,9 +684,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -684,9 +695,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -695,9 +708,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -708,9 +719,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -719,9 +732,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -732,9 +743,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -743,9 +756,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -756,9 +767,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -767,9 +780,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -780,9 +791,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -791,9 +804,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -804,9 +815,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -815,9 +828,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -828,9 +839,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -839,9 +852,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -852,9 +863,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -863,9 +876,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -876,20 +887,20 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -908,9 +919,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -919,9 +932,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -940,9 +951,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -951,9 +964,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -972,9 +983,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -983,9 +996,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1004,9 +1015,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1015,9 +1028,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1036,9 +1047,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1047,9 +1060,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1068,9 +1079,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1079,9 +1092,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1100,9 +1111,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1111,9 +1124,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1132,9 +1143,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1143,9 +1156,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1164,9 +1175,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1175,9 +1188,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1196,9 +1207,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1207,9 +1220,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1228,9 +1239,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1239,9 +1252,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1260,9 +1271,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1271,9 +1284,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1292,9 +1303,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1303,9 +1316,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1324,9 +1335,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1335,9 +1348,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1356,9 +1367,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1367,9 +1380,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1388,9 +1399,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1399,9 +1412,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1420,9 +1431,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1431,9 +1444,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1452,9 +1463,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1463,9 +1476,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1484,9 +1495,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1495,9 +1508,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1516,9 +1527,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1527,9 +1540,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1548,9 +1559,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1559,9 +1572,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1580,9 +1591,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1591,9 +1604,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1612,9 +1623,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1623,9 +1636,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1644,9 +1655,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1655,9 +1668,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1676,9 +1687,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1687,9 +1700,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1708,9 +1719,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1719,9 +1732,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1740,9 +1751,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1751,9 +1764,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1772,9 +1783,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1783,9 +1796,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1804,9 +1815,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1815,9 +1828,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1836,9 +1847,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1847,9 +1860,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1868,9 +1879,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1879,9 +1892,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1900,9 +1911,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1911,9 +1924,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1932,9 +1943,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1943,9 +1956,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1964,9 +1975,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1975,9 +1988,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1996,9 +2007,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -2007,9 +2020,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -2028,9 +2039,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -2039,9 +2052,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -2060,9 +2071,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -2071,9 +2084,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -2092,33 +2103,33 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, + "type": "StdLibCall", "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -2137,18 +2148,7 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2259,6 +2259,17 @@ description: Operations executed kitt.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -2268,20 +2279,20 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -2300,18 +2311,7 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -2746,6 +2746,17 @@ description: Operations executed kitt.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -2755,20 +2766,20 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -2787,18 +2798,7 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -4205,32 +4205,43 @@ description: Operations executed kitt.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -4249,9 +4260,11 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -4260,9 +4273,7 @@ description: Operations executed kitt.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -4281,18 +4292,7 @@ description: Operations executed kitt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/lego/ops.snap b/rust/kcl-lib/tests/kcl_samples/lego/ops.snap index 6fda1d44e..de38a6b7c 100644 --- a/rust/kcl-lib/tests/kcl_samples/lego/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/lego/ops.snap @@ -4,19 +4,30 @@ description: Operations executed lego.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed lego.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,20 +69,20 @@ description: Operations executed lego.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,20 +101,20 @@ description: Operations executed lego.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -113,41 +124,11 @@ description: Operations executed lego.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 1.8, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -191,9 +172,39 @@ description: Operations executed lego.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 1.8, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -203,41 +214,11 @@ description: Operations executed lego.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 1.8, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -257,6 +238,25 @@ description: Operations executed lego.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 1.8, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/makeup-mirror/ops.snap b/rust/kcl-lib/tests/kcl_samples/makeup-mirror/ops.snap index ad4d38006..1e9f2f66a 100644 --- a/rust/kcl-lib/tests/kcl_samples/makeup-mirror/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/makeup-mirror/ops.snap @@ -4,98 +4,98 @@ description: Operations executed makeup-mirror.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -125,7 +125,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -155,7 +155,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -185,7 +185,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -215,7 +215,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -245,7 +245,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -275,7 +275,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -305,6 +305,17 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -323,20 +334,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -355,20 +366,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -387,20 +398,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -419,20 +430,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -451,20 +462,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -483,20 +494,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -515,18 +526,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -949,32 +949,43 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -993,9 +1004,11 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1004,9 +1017,7 @@ description: Operations executed makeup-mirror.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1025,18 +1036,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1141,20 +1141,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1184,6 +1184,17 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1202,20 +1213,20 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1234,18 +1245,7 @@ description: Operations executed makeup-mirror.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/mounting-plate/ops.snap b/rust/kcl-lib/tests/kcl_samples/mounting-plate/ops.snap index abbc510c7..3c9c4908c 100644 --- a/rust/kcl-lib/tests/kcl_samples/mounting-plate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/mounting-plate/ops.snap @@ -4,17 +4,17 @@ description: Operations executed mounting-plate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -95,6 +95,17 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -106,9 +117,11 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -117,9 +130,7 @@ description: Operations executed mounting-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -131,9 +142,11 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -142,9 +155,7 @@ description: Operations executed mounting-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -156,9 +167,11 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -167,9 +180,7 @@ description: Operations executed mounting-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -181,9 +192,11 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -192,9 +205,7 @@ description: Operations executed mounting-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -206,9 +217,11 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -217,9 +230,7 @@ description: Operations executed mounting-plate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -238,21 +249,10 @@ description: Operations executed mounting-plate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/pdu-faceplate/ops.snap b/rust/kcl-lib/tests/kcl_samples/pdu-faceplate/ops.snap index c176fcc5f..1b37d6e71 100644 --- a/rust/kcl-lib/tests/kcl_samples/pdu-faceplate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/pdu-faceplate/ops.snap @@ -4,20 +4,20 @@ description: Operations executed pdu-faceplate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -47,6 +47,17 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -65,20 +76,20 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -89,20 +100,20 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -121,9 +132,76 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -132,74 +210,7 @@ description: Operations executed pdu-faceplate.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -218,9 +229,11 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -229,9 +242,7 @@ description: Operations executed pdu-faceplate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -250,9 +261,11 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -261,9 +274,7 @@ description: Operations executed pdu-faceplate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -282,9 +293,11 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -293,9 +306,7 @@ description: Operations executed pdu-faceplate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -314,9 +325,11 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -325,9 +338,7 @@ description: Operations executed pdu-faceplate.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -346,18 +357,7 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -416,6 +416,17 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -425,20 +436,20 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -457,34 +468,23 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -514,6 +514,17 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -532,18 +543,7 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -602,6 +602,17 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -611,20 +622,20 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -643,20 +654,20 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -666,41 +677,11 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -5.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -720,9 +701,50 @@ description: Operations executed pdu-faceplate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -5.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -804,29 +826,7 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -857,27 +857,8 @@ description: Operations executed pdu-faceplate.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -3.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -921,7 +902,26 @@ description: Operations executed pdu-faceplate.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -3.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/pipe-flange-assembly/ops.snap b/rust/kcl-lib/tests/kcl_samples/pipe-flange-assembly/ops.snap index a5ca34f82..b1af04c2a 100644 --- a/rust/kcl-lib/tests/kcl_samples/pipe-flange-assembly/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/pipe-flange-assembly/ops.snap @@ -100,6 +100,17 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -235,20 +246,43 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -330,41 +364,7 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -378,6 +378,17 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -513,18 +524,7 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -538,6 +538,17 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternCircular3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "arcDegrees": { "value": { @@ -673,94 +684,94 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], + "sourceRange": [] + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "pipe", + "functionSourceRange": [], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { + "type": "GroupBegin", + "group": { + "type": "FunctionCall", + "name": "pipe", + "functionSourceRange": [], + "unlabeledArg": null, + "labeledArgs": {} + }, + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { - "type": "GroupBegin", - "group": { - "type": "FunctionCall", - "name": "pipe", - "functionSourceRange": [], - "unlabeledArg": null, - "labeledArgs": {} }, - "sourceRange": [] - }, - { - "type": "GroupBegin", - "group": { - "type": "FunctionCall", - "name": "pipe", - "functionSourceRange": [], - "unlabeledArg": null, - "labeledArgs": {} - }, - "sourceRange": [] - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "tool": { "value": { @@ -795,9 +806,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -806,9 +819,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -843,9 +854,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -854,9 +867,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -875,9 +886,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -886,9 +899,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -907,9 +918,57 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "start" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -918,55 +977,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "start" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -985,9 +996,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -996,9 +1009,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1017,9 +1028,57 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1028,55 +1087,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -1095,9 +1106,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1106,9 +1119,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1127,9 +1138,57 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1138,55 +1197,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -1205,9 +1216,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1216,9 +1229,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1237,33 +1248,33 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1282,20 +1293,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -1305,20 +1316,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1337,9 +1348,24 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1348,22 +1374,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1382,21 +1393,10 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1445,6 +1445,17 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -1454,20 +1465,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1486,20 +1497,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -1509,20 +1520,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1541,9 +1552,24 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1552,22 +1578,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1586,20 +1597,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -1609,20 +1620,20 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1641,9 +1652,37 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1652,35 +1691,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1699,9 +1710,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1710,9 +1723,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1731,9 +1742,57 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1742,55 +1801,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -1809,9 +1820,11 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1820,9 +1833,7 @@ description: Operations executed pipe-flange-assembly.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1841,18 +1852,7 @@ description: Operations executed pipe-flange-assembly.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/pipe-with-bend/ops.snap b/rust/kcl-lib/tests/kcl_samples/pipe-with-bend/ops.snap index e76a33de8..0040f4e0d 100644 --- a/rust/kcl-lib/tests/kcl_samples/pipe-with-bend/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/pipe-with-bend/ops.snap @@ -4,19 +4,30 @@ description: Operations executed pipe-with-bend.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,21 +39,10 @@ description: Operations executed pipe-with-bend.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/pipe/ops.snap b/rust/kcl-lib/tests/kcl_samples/pipe/ops.snap index 2baa171ca..30ccbbec9 100644 --- a/rust/kcl-lib/tests/kcl_samples/pipe/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/pipe/ops.snap @@ -4,19 +4,30 @@ description: Operations executed pipe.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed pipe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,20 +69,20 @@ description: Operations executed pipe.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,17 +101,6 @@ description: Operations executed pipe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap index 64c9c34e8..acaf54200 100644 --- a/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/poopy-shoe/ops.snap @@ -4,20 +4,20 @@ description: Operations executed poopy-shoe.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,19 +124,30 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -155,24 +166,11 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -312,9 +310,22 @@ description: Operations executed poopy-shoe.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -333,20 +344,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -356,20 +367,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -388,24 +399,11 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -545,9 +543,22 @@ description: Operations executed poopy-shoe.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -566,20 +577,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -590,20 +601,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -622,20 +633,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -645,20 +656,20 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -677,24 +688,11 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -834,9 +832,22 @@ description: Operations executed poopy-shoe.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -855,17 +866,6 @@ description: Operations executed poopy-shoe.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap index 58b4dcc3b..f1d7cda07 100644 --- a/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/prosthetic-hip/ops.snap @@ -4,33 +4,33 @@ description: Operations executed prosthetic-hip.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -60,10 +60,8 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -193,13 +191,13 @@ description: Operations executed prosthetic-hip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -329,13 +327,13 @@ description: Operations executed prosthetic-hip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -465,13 +463,13 @@ description: Operations executed prosthetic-hip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -601,10 +599,12 @@ description: Operations executed prosthetic-hip.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -619,6 +619,17 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -637,24 +648,11 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -686,13 +684,13 @@ description: Operations executed prosthetic-hip.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -718,10 +716,12 @@ description: Operations executed prosthetic-hip.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "clone", "unlabeledArg": { "value": { @@ -736,20 +736,20 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -851,20 +851,20 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -966,20 +966,20 @@ description: Operations executed prosthetic-hip.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/router-template-cross-bar/ops.snap b/rust/kcl-lib/tests/kcl_samples/router-template-cross-bar/ops.snap index f5a5d28c8..61cf54c91 100644 --- a/rust/kcl-lib/tests/kcl_samples/router-template-cross-bar/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/router-template-cross-bar/ops.snap @@ -4,19 +4,30 @@ description: Operations executed router-template-cross-bar.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,20 +69,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,20 +101,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -113,20 +124,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -145,20 +156,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -168,20 +179,20 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -200,17 +211,6 @@ description: Operations executed router-template-cross-bar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/router-template-slate/ops.snap b/rust/kcl-lib/tests/kcl_samples/router-template-slate/ops.snap index 90469c0d1..ca339c383 100644 --- a/rust/kcl-lib/tests/kcl_samples/router-template-slate/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/router-template-slate/ops.snap @@ -4,19 +4,30 @@ description: Operations executed router-template-slate.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed router-template-slate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,20 +69,20 @@ description: Operations executed router-template-slate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -90,20 +101,20 @@ description: Operations executed router-template-slate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -113,20 +124,20 @@ description: Operations executed router-template-slate.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -145,17 +156,6 @@ description: Operations executed router-template-slate.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/sash-window/ops.snap b/rust/kcl-lib/tests/kcl_samples/sash-window/ops.snap index be4d48f18..ca7fc844c 100644 --- a/rust/kcl-lib/tests/kcl_samples/sash-window/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/sash-window/ops.snap @@ -4,46 +4,46 @@ description: Operations executed sash-window.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -73,7 +73,7 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -103,7 +103,7 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -133,6 +133,17 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -151,9 +162,11 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -162,9 +175,7 @@ description: Operations executed sash-window.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -183,9 +194,11 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -194,9 +207,7 @@ description: Operations executed sash-window.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -215,9 +226,80 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "String", + "value": "end" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -226,78 +308,7 @@ description: Operations executed sash-window.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "String", - "value": "end" - }, - "sourceRange": [] - } - }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -316,41 +327,11 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -23.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -370,9 +351,7 @@ description: Operations executed sash-window.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -391,9 +370,11 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -413,7 +394,26 @@ description: Operations executed sash-window.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -23.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupBegin", @@ -710,20 +710,20 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -753,6 +753,17 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -771,34 +782,23 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -828,6 +828,17 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -846,18 +857,7 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1007,19 +1007,30 @@ description: Operations executed sash-window.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1038,18 +1049,7 @@ description: Operations executed sash-window.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap index 8bb3047c0..b72c77e79 100644 --- a/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/sheet-metal-bracket/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sheet-metal-bracket.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -107,6 +107,17 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -117,41 +128,11 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.125, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -171,9 +152,39 @@ description: Operations executed sheet-metal-bracket.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.125, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -184,41 +195,11 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -0.125, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -238,33 +219,7 @@ description: Operations executed sheet-metal-bracket.kcl ] }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "TagIdentifier", - "value": "seg05", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -283,9 +238,35 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "TagIdentifier", + "value": "seg05", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -317,33 +298,7 @@ description: Operations executed sheet-metal-bracket.kcl ] }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "face": { - "value": { - "type": "TagIdentifier", - "value": "seg05", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "length": { "value": { @@ -362,9 +317,35 @@ description: Operations executed sheet-metal-bracket.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "face": { + "value": { + "type": "TagIdentifier", + "value": "seg05", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -373,6 +354,25 @@ description: Operations executed sheet-metal-bracket.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -0.125, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap index f15a4f9d0..c45b05b1c 100644 --- a/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/shepherds-hook-bolt/ops.snap @@ -4,17 +4,17 @@ description: Operations executed shepherds-hook-bolt.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -105,7 +105,7 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -135,6 +135,17 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -153,20 +164,20 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -176,20 +187,20 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -222,21 +233,10 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -280,20 +280,20 @@ description: Operations executed shepherds-hook-bolt.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/socket-head-cap-screw/ops.snap b/rust/kcl-lib/tests/kcl_samples/socket-head-cap-screw/ops.snap index 4a59e8ce4..c67417b6e 100644 --- a/rust/kcl-lib/tests/kcl_samples/socket-head-cap-screw/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/socket-head-cap-screw/ops.snap @@ -4,19 +4,30 @@ description: Operations executed socket-head-cap-screw.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -98,6 +98,17 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -107,20 +118,20 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -139,20 +150,20 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -162,20 +173,20 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -194,21 +205,10 @@ description: Operations executed socket-head-cap-screw.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/artifact_graph_flowchart.snap.md index e51452984..f6665ddfe 100644 --- a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/artifact_graph_flowchart.snap.md @@ -63,30 +63,30 @@ flowchart LR subgraph path13 [Path] 13["Path
[2227, 2279, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 35["Segment
[2285, 2321, 0]"] + 35["Segment
[2285, 2318, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 36["Segment
[2327, 2363, 0]"] + 36["Segment
[2324, 2357, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 37["Segment
[2369, 2406, 0]"] + 37["Segment
[2363, 2397, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 38["Segment
[2412, 2468, 0]"] + 38["Segment
[2403, 2459, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 39["Segment
[2474, 2482, 0]"] + 39["Segment
[2465, 2473, 0]"] %% [ProgramBodyItem { index: 25 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] 49[Solid2d] end subgraph path14 [Path] - 14["Path
[2812, 2867, 0]"] + 14["Path
[2803, 2858, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 1 }] - 40["Segment
[2873, 2902, 0]"] + 40["Segment
[2864, 2893, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 2 }] - 41["Segment
[2908, 2938, 0]"] + 41["Segment
[2899, 2929, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 3 }] - 42["Segment
[2944, 2978, 0]"] + 42["Segment
[2935, 2969, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 4 }] - 43["Segment
[2984, 3040, 0]"] + 43["Segment
[2975, 3031, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 5 }] - 44["Segment
[3046, 3054, 0]"] + 44["Segment
[3037, 3045, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 6 }] 45[Solid2d] end @@ -98,7 +98,7 @@ flowchart LR %% [ProgramBodyItem { index: 21 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }, CallKwArg { index: 0 }] 4["Plane
[1937, 1990, 0]"] %% [ProgramBodyItem { index: 22 }, VariableDeclarationDeclaration, VariableDeclarationInit, CallKwArg { index: 0 }] - 5["Plane
[2789, 2806, 0]"] + 5["Plane
[2780, 2797, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] 6["StartSketchOnPlane
[945, 965, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 0 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] @@ -114,9 +114,9 @@ flowchart LR %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit] 54["Sweep Extrusion
[1209, 1240, 0]"] %% [ProgramBodyItem { index: 16 }, VariableDeclarationDeclaration, VariableDeclarationInit, FunctionExpressionBody, FunctionExpressionBodyItem { index: 1 }, VariableDeclarationDeclaration, VariableDeclarationInit] - 55["Sweep Extrusion
[2554, 2602, 0]"] + 55["Sweep Extrusion
[2545, 2593, 0]"] %% [ProgramBodyItem { index: 26 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 0 }] - 56["Sweep Extrusion
[3060, 3091, 0]"] + 56["Sweep Extrusion
[3051, 3082, 0]"] %% [ProgramBodyItem { index: 29 }, VariableDeclarationDeclaration, VariableDeclarationInit, PipeBodyItem { index: 7 }] 57[Wall] %% face_code_ref=Missing NodePath diff --git a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ast.snap b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ast.snap index 52957821d..454cbefdf 100644 --- a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ast.snap +++ b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ast.snap @@ -2887,17 +2887,6 @@ description: Result of parsing spinning-highrise-tower.kcl "type": "ArrayExpression", "type": "ArrayExpression" } - }, - { - "type": "LabeledArg", - "label": null, - "arg": { - "commentStart": 0, - "end": 0, - "start": 0, - "type": "PipeSubstitution", - "type": "PipeSubstitution" - } } ], "callee": { @@ -2976,17 +2965,6 @@ description: Result of parsing spinning-highrise-tower.kcl "type": "ArrayExpression", "type": "ArrayExpression" } - }, - { - "type": "LabeledArg", - "label": null, - "arg": { - "commentStart": 0, - "end": 0, - "start": 0, - "type": "PipeSubstitution", - "type": "PipeSubstitution" - } } ], "callee": { @@ -3073,17 +3051,6 @@ description: Result of parsing spinning-highrise-tower.kcl "type": "ArrayExpression", "type": "ArrayExpression" } - }, - { - "type": "LabeledArg", - "label": null, - "arg": { - "commentStart": 0, - "end": 0, - "start": 0, - "type": "PipeSubstitution", - "type": "PipeSubstitution" - } } ], "callee": { diff --git a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ops.snap b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ops.snap index 579052206..b79b1b8d0 100644 --- a/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/spinning-highrise-tower/ops.snap @@ -4,58 +4,69 @@ description: Operations executed spinning-highrise-tower.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -74,9 +85,11 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -85,9 +98,7 @@ description: Operations executed spinning-highrise-tower.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -106,9 +117,11 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -117,9 +130,7 @@ description: Operations executed spinning-highrise-tower.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -138,9 +149,11 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -149,9 +162,7 @@ description: Operations executed spinning-highrise-tower.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -170,18 +181,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -286,7 +286,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -367,7 +367,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -397,6 +397,17 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -406,20 +417,20 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -438,18 +449,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -788,6 +788,17 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternTransform", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "instances": { "value": { @@ -812,33 +823,33 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "patternTransform", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -857,18 +868,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -1258,6 +1258,17 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternTransform", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "instances": { "value": { @@ -1282,18 +1293,7 @@ description: Operations executed spinning-highrise-tower.kcl "sourceRange": [] } }, - "name": "patternTransform", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap b/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap index 34f0f6a55..9cae042c0 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-gear/ops.snap @@ -4,30 +4,30 @@ description: Operations executed spur-gear.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -42,13 +42,9 @@ description: Operations executed spur-gear.kcl "type": "Number", "value": 0.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -84,15 +80,11 @@ description: Operations executed spur-gear.kcl "angle": { "value": { "type": "Number", - "value": 7.619, + "value": 0.133, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -128,15 +120,11 @@ description: Operations executed spur-gear.kcl "angle": { "value": { "type": "Number", - "value": 17.1429, + "value": 0.2992, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -162,6 +150,17 @@ description: Operations executed spur-gear.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -173,9 +172,11 @@ description: Operations executed spur-gear.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -184,9 +185,7 @@ description: Operations executed spur-gear.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -205,18 +204,7 @@ description: Operations executed spur-gear.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap index e8509ecf4..c9bb5c10e 100644 --- a/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/spur-reduction-gearset/ops.snap @@ -4,30 +4,30 @@ description: Operations executed spur-reduction-gearset.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -42,13 +42,9 @@ description: Operations executed spur-reduction-gearset.kcl "type": "Number", "value": 0.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -86,13 +82,9 @@ description: Operations executed spur-reduction-gearset.kcl "type": "Number", "value": 0.0, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -128,15 +120,11 @@ description: Operations executed spur-reduction-gearset.kcl "angle": { "value": { "type": "Number", - "value": 9.4118, + "value": 0.1643, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -172,15 +160,11 @@ description: Operations executed spur-reduction-gearset.kcl "angle": { "value": { "type": "Number", - "value": 3.1373, + "value": 0.0548, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -216,15 +200,11 @@ description: Operations executed spur-reduction-gearset.kcl "angle": { "value": { "type": "Number", - "value": 21.1765, + "value": 0.3696, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -260,15 +240,11 @@ description: Operations executed spur-reduction-gearset.kcl "angle": { "value": { "type": "Number", - "value": 7.0588, + "value": 0.1232, "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } + "type": "Known", + "type": "Angle", + "type": "Radians" } }, "sourceRange": [] @@ -294,6 +270,17 @@ description: Operations executed spur-reduction-gearset.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -305,9 +292,11 @@ description: Operations executed spur-reduction-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -316,9 +305,7 @@ description: Operations executed spur-reduction-gearset.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -330,9 +317,11 @@ description: Operations executed spur-reduction-gearset.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -341,9 +330,7 @@ description: Operations executed spur-reduction-gearset.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -362,9 +349,11 @@ description: Operations executed spur-reduction-gearset.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -373,9 +362,7 @@ description: Operations executed spur-reduction-gearset.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -394,18 +381,7 @@ description: Operations executed spur-reduction-gearset.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", diff --git a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ops.snap b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ops.snap index 18d90f50b..e44437eed 100644 --- a/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/surgical-drill-guide/ops.snap @@ -4,19 +4,30 @@ description: Operations executed surgical-drill-guide.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -56,9 +67,24 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -67,22 +93,7 @@ description: Operations executed surgical-drill-guide.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -101,34 +112,23 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -158,6 +158,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -176,34 +187,11 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -217,13 +205,23 @@ description: Operations executed surgical-drill-guide.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -243,23 +241,25 @@ description: Operations executed surgical-drill-guide.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -285,6 +285,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -310,20 +321,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -333,20 +344,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -372,21 +383,10 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -430,6 +430,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -439,20 +450,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -471,34 +482,23 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -524,6 +524,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -535,9 +546,11 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -546,9 +559,7 @@ description: Operations executed surgical-drill-guide.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -581,21 +592,10 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -643,20 +643,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -686,6 +686,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -704,20 +715,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -727,20 +738,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -766,21 +777,10 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -824,6 +824,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -833,20 +844,20 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -865,34 +876,23 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -922,6 +922,17 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -933,9 +944,11 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -944,9 +957,7 @@ description: Operations executed surgical-drill-guide.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -979,21 +990,10 @@ description: Operations executed surgical-drill-guide.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/thermal-block-insert/ops.snap b/rust/kcl-lib/tests/kcl_samples/thermal-block-insert/ops.snap index 84cf299e6..824d61191 100644 --- a/rust/kcl-lib/tests/kcl_samples/thermal-block-insert/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/thermal-block-insert/ops.snap @@ -4,17 +4,17 @@ description: Operations executed thermal-block-insert.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -28,17 +28,17 @@ description: Operations executed thermal-block-insert.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -52,27 +52,8 @@ description: Operations executed thermal-block-insert.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 200.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, + "type": "StdLibCall", "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Array", @@ -92,7 +73,26 @@ description: Operations executed thermal-block-insert.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 200.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/kcl_samples/tooling-nest-block/ops.snap b/rust/kcl-lib/tests/kcl_samples/tooling-nest-block/ops.snap index 22c5b300e..d97ef9387 100644 --- a/rust/kcl-lib/tests/kcl_samples/tooling-nest-block/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/tooling-nest-block/ops.snap @@ -4,19 +4,30 @@ description: Operations executed tooling-nest-block.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -58,9 +69,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -69,9 +82,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -82,9 +93,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -93,9 +106,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -106,9 +117,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -117,9 +130,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -130,9 +141,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -141,9 +154,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -154,9 +165,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -165,9 +178,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -178,9 +189,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -189,9 +202,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -202,9 +213,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -213,9 +226,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -226,9 +237,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -237,9 +250,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -250,9 +261,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -261,9 +274,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -274,9 +285,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -285,9 +298,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -298,9 +309,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -309,9 +322,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -322,9 +333,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -333,9 +346,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -346,9 +357,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -357,9 +370,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -370,9 +381,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -381,9 +394,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -394,9 +405,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -405,9 +418,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -418,9 +429,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -429,9 +442,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -442,9 +453,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -453,9 +466,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -465,20 +476,20 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -504,9 +515,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -515,9 +528,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -543,9 +554,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -554,9 +567,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -582,9 +593,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -593,9 +606,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -621,9 +632,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -632,9 +645,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -656,9 +667,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -667,9 +680,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -691,9 +702,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -702,9 +715,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -726,9 +737,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -737,9 +750,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -761,9 +772,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -772,9 +785,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -796,9 +807,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -807,9 +820,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -835,9 +846,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -846,9 +859,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -874,9 +885,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -885,9 +898,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -913,9 +924,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -924,9 +937,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -952,9 +963,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -963,9 +976,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -991,9 +1002,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1002,9 +1015,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1030,9 +1041,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1041,9 +1054,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1069,9 +1080,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1080,9 +1093,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1108,9 +1119,11 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -1119,9 +1132,7 @@ description: Operations executed tooling-nest-block.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1143,21 +1154,10 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1201,7 +1201,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1245,7 +1245,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1289,7 +1289,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1333,7 +1333,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1373,7 +1373,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1413,7 +1413,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1453,7 +1453,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1493,7 +1493,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1533,7 +1533,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1577,7 +1577,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1621,7 +1621,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1665,7 +1665,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1709,7 +1709,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1753,7 +1753,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1797,7 +1797,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1841,7 +1841,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -1885,7 +1885,7 @@ description: Operations executed tooling-nest-block.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/utility-sink/ops.snap b/rust/kcl-lib/tests/kcl_samples/utility-sink/ops.snap index f64521df2..4fbe48a0d 100644 --- a/rust/kcl-lib/tests/kcl_samples/utility-sink/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/utility-sink/ops.snap @@ -4,40 +4,21 @@ description: Operations executed utility-sink.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 834.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -69,23 +50,42 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 834.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -115,27 +115,8 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 13.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -155,9 +136,7 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -176,9 +155,11 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -198,23 +179,42 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 13.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, + "type": "StdLibCall", "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -244,27 +244,8 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 671.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -284,23 +265,42 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 671.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -330,27 +330,8 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -13.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -370,9 +351,7 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -391,9 +370,11 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -413,23 +394,42 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -13.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, + "type": "StdLibCall", "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -459,6 +459,17 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -477,20 +488,20 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -500,20 +511,20 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -532,20 +543,20 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -555,20 +566,20 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -587,34 +598,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -644,6 +644,17 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -662,34 +673,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -719,6 +719,17 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -737,34 +748,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -794,6 +794,17 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -812,34 +823,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -869,6 +869,17 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -887,34 +898,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -944,27 +944,8 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 667.5, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -984,9 +965,50 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 667.5, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -1068,21 +1090,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", "value": [ { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } @@ -1090,9 +1114,7 @@ description: Operations executed utility-sink.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -1111,45 +1133,23 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -1179,19 +1179,30 @@ description: Operations executed utility-sink.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -1203,20 +1214,20 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -1298,17 +1309,6 @@ description: Operations executed utility-sink.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ops.snap b/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ops.snap index c1af02cd6..a2fc86c90 100644 --- a/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ops.snap @@ -111,58 +111,69 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -181,9 +192,11 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -192,9 +205,7 @@ description: Operations executed walkie-talkie.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -213,9 +224,11 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -224,9 +237,7 @@ description: Operations executed walkie-talkie.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -245,9 +256,11 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -256,9 +269,7 @@ description: Operations executed walkie-talkie.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -277,21 +288,10 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -339,7 +339,7 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -387,7 +387,7 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -435,7 +435,7 @@ description: Operations executed walkie-talkie.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/kcl_samples/washer/ops.snap b/rust/kcl-lib/tests/kcl_samples/washer/ops.snap index e45a1f7fd..befe9eacc 100644 --- a/rust/kcl-lib/tests/kcl_samples/washer/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/washer/ops.snap @@ -4,19 +4,30 @@ description: Operations executed washer.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed washer.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed washer.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,17 +71,6 @@ description: Operations executed washer.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kcl_samples/wing-spar/ops.snap b/rust/kcl-lib/tests/kcl_samples/wing-spar/ops.snap index 9db522a70..4e762bc6b 100644 --- a/rust/kcl-lib/tests/kcl_samples/wing-spar/ops.snap +++ b/rust/kcl-lib/tests/kcl_samples/wing-spar/ops.snap @@ -4,20 +4,20 @@ description: Operations executed wing-spar.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -47,6 +47,17 @@ description: Operations executed wing-spar.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -58,9 +69,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -69,9 +82,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -83,9 +94,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -94,9 +107,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -108,9 +119,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -119,9 +132,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -133,9 +144,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -144,9 +157,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -158,9 +169,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -169,9 +182,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -190,20 +201,20 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -285,9 +296,88 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -700.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -700.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -296,86 +386,7 @@ description: Operations executed wing-spar.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -700.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -700.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "face": { "value": { @@ -386,41 +397,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -10.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -452,9 +433,39 @@ description: Operations executed wing-spar.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -10.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -465,41 +476,11 @@ description: Operations executed wing-spar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -10.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -531,6 +512,25 @@ description: Operations executed wing-spar.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -10.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kittycad_svg/ops.snap b/rust/kcl-lib/tests/kittycad_svg/ops.snap index 0cf2d28df..3098a0a80 100644 --- a/rust/kcl-lib/tests/kittycad_svg/ops.snap +++ b/rust/kcl-lib/tests/kittycad_svg/ops.snap @@ -4,19 +4,30 @@ description: Operations executed kittycad_svg.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed kittycad_svg.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/kw_fn_too_few_args/execution_error.snap b/rust/kcl-lib/tests/kw_fn_too_few_args/execution_error.snap index da6901f24..fc4b016a9 100644 --- a/rust/kcl-lib/tests/kw_fn_too_few_args/execution_error.snap +++ b/rust/kcl-lib/tests/kw_fn_too_few_args/execution_error.snap @@ -6,7 +6,7 @@ KCL Semantic error × semantic: This function requires a parameter y, but you haven't passed it │ one. - ╭─[1:7] + ╭─[1:14] 1 │ ╭─▶ fn add(x, y) { 2 │ │ return x + y 3 │ ├─▶ } @@ -20,7 +20,7 @@ KCL Semantic error × semantic: This function requires a parameter y, but you haven't │ passed it one. - ╭─[1:7] + ╭─[1:14] 1 │ ╭─▶ fn add(x, y) { 2 │ │ return x + y 3 │ ├─▶ } diff --git a/rust/kcl-lib/tests/kw_fn_too_few_args/ops.snap b/rust/kcl-lib/tests/kw_fn_too_few_args/ops.snap index 04a4a0a82..e4ef36f91 100644 --- a/rust/kcl-lib/tests/kw_fn_too_few_args/ops.snap +++ b/rust/kcl-lib/tests/kw_fn_too_few_args/ops.snap @@ -30,8 +30,5 @@ description: Operations executed kw_fn_too_few_args.kcl } }, "sourceRange": [] - }, - { - "type": "GroupEnd" } ] diff --git a/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/execution_error.snap b/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/execution_error.snap index 2efc2b583..30b386c65 100644 --- a/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/execution_error.snap +++ b/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/execution_error.snap @@ -6,7 +6,7 @@ KCL Semantic error × semantic: The function does declare a parameter named 'x', but this │ parameter doesn't use a label. Try removing the `x:` - ╭─[1:7] + ╭─[1:12] 1 │ ╭─▶ fn add(@x) { 2 │ │ return x + 1 3 │ ├─▶ } @@ -20,7 +20,7 @@ KCL Semantic error × semantic: The function does declare a parameter named 'x', but this │ parameter doesn't use a label. Try removing the `x:` - ╭─[1:7] + ╭─[1:12] 1 │ ╭─▶ fn add(@x) { 2 │ │ return x + 1 3 │ ├─▶ } diff --git a/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/ops.snap b/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/ops.snap index 136ad5aa8..a2fd160a3 100644 --- a/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/ops.snap +++ b/rust/kcl-lib/tests/kw_fn_unlabeled_but_has_label/ops.snap @@ -30,8 +30,5 @@ description: Operations executed kw_fn_unlabeled_but_has_label.kcl } }, "sourceRange": [] - }, - { - "type": "GroupEnd" } ] diff --git a/rust/kcl-lib/tests/linear_pattern3d_a_pattern/ops.snap b/rust/kcl-lib/tests/linear_pattern3d_a_pattern/ops.snap index 2a28055ca..fa3cd61fb 100644 --- a/rust/kcl-lib/tests/linear_pattern3d_a_pattern/ops.snap +++ b/rust/kcl-lib/tests/linear_pattern3d_a_pattern/ops.snap @@ -4,19 +4,30 @@ description: Operations executed linear_pattern3d_a_pattern.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed linear_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -130,20 +141,61 @@ description: Operations executed linear_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -225,58 +277,6 @@ description: Operations executed linear_pattern3d_a_pattern.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/loop_tag/ops.snap b/rust/kcl-lib/tests/loop_tag/ops.snap index 3bdcdf5fd..2bafbf61c 100644 --- a/rust/kcl-lib/tests/loop_tag/ops.snap +++ b/rust/kcl-lib/tests/loop_tag/ops.snap @@ -4,17 +4,17 @@ description: Operations executed loop_tag.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -3081,6 +3081,17 @@ description: Operations executed loop_tag.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -3099,18 +3110,7 @@ description: Operations executed loop_tag.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/mike_stress_test/ops.snap b/rust/kcl-lib/tests/mike_stress_test/ops.snap index 3ac267d94..d71a850b6 100644 --- a/rust/kcl-lib/tests/mike_stress_test/ops.snap +++ b/rust/kcl-lib/tests/mike_stress_test/ops.snap @@ -4,19 +4,30 @@ description: Operations executed mike_stress_test.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed mike_stress_test.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/multi_target_csg/ops.snap b/rust/kcl-lib/tests/multi_target_csg/ops.snap index d2a2d841a..cd690c6dd 100644 --- a/rust/kcl-lib/tests/multi_target_csg/ops.snap +++ b/rust/kcl-lib/tests/multi_target_csg/ops.snap @@ -4,19 +4,30 @@ description: Operations executed multi_target_csg.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed multi_target_csg.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed multi_target_csg.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -60,33 +71,44 @@ description: Operations executed multi_target_csg.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -121,45 +143,23 @@ description: Operations executed multi_target_csg.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -189,6 +189,22 @@ description: Operations executed multi_target_csg.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -207,40 +223,11 @@ description: Operations executed multi_target_csg.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "isError": true, - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -260,6 +247,19 @@ description: Operations executed multi_target_csg.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [], + "isError": true } ] diff --git a/rust/kcl-lib/tests/multi_transform/ops.snap b/rust/kcl-lib/tests/multi_transform/ops.snap index 43219e4d1..f2b982bd8 100644 --- a/rust/kcl-lib/tests/multi_transform/ops.snap +++ b/rust/kcl-lib/tests/multi_transform/ops.snap @@ -4,19 +4,30 @@ description: Operations executed multi_transform.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed multi_transform.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -91,6 +91,17 @@ description: Operations executed multi_transform.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternTransform", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "instances": { "value": { @@ -115,18 +126,7 @@ description: Operations executed multi_transform.kcl "sourceRange": [] } }, - "name": "patternTransform", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/neg_xz_plane/ops.snap b/rust/kcl-lib/tests/neg_xz_plane/ops.snap index a145837c0..def0ebcfe 100644 --- a/rust/kcl-lib/tests/neg_xz_plane/ops.snap +++ b/rust/kcl-lib/tests/neg_xz_plane/ops.snap @@ -4,19 +4,30 @@ description: Operations executed neg_xz_plane.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed neg_xz_plane.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/out_of_band_sketches/ops.snap b/rust/kcl-lib/tests/out_of_band_sketches/ops.snap index 9c9871687..cbad6a750 100644 --- a/rust/kcl-lib/tests/out_of_band_sketches/ops.snap +++ b/rust/kcl-lib/tests/out_of_band_sketches/ops.snap @@ -4,53 +4,34 @@ description: Operations executed out_of_band_sketches.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 10.14, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } }, - "name": "extrude", - "sourceRange": [], + "labeledArgs": {}, + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -70,6 +51,25 @@ description: Operations executed out_of_band_sketches.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 10.14, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/panic_repro_cube/ops.snap b/rust/kcl-lib/tests/panic_repro_cube/ops.snap index 91f1db399..3c2fcfae1 100644 --- a/rust/kcl-lib/tests/panic_repro_cube/ops.snap +++ b/rust/kcl-lib/tests/panic_repro_cube/ops.snap @@ -4,19 +4,30 @@ description: Operations executed panic_repro_cube.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -49,17 +60,6 @@ description: Operations executed panic_repro_cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/parametric/ops.snap b/rust/kcl-lib/tests/parametric/ops.snap index a99314205..eb6d9b5ad 100644 --- a/rust/kcl-lib/tests/parametric/ops.snap +++ b/rust/kcl-lib/tests/parametric/ops.snap @@ -4,19 +4,30 @@ description: Operations executed parametric.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed parametric.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/parametric_with_tan_arc/ops.snap b/rust/kcl-lib/tests/parametric_with_tan_arc/ops.snap index c72a66cd4..cabdf97cb 100644 --- a/rust/kcl-lib/tests/parametric_with_tan_arc/ops.snap +++ b/rust/kcl-lib/tests/parametric_with_tan_arc/ops.snap @@ -4,19 +4,30 @@ description: Operations executed parametric_with_tan_arc.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed parametric_with_tan_arc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/pattern_circular_in_module/ops.snap b/rust/kcl-lib/tests/pattern_circular_in_module/ops.snap index 2b903dc8f..cba8b753d 100644 --- a/rust/kcl-lib/tests/pattern_circular_in_module/ops.snap +++ b/rust/kcl-lib/tests/pattern_circular_in_module/ops.snap @@ -24,40 +24,21 @@ description: Operations executed pattern_circular_in_module.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -89,7 +70,26 @@ description: Operations executed pattern_circular_in_module.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/pattern_into_union/ops.snap b/rust/kcl-lib/tests/pattern_into_union/ops.snap index ea6ee60cc..42bbe5cd3 100644 --- a/rust/kcl-lib/tests/pattern_into_union/ops.snap +++ b/rust/kcl-lib/tests/pattern_into_union/ops.snap @@ -4,19 +4,30 @@ description: Operations executed pattern_into_union.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,9 +46,24 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -46,22 +72,7 @@ description: Operations executed pattern_into_union.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,21 +91,10 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -138,6 +138,17 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -219,33 +230,33 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -264,21 +275,10 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -322,6 +322,17 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "patternLinear3d", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "axis": { "value": { @@ -403,25 +414,11 @@ description: Operations executed pattern_into_union.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "isError": true, - "labeledArgs": {}, + "type": "StdLibCall", "name": "union", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Array", @@ -566,6 +563,9 @@ description: Operations executed pattern_into_union.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [], + "isError": true } ] diff --git a/rust/kcl-lib/tests/pattern_linear_in_module/ops.snap b/rust/kcl-lib/tests/pattern_linear_in_module/ops.snap index fdb111e94..3fe9c80c4 100644 --- a/rust/kcl-lib/tests/pattern_linear_in_module/ops.snap +++ b/rust/kcl-lib/tests/pattern_linear_in_module/ops.snap @@ -24,40 +24,21 @@ description: Operations executed pattern_linear_in_module.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": 1.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -107,7 +88,26 @@ description: Operations executed pattern_linear_in_module.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": 1.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/pentagon_fillet_sugar/ops.snap b/rust/kcl-lib/tests/pentagon_fillet_sugar/ops.snap index 94d4d47e6..50a70c5ba 100644 --- a/rust/kcl-lib/tests/pentagon_fillet_sugar/ops.snap +++ b/rust/kcl-lib/tests/pentagon_fillet_sugar/ops.snap @@ -4,19 +4,30 @@ description: Operations executed pentagon_fillet_sugar.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,9 +70,11 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -70,9 +83,7 @@ description: Operations executed pentagon_fillet_sugar.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -83,18 +94,7 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -133,6 +133,17 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -151,21 +162,10 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -250,6 +250,17 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -268,21 +279,10 @@ description: Operations executed pentagon_fillet_sugar.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/poop_chute/ops.snap b/rust/kcl-lib/tests/poop_chute/ops.snap index e0e30903e..29c284586 100644 --- a/rust/kcl-lib/tests/poop_chute/ops.snap +++ b/rust/kcl-lib/tests/poop_chute/ops.snap @@ -4,20 +4,20 @@ description: Operations executed poop_chute.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,19 +124,30 @@ description: Operations executed poop_chute.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -155,17 +166,6 @@ description: Operations executed poop_chute.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/revolve_about_edge/ops.snap b/rust/kcl-lib/tests/revolve_about_edge/ops.snap index 1bba7074b..10b3a98cb 100644 --- a/rust/kcl-lib/tests/revolve_about_edge/ops.snap +++ b/rust/kcl-lib/tests/revolve_about_edge/ops.snap @@ -4,33 +4,33 @@ description: Operations executed revolve_about_edge.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/riddle_small/ops.snap b/rust/kcl-lib/tests/riddle_small/ops.snap index 11f7a6d12..b0f5a4682 100644 --- a/rust/kcl-lib/tests/riddle_small/ops.snap +++ b/rust/kcl-lib/tests/riddle_small/ops.snap @@ -56,19 +56,30 @@ description: Operations executed riddle_small.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -87,18 +98,7 @@ description: Operations executed riddle_small.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/rotate_after_fillet/ops.snap b/rust/kcl-lib/tests/rotate_after_fillet/ops.snap index f891928a2..347c9665a 100644 --- a/rust/kcl-lib/tests/rotate_after_fillet/ops.snap +++ b/rust/kcl-lib/tests/rotate_after_fillet/ops.snap @@ -4,19 +4,30 @@ description: Operations executed rotate_after_fillet.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -98,6 +98,17 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -107,20 +118,20 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -139,20 +150,20 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -162,20 +173,20 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -194,21 +205,10 @@ description: Operations executed rotate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/scale_after_fillet/ops.snap b/rust/kcl-lib/tests/scale_after_fillet/ops.snap index d87b4a701..0287fb07d 100644 --- a/rust/kcl-lib/tests/scale_after_fillet/ops.snap +++ b/rust/kcl-lib/tests/scale_after_fillet/ops.snap @@ -4,19 +4,30 @@ description: Operations executed scale_after_fillet.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -98,6 +98,17 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -107,20 +118,20 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -139,20 +150,20 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -162,20 +173,20 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -194,21 +205,10 @@ description: Operations executed scale_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/sketch-on-chamfer-two-times-different-order/ops.snap b/rust/kcl-lib/tests/sketch-on-chamfer-two-times-different-order/ops.snap index c0b9e7b45..975eca32f 100644 --- a/rust/kcl-lib/tests/sketch-on-chamfer-two-times-different-order/ops.snap +++ b/rust/kcl-lib/tests/sketch-on-chamfer-two-times-different-order/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -94,7 +94,7 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -145,7 +145,7 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -197,6 +197,17 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -207,9 +218,11 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -218,9 +231,7 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -231,20 +242,20 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -263,17 +274,6 @@ description: Operations executed sketch-on-chamfer-two-times-different-order.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/sketch-on-chamfer-two-times/ops.snap b/rust/kcl-lib/tests/sketch-on-chamfer-two-times/ops.snap index 3edceccfc..9b8b2d59b 100644 --- a/rust/kcl-lib/tests/sketch-on-chamfer-two-times/ops.snap +++ b/rust/kcl-lib/tests/sketch-on-chamfer-two-times/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sketch-on-chamfer-two-times.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -94,7 +94,7 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -146,7 +146,7 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "chamfer", "unlabeledArg": { "value": { @@ -197,6 +197,17 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -207,9 +218,11 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Solid", @@ -218,9 +231,7 @@ description: Operations executed sketch-on-chamfer-two-times.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -231,20 +242,20 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -263,17 +274,6 @@ description: Operations executed sketch-on-chamfer-two-times.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/sketch_in_object/ops.snap b/rust/kcl-lib/tests/sketch_in_object/ops.snap index d64f23a2e..444e52e95 100644 --- a/rust/kcl-lib/tests/sketch_in_object/ops.snap +++ b/rust/kcl-lib/tests/sketch_in_object/ops.snap @@ -4,30 +4,30 @@ description: Operations executed sketch_in_object.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -41,6 +41,17 @@ description: Operations executed sketch_in_object.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -59,18 +70,7 @@ description: Operations executed sketch_in_object.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -84,6 +84,17 @@ description: Operations executed sketch_in_object.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -102,18 +113,7 @@ description: Operations executed sketch_in_object.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/sketch_on_face/ops.snap b/rust/kcl-lib/tests/sketch_on_face/ops.snap index 96f71486c..a676931eb 100644 --- a/rust/kcl-lib/tests/sketch_on_face/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sketch_on_face.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed sketch_on_face.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,20 +70,20 @@ description: Operations executed sketch_on_face.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -91,17 +102,6 @@ description: Operations executed sketch_on_face.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/sketch_on_face_after_fillets_referencing_face/ops.snap b/rust/kcl-lib/tests/sketch_on_face_after_fillets_referencing_face/ops.snap index 6b8a57512..0bbdaa81a 100644 --- a/rust/kcl-lib/tests/sketch_on_face_after_fillets_referencing_face/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_after_fillets_referencing_face/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -93,7 +93,7 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -137,6 +137,17 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -147,20 +158,20 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -179,17 +190,6 @@ description: Operations executed sketch_on_face_after_fillets_referencing_face.k "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/sketch_on_face_circle_tagged/ops.snap b/rust/kcl-lib/tests/sketch_on_face_circle_tagged/ops.snap index 37287b742..27215e2f6 100644 --- a/rust/kcl-lib/tests/sketch_on_face_circle_tagged/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_circle_tagged/ops.snap @@ -4,17 +4,17 @@ description: Operations executed sketch_on_face_circle_tagged.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,6 +79,17 @@ description: Operations executed sketch_on_face_circle_tagged.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -97,20 +108,20 @@ description: Operations executed sketch_on_face_circle_tagged.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -120,20 +131,20 @@ description: Operations executed sketch_on_face_circle_tagged.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -152,18 +163,7 @@ description: Operations executed sketch_on_face_circle_tagged.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/sketch_on_face_end/ops.snap b/rust/kcl-lib/tests/sketch_on_face_end/ops.snap index e37bb6ac1..32e66c8a5 100644 --- a/rust/kcl-lib/tests/sketch_on_face_end/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_end/ops.snap @@ -4,17 +4,17 @@ description: Operations executed sketch_on_face_end.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,6 +79,17 @@ description: Operations executed sketch_on_face_end.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -97,20 +108,20 @@ description: Operations executed sketch_on_face_end.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -120,20 +131,20 @@ description: Operations executed sketch_on_face_end.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -152,18 +163,7 @@ description: Operations executed sketch_on_face_end.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/sketch_on_face_end_negative_extrude/ops.snap b/rust/kcl-lib/tests/sketch_on_face_end_negative_extrude/ops.snap index 3eb319948..81687e5c0 100644 --- a/rust/kcl-lib/tests/sketch_on_face_end_negative_extrude/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_end_negative_extrude/ops.snap @@ -4,17 +4,17 @@ description: Operations executed sketch_on_face_end_negative_extrude.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,6 +79,17 @@ description: Operations executed sketch_on_face_end_negative_extrude.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -97,20 +108,20 @@ description: Operations executed sketch_on_face_end_negative_extrude.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -120,20 +131,20 @@ description: Operations executed sketch_on_face_end_negative_extrude.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -152,18 +163,7 @@ description: Operations executed sketch_on_face_end_negative_extrude.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/sketch_on_face_start/ops.snap b/rust/kcl-lib/tests/sketch_on_face_start/ops.snap index 04f8873a8..df854b99e 100644 --- a/rust/kcl-lib/tests/sketch_on_face_start/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_start/ops.snap @@ -4,17 +4,17 @@ description: Operations executed sketch_on_face_start.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -79,6 +79,17 @@ description: Operations executed sketch_on_face_start.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -97,20 +108,20 @@ description: Operations executed sketch_on_face_start.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -120,20 +131,20 @@ description: Operations executed sketch_on_face_start.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -152,18 +163,7 @@ description: Operations executed sketch_on_face_start.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/sketch_on_face_union/ops.snap b/rust/kcl-lib/tests/sketch_on_face_union/ops.snap index 82675075d..4f73a03ae 100644 --- a/rust/kcl-lib/tests/sketch_on_face_union/ops.snap +++ b/rust/kcl-lib/tests/sketch_on_face_union/ops.snap @@ -4,19 +4,30 @@ description: Operations executed sketch_on_face_union.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract2d", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed sketch_on_face_union.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tool": { "value": { @@ -53,9 +64,11 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -64,9 +77,7 @@ description: Operations executed sketch_on_face_union.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -85,34 +96,23 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -142,6 +142,17 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -160,9 +171,11 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -171,9 +184,7 @@ description: Operations executed sketch_on_face_union.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -192,20 +203,20 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -216,20 +227,20 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -248,17 +259,6 @@ description: Operations executed sketch_on_face_union.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/ssi_pattern/ops.snap b/rust/kcl-lib/tests/ssi_pattern/ops.snap index 1ba0aafee..92d774176 100644 --- a/rust/kcl-lib/tests/ssi_pattern/ops.snap +++ b/rust/kcl-lib/tests/ssi_pattern/ops.snap @@ -4,19 +4,30 @@ description: Operations executed ssi_pattern.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,20 +46,20 @@ description: Operations executed ssi_pattern.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -59,41 +70,11 @@ description: Operations executed ssi_pattern.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "length": { - "value": { - "type": "Number", - "value": -40.0, - "ty": { - "type": "Default", - "len": { - "type": "Mm" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -281,6 +262,25 @@ description: Operations executed ssi_pattern.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "length": { + "value": { + "type": "Number", + "value": -40.0, + "ty": { + "type": "Default", + "len": { + "type": "Mm" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_cylinder_from_cube/ops.snap b/rust/kcl-lib/tests/subtract_cylinder_from_cube/ops.snap index f26018259..5ef9d57b6 100644 --- a/rust/kcl-lib/tests/subtract_cylinder_from_cube/ops.snap +++ b/rust/kcl-lib/tests/subtract_cylinder_from_cube/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_cylinder_from_cube.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,18 +46,7 @@ description: Operations executed subtract_cylinder_from_cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -95,19 +95,30 @@ description: Operations executed subtract_cylinder_from_cube.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -126,20 +137,25 @@ description: Operations executed subtract_cylinder_from_cube.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -156,23 +172,7 @@ description: Operations executed subtract_cylinder_from_cube.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/subtract_doesnt_need_brackets/ops.snap b/rust/kcl-lib/tests/subtract_doesnt_need_brackets/ops.snap index 7214fdd0d..6a5a65a5a 100644 --- a/rust/kcl-lib/tests/subtract_doesnt_need_brackets/ops.snap +++ b/rust/kcl-lib/tests/subtract_doesnt_need_brackets/ops.snap @@ -4,32 +4,43 @@ description: Operations executed subtract_doesnt_need_brackets.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,9 +59,11 @@ description: Operations executed subtract_doesnt_need_brackets.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -59,9 +72,7 @@ description: Operations executed subtract_doesnt_need_brackets.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,18 +91,7 @@ description: Operations executed subtract_doesnt_need_brackets.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -218,6 +218,17 @@ description: Operations executed subtract_doesnt_need_brackets.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -229,18 +240,7 @@ description: Operations executed subtract_doesnt_need_brackets.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/subtract_regression00/ops.snap b/rust/kcl-lib/tests/subtract_regression00/ops.snap index 260e6114c..9f13fe697 100644 --- a/rust/kcl-lib/tests/subtract_regression00/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression00/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_regression00.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -51,34 +62,23 @@ description: Operations executed subtract_regression00.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -108,6 +108,17 @@ description: Operations executed subtract_regression00.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -126,20 +137,20 @@ description: Operations executed subtract_regression00.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tools": { "value": { @@ -151,17 +162,6 @@ description: Operations executed subtract_regression00.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression01/ops.snap b/rust/kcl-lib/tests/subtract_regression01/ops.snap index fc9169adf..e023878da 100644 --- a/rust/kcl-lib/tests/subtract_regression01/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression01/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_regression01.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -51,34 +62,23 @@ description: Operations executed subtract_regression01.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -108,6 +108,22 @@ description: Operations executed subtract_regression01.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -126,25 +142,20 @@ description: Operations executed subtract_regression01.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -156,17 +167,6 @@ description: Operations executed subtract_regression01.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression02/ops.snap b/rust/kcl-lib/tests/subtract_regression02/ops.snap index 91b346f28..b9ef063b2 100644 --- a/rust/kcl-lib/tests/subtract_regression02/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression02/ops.snap @@ -4,56 +4,21 @@ description: Operations executed subtract_regression02.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": { - "bidirectionalLength": { - "value": { - "type": "Number", - "value": 0.655, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - }, - "length": { - "value": { - "type": "Number", - "value": 0.655, - "ty": { - "type": "Default", - "len": { - "type": "Inches" - }, - "angle": { - "type": "Degrees" - } - } - }, - "sourceRange": [] - } - }, - "name": "extrude", - "sourceRange": [], "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -62,22 +27,73 @@ description: Operations executed subtract_regression02.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": { + "bidirectionalLength": { + "value": { + "type": "Number", + "value": 0.655, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + }, + "length": { + "value": { + "type": "Number", + "value": 0.655, + "ty": { + "type": "Default", + "len": { + "type": "Inches" + }, + "angle": { + "type": "Degrees" + } + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -112,9 +128,49 @@ description: Operations executed subtract_regression02.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Array", @@ -128,47 +184,7 @@ description: Operations executed subtract_regression02.kcl ] }, "sourceRange": [] - } - }, - { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { "labeledArgs": { "bidirectionalLength": { "value": { @@ -203,25 +219,20 @@ description: Operations executed subtract_regression02.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -233,17 +244,6 @@ description: Operations executed subtract_regression02.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression03/ops.snap b/rust/kcl-lib/tests/subtract_regression03/ops.snap index 9b344ed9f..afb2396d7 100644 --- a/rust/kcl-lib/tests/subtract_regression03/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression03/ops.snap @@ -4,23 +4,21 @@ description: Operations executed subtract_regression03.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -204,9 +202,22 @@ description: Operations executed subtract_regression03.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -218,24 +229,11 @@ description: Operations executed subtract_regression03.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -419,9 +417,27 @@ description: Operations executed subtract_regression03.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -440,25 +456,20 @@ description: Operations executed subtract_regression03.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -470,24 +481,11 @@ description: Operations executed subtract_regression03.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -671,9 +669,27 @@ description: Operations executed subtract_regression03.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -692,25 +708,20 @@ description: Operations executed subtract_regression03.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -722,17 +733,6 @@ description: Operations executed subtract_regression03.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression04/ops.snap b/rust/kcl-lib/tests/subtract_regression04/ops.snap index 870611692..70a08e765 100644 --- a/rust/kcl-lib/tests/subtract_regression04/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression04/ops.snap @@ -4,20 +4,20 @@ description: Operations executed subtract_regression04.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,19 +124,35 @@ description: Operations executed subtract_regression04.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -171,25 +187,20 @@ description: Operations executed subtract_regression04.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -201,17 +212,6 @@ description: Operations executed subtract_regression04.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression05/ops.snap b/rust/kcl-lib/tests/subtract_regression05/ops.snap index a98043219..33420a07e 100644 --- a/rust/kcl-lib/tests/subtract_regression05/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression05/ops.snap @@ -4,32 +4,43 @@ description: Operations executed subtract_regression05.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -41,9 +52,11 @@ description: Operations executed subtract_regression05.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -52,9 +65,7 @@ description: Operations executed subtract_regression05.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -66,34 +77,23 @@ description: Operations executed subtract_regression05.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -200,6 +200,17 @@ description: Operations executed subtract_regression05.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -211,17 +222,6 @@ description: Operations executed subtract_regression05.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression06/ops.snap b/rust/kcl-lib/tests/subtract_regression06/ops.snap index 9f8bf0538..9f9f3f33a 100644 --- a/rust/kcl-lib/tests/subtract_regression06/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression06/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_regression06.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -51,24 +62,11 @@ description: Operations executed subtract_regression06.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -252,9 +250,27 @@ description: Operations executed subtract_regression06.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -273,25 +289,20 @@ description: Operations executed subtract_regression06.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -303,17 +314,6 @@ description: Operations executed subtract_regression06.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression07/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/subtract_regression07/artifact_graph_flowchart.snap.md index 27c105bc7..7335a8fe8 100644 --- a/rust/kcl-lib/tests/subtract_regression07/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/subtract_regression07/artifact_graph_flowchart.snap.md @@ -139,7 +139,7 @@ flowchart LR 15 --- 42 15 --- 49 18 --- 32 - 18 x--> 35 + 18 x--> 36 18 --- 43 18 --- 50 23 --- 26 @@ -194,5 +194,5 @@ flowchart LR 40 <--x 34 41 <--x 34 42 <--x 34 - 43 <--x 36 + 43 <--x 35 ``` diff --git a/rust/kcl-lib/tests/subtract_regression07/ops.snap b/rust/kcl-lib/tests/subtract_regression07/ops.snap index 47890976f..138ea8917 100644 --- a/rust/kcl-lib/tests/subtract_regression07/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression07/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_regression07.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract2d", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tool": { "value": { @@ -28,9 +39,11 @@ description: Operations executed subtract_regression07.kcl "sourceRange": [] } }, - "name": "subtract2d", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -39,9 +52,7 @@ description: Operations executed subtract_regression07.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -76,34 +87,23 @@ description: Operations executed subtract_regression07.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -133,20 +133,20 @@ description: Operations executed subtract_regression07.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "offsetPlane", "unlabeledArg": { "value": { @@ -176,10 +176,8 @@ description: Operations executed subtract_regression07.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "loft", - "sourceRange": [], "type": "StdLibCall", + "name": "loft", "unlabeledArg": { "value": { "type": "Array", @@ -199,9 +197,22 @@ description: Operations executed subtract_regression07.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -213,17 +224,6 @@ description: Operations executed subtract_regression07.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression08/artifact_graph_flowchart.snap.md b/rust/kcl-lib/tests/subtract_regression08/artifact_graph_flowchart.snap.md index 004106c4b..e4de2e966 100644 --- a/rust/kcl-lib/tests/subtract_regression08/artifact_graph_flowchart.snap.md +++ b/rust/kcl-lib/tests/subtract_regression08/artifact_graph_flowchart.snap.md @@ -86,8 +86,8 @@ flowchart LR 8 --- 18 8 ---- 20 8 --- 21 - 12 --- 22 - 12 <--x 23 + 12 <--x 22 + 12 --- 23 12 <--x 24 16 <--x 25 16 <--x 26 diff --git a/rust/kcl-lib/tests/subtract_regression08/ops.snap b/rust/kcl-lib/tests/subtract_regression08/ops.snap index 1584fd969..508bb6803 100644 --- a/rust/kcl-lib/tests/subtract_regression08/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression08/ops.snap @@ -4,32 +4,43 @@ description: Operations executed subtract_regression08.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "sweep", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "path": { "value": { @@ -48,9 +59,37 @@ description: Operations executed subtract_regression08.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "sweep", "unlabeledArg": { "value": { "type": "Sketch", @@ -59,35 +98,7 @@ description: Operations executed subtract_regression08.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "path": { "value": { @@ -106,20 +117,20 @@ description: Operations executed subtract_regression08.kcl "sourceRange": [] } }, - "name": "sweep", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tools": { "value": { @@ -131,17 +142,6 @@ description: Operations executed subtract_regression08.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression09/ops.snap b/rust/kcl-lib/tests/subtract_regression09/ops.snap index a4963ae0b..b21147203 100644 --- a/rust/kcl-lib/tests/subtract_regression09/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression09/ops.snap @@ -4,20 +4,20 @@ description: Operations executed subtract_regression09.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -124,19 +124,35 @@ description: Operations executed subtract_regression09.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "bidirectionalLength": { "value": { @@ -171,25 +187,20 @@ description: Operations executed subtract_regression09.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -201,17 +212,6 @@ description: Operations executed subtract_regression09.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_regression10/ops.snap b/rust/kcl-lib/tests/subtract_regression10/ops.snap index a216168be..a2e82acd8 100644 --- a/rust/kcl-lib/tests/subtract_regression10/ops.snap +++ b/rust/kcl-lib/tests/subtract_regression10/ops.snap @@ -4,33 +4,33 @@ description: Operations executed subtract_regression10.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "revolve", "unlabeledArg": { "value": { @@ -132,19 +132,30 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -170,20 +181,20 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternCircular3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "arcDegrees": { "value": { @@ -319,34 +330,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "patternCircular3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, - "name": "subtract", - "sourceRange": [], "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", @@ -360,13 +348,23 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -386,22 +384,35 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -427,21 +438,10 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -490,19 +490,30 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -528,20 +539,25 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -558,38 +574,33 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -615,24 +626,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -772,9 +770,22 @@ description: Operations executed subtract_regression10.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -800,24 +811,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "intersect", - "sourceRange": [], "type": "StdLibCall", + "name": "intersect", "unlabeledArg": { "value": { "type": "Array", @@ -837,20 +835,22 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupBegin", @@ -863,11 +863,11 @@ description: Operations executed subtract_regression10.kcl "angle": { "value": { "type": "Number", - "value": 40.0, + "value": 0.6981, "ty": { "type": "Known", "type": "Angle", - "type": "Degrees" + "type": "Radians" } }, "sourceRange": [] @@ -893,6 +893,17 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -918,9 +929,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -929,9 +942,7 @@ description: Operations executed subtract_regression10.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -957,34 +968,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": { - "tools": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } - }, + "type": "StdLibCall", "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", "unlabeledArg": { "value": { "type": "Array", @@ -998,13 +986,23 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": { + "tools": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + } + }, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -1024,13 +1022,13 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Object", @@ -1170,9 +1168,33 @@ description: Operations executed subtract_regression10.kcl } }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -1191,21 +1213,17 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "subtract", "unlabeledArg": { "value": { "type": "Array", "value": [ { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } @@ -1213,9 +1231,7 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "tools": { "value": { @@ -1227,29 +1243,11 @@ description: Operations executed subtract_regression10.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -1269,7 +1267,9 @@ description: Operations executed subtract_regression10.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/subtract_with_pattern/ops.snap b/rust/kcl-lib/tests/subtract_with_pattern/ops.snap index 3c35e852f..68c83a6b6 100644 --- a/rust/kcl-lib/tests/subtract_with_pattern/ops.snap +++ b/rust/kcl-lib/tests/subtract_with_pattern/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_with_pattern.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,9 +46,24 @@ description: Operations executed subtract_with_pattern.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -46,22 +72,7 @@ description: Operations executed subtract_with_pattern.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,20 +91,20 @@ description: Operations executed subtract_with_pattern.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -175,20 +186,25 @@ description: Operations executed subtract_with_pattern.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -264,22 +280,6 @@ description: Operations executed subtract_with_pattern.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/subtract_with_pattern_cut_thru/ops.snap b/rust/kcl-lib/tests/subtract_with_pattern_cut_thru/ops.snap index 081181ae1..93185aa17 100644 --- a/rust/kcl-lib/tests/subtract_with_pattern_cut_thru/ops.snap +++ b/rust/kcl-lib/tests/subtract_with_pattern_cut_thru/ops.snap @@ -4,19 +4,30 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,9 +46,24 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Plane", + "artifact_id": "[uuid]" + }, + "sourceRange": [] + }, + "labeledArgs": {}, + "sourceRange": [] + }, + { + "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -46,22 +72,7 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl } }, "sourceRange": [] - } - }, - { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Plane", - "artifact_id": "[uuid]" - }, - "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,20 +91,20 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "patternLinear3d", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "axis": { "value": { @@ -175,20 +186,25 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl "sourceRange": [] } }, - "name": "patternLinear3d", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "subtract", + "unlabeledArg": { + "value": { + "type": "Array", + "value": [ + { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + } + ] + }, + "sourceRange": [] + }, "labeledArgs": { "tools": { "value": { @@ -234,22 +250,6 @@ description: Operations executed subtract_with_pattern_cut_thru.kcl "sourceRange": [] } }, - "name": "subtract", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Array", - "value": [ - { - "type": "Solid", - "value": { - "artifactId": "[uuid]" - } - } - ] - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/tan_arc_x_line/ops.snap b/rust/kcl-lib/tests/tan_arc_x_line/ops.snap index dfe076c5d..1f02a68b9 100644 --- a/rust/kcl-lib/tests/tan_arc_x_line/ops.snap +++ b/rust/kcl-lib/tests/tan_arc_x_line/ops.snap @@ -4,16 +4,16 @@ description: Operations executed tan_arc_x_line.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/tangent_to_3_point_arc/ops.snap b/rust/kcl-lib/tests/tangent_to_3_point_arc/ops.snap index 16055d248..2fccfa4ec 100644 --- a/rust/kcl-lib/tests/tangent_to_3_point_arc/ops.snap +++ b/rust/kcl-lib/tests/tangent_to_3_point_arc/ops.snap @@ -4,16 +4,16 @@ description: Operations executed tangent_to_3_point_arc.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/tangential_arc/ops.snap b/rust/kcl-lib/tests/tangential_arc/ops.snap index 56effacc5..7a07d555a 100644 --- a/rust/kcl-lib/tests/tangential_arc/ops.snap +++ b/rust/kcl-lib/tests/tangential_arc/ops.snap @@ -4,19 +4,30 @@ description: Operations executed tangential_arc.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed tangential_arc.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/rust/kcl-lib/tests/translate_after_fillet/ops.snap b/rust/kcl-lib/tests/translate_after_fillet/ops.snap index 5a1314cf7..6b2976e1d 100644 --- a/rust/kcl-lib/tests/translate_after_fillet/ops.snap +++ b/rust/kcl-lib/tests/translate_after_fillet/ops.snap @@ -4,19 +4,30 @@ description: Operations executed translate_after_fillet.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,21 +46,10 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { @@ -98,6 +98,17 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] }, { + "type": "StdLibCall", + "name": "startSketchOn", + "unlabeledArg": { + "value": { + "type": "Solid", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "face": { "value": { @@ -107,20 +118,20 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -139,20 +150,20 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { - "type": "Sketch", + "type": "Solid", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "face": { "value": { @@ -162,20 +173,20 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] } }, - "name": "startSketchOn", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { - "type": "Solid", + "type": "Sketch", "value": { "artifactId": "[uuid]" } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -194,21 +205,10 @@ description: Operations executed translate_after_fillet.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { - "type": "KclStdLibCall", + "type": "StdLibCall", "name": "fillet", "unlabeledArg": { "value": { diff --git a/rust/kcl-lib/tests/union_cubes/ops.snap b/rust/kcl-lib/tests/union_cubes/ops.snap index f9cbae8f5..301dff2b2 100644 --- a/rust/kcl-lib/tests/union_cubes/ops.snap +++ b/rust/kcl-lib/tests/union_cubes/ops.snap @@ -4,32 +4,43 @@ description: Operations executed union_cubes.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -48,9 +59,11 @@ description: Operations executed union_cubes.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], + "sourceRange": [] + }, + { "type": "StdLibCall", + "name": "extrude", "unlabeledArg": { "value": { "type": "Sketch", @@ -59,9 +72,7 @@ description: Operations executed union_cubes.kcl } }, "sourceRange": [] - } - }, - { + }, "labeledArgs": { "length": { "value": { @@ -80,18 +91,7 @@ description: Operations executed union_cubes.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] }, { "type": "GroupBegin", @@ -218,10 +218,8 @@ description: Operations executed union_cubes.kcl "sourceRange": [] }, { - "labeledArgs": {}, - "name": "union", - "sourceRange": [], "type": "StdLibCall", + "name": "union", "unlabeledArg": { "value": { "type": "Array", @@ -241,7 +239,9 @@ description: Operations executed union_cubes.kcl ] }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { "type": "GroupEnd" diff --git a/rust/kcl-lib/tests/xz_plane/ops.snap b/rust/kcl-lib/tests/xz_plane/ops.snap index 41cebe564..0723845e1 100644 --- a/rust/kcl-lib/tests/xz_plane/ops.snap +++ b/rust/kcl-lib/tests/xz_plane/ops.snap @@ -4,19 +4,30 @@ description: Operations executed xz_plane.kcl --- [ { - "labeledArgs": {}, - "name": "startSketchOn", - "sourceRange": [], "type": "StdLibCall", + "name": "startSketchOn", "unlabeledArg": { "value": { "type": "Plane", "artifact_id": "[uuid]" }, "sourceRange": [] - } + }, + "labeledArgs": {}, + "sourceRange": [] }, { + "type": "StdLibCall", + "name": "extrude", + "unlabeledArg": { + "value": { + "type": "Sketch", + "value": { + "artifactId": "[uuid]" + } + }, + "sourceRange": [] + }, "labeledArgs": { "length": { "value": { @@ -35,17 +46,6 @@ description: Operations executed xz_plane.kcl "sourceRange": [] } }, - "name": "extrude", - "sourceRange": [], - "type": "StdLibCall", - "unlabeledArg": { - "value": { - "type": "Sketch", - "value": { - "artifactId": "[uuid]" - } - }, - "sourceRange": [] - } + "sourceRange": [] } ] diff --git a/src/components/ModelingSidebar/ModelingPanes/FeatureTreePane.tsx b/src/components/ModelingSidebar/ModelingPanes/FeatureTreePane.tsx index 60193d28c..e5fe8abb8 100644 --- a/src/components/ModelingSidebar/ModelingPanes/FeatureTreePane.tsx +++ b/src/components/ModelingSidebar/ModelingPanes/FeatureTreePane.tsx @@ -317,10 +317,7 @@ const OperationItem = (props: { * TODO: https://github.com/KittyCAD/modeling-app/issues/4442 */ function enterEditFlow() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' - ) { + if (props.item.type === 'StdLibCall') { props.send({ type: 'enterEditFlow', data: { @@ -332,10 +329,7 @@ const OperationItem = (props: { } function enterAppearanceFlow() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' - ) { + if (props.item.type === 'StdLibCall') { props.send({ type: 'enterAppearanceFlow', data: { @@ -347,11 +341,7 @@ const OperationItem = (props: { } function enterTranslateFlow() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' || - props.item.type === 'GroupBegin' - ) { + if (props.item.type === 'StdLibCall' || props.item.type === 'GroupBegin') { props.send({ type: 'enterTranslateFlow', data: { @@ -363,11 +353,7 @@ const OperationItem = (props: { } function enterRotateFlow() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' || - props.item.type === 'GroupBegin' - ) { + if (props.item.type === 'StdLibCall' || props.item.type === 'GroupBegin') { props.send({ type: 'enterRotateFlow', data: { @@ -379,11 +365,7 @@ const OperationItem = (props: { } function enterCloneFlow() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' || - props.item.type === 'GroupBegin' - ) { + if (props.item.type === 'StdLibCall' || props.item.type === 'GroupBegin') { props.send({ type: 'enterCloneFlow', data: { @@ -395,11 +377,7 @@ const OperationItem = (props: { } function deleteOperation() { - if ( - props.item.type === 'StdLibCall' || - props.item.type === 'GroupBegin' || - props.item.type === 'KclStdLibCall' - ) { + if (props.item.type === 'StdLibCall' || props.item.type === 'GroupBegin') { props.send({ type: 'deleteOperation', data: { @@ -454,8 +432,7 @@ const OperationItem = (props: { , ] : []), - ...(props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' + ...(props.item.type === 'StdLibCall' ? [ , ] : []), - ...(props.item.type === 'StdLibCall' || - props.item.type === 'KclStdLibCall' || - props.item.type === 'GroupBegin' + ...(props.item.type === 'StdLibCall' || props.item.type === 'GroupBegin' ? [ { }) }) -describe('testing hasExtrudeSketch', () => { - it('find sketch', async () => { - const exampleCode = `length001 = 2 -part001 = startSketchOn(XY) - |> startProfile(at = [-1.41, 3.46]) - |> line(end = [19.49, 1.16], tag = $seg01) - |> angledLine(angle = -35, length = length001) - |> line(end = [-3.22, -7.36]) - |> angledLine(angle = -175, length = segLen(seg01))` - const ast = assertParse(exampleCode) - - const execState = await enginelessExecutor(ast) - const result = hasExtrudeSketch({ - ast, - selection: { - codeRef: codeRefFromRange(topLevelRange(100, 101), ast), - }, - memVars: execState.variables, - }) - expect(result).toEqual(true) - }) - it('find solid', async () => { - const exampleCode = `length001 = 2 -part001 = startSketchOn(XY) - |> startProfile(at = [-1.41, 3.46]) - |> line(end = [19.49, 1.16], tag = $seg01) - |> angledLine(angle = -35, length = length001) - |> line(end = [-3.22, -7.36]) - |> angledLine(angle = -175, length = segLen(seg01)) - |> extrude(length = 1)` - const ast = assertParse(exampleCode) - - const execState = await enginelessExecutor(ast) - const result = hasExtrudeSketch({ - ast, - selection: { - codeRef: codeRefFromRange(topLevelRange(100, 101), ast), - }, - memVars: execState.variables, - }) - expect(result).toEqual(true) - }) - it('finds nothing', async () => { - const exampleCode = `length001 = 2` - const ast = assertParse(exampleCode) - - const execState = await enginelessExecutor(ast) - const result = hasExtrudeSketch({ - ast, - selection: { - codeRef: codeRefFromRange(topLevelRange(10, 11), ast), - }, - memVars: execState.variables, - }) - expect(result).toEqual(false) - }) -}) - describe('Testing findUsesOfTagInPipe', () => { const exampleCode = `part001 = startSketchOn(-XZ) |> startProfile(at = [68.12, 156.65]) diff --git a/src/lang/queryAst.ts b/src/lang/queryAst.ts index 64b057a09..3a2dea259 100644 --- a/src/lang/queryAst.ts +++ b/src/lang/queryAst.ts @@ -43,13 +43,12 @@ import { kclSettings, recast, sketchFromKclValue, - sketchFromKclValueOptional, unitAngToUnitAngle, unitLenToUnitLength, } from '@src/lang/wasm' import type { Selection, Selections } from '@src/lib/selections' import type { KclSettingsAnnotation } from '@src/lib/settings/settingsTypes' -import { Reason, err } from '@src/lib/trap' +import { err } from '@src/lib/trap' import { getAngle, isArray } from '@src/lib/utils' import type { OpKclValue, Operation } from '@rust/kcl-lib/bindings/Operation' @@ -635,34 +634,6 @@ export function isLinesParallelAndConstrained( } } -export function hasExtrudeSketch({ - ast, - selection, - memVars, -}: { - ast: Program - selection: Selection - memVars: VariableMap -}): boolean { - const varDecMeta = getNodeFromPath( - ast, - selection?.codeRef?.pathToNode, - 'VariableDeclaration' - ) - if (err(varDecMeta)) { - console.error(varDecMeta) - return false - } - const varDec = varDecMeta.node - if (varDec.type !== 'VariableDeclaration') return false - const varName = varDec.declaration.id.name - const varValue = memVars[varName] - return ( - varValue?.type === 'Solid' || - !(sketchFromKclValueOptional(varValue, varName) instanceof Reason) - ) -} - export function artifactIsPlaneWithPaths(selectionRanges: Selections) { return ( selectionRanges.graphSelections.length && @@ -1124,7 +1095,7 @@ export function getSketchSelectionsFromOperation( artifactGraph: ArtifactGraph ): Error | Selections { const error = new Error("Couldn't retrieve sketches from operation") - if (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') { + if (operation.type !== 'StdLibCall') { return error } diff --git a/src/lang/wasm.ts b/src/lang/wasm.ts index c6c521470..e0f848c0e 100644 --- a/src/lang/wasm.ts +++ b/src/lang/wasm.ts @@ -1,8 +1,8 @@ import type { ArtifactCommand, - ArtifactId, ArtifactGraph as RustArtifactGraph, } from '@rust/kcl-lib/bindings/Artifact' +import type { ArtifactId } from '@rust/kcl-lib/bindings/ArtifactId' import type { CompilationError } from '@rust/kcl-lib/bindings/CompilationError' import type { Configuration } from '@rust/kcl-lib/bindings/Configuration' import type { CoreDumpInfo } from '@rust/kcl-lib/bindings/CoreDumpInfo' @@ -75,7 +75,6 @@ export type { ArrayExpression } from '@rust/kcl-lib/bindings/ArrayExpression' export type { Artifact, ArtifactCommand, - ArtifactId, Cap as CapArtifact, CodeRef, CompositeSolid as CompositeSolidArtifact, @@ -88,6 +87,7 @@ export type { SweepEdge, Wall as WallArtifact, } from '@rust/kcl-lib/bindings/Artifact' +export type { ArtifactId } from '@rust/kcl-lib/bindings/ArtifactId' export type { BinaryExpression } from '@rust/kcl-lib/bindings/BinaryExpression' export type { BinaryPart } from '@rust/kcl-lib/bindings/BinaryPart' export type { CallExpressionKw } from '@rust/kcl-lib/bindings/CallExpressionKw' diff --git a/src/lib/operations.ts b/src/lib/operations.ts index 26a934cda..3ef5518f4 100644 --- a/src/lib/operations.ts +++ b/src/lib/operations.ts @@ -66,7 +66,7 @@ const prepareToEditExtrude: PrepareToEditCallback = async ({ operation }) => { name: 'Extrude', groupId: 'modeling', } - if (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') { + if (operation.type !== 'StdLibCall') { return { reason: 'Wrong operation type' } } @@ -123,7 +123,7 @@ const prepareToEditEdgeTreatment: PrepareToEditCallback = async ({ groupId: 'modeling', } if ( - (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') || + operation.type !== 'StdLibCall' || !operation.labeledArgs || (!isChamfer && !isFillet) ) { @@ -225,7 +225,7 @@ const prepareToEditShell: PrepareToEditCallback = } if ( - (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') || + operation.type !== 'StdLibCall' || !operation.labeledArgs || !operation.unlabeledArg || !('thickness' in operation.labeledArgs) || @@ -346,7 +346,7 @@ const prepareToEditOffsetPlane: PrepareToEditCallback = async ({ groupId: 'modeling', } if ( - (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') || + operation.type !== 'StdLibCall' || !operation.labeledArgs || !operation.unlabeledArg || !('offset' in operation.labeledArgs) || @@ -412,7 +412,7 @@ const prepareToEditOffsetPlane: PrepareToEditCallback = async ({ } /** - * Gather up the argument values for the Revolve command + * Gather up the argument values for the sweep command * to be used in the command bar edit flow. */ const prepareToEditSweep: PrepareToEditCallback = async ({ operation }) => { @@ -420,7 +420,7 @@ const prepareToEditSweep: PrepareToEditCallback = async ({ operation }) => { name: 'Sweep', groupId: 'modeling', } - if (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') { + if (operation.type !== 'StdLibCall') { return { reason: 'Wrong operation type' } } @@ -515,7 +515,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => { name: 'Helix', groupId: 'modeling', } - if (operation.type !== 'KclStdLibCall' || !operation.labeledArgs) { + if (operation.type !== 'StdLibCall' || !operation.labeledArgs) { return { reason: 'Wrong operation type or arguments' } } @@ -768,11 +768,7 @@ const prepareToEditRevolve: PrepareToEditCallback = async ({ name: 'Revolve', groupId: 'modeling', } - if ( - !artifact || - operation.type !== 'KclStdLibCall' || - !operation.labeledArgs - ) { + if (!artifact || operation.type !== 'StdLibCall' || !operation.labeledArgs) { return { reason: 'Wrong operation type or artifact' } } @@ -1041,8 +1037,6 @@ export function getOperationLabel(op: Operation): string { switch (op.type) { case 'StdLibCall': return stdLibMap[op.name]?.label ?? op.name - case 'KclStdLibCall': - return stdLibMap[op.name]?.label ?? op.name case 'GroupBegin': if (op.group.type === 'FunctionCall') { return op.group.name ?? 'anonymous' @@ -1067,8 +1061,6 @@ export function getOperationIcon(op: Operation): CustomIconName { switch (op.type) { case 'StdLibCall': return stdLibMap[op.name]?.icon ?? 'questionMark' - case 'KclStdLibCall': - return stdLibMap[op.name]?.icon ?? 'questionMark' case 'GroupBegin': if (op.group.type === 'ModuleInstance') { return 'import' // TODO: Use insert icon. @@ -1173,7 +1165,7 @@ export async function enterEditFlow({ operation, artifact, }: EnterEditFlowProps): Promise { - if (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') { + if (operation.type !== 'StdLibCall') { return new Error( 'Feature tree editing not yet supported for user-defined functions or modules. Please edit in the code editor.' ) @@ -1211,7 +1203,7 @@ export async function enterEditFlow({ export async function enterAppearanceFlow({ operation, }: EnterEditFlowProps): Promise { - if (operation.type !== 'StdLibCall' && operation.type !== 'KclStdLibCall') { + if (operation.type !== 'StdLibCall') { return new Error( 'Appearance setting not yet supported for user-defined functions or modules. Please edit in the code editor.' ) @@ -1245,7 +1237,7 @@ export async function enterTranslateFlow({ }: EnterEditFlowProps): Promise { const isModuleImport = operation.type === 'GroupBegin' const isSupportedStdLibCall = - (operation.type === 'KclStdLibCall' || operation.type === 'StdLibCall') && + operation.type === 'StdLibCall' && stdLibMap[operation.name]?.supportsTransform if (!isModuleImport && !isSupportedStdLibCall) { return new Error( @@ -1307,7 +1299,7 @@ export async function enterRotateFlow({ }: EnterEditFlowProps): Promise { const isModuleImport = operation.type === 'GroupBegin' const isSupportedStdLibCall = - (operation.type === 'KclStdLibCall' || operation.type === 'StdLibCall') && + operation.type === 'StdLibCall' && stdLibMap[operation.name]?.supportsTransform if (!isModuleImport && !isSupportedStdLibCall) { return new Error( @@ -1369,7 +1361,7 @@ export async function enterCloneFlow({ }: EnterEditFlowProps): Promise { const isModuleImport = operation.type === 'GroupBegin' const isSupportedStdLibCall = - (operation.type === 'KclStdLibCall' || operation.type === 'StdLibCall') && + operation.type === 'StdLibCall' && stdLibMap[operation.name]?.supportsTransform if (!isModuleImport && !isSupportedStdLibCall) { return new Error(