Make ProgramMemory and the internals of ExecState private (#5364)

* Make ProgramMemory and the internals of ExecState private

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* snapshot test changes

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-02-13 11:59:57 +13:00
committed by GitHub
parent b9862baed0
commit 59d0e079a1
97 changed files with 153926 additions and 156268 deletions

View File

@ -9,7 +9,6 @@ import {
modify_ast_for_sketch_wasm,
is_points_ccw,
get_tangential_arc_to_info,
program_memory_init,
make_default_planes,
coredump,
toml_stringify,
@ -43,9 +42,6 @@ import { DeepPartial } from 'lib/types'
import { ProjectConfiguration } from 'wasm-lib/kcl/bindings/ProjectConfiguration'
import { Sketch } from '../wasm-lib/kcl/bindings/Sketch'
import { ExecOutcome as RustExecOutcome } from 'wasm-lib/kcl/bindings/ExecOutcome'
import { ProgramMemory as RawProgramMemory } from '../wasm-lib/kcl/bindings/ProgramMemory'
import { EnvironmentRef } from '../wasm-lib/kcl/bindings/EnvironmentRef'
import { Environment } from '../wasm-lib/kcl/bindings/Environment'
import { Node } from 'wasm-lib/kcl/bindings/Node'
import { CompilationError } from 'wasm-lib/kcl/bindings/CompilationError'
import { SourceRange } from 'wasm-lib/kcl/bindings/SourceRange'

View File

@ -17,7 +17,6 @@ import {
modify_ast_for_sketch_wasm as ModifyAstForSketch,
is_points_ccw as IsPointsCcw,
get_tangential_arc_to_info as GetTangentialArcToInfo,
program_memory_init as ProgramMemoryInit,
make_default_planes as MakeDefaultPlanes,
coredump as CoreDump,
toml_stringify as TomlStringify,
@ -80,9 +79,6 @@ export const get_tangential_arc_to_info: typeof GetTangentialArcToInfo = (
) => {
return getModule().get_tangential_arc_to_info(...args)
}
export const program_memory_init: typeof ProgramMemoryInit = (...args) => {
return getModule().program_memory_init(...args)
}
export const make_default_planes: typeof MakeDefaultPlanes = (...args) => {
return getModule().make_default_planes(...args)
}

View File

@ -442,7 +442,7 @@ fn do_stdlib_inner(
#const_struct
fn #boxed_fn_name_ident(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<dyn std::future::Future<Output = anyhow::Result<crate::execution::KclValue, crate::errors::KclError>> + Send + '_>,
@ -831,7 +831,7 @@ fn generate_code_block_test(fn_name: &str, code_block: &str, index: usize) -> pr
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx.run(&program, &mut crate::ExecState::new(&ctx.settings)).await {
if let Err(e) = ctx.run(&program, &mut crate::execution::ExecState::new(&ctx.settings)).await {
return Err(miette::Report::new(crate::errors::Report {
error: e,
filename: format!("{}{}", #fn_name, #index),

View File

@ -15,7 +15,10 @@ mod test_examples_someFn {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -67,7 +70,7 @@ pub(crate) struct SomeFn {}
#[doc = "Std lib function: someFn\nDocs"]
pub(crate) const SomeFn: SomeFn = SomeFn {};
fn boxed_someFn(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -15,7 +15,10 @@ mod test_examples_someFn {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -67,7 +70,7 @@ pub(crate) struct SomeFn {}
#[doc = "Std lib function: someFn\nDocs"]
pub(crate) const SomeFn: SomeFn = SomeFn {};
fn boxed_someFn(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_show {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -73,7 +76,10 @@ mod test_examples_show {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -125,7 +131,7 @@ pub(crate) struct Show {}
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
pub(crate) const Show: Show = Show {};
fn boxed_show(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_show {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Show {}
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
pub(crate) const Show: Show = Show {};
fn boxed_show(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -17,7 +17,10 @@ mod test_examples_my_func {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -74,7 +77,10 @@ mod test_examples_my_func {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -126,7 +132,7 @@ pub(crate) struct MyFunc {}
#[doc = "Std lib function: myFunc\nThis is some function.\nIt does shit."]
pub(crate) const MyFunc: MyFunc = MyFunc {};
fn boxed_my_func(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -17,7 +17,10 @@ mod test_examples_line_to {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -74,7 +77,10 @@ mod test_examples_line_to {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -126,7 +132,7 @@ pub(crate) struct LineTo {}
#[doc = "Std lib function: lineTo\nThis is some function.\nIt does shit."]
pub(crate) const LineTo: LineTo = LineTo {};
fn boxed_line_to(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_min {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -73,7 +76,10 @@ mod test_examples_min {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -125,7 +131,7 @@ pub(crate) struct Min {}
#[doc = "Std lib function: min\nThis is some function.\nIt does shit."]
pub(crate) const Min: Min = Min {};
fn boxed_min(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_show {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Show {}
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
pub(crate) const Show: Show = Show {};
fn boxed_show(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_import {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Import {}
#[doc = "Std lib function: import\nThis is some function.\nIt does shit."]
pub(crate) const Import: Import = Import {};
fn boxed_import(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_import {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Import {}
#[doc = "Std lib function: import\nThis is some function.\nIt does shit."]
pub(crate) const Import: Import = Import {};
fn boxed_import(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_import {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Import {}
#[doc = "Std lib function: import\nThis is some function.\nIt does shit."]
pub(crate) const Import: Import = Import {};
fn boxed_import(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -16,7 +16,10 @@ mod test_examples_show {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -68,7 +71,7 @@ pub(crate) struct Show {}
#[doc = "Std lib function: show\nThis is some function.\nIt does shit."]
pub(crate) const Show: Show = Show {};
fn boxed_show(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -15,7 +15,10 @@ mod test_examples_some_function {
context_type: crate::execution::ContextType::Mock,
};
if let Err(e) = ctx
.run(&program, &mut crate::ExecState::new(&ctx.settings))
.run(
&program,
&mut crate::execution::ExecState::new(&ctx.settings),
)
.await
{
return Err(miette::Report::new(crate::errors::Report {
@ -67,7 +70,7 @@ pub(crate) struct SomeFunction {}
#[doc = "Std lib function: someFunction\nDocs"]
pub(crate) const SomeFunction: SomeFunction = SomeFunction {};
fn boxed_some_function(
exec_state: &mut crate::ExecState,
exec_state: &mut crate::execution::ExecState,
args: crate::std::Args,
) -> std::pin::Pin<
Box<

View File

@ -31,12 +31,12 @@ impl From<KclErrorWithOutputs> for ExecError {
#[derive(Debug)]
pub struct ExecErrorWithState {
pub error: ExecError,
pub exec_state: Option<crate::ExecState>,
pub exec_state: Option<crate::execution::ExecState>,
}
impl ExecErrorWithState {
#[cfg_attr(target_arch = "wasm32", expect(dead_code))]
pub fn new(error: ExecError, exec_state: crate::ExecState) -> Self {
pub fn new(error: ExecError, exec_state: crate::execution::ExecState) -> Self {
Self {
error,
exec_state: Some(exec_state),

View File

@ -6,13 +6,11 @@ use itertools::{EitherOrBoth, Itertools};
use tokio::sync::RwLock;
use crate::{
execution::{ExecState, ExecutorSettings},
execution::{memory::ProgramMemory, ExecState, ExecutorSettings},
parsing::ast::types::{Node, NonCodeValue, Program},
walk::Node as WalkNode,
};
use super::ProgramMemory;
lazy_static::lazy_static! {
/// A static mutable lock for updating the last successful execution state for the cache.
static ref OLD_AST: Arc<RwLock<Option<OldAstState>>> = Default::default();

View File

@ -10,9 +10,10 @@ use crate::{
annotations,
cad_op::{OpArg, Operation},
memory,
memory::ProgramMemory,
state::ModuleState,
BodyType, EnvironmentRef, ExecState, ExecutorContext, KclValue, MemoryFunction, Metadata, ProgramMemory,
TagEngineInfo, TagIdentifier,
BodyType, EnvironmentRef, ExecState, ExecutorContext, KclValue, MemoryFunction, Metadata, TagEngineInfo,
TagIdentifier,
},
modules::{ModuleId, ModulePath, ModuleRepr},
parsing::ast::types::{

View File

@ -8,14 +8,15 @@ use crate::{
errors::KclErrorDetails,
exec::Sketch,
execution::{
Face, Helix, ImportedGeometry, MemoryFunction, Metadata, Plane, SketchSet, Solid, SolidSet, TagIdentifier,
ExecState, Face, Helix, ImportedGeometry, MemoryFunction, Metadata, Plane, SketchSet, Solid, SolidSet,
TagIdentifier,
},
parsing::{
ast::types::{FunctionExpression, KclNone, LiteralValue, TagDeclarator, TagNode},
token::NumericSuffix,
},
std::{args::Arg, FnAsArg},
ExecState, ExecutorContext, KclError, ModuleId, SourceRange,
ExecutorContext, KclError, ModuleId, SourceRange,
};
use super::memory::EnvironmentRef;

View File

@ -156,18 +156,14 @@ pub(crate) const RETURN_NAME: &str = "__return";
/// including other modules). Multiple interpretation runs should have fresh instances.
///
/// See module docs.
#[derive(Debug, Clone, Deserialize, Serialize, ts_rs::TS, JsonSchema)]
#[ts(export)]
#[serde(rename_all = "camelCase")]
pub struct ProgramMemory {
#[derive(Debug, Clone)]
pub(crate) struct ProgramMemory {
environments: Vec<Environment>,
/// Invariant: current_env.1.is_none()
current_env: 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.
#[allow(dead_code)]
#[serde(skip)]
pub(crate) stats: MemoryStats,
}
@ -573,7 +569,7 @@ pub(crate) struct MemoryStats {
mod env {
use super::*;
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
#[derive(Debug, Clone, PartialEq)]
pub(super) struct Environment {
bindings: IndexMap<String, KclValue>,
// invariant: self.parent.is_none() => forall s in self.snapshots: s.parent_snapshot.is_none()
@ -603,7 +599,7 @@ mod env {
}
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
#[derive(Debug, Clone, PartialEq)]
struct Snapshot {
/// The version of the owning environment's parent environment corresponding to this snapshot.
parent_snapshot: Option<SnapshotRef>,

View File

@ -39,7 +39,7 @@ pub(crate) use import::{
import_foreign, send_to_engine as send_import_to_engine, PreImportedGeometry, ZOO_COORD_SYSTEM,
};
pub use kcl_value::{KclObjectFields, KclValue, UnitAngle, UnitLen};
pub use memory::{EnvironmentRef, ProgramMemory};
pub use memory::EnvironmentRef;
pub use state::{ExecState, IdGenerator, MetaSettings};
pub(crate) mod annotations;
@ -821,7 +821,7 @@ mod tests {
use pretty_assertions::assert_eq;
use super::*;
use crate::{errors::KclErrorDetails, ModuleId};
use crate::{errors::KclErrorDetails, execution::memory::ProgramMemory, ModuleId};
/// Convenience function to get a JSON value from memory and unwrap.
#[track_caller]

View File

@ -8,8 +8,8 @@ use uuid::Uuid;
use crate::{
errors::{KclError, KclErrorDetails},
execution::{
annotations, kcl_value, Artifact, ArtifactCommand, ArtifactGraph, ArtifactId, ExecOutcome, ExecutorSettings,
KclValue, Operation, ProgramMemory, UnitAngle, UnitLen,
annotations, kcl_value, memory::ProgramMemory, Artifact, ArtifactCommand, ArtifactGraph, ArtifactId,
ExecOutcome, ExecutorSettings, KclValue, Operation, UnitAngle, UnitLen,
},
modules::{ModuleId, ModuleInfo, ModuleLoader, ModulePath, ModuleRepr},
parsing::ast::types::NonCodeValue,
@ -17,16 +17,14 @@ use crate::{
};
/// State for executing a program.
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
#[derive(Debug, Clone)]
pub struct ExecState {
pub global: GlobalState,
pub mod_local: ModuleState,
pub(super) global: GlobalState,
pub(super) mod_local: ModuleState,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GlobalState {
#[derive(Debug, Clone)]
pub(super) struct GlobalState {
/// Program variable bindings.
pub memory: ProgramMemory,
/// The stable artifact ID generator.
@ -52,9 +50,8 @@ pub struct GlobalState {
pub mod_loader: ModuleLoader,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ModuleState {
#[derive(Debug, Clone)]
pub(super) struct ModuleState {
/// The current value of the pipe operator returned from the previous
/// expression. If we're not currently in a pipeline, this will be None.
pub pipe_value: Option<KclValue>,
@ -125,19 +122,19 @@ impl ExecState {
}
}
pub fn memory(&self) -> &ProgramMemory {
pub(crate) fn memory(&self) -> &ProgramMemory {
&self.global.memory
}
pub fn mut_memory(&mut self) -> &mut ProgramMemory {
pub(crate) fn mut_memory(&mut self) -> &mut ProgramMemory {
&mut self.global.memory
}
pub fn next_uuid(&mut self) -> Uuid {
pub(crate) fn next_uuid(&mut self) -> Uuid {
self.global.id_generator.next_uuid()
}
pub fn add_artifact(&mut self, artifact: Artifact) {
pub(crate) fn add_artifact(&mut self, artifact: Artifact) {
let id = artifact.id();
self.global.artifacts.insert(id, artifact);
}

View File

@ -98,9 +98,7 @@ pub use source_range::SourceRange;
// Rather than make executor public and make lots of it pub(crate), just re-export into a new module.
// Ideally we wouldn't export these things at all, they should only be used for testing.
pub mod exec {
pub use crate::execution::{
ArtifactCommand, DefaultPlanes, IdGenerator, KclValue, PlaneType, ProgramMemory, Sketch,
};
pub use crate::execution::{ArtifactCommand, DefaultPlanes, IdGenerator, KclValue, PlaneType, Sketch};
}
#[cfg(target_arch = "wasm32")]

View File

@ -33,9 +33,8 @@ impl ModuleId {
}
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ModuleLoader {
#[derive(Debug, Clone, Default)]
pub(crate) struct ModuleLoader {
/// The stack of import statements for detecting circular module imports.
/// If this is empty, we're not currently executing an import statement.
pub import_stack: Vec<PathBuf>,

View File

@ -102,21 +102,22 @@ 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);
}
assert_snapshot(test_name, "Program memory after executing", || {
insta::assert_json_snapshot!("program_memory", exec_state.memory(), {
".environments[].**[].from[]" => rounded_redaction(4),
".environments[].**[].to[]" => rounded_redaction(4),
".environments[].**[].x[]" => rounded_redaction(4),
".environments[].**[].y[]" => rounded_redaction(4),
".environments[].**[].z[]" => rounded_redaction(4),
});
});
let outcome = exec_state.to_wasm_outcome();
assert_common_snapshots(
test_name,
exec_state.mod_local.operations,
exec_state.global.artifact_commands,
exec_state.global.artifact_graph,
outcome.operations,
outcome.artifact_commands,
outcome.artifact_graph,
);
assert_snapshot(test_name, "Variables in memory after executing", || {
insta::assert_json_snapshot!("program_memory", outcome.variables, {
".**[].from[]" => rounded_redaction(4),
".**[].to[]" => rounded_redaction(4),
".**[].x[]" => rounded_redaction(4),
".**[].y[]" => rounded_redaction(4),
".**[].z[]" => rounded_redaction(4),
})
});
}
Err(e) => {
let ok_path_str = format!("tests/{test_name}/program_memory.snap");

View File

@ -134,7 +134,7 @@ async fn inner_chamfer(
EdgeReference::Tag(edge_tag) => args.get_tag_engine_info(exec_state, &edge_tag)?.id,
};
let id = exec_state.global.id_generator.next_uuid();
let id = exec_state.next_uuid();
args.batch_end_cmd(
id,
ModelingCmd::from(mcmd::Solid3dFilletEdge {

View File

@ -218,7 +218,7 @@ async fn straight_line(
}
};
let id = exec_state.global.id_generator.next_uuid();
let id = exec_state.next_uuid();
args.batch_modeling_cmd(
id,
ModelingCmd::from(mcmd::ExtendPath {

View File

@ -5,9 +5,9 @@ use std::path::PathBuf;
use crate::{
engine::new_zoo_client,
errors::ExecErrorWithState,
execution::{ExecutorContext, ExecutorSettings},
execution::{ExecState, ExecutorContext, ExecutorSettings},
settings::types::UnitLength,
ConnectionError, ExecError, ExecState, KclErrorWithOutputs, Program,
ConnectionError, ExecError, KclErrorWithOutputs, Program,
};
#[derive(serde::Deserialize, serde::Serialize)]

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,320 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing angled_line.kcl
description: Variables in memory after executing angled_line.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
73,
97,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
142,
0
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
148,
174,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
180,
217,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
250,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
256,
264,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
73,
97,
0
]
},
"from": [
4.83,
12.56
],
"tag": null,
"to": [
19.93,
15.04
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.04
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.19
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
148,
174,
0
]
},
"from": [
23.08,
5.19
],
"tag": null,
"to": [
7.91,
1.09
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
180,
217,
0
]
},
"from": [
7.91,
1.09
],
"tag": null,
"to": [
11.6718,
-10.6731
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
250,
0
]
},
"from": [
11.6718,
-10.6731
],
"tag": null,
"to": [
-1.3482,
-0.6431
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
256,
264,
0
]
},
"from": [
-1.3482,
-0.6431
],
"tag": null,
"to": [
4.83,
12.56
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"start": {
"from": [
4.83,
12.56
],
"to": [
4.83,
12.56
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
73,
97,
0
"sourceRange": [
35,
67,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": null,
"type": "extrudePlane"
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
},
{
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -59,392 +329,109 @@ description: Program memory after executing angled_line.kcl
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
148,
174,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
180,
217,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
250,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
256,
264,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
73,
97,
0
]
},
"from": [
4.83,
12.56
],
"tag": null,
"to": [
19.93,
15.04
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.04
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.19
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
148,
174,
0
]
},
"from": [
23.08,
5.19
],
"tag": null,
"to": [
7.91,
1.09
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
180,
217,
0
]
},
"from": [
7.91,
1.09
],
"tag": null,
"to": [
11.6718,
-10.6731
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
250,
0
]
},
"from": [
11.6718,
-10.6731
],
"tag": null,
"to": [
-1.3482,
-0.6431
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
256,
264,
0
]
},
"from": [
-1.3482,
-0.6431
],
"tag": null,
"to": [
4.83,
12.56
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
4.83,
12.56
],
"to": [
4.83,
12.56
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
67,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
142,
0
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
135,
141,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
67,
0
]
}
]
},
"height": 4.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
67,
135,
141,
0
]
}
]
}
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
142,
0
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
135,
141,
0
]
}
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
67,
0
]
}
]
},
"height": 4.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
67,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
142,
0
]
},
"from": [
19.93,
15.040000000000001
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
23.08,
5.190000000000001
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
142,
0
],
"tag": {
"end": 141,
"start": 135,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
135,
141,
0
]
}
]
}
}

View File

@ -1,172 +1,159 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing array_elem_pop.kcl
description: Variables in memory after executing array_elem_pop.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
6,
15,
0
]
}
]
},
"new_arr1": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
27,
35,
0
]
}
]
},
"new_arr2": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
47,
60,
0
]
}
]
},
"new_arr3": {
"type": "Array",
"value": [],
"__meta": [
{
"sourceRange": [
72,
85,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
6,
15,
0
]
}
]
},
"new_arr1": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
27,
35,
0
]
}
]
},
"new_arr2": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
47,
60,
0
]
}
]
},
"new_arr3": {
"type": "Array",
"value": [],
"__meta": [
{
"sourceRange": [
72,
85,
0
]
}
]
}
}

View File

@ -1,237 +1,224 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing array_elem_push.kcl
description: Variables in memory after executing array_elem_push.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
6,
15,
0
]
}
]
},
"new_arr1": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
37,
38,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
27,
39,
0
]
}
]
},
"new_arr2": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
37,
38,
0
]
}
]
},
{
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
66,
67,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
51,
68,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
6,
15,
0
]
}
]
},
"new_arr1": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
37,
38,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
27,
39,
0
]
}
]
},
"new_arr2": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
7,
8,
0
]
}
]
},
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
10,
11,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
13,
14,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
37,
38,
0
]
}
]
},
{
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
66,
67,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
51,
68,
0
]
}
]
}
}

View File

@ -1,394 +1,381 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing array_range_expr.kcl
description: Variables in memory after executing array_range_expr.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"five": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
175,
188,
0
]
}
]
},
"four": {
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
79,
80,
0
]
}
]
},
"r1": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
"r2": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
"r3": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 5,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
"r4": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
"zero": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
88,
89,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"five": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
175,
188,
0
]
}
]
},
"four": {
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
79,
80,
0
]
}
]
},
"r1": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
5,
11,
0
]
}
]
},
"r2": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
95,
107,
0
]
}
]
},
"r3": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
{
"type": "Int",
"value": 5,
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
194,
206,
0
]
}
]
},
"r4": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
341,
373,
0
]
}
]
},
"zero": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
88,
89,
0
]
}
]
}
}

View File

@ -1,196 +1,183 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing array_range_negative_expr.kcl
description: Variables in memory after executing array_range_negative_expr.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"xs": {
"type": "Array",
"value": [
{
"type": "Int",
"value": -5,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -4,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -3,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -2,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -1,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 5,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"xs": {
"type": "Array",
"value": [
{
"type": "Int",
"value": -5,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Int",
"value": -4,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -3,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -2,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": -1,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 3,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 4,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
},
{
"type": "Int",
"value": 5,
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
5,
19,
0
]
}
]
}
}

View File

@ -1,228 +1,214 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing artifact_graph_example_code_offset_planes.kcl
snapshot_kind: text
description: Variables in memory after executing artifact_graph_example_code_offset_planes.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"offsetPlane001": {
"type": "Plane",
"value": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"offsetPlane001": {
"type": "Plane",
"value": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 20.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"offsetPlane002": {
"type": "Plane",
"value": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 50.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"offsetPlane003": {
"type": "Plane",
"value": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 10.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"sketch002": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 20.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"offsetPlane002": {
"type": "Plane",
"value": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 50.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"offsetPlane003": {
"type": "Plane",
"value": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 10.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
}
},
"sketch002": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
197,
222,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
6.78,
15.01
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 20.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
166,
191,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
166,
191,
0
]
}
"sourceRange": [
197,
222,
0
]
}
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
6.78,
15.01
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "Custom",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 20.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
166,
191,
0
]
}
},
"snapshots": [],
"parent": null
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
166,
191,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -1,39 +1,268 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_end.kcl
description: Variables in memory after executing basic_fillet_cube_end.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
105,
124,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
171,
179,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
105,
124,
0
]
},
"from": [
0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
171,
179,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -48,19 +277,51 @@ description: Program memory after executing basic_fillet_cube_end.kcl
"value": "thing"
},
"type": "extrudePlane"
},
}
},
"__meta": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
105,
124,
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": null,
"type": "extrudePlane"
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -75,459 +336,185 @@ description: Program memory after executing basic_fillet_cube_end.kcl
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
171,
179,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
105,
124,
0
]
},
"from": [
0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
171,
179,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
157,
164,
0
]
}
]
}
},
"thing": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"thing2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"thing": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
]
}
}

View File

@ -1,39 +1,268 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing basic_fillet_cube_start.kcl
description: Variables in memory after executing basic_fillet_cube_start.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
105,
124,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
171,
179,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
105,
124,
0
]
},
"from": [
0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
171,
179,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -48,19 +277,51 @@ description: Program memory after executing basic_fillet_cube_start.kcl
"value": "thing"
},
"type": "extrudePlane"
},
}
},
"__meta": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
105,
124,
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": null,
"type": "extrudePlane"
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -75,459 +336,185 @@ description: Program memory after executing basic_fillet_cube_start.kcl
"value": "thing2"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
171,
179,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
105,
124,
0
]
},
"from": [
0.0,
10.0
],
"tag": null,
"to": [
10.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
171,
179,
0
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"thing": {
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
157,
164,
0
]
}
]
}
},
"thing": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"thing2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": 2.0,
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"thing": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
99,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
99,
0
],
"tag": {
"end": 98,
"start": 92,
"type": "TagDeclarator",
"value": "thing"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
92,
98,
0
]
}
]
},
"thing2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "thing2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
130,
165,
0
]
},
"from": [
10.0,
10.0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
130,
165,
0
],
"tag": {
"end": 164,
"start": 157,
"type": "TagDeclarator",
"value": "thing2"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
157,
164,
0
]
}
]
}
}

View File

@ -1,39 +1,227 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_x.kcl
description: Variables in memory after executing big_number_angle_to_match_length_x.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
107,
163,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
169,
177,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
107,
163,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
0.4152
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
169,
177,
0
]
},
"from": [
3.0,
0.4152
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -48,310 +236,109 @@ description: Program memory after executing big_number_angle_to_match_length_x.k
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
107,
163,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
169,
177,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
107,
163,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
0.4152
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
169,
177,
0
]
},
"from": [
3.0,
0.4152
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
94,
100,
0
]
}
]
}
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
]
}
}

View File

@ -1,39 +1,227 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing big_number_angle_to_match_length_y.kcl
description: Variables in memory after executing big_number_angle_to_match_length_y.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
107,
163,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
169,
177,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
107,
163,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
3.3954
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
169,
177,
0
]
},
"from": [
3.0,
3.3954
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
@ -48,310 +236,109 @@ description: Program memory after executing big_number_angle_to_match_length_y.k
"value": "seg01"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
107,
163,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
169,
177,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
107,
163,
0
]
},
"from": [
1.0,
3.82
],
"tag": null,
"to": [
3.0,
3.3954
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
169,
177,
0
]
},
"from": [
3.0,
3.3954
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"tags": {
"seg01": {
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
94,
100,
0
]
}
]
}
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"seg01": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "seg01",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
101,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"to": [
1.0,
3.82
],
"type": "ToPoint"
},
"surface": {
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
101,
0
],
"tag": {
"end": 100,
"start": 94,
"type": "TagDeclarator",
"value": "seg01"
},
"type": "extrudePlane"
}
},
"__meta": [
{
"sourceRange": [
94,
100,
0
]
}
]
}
}

View File

@ -1,171 +1,158 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing boolean_logical_and.kcl
description: Variables in memory after executing boolean_logical_and.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
45,
46,
0
]
}
]
},
"aa": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
{
"sourceRange": [
12,
17,
0
]
}
]
},
"b": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
175,
176,
0
]
}
]
},
"bb": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
135,
140,
0
]
},
{
"sourceRange": [
143,
147,
0
]
}
]
},
"c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
290,
291,
0
]
}
]
},
"cc": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
264,
268,
0
]
},
{
"sourceRange": [
271,
275,
0
]
}
]
},
"d": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
434,
435,
0
]
}
]
},
"dd": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
393,
398,
0
]
},
{
"sourceRange": [
401,
406,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
45,
46,
0
]
}
]
},
"aa": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"sourceRange": [
12,
17,
0
]
}
]
},
"b": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
175,
176,
0
]
}
]
},
"bb": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
135,
140,
0
]
},
{
"sourceRange": [
143,
147,
0
]
}
]
},
"c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
290,
291,
0
]
}
]
},
"cc": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
264,
268,
0
]
},
{
"sourceRange": [
271,
275,
0
]
}
]
},
"d": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
434,
435,
0
]
}
]
},
"dd": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
393,
398,
0
]
},
{
"sourceRange": [
401,
406,
0
]
}
]
}
}

View File

@ -1,133 +1,120 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing boolean_logical_multiple.kcl
description: Variables in memory after executing boolean_logical_multiple.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"i": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
40,
41,
0
]
}
]
},
"ii": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
{
"sourceRange": [
12,
17,
0
]
},
{
"sourceRange": [
20,
25,
0
]
}
]
},
"j": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
166,
167,
0
]
}
]
},
"jj": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
115,
120,
0
]
},
{
"sourceRange": [
123,
127,
0
]
},
{
"sourceRange": [
130,
136,
0
]
},
{
"sourceRange": [
139,
144,
0
]
},
{
"sourceRange": [
147,
151,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"i": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
40,
41,
0
]
}
]
},
"ii": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"sourceRange": [
12,
17,
0
]
},
{
"sourceRange": [
20,
25,
0
]
}
]
},
"j": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
166,
167,
0
]
}
]
},
"jj": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
115,
120,
0
]
},
{
"sourceRange": [
123,
127,
0
]
},
{
"sourceRange": [
130,
136,
0
]
},
{
"sourceRange": [
139,
144,
0
]
},
{
"sourceRange": [
147,
151,
0
]
}
]
}
}

View File

@ -1,171 +1,158 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing boolean_logical_or.kcl
description: Variables in memory after executing boolean_logical_or.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
32,
33,
0
]
}
]
},
"aa": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
{
"sourceRange": [
12,
17,
0
]
}
]
},
"b": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
158,
159,
0
]
}
]
},
"bb": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
131,
136,
0
]
},
{
"sourceRange": [
139,
143,
0
]
}
]
},
"c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
284,
285,
0
]
}
]
},
"cc": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
258,
262,
0
]
},
{
"sourceRange": [
265,
269,
0
]
}
]
},
"d": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
427,
428,
0
]
}
]
},
"dd": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
386,
391,
0
]
},
{
"sourceRange": [
394,
399,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
32,
33,
0
]
}
]
},
"aa": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
5,
9,
0
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"sourceRange": [
12,
17,
0
]
}
]
},
"b": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
158,
159,
0
]
}
]
},
"bb": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
131,
136,
0
]
},
{
"sourceRange": [
139,
143,
0
]
}
]
},
"c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
284,
285,
0
]
}
]
},
"cc": {
"type": "Bool",
"value": true,
"__meta": [
{
"sourceRange": [
258,
262,
0
]
},
{
"sourceRange": [
265,
269,
0
]
}
]
},
"d": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
427,
428,
0
]
}
]
},
"dd": {
"type": "Bool",
"value": false,
"__meta": [
{
"sourceRange": [
386,
391,
0
]
},
{
"sourceRange": [
394,
399,
0
]
}
]
}
}

View File

@ -1,171 +1,157 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing circle_three_point.kcl
snapshot_kind: text
description: Variables in memory after executing circle_three_point.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"sketch001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
37,
98,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"sketch001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
37,
98,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
98,
0
]
},
"ccw": true,
"center": [
24.749999999999996,
19.749999999999996
],
"from": [
30.0059,
19.75
],
"radius": 5.255949010407163,
"tag": null,
"to": [
30.0059,
19.75
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
30.00594901040716,
19.749999999999996
],
"to": [
30.00594901040716,
19.749999999999996
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
98,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
37,
98,
0
]
}
"sourceRange": [
37,
98,
0
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
37,
98,
0
]
}
"ccw": true,
"center": [
24.749999999999996,
19.749999999999996
],
"from": [
30.0059,
19.75
],
"radius": 5.255949010407163,
"tag": null,
"to": [
30.0059,
19.75
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
30.00594901040716,
19.749999999999996
],
"to": [
30.00594901040716,
19.749999999999996
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
37,
98,
0
]
}
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
37,
98,
0
]
}
]
},
"snapshots": [],
"parent": null
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
37,
98,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -1,39 +1,26 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing comparisons.kcl
description: Variables in memory after executing comparisons.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
}
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
}
}

View File

@ -1,197 +1,184 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing computed_var.kcl
description: Variables in memory after executing computed_var.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
44,
45,
0
]
}
]
},
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
47,
48,
0
]
}
]
},
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
50,
51,
0
]
}
]
},
{
"type": "Number",
"value": 10.0,
"__meta": [
{
"sourceRange": [
53,
55,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
43,
56,
0
]
}
]
},
"i": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
61,
62,
0
]
}
]
},
"obj": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
150,
151,
0
]
}
]
},
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
141,
142,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
133,
153,
0
]
}
]
},
"one": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
141,
142,
0
]
}
]
},
"p": {
"type": "String",
"value": "foo",
"__meta": [
{
"sourceRange": [
121,
126,
0
]
}
]
},
"ten": {
"type": "Number",
"value": 10.0,
"__meta": [
{
"sourceRange": [
53,
55,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
44,
45,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
47,
48,
0
]
}
]
},
{
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
50,
51,
0
]
}
]
},
{
"type": "Number",
"value": 10.0,
"__meta": [
{
"sourceRange": [
53,
55,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
43,
56,
0
]
}
]
},
"i": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
61,
62,
0
]
}
]
},
"obj": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
150,
151,
0
]
}
]
},
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
141,
142,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
133,
153,
0
]
}
]
},
"one": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
141,
142,
0
]
}
]
},
"p": {
"type": "String",
"value": "foo",
"__meta": [
{
"sourceRange": [
121,
126,
0
]
}
]
},
"ten": {
"type": "Number",
"value": 10.0,
"__meta": [
{
"sourceRange": [
53,
55,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,277 +1,243 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing double_map_fn.kcl
description: Variables in memory after executing double_map_fn.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 32,
"left": {
"end": 28,
"name": "i",
"start": 27,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 32,
"raw": "1",
"start": 31,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 27,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 32,
"start": 20,
"type": "ReturnStatement",
"type": "ReturnStatement"
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 32,
"left": {
"end": 28,
"name": "i",
"start": 27,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 32,
"raw": "1",
"start": 31,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
],
"end": 34,
"start": 16
},
"start": 27,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 34,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 14,
"name": "i",
"start": 13,
"type": "Identifier"
}
}
],
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
34,
0
]
}
]
},
"xs": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
"ys": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
84,
101,
0
]
}
]
}
"end": 32,
"start": 20,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 34,
"start": 16
},
"snapshots": [
"end": 34,
"params": [
{
"parent_snapshot": null,
"data": {
"increment": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"xs": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"ys": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"type": "Parameter",
"identifier": {
"end": 14,
"name": "i",
"start": 13,
"type": "Identifier"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
34,
0
]
}
]
},
"xs": {
"type": "Array",
"value": [
{
"type": "Int",
"value": 0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
{
"type": "Int",
"value": 1,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
{
"type": "Int",
"value": 2,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
41,
47,
0
]
}
]
},
"ys": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
},
{
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
},
{
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
41,
47,
0
]
},
{
"sourceRange": [
31,
32,
0
]
},
{
"sourceRange": [
31,
32,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
84,
101,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,171 +1,157 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing helix_ccw.kcl
snapshot_kind: text
description: Variables in memory after executing helix_ccw.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
35,
78,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
35,
78,
0
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
78,
0
]
},
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
78,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
78,
0
]
}
"sourceRange": [
35,
78,
0
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
78,
0
]
}
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
78,
0
]
}
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
78,
0
]
}
]
},
"snapshots": [],
"parent": null
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
78,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -1,34 +1,178 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing helix_simple.kcl
snapshot_kind: text
description: Variables in memory after executing helix_simple.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"edge001": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "edge001",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
137,
0
]
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
"from": [
0.0,
0.0
],
"tag": {
"end": 136,
"start": 128,
"type": "TagDeclarator",
"value": "edge001"
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
128,
136,
0
]
}
]
},
"helixPath": {
"type": "Helix",
"value": {
"value": "[uuid]",
"artifactId": "[uuid]",
"revolutions": 5.0,
"angleStart": 0.0,
"ccw": true,
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
151,
257,
0
]
}
]
}
},
"helper001": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
137,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 136,
"start": 128,
"type": "TagDeclarator",
"value": "edge001"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
71,
96,
0
]
}
},
"tags": {
"edge001": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "edge001",
"info": {
@ -71,180 +215,22 @@ snapshot_kind: text
]
}
]
},
"helixPath": {
"type": "Helix",
"value": {
"value": "[uuid]",
"artifactId": "[uuid]",
"revolutions": 5.0,
"angleStart": 0.0,
"ccw": true,
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
151,
257,
0
]
}
]
}
},
"helper001": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
137,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 136,
"start": 128,
"type": "TagDeclarator",
"value": "edge001"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
71,
96,
0
]
}
},
"tags": {
"edge001": {
"type": "TagIdentifier",
"value": "edge001",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
137,
0
]
},
"from": [
0.0,
0.0
],
"tag": {
"end": 136,
"start": 128,
"type": "TagDeclarator",
"value": "edge001"
},
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
128,
136,
0
]
}
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
71,
96,
0
]
}
]
}
}
},
"snapshots": [],
"parent": null
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
71,
96,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,78 +1,65 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing if_else.kcl
description: Variables in memory after executing if_else.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"b": {
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
199,
200,
0
]
}
]
},
"c": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
332,
333,
0
]
}
]
}
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"a": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"b": {
"type": "Number",
"value": 4.0,
"__meta": [
{
"sourceRange": [
199,
200,
0
]
}
]
},
"c": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
332,
333,
0
]
}
]
}
}

View File

@ -1,91 +1,39 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_constant.kcl
description: Variables in memory after executing import_constant.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
},
"snapshots": [],
"parent": null
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
}

View File

@ -1,130 +1,39 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_export.kcl
description: Variables in memory after executing import_export.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
2
]
}
]
}
},
"snapshots": [],
"parent": null
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
2
]
}
]
}
},
"snapshots": [],
"parent": null
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
2
]
}
]
}
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
2
]
}
]
}
}

View File

@ -1,68 +1,55 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_foreign.kcl
description: Variables in memory after executing import_foreign.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"cube": {
"type": "Module",
"value": 1,
"__meta": [
{
"sourceRange": [
0,
36,
0
]
}
]
},
"model": {
"type": "ImportedGeometry",
"id": "[uuid]",
"value": [
"cube.gltf"
],
"__meta": [
{
"sourceRange": [
0,
36,
0
]
}
]
}
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"cube": {
"type": "Module",
"value": 1,
"__meta": [
{
"sourceRange": [
0,
36,
0
]
}
]
},
"model": {
"type": "ImportedGeometry",
"id": "[uuid]",
"value": [
"cube.gltf"
],
"__meta": [
{
"sourceRange": [
0,
36,
0
]
}
]
}
}

View File

@ -1,592 +1,140 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_function_not_sketch.kcl
description: Variables in memory after executing import_function_not_sketch.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"one": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 106,
"left": {
"arguments": [],
"callee": {
"end": 100,
"name": "two",
"start": 97,
"type": "Identifier"
},
"end": 102,
"start": 97,
"type": "CallExpression",
"type": "CallExpression"
},
"operator": "-",
"right": {
"end": 106,
"raw": "1",
"start": 105,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 97,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 106,
"start": 90,
"type": "ReturnStatement",
"type": "ReturnStatement"
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"one": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 106,
"left": {
"arguments": [],
"callee": {
"end": 100,
"name": "two",
"start": 97,
"type": "Identifier"
},
"end": 102,
"start": 97,
"type": "CallExpression",
"type": "CallExpression"
},
"operator": "-",
"right": {
"end": 106,
"raw": "1",
"start": 105,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
],
"end": 108,
"start": 86
},
"start": 97,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 108,
"params": [],
"start": 83,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
83,
108,
0
]
}
]
},
"two": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 388,
"moduleId": 1,
"raw": "5",
"start": 387,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"end": 388,
"moduleId": 1,
"start": 380,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 390,
"moduleId": 1,
"start": 378
},
"end": 390,
"moduleId": 1,
"params": [],
"start": 372,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
372,
390,
1
]
}
]
}
},
"snapshots": [
{
"parent_snapshot": null,
"data": {
"one": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"end": 106,
"start": 90,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
}
],
"parent": null
],
"end": 108,
"start": 86
},
"end": 108,
"params": [],
"start": 83,
"type": "FunctionExpression"
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
109,
127,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
133,
152,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
158,
177,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
183,
202,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
208,
233,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
239,
260,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
266,
285,
1
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
291,
298,
1
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
109,
127,
1
]
},
"from": [
4.0,
12.0
],
"tag": null,
"to": [
6.0,
12.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
133,
152,
1
]
},
"from": [
6.0,
12.0
],
"tag": null,
"to": [
6.0,
6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
158,
177,
1
]
},
"from": [
6.0,
6.0
],
"tag": null,
"to": [
10.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
183,
202,
1
]
},
"from": [
10.0,
0.0
],
"tag": null,
"to": [
10.0,
-6.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
208,
233,
1
]
},
"from": [
10.0,
-6.0
],
"tag": null,
"to": [
6.25,
-10.5
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
239,
260,
1
]
},
"from": [
6.25,
-10.5
],
"tag": null,
"to": [
6.25,
-16.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
266,
285,
1
]
},
"from": [
6.25,
-16.0
],
"tag": null,
"to": [
4.25,
-16.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
291,
298,
1
]
},
"from": [
4.25,
-16.0
],
"tag": null,
"to": [
4.0,
12.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
4.0,
12.0
],
"to": [
4.0,
12.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
77,
103,
1
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
77,
103,
1
]
}
]
},
"height": 0.0,
"startCapId": null,
"endCapId": null,
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
77,
103,
1
]
}
]
}
},
"two": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 388,
"moduleId": 1,
"raw": "5",
"start": 387,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"end": 388,
"moduleId": 1,
"start": 380,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 390,
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
83,
108,
0
]
}
]
},
"two": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 388,
"moduleId": 1,
"start": 378
"raw": "5",
"start": 387,
"type": "Literal",
"type": "Literal",
"value": {
"value": 5.0,
"suffix": "None"
}
},
"end": 390,
"end": 388,
"moduleId": 1,
"params": [],
"start": 372,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
372,
390,
1
]
}
]
}
},
"snapshots": [
{
"parent_snapshot": null,
"data": {
"two": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"start": 380,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
],
"end": 390,
"moduleId": 1,
"start": 378
},
"end": 390,
"moduleId": 1,
"params": [],
"start": 372,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
372,
390,
1
]
}
]
}
}

View File

@ -1,200 +1,88 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_glob.kcl
description: Variables in memory after executing import_glob.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 47,
"moduleId": 1,
"raw": "42",
"start": 45,
"type": "Literal",
"type": "Literal",
"value": {
"value": 42.0,
"suffix": "None"
}
},
"end": 47,
"moduleId": 1,
"start": 38,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 49,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 47,
"moduleId": 1,
"start": 34
"raw": "42",
"start": 45,
"type": "Literal",
"type": "Literal",
"value": {
"value": 42.0,
"suffix": "None"
}
},
"end": 49,
"end": 47,
"moduleId": 1,
"params": [],
"start": 31,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
31,
49,
1
]
}
]
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
},
"snapshots": [],
"parent": null
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 47,
"moduleId": 1,
"raw": "42",
"start": 45,
"type": "Literal",
"type": "Literal",
"value": {
"value": 42.0,
"suffix": "None"
}
},
"end": 47,
"moduleId": 1,
"start": 38,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 49,
"moduleId": 1,
"start": 34
},
"end": 49,
"moduleId": 1,
"params": [],
"start": 31,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
31,
49,
1
]
}
]
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
},
"snapshots": [
{
"parent_snapshot": null,
"data": {
"foo": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"start": 38,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
],
"end": 49,
"moduleId": 1,
"start": 34
},
"end": 49,
"moduleId": 1,
"params": [],
"start": 31,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
31,
49,
1
]
}
]
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
15,
16,
1
]
}
]
}
}

View File

@ -1,277 +1,75 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_side_effect.kcl
description: Variables in memory after executing import_side_effect.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 32,
"moduleId": 1,
"raw": "0",
"start": 31,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"end": 32,
"moduleId": 1,
"start": 24,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 34,
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 32,
"moduleId": 1,
"start": 22
"raw": "0",
"start": 31,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"end": 34,
"end": 32,
"moduleId": 1,
"params": [],
"start": 16,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
16,
34,
1
]
}
]
}
"start": 24,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 34,
"moduleId": 1,
"start": 22
},
"snapshots": [],
"parent": null
"end": 34,
"moduleId": 1,
"params": [],
"start": 16,
"type": "FunctionExpression"
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"foo": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 32,
"moduleId": 1,
"raw": "0",
"start": 31,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
"end": 32,
"moduleId": 1,
"start": 24,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 34,
"moduleId": 1,
"start": 22
},
"end": 34,
"moduleId": 1,
"params": [],
"start": 16,
"type": "FunctionExpression"
},
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
16,
34,
1
]
}
]
},
"part001": {
"type": "Sketch",
"value": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
106,
149,
1
]
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
10.0,
0.0
],
"radius": 10.0,
"tag": null,
"to": [
10.0,
0.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
10.0,
0.0
],
"to": [
10.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
106,
149,
1
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
106,
149,
1
]
}
]
}
}
},
"snapshots": [
{
"parent_snapshot": null,
"data": {
"foo": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"part001": {
"type": "Tombstone",
"value": null,
"__meta": []
}
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"memory": [
1,
1
],
"__meta": [
{
"sourceRange": [
16,
34,
1
]
}
]
}
}

View File

@ -1,210 +1,170 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing import_whole.kcl
snapshot_kind: text
description: Variables in memory after executing import_whole.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bar": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
61,
104,
1
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bar": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
61,
104,
1
],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
61,
104,
1
]
},
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Inches"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
61,
104,
1
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
},
"__meta": [
{
"sourceRange": [
61,
104,
1
]
}
"sourceRange": [
61,
104,
1
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Inches"
},
"__meta": [
{
"sourceRange": [
61,
104,
1
]
}
"ccw": true,
"center": [
5.0,
5.0
],
"from": [
15.0,
5.0
],
"radius": 10.0,
"tag": null,
"to": [
15.0,
5.0
],
"type": "Circle"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Inches"
},
"__meta": []
},
"start": {
"from": [
15.0,
5.0
],
"to": [
15.0,
5.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
61,
104,
1
]
}
},
"foo": {
"type": "Module",
"value": 1,
"__meta": [
{
"sourceRange": [
34,
66,
0
]
}
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
},
"__meta": [
{
"sourceRange": [
61,
104,
1
]
}
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Inches"
},
"__meta": [
{
"sourceRange": [
61,
104,
1
]
}
},
"snapshots": [],
"parent": null
},
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"foo": {
"type": "Module",
"value": 1,
"__meta": [
{
"sourceRange": [
34,
66,
0
]
}
]
}
}

View File

@ -1,131 +1,118 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing index_of_array.kcl
description: Variables in memory after executing index_of_array.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 90.0,
"__meta": [
{
"sourceRange": [
42,
44,
0
]
}
]
},
{
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
},
{
"type": "Number",
"value": 92.0,
"__meta": [
{
"sourceRange": [
50,
52,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
41,
53,
0
]
}
]
},
"i": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
252,
262,
0
]
}
]
},
"result0": {
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
},
"result1": {
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"arr": {
"type": "Array",
"value": [
{
"type": "Number",
"value": 90.0,
"__meta": [
{
"sourceRange": [
42,
44,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
{
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
},
{
"type": "Number",
"value": 92.0,
"__meta": [
{
"sourceRange": [
50,
52,
0
]
}
]
}
],
"__meta": [
{
"sourceRange": [
41,
53,
0
]
}
]
},
"i": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
252,
262,
0
]
}
]
},
"result0": {
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
},
"result1": {
"type": "Number",
"value": 91.0,
"__meta": [
{
"sourceRange": [
46,
48,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,255 +1,211 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing kw_fn.kcl
description: Variables in memory after executing kw_fn.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"add": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 75,
"left": {
"end": 67,
"name": "x",
"start": 66,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 75,
"name": "delta",
"start": 70,
"type": "Identifier",
"type": "Identifier"
},
"start": 66,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 75,
"start": 59,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 77,
"start": 55
},
"end": 77,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 46,
"name": "x",
"start": 45,
"type": "Identifier"
},
"labeled": false
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"add": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 75,
"left": {
"end": 67,
"name": "x",
"start": 66,
"type": "Identifier",
"type": "Identifier"
},
{
"type": "Parameter",
"identifier": {
"end": 53,
"name": "delta",
"start": 48,
"type": "Identifier"
}
}
],
"start": 43,
"type": "FunctionExpression"
},
"memory": [
0,
2
],
"__meta": [
{
"sourceRange": [
43,
77,
0
]
}
]
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 33,
"left": {
"end": 29,
"name": "x",
"start": 28,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 33,
"raw": "1",
"start": 32,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 28,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 33,
"start": 21,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 35,
"start": 17
"operator": "+",
"right": {
"end": 75,
"name": "delta",
"start": 70,
"type": "Identifier",
"type": "Identifier"
},
"start": 66,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 35,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 15,
"name": "x",
"start": 14,
"type": "Identifier"
},
"labeled": false
}
],
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
35,
0
]
}
]
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
110,
111,
0
]
},
{
"sourceRange": [
121,
122,
0
]
}
]
},
"two": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
95,
96,
0
]
},
{
"sourceRange": [
32,
33,
0
]
}
]
}
},
"snapshots": [
{
"parent_snapshot": null,
"data": {
"increment": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"end": 75,
"start": 59,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 77,
"start": 55
},
"end": 77,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 46,
"name": "x",
"start": 45,
"type": "Identifier"
},
"labeled": false
},
{
"parent_snapshot": null,
"data": {
"add": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"three": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"two": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"type": "Parameter",
"identifier": {
"end": 53,
"name": "delta",
"start": 48,
"type": "Identifier"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"start": 43,
"type": "FunctionExpression"
},
"memory": [
0,
2
],
"__meta": [
{
"sourceRange": [
43,
77,
0
]
}
]
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 33,
"left": {
"end": 29,
"name": "x",
"start": 28,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 33,
"raw": "1",
"start": 32,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"start": 28,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 33,
"start": 21,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 35,
"start": 17
},
"end": 35,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 15,
"name": "x",
"start": 14,
"type": "Identifier"
},
"labeled": false
}
],
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
35,
0
]
}
]
},
"three": {
"type": "Number",
"value": 3.0,
"__meta": [
{
"sourceRange": [
110,
111,
0
]
},
{
"sourceRange": [
121,
122,
0
]
}
]
},
"two": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
95,
96,
0
]
},
{
"sourceRange": [
32,
33,
0
]
}
]
}
}

View File

@ -1,177 +1,143 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing kw_fn_with_defaults.kcl
description: Variables in memory after executing kw_fn_with_defaults.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 43,
"left": {
"end": 38,
"name": "x",
"start": 37,
"type": "Identifier",
"type": "Identifier"
},
"operator": "+",
"right": {
"end": 43,
"name": "by",
"start": 41,
"type": "Identifier",
"type": "Identifier"
},
"start": 37,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 43,
"start": 30,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 45,
"start": 26
},
"end": 45,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 15,
"name": "x",
"start": 14,
"type": "Identifier"
},
"labeled": false
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"increment": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 43,
"left": {
"end": 38,
"name": "x",
"start": 37,
"type": "Identifier",
"type": "Identifier"
},
{
"type": "Parameter",
"identifier": {
"end": 19,
"name": "by",
"start": 17,
"type": "Identifier"
},
"default_value": {
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
},
"raw": "1"
}
}
],
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
45,
0
]
}
]
},
"twentyOne": {
"type": "Number",
"value": 21.0,
"__meta": [
{
"sourceRange": [
88,
89,
0
]
"operator": "+",
"right": {
"end": 43,
"name": "by",
"start": 41,
"type": "Identifier",
"type": "Identifier"
},
"start": 37,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
{
"sourceRange": [
96,
98,
0
]
}
]
},
"two": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
63,
64,
0
]
}
]
}
"end": 43,
"start": 30,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 45,
"start": 26
},
"snapshots": [
"end": 45,
"params": [
{
"parent_snapshot": null,
"data": {
"increment": {
"type": "Tombstone",
"value": null,
"__meta": []
"type": "Parameter",
"identifier": {
"end": 15,
"name": "x",
"start": 14,
"type": "Identifier"
},
"labeled": false
},
{
"type": "Parameter",
"identifier": {
"end": 19,
"name": "by",
"start": 17,
"type": "Identifier"
},
"default_value": {
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
},
"twentyOne": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"two": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"raw": "1"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"start": 12,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
12,
45,
0
]
}
]
},
"twentyOne": {
"type": "Number",
"value": 21.0,
"__meta": [
{
"sourceRange": [
88,
89,
0
]
},
{
"sourceRange": [
96,
98,
0
]
}
]
},
"two": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
63,
64,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,227 +1,213 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing neg_xz_plane.kcl
snapshot_kind: text
description: Variables in memory after executing neg_xz_plane.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
67,
97,
0
],
"tag": null,
"type": "extrudePlane"
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
131,
0
],
"tag": null,
"type": "extrudePlane"
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
67,
97,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
103,
131,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
137,
145,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
137,
145,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
67,
97,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
131,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
137,
145,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
36,
61,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
"sourceRange": [
67,
97,
0
]
},
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
103,
131,
0
]
},
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
137,
145,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
36,
61,
0
]
}
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
]
},
"snapshots": [],
"parent": null
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
36,
61,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -1,424 +1,410 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing parametric.kcl
snapshot_kind: text
description: Variables in memory after executing parametric.kcl
---
{
"environments": [
{
"bindings": {
"FOS": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"FOS": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
105,
106,
0
]
}
]
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bracket": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
284,
305,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
311,
332,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
338,
365,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
371,
405,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
411,
445,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
451,
459,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
105,
106,
284,
305,
0
]
}
]
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bracket": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
284,
305,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
311,
332,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
338,
365,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
371,
405,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
411,
445,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
451,
459,
0
],
"tag": null,
"type": "extrudePlane"
}
},
"from": [
0.0,
0.0
],
"sketch": {
"type": "Sketch",
"tag": null,
"to": [
0.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
284,
305,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
311,
332,
0
]
},
"from": [
0.0,
5.0
],
"tag": null,
"to": [
8.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
338,
365,
0
]
},
"from": [
8.0,
5.0
],
"tag": null,
"to": [
8.0,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
371,
405,
0
]
},
"from": [
8.0,
4.8148
],
"tag": null,
"to": [
0.1852,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
411,
445,
0
]
},
"from": [
0.1852,
4.8148
],
"tag": null,
"to": [
0.1852,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
451,
459,
0
]
},
"from": [
0.1852,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
253,
278,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
"sourceRange": [
311,
332,
0
]
},
"height": 9.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"from": [
0.0,
5.0
],
"tag": null,
"to": [
8.0,
5.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
338,
365,
0
]
},
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
"from": [
8.0,
5.0
],
"tag": null,
"to": [
8.0,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
371,
405,
0
]
},
"from": [
8.0,
4.8148
],
"tag": null,
"to": [
0.1852,
4.8148
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
411,
445,
0
]
},
"from": [
0.1852,
4.8148
],
"tag": null,
"to": [
0.1852,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
451,
459,
0
]
},
"from": [
0.1852,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
253,
278,
0
]
}
},
"distance": {
"type": "Number",
"value": 6.0,
"__meta": [
{
"sourceRange": [
87,
88,
0
]
}
]
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"leg1": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
115,
116,
0
]
}
]
},
"leg2": {
"type": "Number",
"value": 8.0,
"__meta": [
{
"sourceRange": [
134,
135,
0
]
}
]
},
"p": {
"type": "Number",
"value": 150.0,
"__meta": [
{
"sourceRange": [
48,
51,
0
]
}
]
},
"sigmaAllow": {
"type": "Number",
"value": 35000.0,
"__meta": [
{
"sourceRange": [
13,
18,
0
]
}
]
},
"thickness": {
"type": "Number",
"value": 0.1851640199545103,
"__meta": [
{
"sourceRange": [
158,
207,
0
]
}
]
},
"width": {
"type": "Number",
"value": 9.0,
"__meta": [
{
"sourceRange": [
34,
35,
0
]
}
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
]
},
"height": 9.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
253,
278,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"distance": {
"type": "Number",
"value": 6.0,
"__meta": [
{
"sourceRange": [
87,
88,
0
]
}
]
},
"leg1": {
"type": "Number",
"value": 5.0,
"__meta": [
{
"sourceRange": [
115,
116,
0
]
}
]
},
"leg2": {
"type": "Number",
"value": 8.0,
"__meta": [
{
"sourceRange": [
134,
135,
0
]
}
]
},
"p": {
"type": "Number",
"value": 150.0,
"__meta": [
{
"sourceRange": [
48,
51,
0
]
}
]
},
"sigmaAllow": {
"type": "Number",
"value": 35000.0,
"__meta": [
{
"sourceRange": [
13,
18,
0
]
}
]
},
"thickness": {
"type": "Number",
"value": 0.1851640199545103,
"__meta": [
{
"sourceRange": [
158,
207,
0
]
}
]
},
"width": {
"type": "Number",
"value": 9.0,
"__meta": [
{
"sourceRange": [
34,
35,
0
]
}
]
}
}

View File

@ -1,516 +1,502 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing parametric_with_tan_arc.kcl
snapshot_kind: text
description: Variables in memory after executing parametric_with_tan_arc.kcl
---
{
"environments": [
{
"bindings": {
"FOS": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"FOS": {
"type": "Number",
"value": 2.0,
"__meta": [
{
"sourceRange": [
107,
108,
0
]
}
]
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bracket": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
266,
293,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
299,
350,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
356,
385,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
391,
418,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
424,
452,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
458,
541,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
547,
575,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
581,
589,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
107,
108,
266,
293,
0
]
}
]
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"bracket": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
266,
293,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
299,
350,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
356,
385,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
391,
418,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
424,
452,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
458,
541,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
547,
575,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
581,
589,
0
],
"tag": null,
"type": "extrudePlane"
}
},
"from": [
0.0,
0.0
],
"sketch": {
"type": "Sketch",
"tag": null,
"to": [
0.0,
8.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
266,
293,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
8.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
299,
350,
0
]
},
"ccw": true,
"center": [
-0.7236272269866327,
8.0
],
"from": [
0.0,
8.0
],
"tag": null,
"to": [
-0.7236,
8.7236
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
356,
385,
0
]
},
"from": [
-0.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.7236
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
391,
418,
0
]
},
"from": [
-9.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
424,
452,
0
]
},
"from": [
-9.7236,
8.3618
],
"tag": null,
"to": [
-0.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
458,
541,
0
]
},
"ccw": false,
"center": [
-0.7236272269866326,
8.0
],
"from": [
-0.7236,
8.3618
],
"tag": null,
"to": [
-0.3618,
8.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
547,
575,
0
]
},
"from": [
-0.3618,
8.0
],
"tag": null,
"to": [
-0.3618,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
581,
589,
0
]
},
"from": [
-0.3618,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
239,
260,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
"sourceRange": [
299,
350,
0
]
},
"height": 11.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"ccw": true,
"center": [
-0.7236272269866327,
8.0
],
"from": [
0.0,
8.0
],
"tag": null,
"to": [
-0.7236,
8.7236
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
356,
385,
0
]
},
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
"from": [
-0.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.7236
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
391,
418,
0
]
},
"from": [
-9.7236,
8.7236
],
"tag": null,
"to": [
-9.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
424,
452,
0
]
},
"from": [
-9.7236,
8.3618
],
"tag": null,
"to": [
-0.7236,
8.3618
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
458,
541,
0
]
},
"ccw": false,
"center": [
-0.7236272269866326,
8.0
],
"from": [
-0.7236,
8.3618
],
"tag": null,
"to": [
-0.3618,
8.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
547,
575,
0
]
},
"from": [
-0.3618,
8.0
],
"tag": null,
"to": [
-0.3618,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
581,
589,
0
]
},
"from": [
-0.3618,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
239,
260,
0
]
}
},
"distance": {
"type": "Number",
"value": 12.0,
"__meta": [
{
"sourceRange": [
88,
90,
0
]
}
]
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"filletR": {
"type": "Number",
"value": 0.7236272269866327,
"__meta": [
{
"sourceRange": [
121,
172,
0
]
},
{
"sourceRange": [
195,
196,
0
]
}
]
},
"p": {
"type": "Number",
"value": 150.0,
"__meta": [
{
"sourceRange": [
49,
52,
0
]
}
]
},
"shelfMountL": {
"type": "Number",
"value": 9.0,
"__meta": [
{
"sourceRange": [
211,
212,
0
]
}
]
},
"sigmaAllow": {
"type": "Number",
"value": 15000.0,
"__meta": [
{
"sourceRange": [
13,
18,
0
]
}
]
},
"thickness": {
"type": "Number",
"value": 0.36181361349331637,
"__meta": [
{
"sourceRange": [
121,
172,
0
]
}
]
},
"wallMountL": {
"type": "Number",
"value": 8.0,
"__meta": [
{
"sourceRange": [
226,
227,
0
]
}
]
},
"width": {
"type": "Number",
"value": 11.0,
"__meta": [
{
"sourceRange": [
34,
36,
0
]
}
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
]
},
"height": 11.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
239,
260,
0
]
}
},
"snapshots": [],
"parent": null
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
},
"distance": {
"type": "Number",
"value": 12.0,
"__meta": [
{
"sourceRange": [
88,
90,
0
]
}
]
},
"filletR": {
"type": "Number",
"value": 0.7236272269866327,
"__meta": [
{
"sourceRange": [
121,
172,
0
]
},
{
"sourceRange": [
195,
196,
0
]
}
]
},
"p": {
"type": "Number",
"value": 150.0,
"__meta": [
{
"sourceRange": [
49,
52,
0
]
}
]
},
"shelfMountL": {
"type": "Number",
"value": 9.0,
"__meta": [
{
"sourceRange": [
211,
212,
0
]
}
]
},
"sigmaAllow": {
"type": "Number",
"value": 15000.0,
"__meta": [
{
"sourceRange": [
13,
18,
0
]
}
]
},
"thickness": {
"type": "Number",
"value": 0.36181361349331637,
"__meta": [
{
"sourceRange": [
121,
172,
0
]
}
]
},
"wallMountL": {
"type": "Number",
"value": 8.0,
"__meta": [
{
"sourceRange": [
226,
227,
0
]
}
]
},
"width": {
"type": "Number",
"value": 11.0,
"__meta": [
{
"sourceRange": [
34,
36,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +1,185 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing property_of_object.kcl
description: Variables in memory after executing property_of_object.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"obj": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
73,
74,
0
]
}
]
},
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
56,
76,
0
]
}
]
},
"obj2": {
"type": "Object",
"value": {
"inner": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
73,
74,
0
]
}
]
},
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
56,
76,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
531,
546,
0
]
}
]
},
"one_a": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_b": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_d": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"p": {
"type": "String",
"value": "foo",
"__meta": [
{
"sourceRange": [
344,
349,
0
]
}
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"obj": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
73,
74,
0
]
}
]
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
56,
76,
0
]
}
]
},
"obj2": {
"type": "Object",
"value": {
"inner": {
"type": "Object",
"value": {
"bar": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
73,
74,
0
]
}
]
},
"foo": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
56,
76,
0
]
}
]
}
},
"__meta": [
{
"sourceRange": [
531,
546,
0
]
}
]
},
"one_a": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_b": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_c": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"one_d": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
64,
65,
0
]
}
]
},
"p": {
"type": "String",
"value": "foo",
"__meta": [
{
"sourceRange": [
344,
349,
0
]
}
]
}
}

View File

@ -1,529 +1,480 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing riddle_small.kcl
description: Variables in memory after executing riddle_small.kcl
---
{
"environments": [
{
"bindings": {
"ANSWER": {
"type": "Number",
"value": 41803.0,
"__meta": [
{
"sourceRange": [
9,
14,
0
]
}
]
"ANSWER": {
"type": "Number",
"value": 41803.0,
"__meta": [
{
"sourceRange": [
9,
14,
0
]
}
]
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"ox": {
"type": "Number",
"value": -26.0,
"__meta": [
{
"sourceRange": [
96,
98,
0
]
},
{
"sourceRange": [
9,
14,
0
]
},
{
"sourceRange": [
73,
79,
0
]
},
{
"sourceRange": [
49,
54,
0
]
},
{
"sourceRange": [
58,
64,
0
]
},
{
"sourceRange": [
110,
112,
0
]
}
]
},
"oy": {
"type": "Number",
"value": 34.0,
"__meta": [
{
"sourceRange": [
119,
121,
0
]
},
{
"sourceRange": [
9,
14,
0
]
},
{
"sourceRange": [
85,
90,
0
]
},
{
"sourceRange": [
49,
54,
0
]
},
{
"sourceRange": [
58,
64,
0
]
},
{
"sourceRange": [
133,
135,
0
]
}
]
},
"r": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
199,
217,
0
],
"tag": null,
"type": "extrudePlane"
},
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
242,
0
],
"tag": null,
"type": "extrudePlane"
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
248,
267,
0
],
"tag": null,
"type": "extrudePlane"
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"ox": {
"type": "Number",
"value": -26.0,
"__meta": [
{
"sourceRange": [
96,
98,
0
]
},
{
"sourceRange": [
9,
14,
0
]
},
{
"sourceRange": [
73,
79,
0
]
},
{
"sourceRange": [
49,
54,
0
]
},
{
"sourceRange": [
58,
64,
0
]
},
{
"sourceRange": [
110,
112,
0
]
}
]
},
"oy": {
"type": "Number",
"value": 34.0,
"__meta": [
{
"sourceRange": [
119,
121,
0
]
},
{
"sourceRange": [
9,
14,
0
]
},
{
"sourceRange": [
85,
90,
0
]
},
{
"sourceRange": [
49,
54,
0
]
},
{
"sourceRange": [
58,
64,
0
]
},
{
"sourceRange": [
133,
135,
0
]
}
]
},
"r": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
199,
217,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
223,
242,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
248,
267,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
273,
281,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
273,
281,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
199,
217,
0
]
},
"from": [
-26.0,
34.0
],
"tag": null,
"to": [
-25.0,
34.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
242,
0
]
},
"from": [
-25.0,
34.0
],
"tag": null,
"to": [
-25.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
248,
267,
0
]
},
"from": [
-25.0,
33.0
],
"tag": null,
"to": [
-26.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
273,
281,
0
]
},
"from": [
-26.0,
33.0
],
"tag": null,
"to": [
-26.0,
34.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-26.0,
34.0
],
"to": [
-26.0,
34.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
166,
193,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
"sourceRange": [
199,
217,
0
]
},
"height": 1.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"from": [
-26.0,
34.0
],
"tag": null,
"to": [
-25.0,
34.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
223,
242,
0
]
},
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
"from": [
-25.0,
34.0
],
"tag": null,
"to": [
-25.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
248,
267,
0
]
},
"from": [
-25.0,
33.0
],
"tag": null,
"to": [
-26.0,
33.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
273,
281,
0
]
},
"from": [
-26.0,
33.0
],
"tag": null,
"to": [
-26.0,
34.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
-26.0,
34.0
],
"to": [
-26.0,
34.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
166,
193,
0
]
}
},
"t": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 64,
"left": {
"end": 54,
"left": {
"end": 46,
"left": {
"end": 42,
"name": "ANSWER",
"start": 36,
"type": "Identifier",
"type": "Identifier"
},
"operator": "*",
"right": {
"end": 46,
"name": "s",
"start": 45,
"type": "Identifier",
"type": "Identifier"
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 54,
"raw": "12345",
"start": 49,
"type": "Literal",
"type": "Literal",
"value": {
"value": 12345.0,
"suffix": "None"
}
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "%",
"right": {
"end": 64,
"raw": "214748",
"start": 58,
"type": "Literal",
"type": "Literal",
"value": {
"value": 214748.0,
"suffix": "None"
}
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 64,
"start": 28,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 66,
"start": 24
},
"end": 66,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 22,
"name": "s",
"start": 21,
"type": "Identifier"
}
}
],
"start": 20,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
20,
66,
0
]
}
]
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"xs": {
"type": "Number",
"value": 205804.0,
"__meta": [
{
"sourceRange": [
73,
79,
0
]
}
]
},
"ys": {
"type": "Number",
"value": 71816.0,
"__meta": [
{
"sourceRange": [
85,
90,
0
]
}
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
]
},
"height": 1.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
166,
193,
0
]
}
]
}
},
"t": {
"type": "Function",
"expression": {
"body": {
"body": [
{
"argument": {
"end": 64,
"left": {
"end": 54,
"left": {
"end": 46,
"left": {
"end": 42,
"name": "ANSWER",
"start": 36,
"type": "Identifier",
"type": "Identifier"
},
"operator": "*",
"right": {
"end": 46,
"name": "s",
"start": 45,
"type": "Identifier",
"type": "Identifier"
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"end": 54,
"raw": "12345",
"start": 49,
"type": "Literal",
"type": "Literal",
"value": {
"value": 12345.0,
"suffix": "None"
}
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "%",
"right": {
"end": 64,
"raw": "214748",
"start": 58,
"type": "Literal",
"type": "Literal",
"value": {
"value": 214748.0,
"suffix": "None"
}
},
"start": 36,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"end": 64,
"start": 28,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 66,
"start": 24
},
"snapshots": [
"end": 66,
"params": [
{
"parent_snapshot": null,
"data": {
"ox": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"oy": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"r": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"t": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"xs": {
"type": "Tombstone",
"value": null,
"__meta": []
},
"ys": {
"type": "Tombstone",
"value": null,
"__meta": []
}
"type": "Parameter",
"identifier": {
"end": 22,
"name": "s",
"start": 21,
"type": "Identifier"
}
}
],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"start": 20,
"type": "FunctionExpression"
},
"memory": [
0,
1
],
"__meta": [
{
"sourceRange": [
20,
66,
0
]
}
]
},
"xs": {
"type": "Number",
"value": 205804.0,
"__meta": [
{
"sourceRange": [
73,
79,
0
]
}
]
},
"ys": {
"type": "Number",
"value": 71816.0,
"__meta": [
{
"sourceRange": [
85,
90,
0
]
}
]
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,254 +1,241 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing tan_arc_x_line.kcl
description: Variables in memory after executing tan_arc_x_line.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"angleOffset": {
"type": "Number",
"value": 135.0,
"__meta": [
{
"sourceRange": [
36,
39,
0
]
}
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"angleOffset": {
"type": "Number",
"value": 135.0,
"__meta": [
{
"sourceRange": [
36,
39,
0
]
}
]
},
"angleStart": {
"type": "Number",
"value": 110.0,
"__meta": [
{
"sourceRange": [
59,
62,
0
]
}
]
},
"arc1": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
191,
252,
0
]
},
"angleStart": {
"type": "Number",
"value": 110.0,
"__meta": [
{
"sourceRange": [
59,
62,
0
]
}
]
"ccw": true,
"center": [
-0.9396929628060517,
-0.34201920363304794
],
"from": [
-0.0000003420201433256687,
0.0000009396926207859084
],
"tag": {
"end": 251,
"start": 246,
"type": "TagDeclarator",
"value": "arc1"
},
"arc1": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc1",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
191,
252,
0
]
},
"ccw": true,
"center": [
-0.9396929628060517,
-0.34201920363304794
],
"from": [
-0.0000003420201433256687,
0.0000009396926207859084
],
"tag": {
"end": 251,
"start": 246,
"type": "TagDeclarator",
"value": "arc1"
},
"to": [
-1.8460007498427018,
0.08059905810765156
],
"type": "TangentialArc"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
246,
251,
0
]
}
]
},
"arc2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
258,
344,
0
]
},
"ccw": true,
"center": [
-1.3928468563243768,
-0.13071007276269808
],
"from": [
-1.8460007498427018,
0.08059905810765156
],
"tag": {
"end": 343,
"start": 338,
"type": "TagDeclarator",
"value": "arc2"
},
"to": [
-1.2218367846615423,
-0.6005563831556522
],
"type": "TangentialArc"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
338,
343,
0
]
}
]
},
"arc3": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
350,
437,
0
]
},
"ccw": false,
"center": [
-1.050826712998708,
-1.0704026935486064
],
"from": [
-1.2218367846615423,
-0.6005563831556522
],
"tag": {
"end": 436,
"start": 431,
"type": "TagDeclarator",
"value": "arc3"
},
"to": [
-0.5976728194803829,
-1.281711824418956
],
"type": "TangentialArc"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
431,
436,
0
]
}
]
},
"r": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
44,
45,
0
]
}
]
},
"startX": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
9,
10,
0
]
}
]
},
"startY": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
20,
21,
0
]
}
]
}
"to": [
-1.8460007498427018,
0.08059905810765156
],
"type": "TangentialArc"
},
"snapshots": [],
"parent": null
}
],
"currentEnv": [
0,
0
],
"callStack": []
"surface": null
},
"__meta": [
{
"sourceRange": [
246,
251,
0
]
}
]
},
"arc2": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc2",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
258,
344,
0
]
},
"ccw": true,
"center": [
-1.3928468563243768,
-0.13071007276269808
],
"from": [
-1.8460007498427018,
0.08059905810765156
],
"tag": {
"end": 343,
"start": 338,
"type": "TagDeclarator",
"value": "arc2"
},
"to": [
-1.2218367846615423,
-0.6005563831556522
],
"type": "TangentialArc"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
338,
343,
0
]
}
]
},
"arc3": {
"type": "TagIdentifier",
"type": "TagIdentifier",
"value": "arc3",
"info": {
"type": "TagEngineInfo",
"id": "[uuid]",
"sketch": "[uuid]",
"path": {
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
350,
437,
0
]
},
"ccw": false,
"center": [
-1.050826712998708,
-1.0704026935486064
],
"from": [
-1.2218367846615423,
-0.6005563831556522
],
"tag": {
"end": 436,
"start": 431,
"type": "TagDeclarator",
"value": "arc3"
},
"to": [
-0.5976728194803829,
-1.281711824418956
],
"type": "TangentialArc"
},
"surface": null
},
"__meta": [
{
"sourceRange": [
431,
436,
0
]
}
]
},
"r": {
"type": "Number",
"value": 1.0,
"__meta": [
{
"sourceRange": [
44,
45,
0
]
}
]
},
"startX": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
9,
10,
0
]
}
]
},
"startY": {
"type": "Number",
"value": 0.0,
"__meta": [
{
"sourceRange": [
20,
21,
0
]
}
]
}
}

View File

@ -1,232 +1,218 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing tangential_arc.kcl
snapshot_kind: text
description: Variables in memory after executing tangential_arc.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"boxSketch": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
39,
58,
0
],
"tag": null,
"type": "extrudePlane"
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
64,
109,
0
],
"tag": null,
"type": "extrudeArc"
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"boxSketch": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
39,
58,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
64,
109,
0
],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
115,
135,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
115,
135,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
39,
58,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
64,
109,
0
]
},
"ccw": true,
"center": [
-5.0,
10.0
],
"from": [
0.0,
10.0
],
"tag": null,
"to": [
-5.0,
15.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
115,
135,
0
]
},
"from": [
-5.0,
15.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
12,
33,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
"sourceRange": [
39,
58,
0
]
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"from": [
0.0,
0.0
],
"tag": null,
"to": [
0.0,
10.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
64,
109,
0
]
},
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
"ccw": true,
"center": [
-5.0,
10.0
],
"from": [
0.0,
10.0
],
"tag": null,
"to": [
-5.0,
15.0
],
"type": "TangentialArc"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
115,
135,
0
]
},
"from": [
-5.0,
15.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XY",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
12,
33,
0
]
}
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
]
},
"snapshots": [],
"parent": null
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
12,
33,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -1,227 +1,213 @@
---
source: kcl/src/simulation_tests.rs
description: Program memory after executing xz_plane.kcl
snapshot_kind: text
description: Variables in memory after executing xz_plane.kcl
---
{
"environments": [
{
"bindings": {
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
"HALF_TURN": {
"type": "Number",
"value": 180.0,
"__meta": []
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
96,
0
],
"tag": null,
"type": "extrudePlane"
},
"QUARTER_TURN": {
"type": "Number",
"value": 90.0,
"__meta": []
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
102,
130,
0
],
"tag": null,
"type": "extrudePlane"
},
"THREE_QUARTER_TURN": {
"type": "Number",
"value": 270.0,
"__meta": []
},
"ZERO": {
"type": "Number",
"value": 0.0,
"__meta": []
},
"part001": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
66,
96,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
102,
130,
0
],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
136,
144,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [
136,
144,
0
],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
66,
96,
0
]
},
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
130,
0
]
},
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
136,
144,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
"sourceRange": [
66,
96,
0
]
},
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
"from": [
0.0,
0.0
],
"tag": null,
"to": [
100.0,
100.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
102,
130,
0
]
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
"from": [
100.0,
100.0
],
"tag": null,
"to": [
100.0,
0.0
],
"type": "ToPoint"
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
136,
144,
0
]
},
"from": [
100.0,
0.0
],
"tag": null,
"to": [
0.0,
0.0
],
"type": "ToPoint"
}
],
"on": {
"type": "plane",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "XZ",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0
},
"units": {
"type": "Mm"
},
"__meta": []
},
"start": {
"from": [
0.0,
0.0
],
"to": [
0.0,
0.0
],
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": [
35,
60,
0
]
}
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
},
"snapshots": [],
"parent": null
"height": 12.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"__meta": [
{
"sourceRange": [
35,
60,
0
]
}
]
}
],
"currentEnv": [
0,
0
],
"callStack": []
}
}

View File

@ -421,18 +421,6 @@ pub fn get_tangential_arc_to_info(
}
}
/// Create the default program memory.
#[wasm_bindgen]
pub fn program_memory_init() -> Result<JsValue, String> {
console_error_panic_hook::set_once();
let memory = kcl_lib::exec::ProgramMemory::new();
// The serde-wasm-bindgen does not work here because of weird HashMap issues so we use the
// gloo-serialize crate instead.
JsValue::from_serde(&memory).map_err(|e| e.to_string())
}
/// Get a coredump.
#[wasm_bindgen]
pub async fn coredump(core_dump_manager: kcl_lib::wasm_engine::CoreDumpManager) -> Result<JsValue, String> {

View File

@ -12,11 +12,11 @@ async fn setup(code: &str, name: &str) -> Result<(ExecutorContext, Program, Modu
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();
// We need to get the sketch ID.
// Get the sketch ID from memory.
let KclValue::Sketch { value: sketch } = exec_state.memory().get(name, SourceRange::default()).unwrap() else {
anyhow::bail!("part001 not found in memory: {:?}", exec_state.memory());
let KclValue::Sketch { value: sketch } = outcome.variables.get(name).unwrap() else {
anyhow::bail!("part001 not found in: {:?}", outcome.variables);
};
let sketch_id = sketch.id;