Share instances of the std prelude (#5448)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "std::prelude::HALF_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::prelude::HALF_TURN: number(deg) = 180deg
|
||||
```
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "std::prelude::QUARTER_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::prelude::QUARTER_TURN: number(deg) = 90deg
|
||||
```
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "std::prelude::THREE_QUARTER_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::prelude::THREE_QUARTER_TURN: number(deg) = 270deg
|
||||
```
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
title: "std::prelude::ZERO"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::prelude::ZERO: number = 0
|
||||
```
|
||||
|
||||
|
15
docs/kcl/const_std-HALF_TURN.md
Normal file
15
docs/kcl/const_std-HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "std::HALF_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::HALF_TURN: number(deg) = 180deg
|
||||
```
|
||||
|
||||
|
15
docs/kcl/const_std-QUARTER_TURN.md
Normal file
15
docs/kcl/const_std-QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "std::QUARTER_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::QUARTER_TURN: number(deg) = 90deg
|
||||
```
|
||||
|
||||
|
15
docs/kcl/const_std-THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_std-THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "std::THREE_QUARTER_TURN"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::THREE_QUARTER_TURN: number(deg) = 270deg
|
||||
```
|
||||
|
||||
|
15
docs/kcl/const_std-ZERO.md
Normal file
15
docs/kcl/const_std-ZERO.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
title: "std::ZERO"
|
||||
excerpt: ""
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
```js
|
||||
std::ZERO: number = 0
|
||||
```
|
||||
|
||||
|
@ -10,6 +10,10 @@ layout: manual
|
||||
* [Modules](kcl/modules)
|
||||
* [Known Issues](kcl/KNOWN-ISSUES)
|
||||
* **`std`**
|
||||
* [`HALF_TURN`](kcl/const_std-HALF_TURN)
|
||||
* [`QUARTER_TURN`](kcl/const_std-QUARTER_TURN)
|
||||
* [`THREE_QUARTER_TURN`](kcl/const_std-THREE_QUARTER_TURN)
|
||||
* [`ZERO`](kcl/const_std-ZERO)
|
||||
* [`abs`](kcl/abs)
|
||||
* [`acos`](kcl/acos)
|
||||
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
||||
@ -118,8 +122,3 @@ layout: manual
|
||||
* [`cos`](kcl/std-math-cos)
|
||||
* [`sin`](kcl/std-math-sin)
|
||||
* [`tan`](kcl/std-math-tan)
|
||||
* **`std::prelude`**
|
||||
* [`HALF_TURN`](kcl/const_std-prelude-HALF_TURN)
|
||||
* [`QUARTER_TURN`](kcl/const_std-prelude-QUARTER_TURN)
|
||||
* [`THREE_QUARTER_TURN`](kcl/const_std-prelude-THREE_QUARTER_TURN)
|
||||
* [`ZERO`](kcl/const_std-prelude-ZERO)
|
||||
|
@ -457,7 +457,7 @@ fn generate_const_from_kcl(cnst: &ConstData, file_name: String) -> Result<()> {
|
||||
});
|
||||
|
||||
let output = hbs.render("const", &data)?;
|
||||
expectorate::assert_contents(format!("../../../docs/kcl/const_{}.md", file_name), &output);
|
||||
expectorate::assert_contents(format!("../../../docs/kcl/{}.md", file_name), &output);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -49,12 +49,15 @@ impl CollectionVisitor {
|
||||
}
|
||||
}
|
||||
crate::parsing::ast::types::BodyItem::VariableDeclaration(var) if !var.visibility.is_default() => {
|
||||
let qual_name = if self.name == "prelude" {
|
||||
"std::".to_owned()
|
||||
} else {
|
||||
format!("std::{}::", self.name)
|
||||
};
|
||||
let mut dd = match var.kind {
|
||||
// TODO metadata for args
|
||||
VariableKind::Fn => DocData::Fn(FnData::from_ast(var, format!("std::{}::", self.name))),
|
||||
VariableKind::Const => {
|
||||
DocData::Const(ConstData::from_ast(var, format!("std::{}::", self.name)))
|
||||
}
|
||||
VariableKind::Fn => DocData::Fn(FnData::from_ast(var, qual_name)),
|
||||
VariableKind::Const => DocData::Const(ConstData::from_ast(var, qual_name)),
|
||||
};
|
||||
|
||||
// FIXME this association of metadata with items is pretty flaky.
|
||||
|
@ -15,7 +15,7 @@ pub(super) const SIGNIFICANT_ATTRS: [&str; 2] = [SETTINGS, NO_PRELUDE];
|
||||
pub(crate) const SETTINGS: &str = "settings";
|
||||
pub(crate) const SETTINGS_UNIT_LENGTH: &str = "defaultLengthUnit";
|
||||
pub(crate) const SETTINGS_UNIT_ANGLE: &str = "defaultAngleUnit";
|
||||
pub(super) const NO_PRELUDE: &str = "no_prelude";
|
||||
pub(super) const NO_PRELUDE: &str = "no_std";
|
||||
|
||||
pub(super) const IMPORT_FORMAT: &str = "format";
|
||||
pub(super) const IMPORT_FORMAT_VALUES: [&str; 9] = ["fbx", "gltf", "glb", "obj", "ply", "sldprt", "stp", "step", "stl"];
|
||||
|
@ -6,7 +6,7 @@ use itertools::{EitherOrBoth, Itertools};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use crate::{
|
||||
execution::{annotations, memory::ProgramMemory, ExecState, ExecutorSettings},
|
||||
execution::{annotations, memory::ProgramMemory, EnvironmentRef, ExecState, ExecutorSettings},
|
||||
parsing::ast::types::{Annotation, Node, Program},
|
||||
walk::Node as WalkNode,
|
||||
};
|
||||
@ -65,6 +65,7 @@ pub struct OldAstState {
|
||||
pub exec_state: ExecState,
|
||||
/// The last settings used for execution.
|
||||
pub settings: crate::execution::ExecutorSettings,
|
||||
pub result_env: EnvironmentRef,
|
||||
}
|
||||
|
||||
/// The result of a cache check.
|
||||
@ -267,7 +268,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, ctx, _) = parse_execute(new).await.unwrap();
|
||||
let (program, _, ctx, _) = parse_execute(new).await.unwrap();
|
||||
|
||||
let result = get_changed_program(
|
||||
CacheInformation {
|
||||
@ -310,7 +311,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program_old, ctx, _) = parse_execute(old).await.unwrap();
|
||||
let (program_old, _, ctx, _) = parse_execute(old).await.unwrap();
|
||||
|
||||
let program_new = crate::Program::parse_no_errs(new).unwrap();
|
||||
|
||||
@ -355,7 +356,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, ctx, _) = parse_execute(old).await.unwrap();
|
||||
let (program, _, ctx, _) = parse_execute(old).await.unwrap();
|
||||
|
||||
let program_new = crate::Program::parse_no_errs(new).unwrap();
|
||||
|
||||
@ -404,7 +405,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, ctx, _) = parse_execute(old).await.unwrap();
|
||||
let (program, _, ctx, _) = parse_execute(old).await.unwrap();
|
||||
|
||||
let program_new = crate::Program::parse_no_errs(new).unwrap();
|
||||
|
||||
@ -438,7 +439,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
let (program, _, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
|
||||
// Change the settings to cm.
|
||||
ctx.settings.units = crate::UnitLength::Cm;
|
||||
@ -480,7 +481,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
let (program, _, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
|
||||
// Change the settings.
|
||||
ctx.settings.show_grid = !ctx.settings.show_grid;
|
||||
@ -515,7 +516,7 @@ firstSketch = startSketchOn('XY')
|
||||
// Remove the end face for the extrusion.
|
||||
shell(firstSketch, faces = ['end'], thickness = 0.25)"#;
|
||||
|
||||
let (program, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
let (program, _, mut ctx, _) = parse_execute(new).await.unwrap();
|
||||
|
||||
// Change the settings.
|
||||
ctx.settings.highlight_edges = !ctx.settings.highlight_edges;
|
||||
@ -582,7 +583,7 @@ startSketchOn('XY')
|
||||
startSketchOn('XY')
|
||||
"#;
|
||||
|
||||
let (program, ctx, _) = parse_execute(old_code).await.unwrap();
|
||||
let (program, _, ctx, _) = parse_execute(old_code).await.unwrap();
|
||||
|
||||
let mut new_program = crate::Program::parse_no_errs(new_code).unwrap();
|
||||
new_program.compute_digest();
|
||||
|
@ -53,7 +53,7 @@ impl ExecutorContext {
|
||||
let mut no_prelude = false;
|
||||
for annotation in annotations {
|
||||
if annotation.name() == Some(annotations::SETTINGS) {
|
||||
if matches!(body_type, BodyType::Root(_)) {
|
||||
if matches!(body_type, BodyType::Root) {
|
||||
let old_units = exec_state.length_unit();
|
||||
exec_state.mod_local.settings.update_from_annotation(annotation)?;
|
||||
let new_units = exec_state.length_unit();
|
||||
@ -69,12 +69,12 @@ impl ExecutorContext {
|
||||
));
|
||||
}
|
||||
} else if annotation.name() == Some(annotations::NO_PRELUDE) {
|
||||
if matches!(body_type, BodyType::Root(_)) {
|
||||
if matches!(body_type, BodyType::Root) {
|
||||
no_prelude = true;
|
||||
} else {
|
||||
exec_state.err(CompilationError::err(
|
||||
annotation.as_source_range(),
|
||||
"Prelude can only be skipped at the top level scope of a file",
|
||||
"The standard library can only be skipped at the top level scope of a file",
|
||||
));
|
||||
}
|
||||
} else {
|
||||
@ -87,51 +87,56 @@ impl ExecutorContext {
|
||||
Ok(no_prelude)
|
||||
}
|
||||
|
||||
pub(super) async fn exec_module_body(
|
||||
&self,
|
||||
program: &Node<Program>,
|
||||
exec_state: &mut ExecState,
|
||||
exec_kind: ExecutionKind,
|
||||
preserve_mem: bool,
|
||||
) -> Result<(Option<KclValue>, EnvironmentRef), KclError> {
|
||||
let old_units = exec_state.length_unit();
|
||||
|
||||
let no_prelude = self
|
||||
.handle_annotations(program.inner_attrs.iter(), crate::execution::BodyType::Root, exec_state)
|
||||
.await?;
|
||||
|
||||
if !preserve_mem {
|
||||
exec_state.mut_memory().push_new_root_env(!no_prelude);
|
||||
}
|
||||
let original_execution = self.engine.replace_execution_kind(exec_kind).await;
|
||||
|
||||
let result = self
|
||||
.exec_block(program, exec_state, crate::execution::BodyType::Root)
|
||||
.await;
|
||||
|
||||
let new_units = exec_state.length_unit();
|
||||
let env_ref = if preserve_mem {
|
||||
exec_state.mut_memory().pop_and_preserve_env()
|
||||
} else {
|
||||
exec_state.mut_memory().pop_env()
|
||||
};
|
||||
if !exec_kind.is_isolated() && new_units != old_units {
|
||||
self.engine.set_units(old_units.into(), Default::default()).await?;
|
||||
}
|
||||
self.engine.replace_execution_kind(original_execution).await;
|
||||
|
||||
result.map(|result| (result, env_ref))
|
||||
}
|
||||
|
||||
/// Execute an AST's program.
|
||||
#[async_recursion]
|
||||
pub(super) async fn exec_program<'a>(
|
||||
pub(super) async fn exec_block<'a>(
|
||||
&'a self,
|
||||
program: NodeRef<'a, crate::parsing::ast::types::Program>,
|
||||
exec_state: &mut ExecState,
|
||||
body_type: BodyType,
|
||||
) -> Result<Option<KclValue>, KclError> {
|
||||
let no_prelude = self
|
||||
.handle_annotations(program.inner_attrs.iter(), body_type, exec_state)
|
||||
.await?;
|
||||
|
||||
if !no_prelude && body_type == BodyType::Root(true) {
|
||||
// Import std::prelude
|
||||
let prelude_range = SourceRange::from(program).start_as_range();
|
||||
let id = self
|
||||
.open_module(
|
||||
&ImportPath::Std {
|
||||
path: vec!["std".to_owned(), "prelude".to_owned()],
|
||||
},
|
||||
&[],
|
||||
exec_state,
|
||||
prelude_range,
|
||||
)
|
||||
.await?;
|
||||
let (module_memory, module_exports) = self
|
||||
.exec_module_for_items(id, exec_state, ExecutionKind::Isolated, prelude_range)
|
||||
.await
|
||||
.unwrap();
|
||||
for name in module_exports {
|
||||
let item = exec_state
|
||||
.memory()
|
||||
.get_from(&name, module_memory, prelude_range)
|
||||
.cloned()
|
||||
.unwrap();
|
||||
exec_state.mut_memory().add(name, item, prelude_range)?;
|
||||
}
|
||||
}
|
||||
|
||||
let mut last_expr = None;
|
||||
// Iterate over the body of the program.
|
||||
for statement in &program.body {
|
||||
match statement {
|
||||
BodyItem::ImportStatement(import_stmt) => {
|
||||
if !matches!(body_type, BodyType::Root(_)) {
|
||||
if !matches!(body_type, BodyType::Root) {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Imports are only supported at the top-level of a file.".to_owned(),
|
||||
source_ranges: vec![import_stmt.into()],
|
||||
@ -262,7 +267,7 @@ impl ExecutorContext {
|
||||
BodyItem::ReturnStatement(return_statement) => {
|
||||
let metadata = Metadata::from(return_statement);
|
||||
|
||||
if matches!(body_type, BodyType::Root(_)) {
|
||||
if matches!(body_type, BodyType::Root) {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Cannot return from outside a function.".to_owned(),
|
||||
source_ranges: vec![metadata.source_range],
|
||||
@ -292,7 +297,7 @@ impl ExecutorContext {
|
||||
}
|
||||
}
|
||||
|
||||
if matches!(body_type, BodyType::Root(_)) {
|
||||
if matches!(body_type, BodyType::Root) {
|
||||
// Flush the batch queue.
|
||||
self.engine
|
||||
.flush_batch(
|
||||
@ -307,7 +312,7 @@ impl ExecutorContext {
|
||||
Ok(last_expr)
|
||||
}
|
||||
|
||||
async fn open_module(
|
||||
pub(super) async fn open_module(
|
||||
&self,
|
||||
path: &ImportPath,
|
||||
attrs: &[Node<Annotation>],
|
||||
@ -357,7 +362,7 @@ impl ExecutorContext {
|
||||
}
|
||||
}
|
||||
|
||||
async fn exec_module_for_items(
|
||||
pub(super) async fn exec_module_for_items(
|
||||
&self,
|
||||
module_id: ModuleId,
|
||||
exec_state: &mut ExecState,
|
||||
@ -424,25 +429,14 @@ impl ExecutorContext {
|
||||
exec_kind: ExecutionKind,
|
||||
source_range: SourceRange,
|
||||
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
||||
let old_units = exec_state.length_unit();
|
||||
let mut local_state = ModuleState::new(&self.settings, path.std_path());
|
||||
exec_state.global.mod_loader.enter_module(path);
|
||||
let mut local_state = ModuleState::new(&self.settings, path.std_path());
|
||||
std::mem::swap(&mut exec_state.mod_local, &mut local_state);
|
||||
exec_state.mut_memory().push_new_root_env();
|
||||
let original_execution = self.engine.replace_execution_kind(exec_kind).await;
|
||||
|
||||
let result = self
|
||||
.exec_program(program, exec_state, crate::execution::BodyType::Root(true))
|
||||
.await;
|
||||
let result = self.exec_module_body(program, exec_state, exec_kind, false).await;
|
||||
|
||||
let new_units = exec_state.length_unit();
|
||||
std::mem::swap(&mut exec_state.mod_local, &mut local_state);
|
||||
let env_ref = exec_state.mut_memory().pop_env();
|
||||
exec_state.global.mod_loader.leave_module(path);
|
||||
if !exec_kind.is_isolated() && new_units != old_units {
|
||||
self.engine.set_units(old_units.into(), Default::default()).await?;
|
||||
}
|
||||
self.engine.replace_execution_kind(original_execution).await;
|
||||
|
||||
result
|
||||
.map_err(|err| {
|
||||
@ -460,7 +454,7 @@ impl ExecutorContext {
|
||||
})
|
||||
}
|
||||
})
|
||||
.map(|result| (result, env_ref, local_state.module_exports))
|
||||
.map(|(val, env)| (val, env, local_state.module_exports))
|
||||
}
|
||||
|
||||
#[async_recursion]
|
||||
@ -1483,7 +1477,7 @@ impl Node<IfExpression> {
|
||||
.await?
|
||||
.get_bool()?;
|
||||
if cond {
|
||||
let block_result = ctx.exec_program(&self.then_val, exec_state, BodyType::Block).await?;
|
||||
let block_result = ctx.exec_block(&self.then_val, exec_state, BodyType::Block).await?;
|
||||
// Block must end in an expression, so this has to be Some.
|
||||
// Enforced by the parser.
|
||||
// See https://github.com/KittyCAD/modeling-app/issues/4015
|
||||
@ -1503,7 +1497,7 @@ impl Node<IfExpression> {
|
||||
.await?
|
||||
.get_bool()?;
|
||||
if cond {
|
||||
let block_result = ctx.exec_program(&else_if.then_val, exec_state, BodyType::Block).await?;
|
||||
let block_result = ctx.exec_block(&else_if.then_val, exec_state, BodyType::Block).await?;
|
||||
// Block must end in an expression, so this has to be Some.
|
||||
// Enforced by the parser.
|
||||
// See https://github.com/KittyCAD/modeling-app/issues/4015
|
||||
@ -1512,7 +1506,7 @@ impl Node<IfExpression> {
|
||||
}
|
||||
|
||||
// Run the final `else` branch.
|
||||
ctx.exec_program(&self.final_else, exec_state, BodyType::Block)
|
||||
ctx.exec_block(&self.final_else, exec_state, BodyType::Block)
|
||||
.await
|
||||
.map(|expr| expr.unwrap())
|
||||
}
|
||||
@ -1745,7 +1739,7 @@ pub(crate) async fn call_user_defined_function(
|
||||
|
||||
// Execute the function body using the memory we just created.
|
||||
let result = ctx
|
||||
.exec_program(&function_expression.body, exec_state, BodyType::Block)
|
||||
.exec_block(&function_expression.body, exec_state, BodyType::Block)
|
||||
.await;
|
||||
let result = result.map(|_| {
|
||||
exec_state
|
||||
@ -1778,7 +1772,7 @@ pub(crate) async fn call_user_defined_function_kw(
|
||||
|
||||
// Execute the function body using the memory we just created.
|
||||
let result = ctx
|
||||
.exec_program(&function_expression.body, exec_state, BodyType::Block)
|
||||
.exec_block(&function_expression.body, exec_state, BodyType::Block)
|
||||
.await;
|
||||
let result = result.map(|_| {
|
||||
exec_state
|
||||
@ -1873,6 +1867,7 @@ mod test {
|
||||
}
|
||||
fn additional_program_memory(items: &[(String, KclValue)]) -> ProgramMemory {
|
||||
let mut program_memory = ProgramMemory::new();
|
||||
program_memory.init_for_tests();
|
||||
for (name, item) in items {
|
||||
program_memory
|
||||
.add(name.clone(), item.clone(), SourceRange::default())
|
||||
@ -1882,7 +1877,7 @@ mod test {
|
||||
}
|
||||
// Declare the test cases.
|
||||
for (test_name, params, args, expected) in [
|
||||
("empty", Vec::new(), Vec::new(), Ok(ProgramMemory::new())),
|
||||
("empty", Vec::new(), Vec::new(), Ok(additional_program_memory(&[]))),
|
||||
(
|
||||
"all params required, and all given, should be OK",
|
||||
vec![req_param("x")],
|
||||
@ -1950,6 +1945,7 @@ mod test {
|
||||
});
|
||||
let args = args.into_iter().map(Arg::synthetic).collect();
|
||||
let mut exec_state = ExecState::new(&Default::default());
|
||||
exec_state.mut_memory().init_for_tests();
|
||||
let actual = assign_args_to_params(func_expr, args, &mut exec_state).map(|_| exec_state.global.memory);
|
||||
assert_eq!(
|
||||
actual, expected,
|
||||
|
@ -161,6 +161,8 @@ pub(crate) struct ProgramMemory {
|
||||
environments: Vec<Environment>,
|
||||
/// Invariant: current_env.1.is_none()
|
||||
current_env: EnvironmentRef,
|
||||
/// Memory for the std prelude.
|
||||
std: Option<EnvironmentRef>,
|
||||
/// Invariant: forall er in call_stack: er.1.is_none()
|
||||
call_stack: Vec<EnvironmentRef>,
|
||||
/// Statistics about the memory, should not be used for anything other than meta-info.
|
||||
@ -195,22 +197,41 @@ impl ProgramMemory {
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
environments: vec![Environment::new_root()],
|
||||
current_env: EnvironmentRef::root(),
|
||||
environments: vec![],
|
||||
current_env: EnvironmentRef::dummy(),
|
||||
std: None,
|
||||
call_stack: Vec::new(),
|
||||
stats: MemoryStats::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the env var used for the standard library prelude.
|
||||
pub fn set_std(&mut self, std: EnvironmentRef) {
|
||||
self.std = Some(std);
|
||||
}
|
||||
|
||||
/// Whether this memory still needs to be initialised with its standard library prelude.
|
||||
pub fn requires_std(&self) -> bool {
|
||||
self.std.is_none()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
/// If you're using ProgramMemory directly for testing it must be initialized first.
|
||||
pub fn init_for_tests(&mut self) {
|
||||
self.push_new_root_env(false);
|
||||
self.std = Some(self.current_env);
|
||||
}
|
||||
|
||||
/// Push a new (standard KCL) stack frame on to the call stack.
|
||||
///
|
||||
/// `parent` is the environment where the function being called is declared (not the caller's
|
||||
/// environment, which is probably `self.current_env`).
|
||||
pub fn push_new_env_for_call(&mut self, parent: EnvironmentRef) {
|
||||
assert!(parent.1 .0 < usize::MAX);
|
||||
self.stats.env_count += 1;
|
||||
|
||||
self.call_stack.push(self.current_env);
|
||||
let new_env = Environment::new(parent);
|
||||
let new_env = Environment::new(parent, false);
|
||||
self.current_env = EnvironmentRef(self.environments.len(), SnapshotRef::none());
|
||||
self.environments.push(new_env);
|
||||
}
|
||||
@ -221,6 +242,7 @@ impl ProgramMemory {
|
||||
pub fn push_new_env_for_scope(&mut self) {
|
||||
self.stats.env_count += 1;
|
||||
|
||||
// We want to use the current env as the parent.
|
||||
// We need to snapshot in case there is a function decl in the new scope.
|
||||
let snapshot = self.snapshot();
|
||||
self.push_new_env_for_call(snapshot);
|
||||
@ -245,15 +267,27 @@ impl ProgramMemory {
|
||||
/// Push a new stack frame on to the call stack with no connection to a parent environment.
|
||||
///
|
||||
/// Suitable for executing a separate module.
|
||||
pub fn push_new_root_env(&mut self) {
|
||||
/// Precondition: include_prelude -> !self.requires_std()
|
||||
pub fn push_new_root_env(&mut self, include_prelude: bool) {
|
||||
self.stats.env_count += 1;
|
||||
|
||||
self.call_stack.push(self.current_env);
|
||||
let new_env = Environment::new_root();
|
||||
let new_env = if include_prelude {
|
||||
Environment::new(self.std.unwrap(), true)
|
||||
} else {
|
||||
Environment::new_no_prelude()
|
||||
};
|
||||
self.current_env = EnvironmentRef(self.environments.len(), SnapshotRef::none());
|
||||
self.environments.push(new_env);
|
||||
}
|
||||
|
||||
/// Push a previously used environment on to the call stack.
|
||||
pub fn restore_env(&mut self, env: EnvironmentRef) {
|
||||
assert!(env.1.is_none());
|
||||
self.call_stack.push(self.current_env);
|
||||
self.current_env = env;
|
||||
}
|
||||
|
||||
/// Pop a frame from the call stack and return a reference to the popped environment. The popped
|
||||
/// environment is preserved if it may be referenced (so the returned reference will remain valid).
|
||||
///
|
||||
@ -263,7 +297,7 @@ impl ProgramMemory {
|
||||
let old = self.current_env;
|
||||
self.current_env = self.call_stack.pop().unwrap();
|
||||
|
||||
if !old.is_rust_env() {
|
||||
if !old.skip_env() {
|
||||
self.environments[old.index()].compact();
|
||||
|
||||
if self.environments[old.index()].is_empty() {
|
||||
@ -292,7 +326,10 @@ impl ProgramMemory {
|
||||
/// Merges the specified environment with the current environment, rewriting any environment refs
|
||||
/// taking snapshots into account. Deletes (if possible) or clears the squashed environment.
|
||||
pub fn squash_env(&mut self, old: EnvironmentRef) {
|
||||
assert!(!old.is_rust_env());
|
||||
assert!(!old.skip_env());
|
||||
if self.current_env.skip_env() {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut old_env = if old.index() == self.environments.len() - 1 {
|
||||
// Common case and efficient
|
||||
@ -301,7 +338,10 @@ impl ProgramMemory {
|
||||
} else {
|
||||
// Should basically never happen in normal usage.
|
||||
self.stats.skipped_env_gcs += 1;
|
||||
std::mem::replace(&mut self.environments[old.index()], Environment::new(self.current_env))
|
||||
std::mem::replace(
|
||||
&mut self.environments[old.index()],
|
||||
Environment::new(self.current_env, false),
|
||||
)
|
||||
};
|
||||
|
||||
// Map of any old env refs to the current env.
|
||||
@ -367,12 +407,12 @@ impl ProgramMemory {
|
||||
|
||||
/// Get a key from the first KCL (i.e., non-Rust) stack frame on the call stack.
|
||||
pub fn get_from_call_stack(&self, key: &str, source_range: SourceRange) -> Result<&KclValue, KclError> {
|
||||
if !self.current_env.is_rust_env() {
|
||||
if !self.current_env.skip_env() {
|
||||
return self.get(key, source_range);
|
||||
}
|
||||
|
||||
for env in self.call_stack.iter().rev() {
|
||||
if !env.is_rust_env() {
|
||||
if !env.skip_env() {
|
||||
return self.get_from(key, *env, source_range);
|
||||
}
|
||||
}
|
||||
@ -408,7 +448,18 @@ impl ProgramMemory {
|
||||
&'a self,
|
||||
pred: impl Fn(&KclValue) -> bool + 'a,
|
||||
) -> impl Iterator<Item = (&'a String, &'a KclValue)> {
|
||||
self.environments[self.current_env.index()].find_all_by(pred)
|
||||
self.find_all_in_env(self.current_env, pred)
|
||||
}
|
||||
|
||||
/// Iterate over all key/value pairs in the specified environment which satisfy the provided
|
||||
/// predicate.
|
||||
pub fn find_all_in_env<'a>(
|
||||
&'a self,
|
||||
env: EnvironmentRef,
|
||||
pred: impl Fn(&KclValue) -> bool + 'a,
|
||||
) -> impl Iterator<Item = (&'a String, &'a KclValue)> {
|
||||
assert!(!env.skip_env());
|
||||
self.environments[env.index()].find_all_by(pred)
|
||||
}
|
||||
|
||||
/// Walk all values accessible from any environment in the call stack.
|
||||
@ -418,7 +469,7 @@ impl ProgramMemory {
|
||||
pub fn walk_call_stack(&self) -> impl Iterator<Item = &KclValue> {
|
||||
let mut cur_env = self.current_env;
|
||||
let mut stack_index = self.call_stack.len();
|
||||
while cur_env.is_rust_env() {
|
||||
while cur_env.skip_env() {
|
||||
stack_index -= 1;
|
||||
cur_env = self.call_stack[stack_index];
|
||||
}
|
||||
@ -455,7 +506,7 @@ impl<'a> Iterator for CallStackIterator<'a> {
|
||||
self.cur_values.as_ref()?;
|
||||
|
||||
// Loop over each frame in the call stack.
|
||||
loop {
|
||||
'outer: loop {
|
||||
// Loop over each environment in the tree of scopes of which the current stack frame is a leaf.
|
||||
loop {
|
||||
// `unwrap` is OK since we check for None at the start of the function, and if we update
|
||||
@ -478,11 +529,13 @@ impl<'a> Iterator for CallStackIterator<'a> {
|
||||
loop {
|
||||
self.stack_index -= 1;
|
||||
let env_ref = self.mem.call_stack[self.stack_index];
|
||||
// We'll eventually hit this condition since we can't start executing in Rust.
|
||||
if !env_ref.is_rust_env() {
|
||||
|
||||
if !env_ref.skip_env() {
|
||||
self.cur_env = env_ref;
|
||||
self.init_iter();
|
||||
break;
|
||||
} else if self.stack_index == 0 {
|
||||
break 'outer;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -507,15 +560,15 @@ impl PartialEq for ProgramMemory {
|
||||
pub struct EnvironmentRef(usize, SnapshotRef);
|
||||
|
||||
impl EnvironmentRef {
|
||||
fn root() -> Self {
|
||||
Self(0, SnapshotRef::none())
|
||||
fn dummy() -> Self {
|
||||
Self(usize::MAX, SnapshotRef(usize::MAX))
|
||||
}
|
||||
|
||||
fn index(&self) -> usize {
|
||||
self.0
|
||||
}
|
||||
|
||||
fn is_rust_env(&self) -> bool {
|
||||
fn skip_env(&self) -> bool {
|
||||
self.0 == usize::MAX
|
||||
}
|
||||
}
|
||||
@ -576,6 +629,7 @@ mod env {
|
||||
snapshots: Vec<Snapshot>,
|
||||
// An outer scope, if one exists.
|
||||
parent: Option<EnvironmentRef>,
|
||||
is_root_env: bool,
|
||||
}
|
||||
|
||||
impl fmt::Display for Environment {
|
||||
@ -624,28 +678,31 @@ mod env {
|
||||
}
|
||||
|
||||
impl Environment {
|
||||
/// Create a new root environment (new program or module)
|
||||
pub(super) fn new_root() -> Self {
|
||||
Self {
|
||||
bindings: IndexMap::new(),
|
||||
snapshots: Vec::new(),
|
||||
parent: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new child environment, parent points to it's surrounding lexical scope.
|
||||
pub(super) fn new(parent: EnvironmentRef) -> Self {
|
||||
assert!(!parent.is_rust_env());
|
||||
/// Create a new environment, parent points to it's surrounding lexical scope or the std
|
||||
/// env if it's a root scope.
|
||||
pub(super) fn new(parent: EnvironmentRef, is_root_env: bool) -> Self {
|
||||
assert!(!parent.skip_env());
|
||||
Self {
|
||||
bindings: IndexMap::new(),
|
||||
snapshots: Vec::new(),
|
||||
parent: Some(parent),
|
||||
is_root_env,
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new root environment with no prelude as parent.
|
||||
pub(super) fn new_no_prelude() -> Self {
|
||||
Self {
|
||||
bindings: IndexMap::new(),
|
||||
snapshots: Vec::new(),
|
||||
parent: None,
|
||||
is_root_env: true,
|
||||
}
|
||||
}
|
||||
|
||||
// True if the env is empty and not a root env.
|
||||
pub(super) fn is_empty(&self) -> bool {
|
||||
self.snapshots.is_empty() && self.bindings.is_empty() && self.parent.is_some()
|
||||
self.snapshots.is_empty() && self.bindings.is_empty() && !self.is_root_env
|
||||
}
|
||||
|
||||
/// Possibly compress this environment by deleting the memory.
|
||||
@ -657,7 +714,7 @@ mod env {
|
||||
/// See module docs for more details.
|
||||
pub(super) fn compact(&mut self) {
|
||||
// Don't compress if there might be a closure or import referencing us.
|
||||
if !self.snapshots.is_empty() || self.parent.is_none() {
|
||||
if !self.snapshots.is_empty() || self.is_root_env {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -881,6 +938,7 @@ mod test {
|
||||
// Follows test_pattern_transform_function_cannot_access_future_definitions
|
||||
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
let transform = mem.snapshot();
|
||||
mem.add("transform".to_owned(), val(1), sr()).unwrap();
|
||||
let layer = mem.snapshot();
|
||||
@ -898,6 +956,7 @@ mod test {
|
||||
#[test]
|
||||
fn simple_snapshot() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
assert_get(mem, "a", 1);
|
||||
mem.add("a".to_owned(), val(2), sr()).unwrap_err();
|
||||
@ -915,6 +974,7 @@ mod test {
|
||||
#[test]
|
||||
fn multiple_snapshot() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
|
||||
let sn1 = mem.snapshot();
|
||||
@ -938,6 +998,7 @@ mod test {
|
||||
#[test]
|
||||
fn simple_call_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
|
||||
@ -962,6 +1023,7 @@ mod test {
|
||||
#[test]
|
||||
fn multiple_call_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
|
||||
@ -986,10 +1048,11 @@ mod test {
|
||||
#[test]
|
||||
fn root_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
|
||||
mem.push_new_root_env();
|
||||
mem.push_new_root_env(false);
|
||||
mem.get("b", sr()).unwrap_err();
|
||||
mem.add("b".to_owned(), val(4), sr()).unwrap();
|
||||
mem.add("c".to_owned(), val(5), sr()).unwrap();
|
||||
@ -1008,6 +1071,7 @@ mod test {
|
||||
#[test]
|
||||
fn rust_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
let sn = mem.snapshot();
|
||||
@ -1026,6 +1090,7 @@ mod test {
|
||||
#[test]
|
||||
fn deep_call_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
|
||||
@ -1058,6 +1123,7 @@ mod test {
|
||||
#[test]
|
||||
fn snap_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
|
||||
let sn = mem.snapshot();
|
||||
@ -1078,6 +1144,7 @@ mod test {
|
||||
#[test]
|
||||
fn snap_env2() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
|
||||
let sn1 = mem.snapshot();
|
||||
@ -1104,6 +1171,7 @@ mod test {
|
||||
#[test]
|
||||
fn snap_env_two_updates() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
|
||||
let sn1 = mem.snapshot();
|
||||
@ -1146,6 +1214,7 @@ mod test {
|
||||
#[test]
|
||||
fn snap_env_clear() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
@ -1169,6 +1238,7 @@ mod test {
|
||||
#[test]
|
||||
fn snap_env_clear2() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
mem.add("b".to_owned(), val(3), sr()).unwrap();
|
||||
let sn1 = mem.snapshot();
|
||||
@ -1199,6 +1269,7 @@ mod test {
|
||||
#[test]
|
||||
fn squash_env() {
|
||||
let mem = &mut ProgramMemory::new();
|
||||
mem.init_for_tests();
|
||||
mem.add("a".to_owned(), val(1), sr()).unwrap();
|
||||
let sn1 = mem.snapshot();
|
||||
mem.push_new_env_for_call(sn1);
|
||||
|
@ -21,14 +21,13 @@ use crate::{
|
||||
execution::{
|
||||
artifact::build_artifact_graph,
|
||||
cache::{CacheInformation, CacheResult},
|
||||
memory::ProgramMemory,
|
||||
},
|
||||
fs::FileManager,
|
||||
parsing::ast::types::{Expr, Node, NodeRef, Program},
|
||||
parsing::ast::types::{Expr, ImportPath, Node, NodeRef, Program},
|
||||
settings::types::UnitLength,
|
||||
source_range::SourceRange,
|
||||
std::StdLib,
|
||||
CompilationError, ExecError, KclErrorWithOutputs,
|
||||
CompilationError, ExecError, ExecutionKind, KclErrorWithOutputs,
|
||||
};
|
||||
|
||||
pub use artifact::{Artifact, ArtifactCommand, ArtifactGraph, ArtifactId};
|
||||
@ -150,7 +149,7 @@ pub struct TagEngineInfo {
|
||||
|
||||
#[derive(Debug, Copy, Clone, Deserialize, Serialize, PartialEq)]
|
||||
pub enum BodyType {
|
||||
Root(bool),
|
||||
Root,
|
||||
Block,
|
||||
}
|
||||
|
||||
@ -488,6 +487,14 @@ impl ExecutorContext {
|
||||
.await
|
||||
}
|
||||
|
||||
async fn prepare_mem(&self, exec_state: &mut ExecState) -> Result<(), KclErrorWithOutputs> {
|
||||
self.eval_prelude(exec_state, SourceRange::synthetic())
|
||||
.await
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
exec_state.mut_memory().push_new_root_env(true);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn run_mock(
|
||||
&self,
|
||||
program: crate::Program,
|
||||
@ -497,58 +504,60 @@ impl ExecutorContext {
|
||||
assert!(self.is_mock());
|
||||
|
||||
let mut exec_state = ExecState::new(&self.settings);
|
||||
let (mut mem, init_mem) = if use_prev_memory {
|
||||
cache::read_old_memory()
|
||||
.await
|
||||
.map(|m| (m, false))
|
||||
.unwrap_or_else(|| (ProgramMemory::new(), true))
|
||||
if use_prev_memory {
|
||||
match cache::read_old_memory().await {
|
||||
Some(mem) => *exec_state.mut_memory() = mem,
|
||||
None => self.prepare_mem(&mut exec_state).await?,
|
||||
}
|
||||
} else {
|
||||
(ProgramMemory::new(), true)
|
||||
self.prepare_mem(&mut exec_state).await?
|
||||
};
|
||||
|
||||
// Add any extra variables to memory
|
||||
let mut to_restore = Vec::new();
|
||||
for (k, v) in variables {
|
||||
to_restore.push((k.clone(), mem.get(&k, SourceRange::default()).ok().cloned()));
|
||||
mem.add(k, v, SourceRange::synthetic())
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
}
|
||||
{
|
||||
let mem = exec_state.mut_memory();
|
||||
|
||||
// Push a scope so that old variables can be overwritten (since we might be re-executing some
|
||||
// part of the scene).
|
||||
mem.push_new_env_for_scope();
|
||||
|
||||
*exec_state.mut_memory() = mem;
|
||||
// Add any extra variables to memory (we want to remove these variables after execution, but
|
||||
// can't do this using scopes because we want to keep the results of computation in other cases).
|
||||
for (k, v) in variables {
|
||||
to_restore.push((k.clone(), mem.get(&k, SourceRange::default()).ok().cloned()));
|
||||
mem.add(k, v, SourceRange::synthetic())
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
}
|
||||
}
|
||||
|
||||
self.inner_run(&program.ast, &mut exec_state, init_mem).await?;
|
||||
let result = self.inner_run(&program.ast, &mut exec_state, true).await?;
|
||||
|
||||
// Restore any temporary variables, then save any newly created variables back to
|
||||
// memory in case another run wants to use them. Note this is just saved to the preserved
|
||||
// memory, not to the exec_state which is not cached for mock execution.
|
||||
let mut mem = exec_state.memory().clone();
|
||||
|
||||
let top = mem.pop_and_preserve_env();
|
||||
mem.squash_env(result.0);
|
||||
for (k, v) in to_restore {
|
||||
match v {
|
||||
Some(v) => mem.insert_or_update(k, v),
|
||||
None => mem.clear(k),
|
||||
}
|
||||
}
|
||||
mem.squash_env(top);
|
||||
|
||||
cache::write_old_memory(mem).await;
|
||||
|
||||
let outcome = exec_state.to_mock_wasm_outcome();
|
||||
let outcome = exec_state.to_mock_wasm_outcome(result.0);
|
||||
Ok(outcome)
|
||||
}
|
||||
|
||||
pub async fn run_with_caching(&self, program: crate::Program) -> Result<ExecOutcome, KclErrorWithOutputs> {
|
||||
assert!(!self.is_mock());
|
||||
|
||||
let (program, mut exec_state, init_mem) = if let Some(OldAstState {
|
||||
let (program, mut exec_state, preserve_mem) = if let Some(OldAstState {
|
||||
ast: old_ast,
|
||||
exec_state: old_state,
|
||||
exec_state: mut old_state,
|
||||
settings: old_settings,
|
||||
result_env,
|
||||
}) = cache::read_old_ast().await
|
||||
{
|
||||
let old = CacheInformation {
|
||||
@ -591,17 +600,18 @@ impl ExecutorContext {
|
||||
ast: old_ast,
|
||||
exec_state: old_state.clone(),
|
||||
settings: self.settings.clone(),
|
||||
result_env,
|
||||
})
|
||||
.await;
|
||||
|
||||
return Ok(old_state.to_wasm_outcome());
|
||||
return Ok(old_state.to_wasm_outcome(result_env));
|
||||
}
|
||||
(true, program.ast)
|
||||
}
|
||||
CacheResult::NoAction(false) => return Ok(old_state.to_wasm_outcome()),
|
||||
CacheResult::NoAction(false) => return Ok(old_state.to_wasm_outcome(result_env)),
|
||||
};
|
||||
|
||||
let exec_state = if clear_scene {
|
||||
let (exec_state, preserve_mem) = if clear_scene {
|
||||
// Pop the execution state, since we are starting fresh.
|
||||
let mut exec_state = old_state;
|
||||
exec_state.reset(&self.settings);
|
||||
@ -612,38 +622,40 @@ impl ExecutorContext {
|
||||
.await
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
|
||||
exec_state
|
||||
(exec_state, false)
|
||||
} else {
|
||||
old_state
|
||||
old_state.mut_memory().restore_env(result_env);
|
||||
(old_state, true)
|
||||
};
|
||||
|
||||
(program, exec_state, clear_scene)
|
||||
(program, exec_state, preserve_mem)
|
||||
} else {
|
||||
let mut exec_state = ExecState::new(&self.settings);
|
||||
self.send_clear_scene(&mut exec_state, Default::default())
|
||||
.await
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
(program.ast, exec_state, true)
|
||||
(program.ast, exec_state, false)
|
||||
};
|
||||
|
||||
let result = self.inner_run(&program, &mut exec_state, init_mem).await;
|
||||
let result = self.inner_run(&program, &mut exec_state, preserve_mem).await;
|
||||
|
||||
if result.is_err() {
|
||||
cache::bust_cache().await;
|
||||
}
|
||||
|
||||
// Throw the error.
|
||||
result?;
|
||||
let result = result?;
|
||||
|
||||
// Save this as the last successful execution to the cache.
|
||||
cache::write_old_ast(OldAstState {
|
||||
ast: program,
|
||||
exec_state: exec_state.clone(),
|
||||
settings: self.settings.clone(),
|
||||
result_env: result.0,
|
||||
})
|
||||
.await;
|
||||
|
||||
Ok(exec_state.to_wasm_outcome())
|
||||
Ok(exec_state.to_wasm_outcome(result.0))
|
||||
}
|
||||
|
||||
/// Perform the execution of a program.
|
||||
@ -656,7 +668,7 @@ impl ExecutorContext {
|
||||
&self,
|
||||
program: &crate::Program,
|
||||
exec_state: &mut ExecState,
|
||||
) -> Result<Option<ModelingSessionData>, KclError> {
|
||||
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclError> {
|
||||
self.run_with_ui_outputs(program, exec_state)
|
||||
.await
|
||||
.map_err(|e| e.into())
|
||||
@ -673,11 +685,11 @@ impl ExecutorContext {
|
||||
&self,
|
||||
program: &crate::Program,
|
||||
exec_state: &mut ExecState,
|
||||
) -> Result<Option<ModelingSessionData>, KclErrorWithOutputs> {
|
||||
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
|
||||
self.send_clear_scene(exec_state, Default::default())
|
||||
.await
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
self.inner_run(&program.ast, exec_state, true).await
|
||||
self.inner_run(&program.ast, exec_state, false).await
|
||||
}
|
||||
|
||||
/// Perform the execution of a program. Accept all possible parameters and
|
||||
@ -686,8 +698,8 @@ impl ExecutorContext {
|
||||
&self,
|
||||
program: &Node<Program>,
|
||||
exec_state: &mut ExecState,
|
||||
init_mem: bool,
|
||||
) -> Result<Option<ModelingSessionData>, KclErrorWithOutputs> {
|
||||
preserve_mem: bool,
|
||||
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
|
||||
let _stats = crate::log::LogPerfStats::new("Interpretation");
|
||||
|
||||
// Re-apply the settings, in case the cache was busted.
|
||||
@ -696,7 +708,8 @@ impl ExecutorContext {
|
||||
.await
|
||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
|
||||
self.execute_and_build_graph(program, exec_state, init_mem)
|
||||
let env_ref = self
|
||||
.execute_and_build_graph(program, exec_state, preserve_mem)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
KclErrorWithOutputs::new(
|
||||
@ -708,7 +721,9 @@ impl ExecutorContext {
|
||||
})?;
|
||||
|
||||
if !self.is_mock() {
|
||||
cache::write_old_memory(exec_state.memory().clone()).await;
|
||||
let mut mem = exec_state.memory().clone();
|
||||
mem.restore_env(env_ref);
|
||||
cache::write_old_memory(mem).await;
|
||||
}
|
||||
|
||||
crate::log::log(format!(
|
||||
@ -716,7 +731,7 @@ impl ExecutorContext {
|
||||
exec_state.memory().stats
|
||||
));
|
||||
let session_data = self.engine.get_session_data().await;
|
||||
Ok(session_data)
|
||||
Ok((env_ref, session_data))
|
||||
}
|
||||
|
||||
/// Execute an AST's program and build auxiliary outputs like the artifact
|
||||
@ -725,11 +740,18 @@ impl ExecutorContext {
|
||||
&self,
|
||||
program: NodeRef<'_, crate::parsing::ast::types::Program>,
|
||||
exec_state: &mut ExecState,
|
||||
init_mem: bool,
|
||||
) -> Result<Option<KclValue>, KclError> {
|
||||
preserve_mem: bool,
|
||||
) -> Result<EnvironmentRef, KclError> {
|
||||
// Don't early return! We need to build other outputs regardless of
|
||||
// whether execution failed.
|
||||
let exec_result = self.exec_program(program, exec_state, BodyType::Root(init_mem)).await;
|
||||
|
||||
self.eval_prelude(exec_state, SourceRange::from(program).start_as_range())
|
||||
.await?;
|
||||
|
||||
let exec_result = self
|
||||
.exec_module_body(program, exec_state, ExecutionKind::Normal, preserve_mem)
|
||||
.await;
|
||||
|
||||
// Move the artifact commands and responses to simplify cache management
|
||||
// and error creation.
|
||||
exec_state
|
||||
@ -749,7 +771,7 @@ impl ExecutorContext {
|
||||
) {
|
||||
Ok(artifact_graph) => {
|
||||
exec_state.global.artifact_graph = artifact_graph;
|
||||
exec_result
|
||||
exec_result.map(|(_, env_ref)| env_ref)
|
||||
}
|
||||
Err(err) => {
|
||||
// Prefer the exec error.
|
||||
@ -758,6 +780,30 @@ impl ExecutorContext {
|
||||
}
|
||||
}
|
||||
|
||||
/// 'Import' std::prelude as the outermost scope.
|
||||
async fn eval_prelude(&self, exec_state: &mut ExecState, source_range: SourceRange) -> Result<(), KclError> {
|
||||
if exec_state.memory().requires_std() {
|
||||
let id = self
|
||||
.open_module(
|
||||
&ImportPath::Std {
|
||||
path: vec!["std".to_owned(), "prelude".to_owned()],
|
||||
},
|
||||
&[],
|
||||
exec_state,
|
||||
source_range,
|
||||
)
|
||||
.await?;
|
||||
let (module_memory, _) = self
|
||||
.exec_module_for_items(id, exec_state, ExecutionKind::Isolated, source_range)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
exec_state.mut_memory().set_std(module_memory);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Update the units for the executor.
|
||||
pub(crate) fn update_units(&mut self, units: UnitLength) {
|
||||
self.settings.units = units;
|
||||
@ -809,7 +855,7 @@ impl ExecutorContext {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
async fn parse_execute(code: &str) -> Result<(crate::Program, ExecutorContext, ExecState)> {
|
||||
async fn parse_execute(code: &str) -> Result<(crate::Program, EnvironmentRef, ExecutorContext, ExecState)> {
|
||||
let program = crate::Program::parse_no_errs(code)?;
|
||||
|
||||
let ctx = ExecutorContext {
|
||||
@ -820,9 +866,9 @@ async fn parse_execute(code: &str) -> Result<(crate::Program, ExecutorContext, E
|
||||
context_type: ContextType::Mock,
|
||||
};
|
||||
let mut exec_state = ExecState::new(&ctx.settings);
|
||||
ctx.run(&program, &mut exec_state).await?;
|
||||
let result = ctx.run(&program, &mut exec_state).await?;
|
||||
|
||||
Ok((program, ctx, exec_state))
|
||||
Ok((program, result.0, ctx, exec_state))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@ -834,14 +880,14 @@ mod tests {
|
||||
|
||||
/// Convenience function to get a JSON value from memory and unwrap.
|
||||
#[track_caller]
|
||||
fn mem_get_json(memory: &ProgramMemory, name: &str) -> KclValue {
|
||||
memory.get(name, SourceRange::default()).unwrap().to_owned()
|
||||
fn mem_get_json(memory: &ProgramMemory, env: EnvironmentRef, name: &str) -> KclValue {
|
||||
memory.get_from(name, env, SourceRange::default()).unwrap().to_owned()
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_execute_warn() {
|
||||
let text = "@blah";
|
||||
let (_, _, exec_state) = parse_execute(text).await.unwrap();
|
||||
let (_, _, _, exec_state) = parse_execute(text).await.unwrap();
|
||||
let errs = exec_state.errors();
|
||||
assert_eq!(errs.len(), 1);
|
||||
assert_eq!(errs[0].severity, crate::errors::Severity::Warning);
|
||||
@ -855,7 +901,7 @@ mod tests {
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_warn_on_deprecated() {
|
||||
let text = "p = pi()";
|
||||
let (_, _, exec_state) = parse_execute(text).await.unwrap();
|
||||
let (_, _, _, exec_state) = parse_execute(text).await.unwrap();
|
||||
let errs = exec_state.errors();
|
||||
assert_eq!(errs.len(), 1);
|
||||
assert_eq!(errs[0].severity, crate::errors::Severity::Warning);
|
||||
@ -1229,6 +1275,14 @@ const answer = returnX()"#;
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_override_prelude() {
|
||||
let text = "PI = 3.0";
|
||||
let (_, _, _, exec_state) = parse_execute(text).await.unwrap();
|
||||
let errs = exec_state.errors();
|
||||
assert!(errs.is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_cannot_shebang_in_fn() {
|
||||
let ast = r#"
|
||||
@ -1291,48 +1345,51 @@ let shape = layer() |> patternTransform(instances = 10, transform = transform)
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_math_execute_with_functions() {
|
||||
let ast = r#"const myVar = 2 + min(100, -1 + legLen(5, 3))"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(5.0, mem_get_json(exec_state.memory(), "myVar").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(5.0, mem_get_json(exec_state.memory(), env, "myVar").as_f64().unwrap());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_math_execute() {
|
||||
let ast = r#"const myVar = 1 + 2 * (3 - 4) / -5 + 6"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(7.4, mem_get_json(exec_state.memory(), "myVar").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(7.4, mem_get_json(exec_state.memory(), env, "myVar").as_f64().unwrap());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_math_execute_start_negative() {
|
||||
let ast = r#"const myVar = -5 + 6"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(1.0, mem_get_json(exec_state.memory(), "myVar").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(1.0, mem_get_json(exec_state.memory(), env, "myVar").as_f64().unwrap());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_math_execute_with_pi() {
|
||||
let ast = r#"const myVar = PI * 2"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(
|
||||
std::f64::consts::TAU,
|
||||
mem_get_json(exec_state.memory(), "myVar").as_f64().unwrap()
|
||||
mem_get_json(exec_state.memory(), env, "myVar").as_f64().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_math_define_decimal_without_leading_zero() {
|
||||
let ast = r#"let thing = .4 + 7"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(7.4, mem_get_json(exec_state.memory(), "thing").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(7.4, mem_get_json(exec_state.memory(), env, "thing").as_f64().unwrap());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_unit_default() {
|
||||
let ast = r#"const inMm = 25.4 * mm()
|
||||
const inInches = 1.0 * inch()"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(25.4, mem_get_json(exec_state.memory(), "inMm").as_f64().unwrap());
|
||||
assert_eq!(25.4, mem_get_json(exec_state.memory(), "inInches").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(25.4, mem_get_json(exec_state.memory(), env, "inMm").as_f64().unwrap());
|
||||
assert_eq!(
|
||||
25.4,
|
||||
mem_get_json(exec_state.memory(), env, "inInches").as_f64().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@ -1340,9 +1397,15 @@ const inInches = 1.0 * inch()"#;
|
||||
let ast = r#"@settings(defaultLengthUnit = inch)
|
||||
const inMm = 25.4 * mm()
|
||||
const inInches = 1.0 * inch()"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(1.0, mem_get_json(exec_state.memory(), "inMm").as_f64().unwrap().round());
|
||||
assert_eq!(1.0, mem_get_json(exec_state.memory(), "inInches").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(
|
||||
1.0,
|
||||
mem_get_json(exec_state.memory(), env, "inMm").as_f64().unwrap().round()
|
||||
);
|
||||
assert_eq!(
|
||||
1.0,
|
||||
mem_get_json(exec_state.memory(), env, "inInches").as_f64().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@ -1350,9 +1413,15 @@ const inInches = 1.0 * inch()"#;
|
||||
let ast = r#"@settings(defaultLengthUnit = in)
|
||||
const inMm = 25.4 * mm()
|
||||
const inInches = 2.0 * inch()"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(1.0, mem_get_json(exec_state.memory(), "inMm").as_f64().unwrap().round());
|
||||
assert_eq!(2.0, mem_get_json(exec_state.memory(), "inInches").as_f64().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(
|
||||
1.0,
|
||||
mem_get_json(exec_state.memory(), env, "inMm").as_f64().unwrap().round()
|
||||
);
|
||||
assert_eq!(
|
||||
2.0,
|
||||
mem_get_json(exec_state.memory(), env, "inInches").as_f64().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@ -1391,11 +1460,17 @@ fn check = (x) => {
|
||||
}
|
||||
check(false)
|
||||
"#;
|
||||
let (_, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(false, mem_get_json(exec_state.memory(), "notTrue").as_bool().unwrap());
|
||||
assert_eq!(true, mem_get_json(exec_state.memory(), "notFalse").as_bool().unwrap());
|
||||
assert_eq!(true, mem_get_json(exec_state.memory(), "c").as_bool().unwrap());
|
||||
assert_eq!(false, mem_get_json(exec_state.memory(), "d").as_bool().unwrap());
|
||||
let (_, env, _, exec_state) = parse_execute(ast).await.unwrap();
|
||||
assert_eq!(
|
||||
false,
|
||||
mem_get_json(exec_state.memory(), env, "notTrue").as_bool().unwrap()
|
||||
);
|
||||
assert_eq!(
|
||||
true,
|
||||
mem_get_json(exec_state.memory(), env, "notFalse").as_bool().unwrap()
|
||||
);
|
||||
assert_eq!(true, mem_get_json(exec_state.memory(), env, "c").as_bool().unwrap());
|
||||
assert_eq!(false, mem_get_json(exec_state.memory(), env, "d").as_bool().unwrap());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@ -1749,4 +1824,44 @@ let w = f() + f()
|
||||
// Ensure the settings are as expected.
|
||||
assert_eq!(settings_state, ctx.settings);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn mock_variables() {
|
||||
let ctx = ExecutorContext::new_mock().await;
|
||||
|
||||
let program = crate::Program::parse_no_errs("x = y").unwrap();
|
||||
let mut vars = IndexMap::new();
|
||||
vars.insert(
|
||||
"y".to_owned(),
|
||||
KclValue::Number {
|
||||
value: 2.0,
|
||||
ty: kcl_value::NumericType::Unknown,
|
||||
meta: Vec::new(),
|
||||
},
|
||||
);
|
||||
let result = ctx.run_mock(program, true, vars).await.unwrap();
|
||||
assert_eq!(result.variables.get("x").unwrap().as_f64().unwrap(), 2.0);
|
||||
cache::read_old_memory()
|
||||
.await
|
||||
.unwrap()
|
||||
.get("y", SourceRange::default())
|
||||
.unwrap_err();
|
||||
|
||||
let program2 = crate::Program::parse_no_errs("z = x + 1").unwrap();
|
||||
let result = ctx.run_mock(program2, true, IndexMap::new()).await.unwrap();
|
||||
assert_eq!(result.variables.get("z").unwrap().as_f64().unwrap(), 3.0);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn mock_after_not_mock() {
|
||||
let ctx = ExecutorContext::new_with_default_client(UnitLength::Mm).await.unwrap();
|
||||
let program = crate::Program::parse_no_errs("x = 2").unwrap();
|
||||
let result = ctx.run_with_caching(program).await.unwrap();
|
||||
assert_eq!(result.variables.get("x").unwrap().as_f64().unwrap(), 2.0);
|
||||
|
||||
let ctx2 = ExecutorContext::new_mock().await;
|
||||
let program2 = crate::Program::parse_no_errs("z = x + 1").unwrap();
|
||||
let result = ctx2.run_mock(program2, true, IndexMap::new()).await.unwrap();
|
||||
assert_eq!(result.variables.get("z").unwrap().as_f64().unwrap(), 3.0);
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ use crate::{
|
||||
CompilationError,
|
||||
};
|
||||
|
||||
use super::EnvironmentRef;
|
||||
|
||||
/// State for executing a program.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ExecState {
|
||||
@ -108,13 +110,13 @@ impl ExecState {
|
||||
/// Convert to execution outcome when running in WebAssembly. We want to
|
||||
/// reduce the amount of data that crosses the WASM boundary as much as
|
||||
/// possible.
|
||||
pub fn to_wasm_outcome(self) -> ExecOutcome {
|
||||
pub fn to_wasm_outcome(self, main_ref: EnvironmentRef) -> ExecOutcome {
|
||||
// Fields are opt-in so that we don't accidentally leak private internal
|
||||
// state when we add more to ExecState.
|
||||
ExecOutcome {
|
||||
variables: self
|
||||
.memory()
|
||||
.find_all_in_current_env(|_| true)
|
||||
.find_all_in_env(main_ref, |_| true)
|
||||
.map(|(k, v)| (k.clone(), v.clone()))
|
||||
.collect(),
|
||||
operations: self.mod_local.operations,
|
||||
@ -125,13 +127,13 @@ impl ExecState {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_mock_wasm_outcome(self) -> ExecOutcome {
|
||||
pub fn to_mock_wasm_outcome(self, main_ref: EnvironmentRef) -> ExecOutcome {
|
||||
// Fields are opt-in so that we don't accidentally leak private internal
|
||||
// state when we add more to ExecState.
|
||||
ExecOutcome {
|
||||
variables: self
|
||||
.memory()
|
||||
.find_all_in_current_env(|_| true)
|
||||
.find_all_in_env(main_ref, |_| true)
|
||||
.map(|(k, v)| (k.clone(), v.clone()))
|
||||
.collect(),
|
||||
operations: Default::default(),
|
||||
|
@ -93,7 +93,7 @@ async fn execute(test_name: &str, render_to_png: bool) {
|
||||
)
|
||||
.await;
|
||||
match exec_res {
|
||||
Ok((exec_state, png)) => {
|
||||
Ok((exec_state, env_ref, png)) => {
|
||||
let fail_path_str = format!("tests/{test_name}/execution_error.snap");
|
||||
let fail_path = Path::new(&fail_path_str);
|
||||
if std::fs::exists(fail_path).unwrap() {
|
||||
@ -102,7 +102,7 @@ async fn execute(test_name: &str, render_to_png: bool) {
|
||||
if render_to_png {
|
||||
twenty_twenty::assert_image(format!("tests/{test_name}/rendered_model.png"), &png, 0.99);
|
||||
}
|
||||
let outcome = exec_state.to_wasm_outcome();
|
||||
let outcome = exec_state.to_wasm_outcome(env_ref);
|
||||
assert_common_snapshots(
|
||||
test_name,
|
||||
outcome.operations,
|
||||
|
@ -5,7 +5,7 @@ use std::path::PathBuf;
|
||||
use crate::{
|
||||
engine::new_zoo_client,
|
||||
errors::ExecErrorWithState,
|
||||
execution::{ExecState, ExecutorContext, ExecutorSettings},
|
||||
execution::{EnvironmentRef, ExecState, ExecutorContext, ExecutorSettings},
|
||||
settings::types::UnitLength,
|
||||
ConnectionError, ExecError, KclError, KclErrorWithOutputs, Program,
|
||||
};
|
||||
@ -28,7 +28,7 @@ pub async fn execute_and_snapshot(
|
||||
let program = Program::parse_no_errs(code).map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
let res = do_execute_and_snapshot(&ctx, program)
|
||||
.await
|
||||
.map(|(_state, snap)| snap)
|
||||
.map(|(_, _, snap)| snap)
|
||||
.map_err(|err| err.error);
|
||||
ctx.close().await;
|
||||
res
|
||||
@ -40,7 +40,7 @@ pub async fn execute_and_snapshot_ast(
|
||||
ast: Program,
|
||||
units: UnitLength,
|
||||
current_file: Option<PathBuf>,
|
||||
) -> Result<(ExecState, image::DynamicImage), ExecErrorWithState> {
|
||||
) -> Result<(ExecState, EnvironmentRef, image::DynamicImage), ExecErrorWithState> {
|
||||
let ctx = new_context(units, true, current_file).await?;
|
||||
let res = do_execute_and_snapshot(&ctx, ast).await;
|
||||
ctx.close().await;
|
||||
@ -51,12 +51,12 @@ pub async fn execute_and_snapshot_no_auth(
|
||||
code: &str,
|
||||
units: UnitLength,
|
||||
current_file: Option<PathBuf>,
|
||||
) -> Result<image::DynamicImage, ExecError> {
|
||||
) -> Result<(image::DynamicImage, EnvironmentRef), ExecError> {
|
||||
let ctx = new_context(units, false, current_file).await?;
|
||||
let program = Program::parse_no_errs(code).map_err(KclErrorWithOutputs::no_outputs)?;
|
||||
let res = do_execute_and_snapshot(&ctx, program)
|
||||
.await
|
||||
.map(|(_state, snap)| snap)
|
||||
.map(|(_, env_ref, snap)| (snap, env_ref))
|
||||
.map_err(|err| err.error);
|
||||
ctx.close().await;
|
||||
res
|
||||
@ -65,9 +65,10 @@ pub async fn execute_and_snapshot_no_auth(
|
||||
async fn do_execute_and_snapshot(
|
||||
ctx: &ExecutorContext,
|
||||
program: Program,
|
||||
) -> Result<(ExecState, image::DynamicImage), ExecErrorWithState> {
|
||||
) -> Result<(ExecState, EnvironmentRef, image::DynamicImage), ExecErrorWithState> {
|
||||
let mut exec_state = ExecState::new(&ctx.settings);
|
||||
ctx.run_with_ui_outputs(&program, &mut exec_state)
|
||||
let result = ctx
|
||||
.run_with_ui_outputs(&program, &mut exec_state)
|
||||
.await
|
||||
.map_err(|err| ExecErrorWithState::new(err.into(), exec_state.clone()))?;
|
||||
for e in exec_state.errors() {
|
||||
@ -94,7 +95,7 @@ async fn do_execute_and_snapshot(
|
||||
|
||||
ctx.close().await;
|
||||
|
||||
Ok((exec_state, img))
|
||||
Ok((exec_state, result.0, img))
|
||||
}
|
||||
|
||||
pub async fn new_context(
|
||||
|
@ -1,4 +1,4 @@
|
||||
@no_prelude
|
||||
@no_std
|
||||
|
||||
/// The value of `pi`, Archimedes’ constant (π).
|
||||
///
|
||||
|
@ -1,4 +1,7 @@
|
||||
@no_prelude
|
||||
@no_std
|
||||
|
||||
// Note that everything in the prelude is treated as exported.
|
||||
|
||||
export import * from "std::math"
|
||||
|
||||
export ZERO = 0
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing add_lots.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"f": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -154,30 +15,6 @@ description: Variables in memory after executing add_lots.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"x": {
|
||||
"type": "Number",
|
||||
"value": 10100.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing angled_line.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -579,29 +440,5 @@ description: Variables in memory after executing angled_line.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing array_elem_pop.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"arr": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -210,18 +83,6 @@ description: Variables in memory after executing array_elem_pop.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"new_arr1": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -328,29 +189,5 @@ description: Variables in memory after executing array_elem_pop.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing array_elem_push.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"arr": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -210,18 +83,6 @@ description: Variables in memory after executing array_elem_push.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"new_arr1": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -447,29 +308,5 @@ description: Variables in memory after executing array_elem_push.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing array_range_expr.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"five": {
|
||||
"type": "Number",
|
||||
"value": 5.0,
|
||||
@ -582,30 +443,6 @@ description: Variables in memory after executing array_range_expr.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"zero": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
|
@ -3,169 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing array_range_negative_expr.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xs": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
|
@ -1,148 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing artifact_graph_example_code1.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extrude001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -1313,18 +1173,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -2228,17 +2076,5 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing artifact_graph_example_code_no_3d.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"rectangleSegmentA001": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
@ -286,18 +147,6 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch003": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -799,17 +648,5 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing artifact_graph_example_code_offset_planes.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"offsetPlane001": {
|
||||
"type": "Plane",
|
||||
"value": {
|
||||
@ -238,18 +99,6 @@ description: Variables in memory after executing artifact_graph_example_code_off
|
||||
"__meta": []
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch002": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -347,17 +196,5 @@ description: Variables in memory after executing artifact_graph_example_code_off
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing artifact_graph_sketch_on_face_etc.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extrude001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -2932,18 +2793,6 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -5377,17 +5226,5 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -305,6 +305,18 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"unit": "in"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
33,
|
||||
5
|
||||
],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "in"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
@ -423,6 +435,18 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "mm"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
@ -552,5 +576,17 @@ description: Artifact commands assembly_non_default_units.kcl
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "mm"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing assembly_non_default_units.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"other1": {
|
||||
"type": "Module",
|
||||
"value": 3,
|
||||
@ -167,29 +28,5 @@ description: Variables in memory after executing assembly_non_default_units.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing basic_fillet_cube_close_opposite.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -609,30 +470,6 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -537,30 +398,6 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing basic_fillet_cube_next_adjacent.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -674,30 +535,6 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing basic_fillet_cube_previous_adjacent.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -674,30 +535,6 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -537,30 +398,6 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing big_number_angle_to_match_length_x.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -477,29 +338,5 @@ description: Variables in memory after executing big_number_angle_to_match_lengt
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing big_number_angle_to_match_length_y.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -477,29 +338,5 @@ description: Variables in memory after executing big_number_angle_to_match_lengt
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing boolean_logical_and.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"a": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -256,18 +129,6 @@ description: Variables in memory after executing boolean_logical_and.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"d": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -309,29 +170,5 @@ description: Variables in memory after executing boolean_logical_and.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing boolean_logical_multiple.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"i": {
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
@ -253,29 +114,5 @@ description: Variables in memory after executing boolean_logical_multiple.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing boolean_logical_or.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"a": {
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
@ -256,18 +129,6 @@ description: Variables in memory after executing boolean_logical_or.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"d": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -309,29 +170,5 @@ description: Variables in memory after executing boolean_logical_or.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,157 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing circle_three_point.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -296,17 +145,5 @@ description: Variables in memory after executing circle_three_point.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing circular_pattern3d_a_pattern.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"exampleSketch": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -68004,29 +67865,5 @@ description: Variables in memory after executing circular_pattern3d_a_pattern.kc
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -2,168 +2,4 @@
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing comparisons.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing computed_var.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"arr": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -232,18 +105,6 @@ description: Variables in memory after executing computed_var.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"i": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
@ -359,30 +220,6 @@ description: Variables in memory after executing computed_var.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ten": {
|
||||
"type": "Number",
|
||||
"value": 10.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing cube.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -409,29 +270,5 @@ description: Variables in memory after executing cube.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing double_map_fn.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"increment": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -154,30 +15,6 @@ description: Variables in memory after executing double_map_fn.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xs": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing fillet-and-shell.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"border": {
|
||||
"type": "Number",
|
||||
"value": 4.0,
|
||||
@ -831,18 +704,6 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"edge1": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
@ -1473,30 +1334,6 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"widthBetweenScrews": {
|
||||
"type": "Number",
|
||||
"value": 23.0,
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing function_sketch.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"box": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -142,18 +15,6 @@ description: Variables in memory after executing function_sketch.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fnBox": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -386,29 +247,5 @@ description: Variables in memory after executing function_sketch.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing function_sketch_with_position.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"box": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -142,42 +15,6 @@ description: Variables in memory after executing function_sketch_with_position.k
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thing": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing helix_ccw.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -278,29 +139,5 @@ description: Variables in memory after executing helix_ccw.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing helix_simple.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"edge001": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
@ -363,29 +224,5 @@ description: Variables in memory after executing helix_simple.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing i_shape.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"brace_base": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -862,18 +735,6 @@ description: Variables in memory after executing i_shape.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"d_wrist_circumference": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -2318,30 +2179,6 @@ description: Variables in memory after executing i_shape.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "Number",
|
||||
"value": 68.4,
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing if_else.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"a": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
@ -195,41 +68,5 @@ description: Variables in memory after executing if_else.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,169 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_constant.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"three": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
|
@ -280,17 +280,5 @@ description: Artifact commands import_cycle1.kcl
|
||||
"object_id": "[uuid]",
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
33,
|
||||
0
|
||||
],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "in"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -3,169 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_export.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"three": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_foreign.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Module",
|
||||
"value": 3,
|
||||
@ -170,29 +31,5 @@ description: Variables in memory after executing import_foreign.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_function_not_sketch.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"one": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -154,30 +15,6 @@ description: Variables in memory after executing import_function_not_sketch.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"two": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_glob.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"foo": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -154,30 +15,6 @@ description: Variables in memory after executing import_glob.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"three": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_side_effect.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"foo": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -153,29 +14,5 @@ description: Variables in memory after executing import_side_effect.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing import_whole.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"bar": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -267,18 +140,6 @@ description: Variables in memory after executing import_whole.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"foo": {
|
||||
"type": "Module",
|
||||
"value": 3,
|
||||
@ -291,29 +152,5 @@ description: Variables in memory after executing import_whole.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing index_of_array.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"arr": {
|
||||
"type": "Array",
|
||||
"value": [
|
||||
@ -210,18 +83,6 @@ description: Variables in memory after executing index_of_array.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"i": {
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
@ -287,29 +148,5 @@ description: Variables in memory after executing index_of_array.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,157 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing kittycad_svg.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"svg": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -9827,17 +9676,5 @@ description: Variables in memory after executing kittycad_svg.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing kw_fn.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"add": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -142,18 +15,6 @@ description: Variables in memory after executing kw_fn.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"increment": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -166,30 +27,6 @@ description: Variables in memory after executing kw_fn.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"three": {
|
||||
"type": "Number",
|
||||
"value": 3.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing kw_fn_with_defaults.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"increment": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -154,30 +15,6 @@ description: Variables in memory after executing kw_fn_with_defaults.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"twentyOne": {
|
||||
"type": "Number",
|
||||
"value": 21.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing linear_pattern3d_a_pattern.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"exampleSketch": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -13264,29 +13125,5 @@ description: Variables in memory after executing linear_pattern3d_a_pattern.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,148 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing mike_stress_test.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -34273,29 +34133,5 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing neg_xz_plane.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -340,29 +201,5 @@ description: Variables in memory after executing neg_xz_plane.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,23 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing parametric.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"FOS": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -42,116 +25,6 @@ description: Variables in memory after executing parametric.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"bracket": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -453,18 +326,6 @@ description: Variables in memory after executing parametric.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"distance": {
|
||||
"type": "Number",
|
||||
"value": 6.0,
|
||||
@ -575,30 +436,6 @@ description: Variables in memory after executing parametric.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thickness": {
|
||||
"type": "Number",
|
||||
"value": 0.1851640199545103,
|
||||
|
@ -3,23 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing parametric_with_tan_arc.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"FOS": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -42,116 +25,6 @@ description: Variables in memory after executing parametric_with_tan_arc.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"bracket": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -531,18 +404,6 @@ description: Variables in memory after executing parametric_with_tan_arc.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"distance": {
|
||||
"type": "Number",
|
||||
"value": 12.0,
|
||||
@ -654,30 +515,6 @@ description: Variables in memory after executing parametric_with_tan_arc.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thickness": {
|
||||
"type": "Number",
|
||||
"value": 0.36181361349331637,
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing pentagon_fillet_sugar.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"a": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
@ -1718,18 +1591,6 @@ description: Variables in memory after executing pentagon_fillet_sugar.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"p": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -3537,30 +3398,6 @@ description: Variables in memory after executing pentagon_fillet_sugar.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"triangleHeight": {
|
||||
"type": "Number",
|
||||
"value": 200.0,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing pipe_as_arg.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -422,30 +283,6 @@ description: Variables in memory after executing pipe_as_arg.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"width": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
|
@ -3,23 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing poop_chute.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"Fx": {
|
||||
"type": "Number",
|
||||
"value": 0.5,
|
||||
@ -64,116 +47,6 @@ description: Variables in memory after executing poop_chute.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"back_length": {
|
||||
"type": "Number",
|
||||
"value": 7.0,
|
||||
@ -218,18 +91,6 @@ description: Variables in memory after executing poop_chute.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"exit_height": {
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
@ -1079,18 +940,6 @@ description: Variables in memory after executing poop_chute.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -2147,18 +1996,6 @@ description: Variables in memory after executing poop_chute.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"wall_thickness": {
|
||||
"type": "Number",
|
||||
"value": 0.125,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing property_of_object.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"obj": {
|
||||
"type": "Object",
|
||||
"value": {
|
||||
@ -372,29 +233,5 @@ description: Variables in memory after executing property_of_object.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -25,145 +25,6 @@ description: Variables in memory after executing riddle_small.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ox": {
|
||||
"type": "Number",
|
||||
"value": -26.0,
|
||||
@ -499,18 +360,6 @@ description: Variables in memory after executing riddle_small.kcl
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"t": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -523,18 +372,6 @@ description: Variables in memory after executing riddle_small.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xs": {
|
||||
"type": "Number",
|
||||
"value": 205804.0,
|
||||
|
@ -1,148 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch-on-chamfer-two-times-different-order.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extrude001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -2429,18 +2289,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -4862,17 +4710,5 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,148 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch-on-chamfer-two-times.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extrude001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -2429,18 +2289,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -4862,17 +4710,5 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,169 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_in_object.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"here": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
@ -1051,29 +912,5 @@ description: Variables in memory after executing sketch_on_face.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face_after_fillets_referencing_face.kcl
|
||||
snapshot_kind: text
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"FOS": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -43,24 +25,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"L": {
|
||||
"type": "Number",
|
||||
"value": 12.0,
|
||||
@ -113,98 +77,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"bracket": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -740,18 +612,6 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"filletR": {
|
||||
"type": "Number",
|
||||
"value": 0.25,
|
||||
@ -1029,18 +889,6 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -1832,18 +1680,6 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"thickness": {
|
||||
"type": "Number",
|
||||
"value": 0.32071349029490925,
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face_circle_tagged.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -905,29 +766,5 @@ description: Variables in memory after executing sketch_on_face_circle_tagged.kc
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face_end.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -852,29 +713,5 @@ description: Variables in memory after executing sketch_on_face_end.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face_end_negative_extrude.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -852,29 +713,5 @@ description: Variables in memory after executing sketch_on_face_end_negative_ext
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing sketch_on_face_start.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cube": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
@ -1085,29 +946,5 @@ description: Variables in memory after executing sketch_on_face_start.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing ssi_pattern.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extrude001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -574,18 +435,6 @@ description: Variables in memory after executing ssi_pattern.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sketch001": {
|
||||
"type": "Sketch",
|
||||
"value": {
|
||||
@ -15967,17 +15816,5 @@ description: Variables in memory after executing ssi_pattern.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing tan_arc_x_line.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"angleOffset": {
|
||||
"type": "Number",
|
||||
"value": 135.0,
|
||||
@ -333,18 +206,6 @@ description: Variables in memory after executing tan_arc_x_line.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"r": {
|
||||
"type": "Number",
|
||||
"value": 1.0,
|
||||
@ -367,18 +228,6 @@ description: Variables in memory after executing tan_arc_x_line.kcl
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"startX": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
@ -422,17 +271,5 @@ description: Variables in memory after executing tan_arc_x_line.kcl
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,133 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing tangential_arc.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"boxSketch": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -333,41 +206,5 @@ description: Variables in memory after executing tangential_arc.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,145 +3,6 @@ source: kcl/src/simulation_tests.rs
|
||||
description: Variables in memory after executing xz_plane.kcl
|
||||
---
|
||||
{
|
||||
"E": {
|
||||
"type": "Number",
|
||||
"value": 2.718281828459045,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
651,
|
||||
689,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
109,
|
||||
115,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"PI": {
|
||||
"type": "Number",
|
||||
"value": 3.141592653589793,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
290,
|
||||
328,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 90.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
84,
|
||||
89,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"TAU": {
|
||||
"type": "Number",
|
||||
"value": 6.283185307179586,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Count"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1042,
|
||||
1080,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"THREE_QUARTER_TURN": {
|
||||
"type": "Number",
|
||||
"value": 270.0,
|
||||
"ty": {
|
||||
"type": "Known",
|
||||
"type": "Angle",
|
||||
"type": "Degrees"
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
144,
|
||||
150,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ZERO": {
|
||||
"type": "Number",
|
||||
"value": 0.0,
|
||||
"ty": {
|
||||
"type": "Default",
|
||||
"len": {
|
||||
"type": "Mm"
|
||||
},
|
||||
"angle": {
|
||||
"type": "Degrees"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
60,
|
||||
61,
|
||||
1
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cos": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1446,
|
||||
1478,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"part001": {
|
||||
"type": "Solid",
|
||||
"value": {
|
||||
@ -340,29 +201,5 @@ description: Variables in memory after executing xz_plane.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"sin": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1844,
|
||||
1876,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tan": {
|
||||
"type": "Function",
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
2234,
|
||||
2266,
|
||||
2
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
//! Cache testing framework.
|
||||
|
||||
use anyhow::Result;
|
||||
use kcl_lib::{bust_cache, ExecError, ExecOutcome};
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -12,29 +11,33 @@ struct Variation<'a> {
|
||||
async fn cache_test(
|
||||
test_name: &str,
|
||||
variations: Vec<Variation<'_>>,
|
||||
) -> Result<Vec<(String, image::DynamicImage, ExecOutcome)>> {
|
||||
) -> Vec<(String, image::DynamicImage, ExecOutcome)> {
|
||||
let first = variations
|
||||
.first()
|
||||
.ok_or_else(|| anyhow::anyhow!("No variations provided for test '{}'", test_name))?;
|
||||
.ok_or_else(|| anyhow::anyhow!("No variations provided for test '{}'", test_name))
|
||||
.unwrap();
|
||||
|
||||
let mut ctx = kcl_lib::ExecutorContext::new_with_client(first.settings.clone(), None, None).await?;
|
||||
let mut ctx = kcl_lib::ExecutorContext::new_with_client(first.settings.clone(), None, None)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
bust_cache().await;
|
||||
let mut img_results = Vec::new();
|
||||
for (index, variation) in variations.iter().enumerate() {
|
||||
let program = kcl_lib::Program::parse_no_errs(variation.code)?;
|
||||
let program = kcl_lib::Program::parse_no_errs(variation.code).unwrap();
|
||||
|
||||
// set the new settings.
|
||||
ctx.settings = variation.settings.clone();
|
||||
|
||||
let outcome = ctx.run_with_caching(program).await?;
|
||||
let snapshot_png_bytes = ctx.prepare_snapshot().await?.contents.0;
|
||||
let outcome = ctx.run_with_caching(program).await.unwrap();
|
||||
let snapshot_png_bytes = ctx.prepare_snapshot().await.unwrap().contents.0;
|
||||
|
||||
// Decode the snapshot, return it.
|
||||
let img = image::ImageReader::new(std::io::Cursor::new(snapshot_png_bytes))
|
||||
.with_guessed_format()
|
||||
.map_err(|e| ExecError::BadPng(e.to_string()))
|
||||
.and_then(|x| x.decode().map_err(|e| ExecError::BadPng(e.to_string())))?;
|
||||
.and_then(|x| x.decode().map_err(|e| ExecError::BadPng(e.to_string())))
|
||||
.unwrap();
|
||||
// Save the snapshot.
|
||||
let path = crate::assert_out(&format!("cache_{}_{}", test_name, index), &img);
|
||||
|
||||
@ -43,7 +46,7 @@ async fn cache_test(
|
||||
|
||||
ctx.close().await;
|
||||
|
||||
Ok(img_results)
|
||||
img_results
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
@ -77,8 +80,7 @@ async fn kcl_test_cache_change_units_changes_output() {
|
||||
},
|
||||
],
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
let first = result.first().unwrap();
|
||||
let second = result.last().unwrap();
|
||||
@ -117,8 +119,7 @@ async fn kcl_test_cache_change_grid_visualizes_grid_off_to_on() {
|
||||
},
|
||||
],
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
let first = result.first().unwrap();
|
||||
let second = result.last().unwrap();
|
||||
@ -157,8 +158,7 @@ async fn kcl_test_cache_change_grid_visualizes_grid_on_to_off() {
|
||||
},
|
||||
],
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
let first = result.first().unwrap();
|
||||
let second = result.last().unwrap();
|
||||
@ -197,8 +197,7 @@ async fn kcl_test_cache_change_highlight_edges_changes_visual() {
|
||||
},
|
||||
],
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
let first = result.first().unwrap();
|
||||
let second = result.last().unwrap();
|
||||
@ -236,8 +235,7 @@ extrude(sketch001, length = 4)
|
||||
},
|
||||
],
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.await;
|
||||
|
||||
let first = &result.first().unwrap().2;
|
||||
let second = &result.last().unwrap().2;
|
||||
|
@ -11,8 +11,8 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, Modu
|
||||
let program = Program::parse_no_errs(code)?;
|
||||
let ctx = kcl_lib::ExecutorContext::new_with_default_client(Default::default()).await?;
|
||||
let mut exec_state = ExecState::new(&ctx.settings);
|
||||
ctx.run(&program, &mut exec_state).await?;
|
||||
let outcome = exec_state.to_wasm_outcome();
|
||||
let result = ctx.run(&program, &mut exec_state).await?;
|
||||
let outcome = exec_state.to_wasm_outcome(result.0);
|
||||
|
||||
// We need to get the sketch ID.
|
||||
let KclValue::Sketch { value: sketch } = outcome.variables.get(name).unwrap() else {
|
||||
|
Reference in New Issue
Block a user