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:
@ -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'
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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),
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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<
|
||||
|
@ -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),
|
||||
|
@ -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();
|
||||
|
@ -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::{
|
||||
|
@ -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;
|
||||
|
@ -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>,
|
||||
|
@ -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]
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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")]
|
||||
|
@ -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>,
|
||||
|
@ -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");
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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)]
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing add_lots.kcl
|
||||
description: Variables in memory after executing add_lots.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1515,30 +1512,4 @@ description: Program memory after executing add_lots.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"f": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"x": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -437,14 +434,4 @@ description: Program memory after executing angled_line.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -159,14 +156,4 @@ description: Program memory after executing array_elem_pop.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -224,14 +221,4 @@ description: Program memory after executing array_elem_push.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -381,14 +378,4 @@ description: Program memory after executing array_range_expr.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -183,14 +180,4 @@ description: Program memory after executing array_range_negative_expr.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing artifact_graph_example_code1.kcl
|
||||
description: Variables in memory after executing artifact_graph_example_code1.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1968,14 +1965,4 @@ description: Program memory after executing artifact_graph_example_code1.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing artifact_graph_example_code_no_3d.kcl
|
||||
description: Variables in memory after executing artifact_graph_example_code_no_3d.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -624,14 +621,4 @@ description: Program memory after executing artifact_graph_example_code_no_3d.kc
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -215,14 +211,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing artifact_graph_sketch_on_face_etc.kcl
|
||||
description: Variables in memory after executing artifact_graph_sketch_on_face_etc.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -4908,14 +4905,4 @@ description: Program memory after executing artifact_graph_sketch_on_face_etc.kc
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing basic_fillet_cube_close_opposite.kcl
|
||||
description: Variables in memory after executing basic_fillet_cube_close_opposite.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -649,14 +646,4 @@ description: Program memory after executing basic_fillet_cube_close_opposite.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -520,14 +517,4 @@ description: Program memory after executing basic_fillet_cube_end.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing basic_fillet_cube_next_adjacent.kcl
|
||||
description: Variables in memory after executing basic_fillet_cube_next_adjacent.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -771,14 +768,4 @@ description: Program memory after executing basic_fillet_cube_next_adjacent.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing basic_fillet_cube_previous_adjacent.kcl
|
||||
description: Variables in memory after executing basic_fillet_cube_previous_adjacent.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -771,14 +768,4 @@ description: Program memory after executing basic_fillet_cube_previous_adjacent.
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -520,14 +517,4 @@ description: Program memory after executing basic_fillet_cube_start.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -344,14 +341,4 @@ description: Program memory after executing big_number_angle_to_match_length_x.k
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -344,14 +341,4 @@ description: Program memory after executing big_number_angle_to_match_length_y.k
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -158,14 +155,4 @@ description: Program memory after executing boolean_logical_and.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -120,14 +117,4 @@ description: Program memory after executing boolean_logical_multiple.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -158,14 +155,4 @@ description: Program memory after executing boolean_logical_or.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -158,14 +154,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing circular_pattern3d_a_pattern.kcl
|
||||
snapshot_kind: text
|
||||
description: Variables in memory after executing circular_pattern3d_a_pattern.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -63465,14 +63461,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -26,14 +23,4 @@ description: Program memory after executing comparisons.kcl
|
||||
"value": 0.0,
|
||||
"__meta": []
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -184,14 +181,4 @@ description: Program memory after executing computed_var.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing cube.kcl
|
||||
description: Variables in memory after executing cube.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -948,30 +945,4 @@ description: Program memory after executing cube.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"myCube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -243,35 +240,4 @@ description: Program memory after executing double_map_fn.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"increment": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"xs": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"ys": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing fillet-and-shell.kcl
|
||||
description: Variables in memory after executing fillet-and-shell.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1569,265 +1566,4 @@ description: Program memory after executing fillet-and-shell.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"edge1": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
"value": "edge1",
|
||||
"info": {
|
||||
"type": "TagEngineInfo",
|
||||
"id": "[uuid]",
|
||||
"sketch": "[uuid]",
|
||||
"path": {
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
833,
|
||||
881,
|
||||
0
|
||||
]
|
||||
},
|
||||
"from": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"end": 880,
|
||||
"start": 874,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge1"
|
||||
},
|
||||
"to": [
|
||||
38.0,
|
||||
0.0
|
||||
],
|
||||
"type": "ToPoint"
|
||||
},
|
||||
"surface": {
|
||||
"faceId": "[uuid]",
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
833,
|
||||
881,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 880,
|
||||
"start": 874,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge1"
|
||||
},
|
||||
"type": "extrudePlane"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
874,
|
||||
880,
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"edge2": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
"value": "edge2",
|
||||
"info": {
|
||||
"type": "TagEngineInfo",
|
||||
"id": "[uuid]",
|
||||
"sketch": "[uuid]",
|
||||
"path": {
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
887,
|
||||
944,
|
||||
0
|
||||
]
|
||||
},
|
||||
"from": [
|
||||
38.0,
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"end": 943,
|
||||
"start": 937,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge2"
|
||||
},
|
||||
"to": [
|
||||
38.0,
|
||||
73.0
|
||||
],
|
||||
"type": "ToPoint"
|
||||
},
|
||||
"surface": {
|
||||
"faceId": "[uuid]",
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
887,
|
||||
944,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 943,
|
||||
"start": 937,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge2"
|
||||
},
|
||||
"type": "extrudePlane"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
937,
|
||||
943,
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"edge3": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
"value": "edge3",
|
||||
"info": {
|
||||
"type": "TagEngineInfo",
|
||||
"id": "[uuid]",
|
||||
"sketch": "[uuid]",
|
||||
"path": {
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
950,
|
||||
999,
|
||||
0
|
||||
]
|
||||
},
|
||||
"from": [
|
||||
38.0,
|
||||
73.0
|
||||
],
|
||||
"tag": {
|
||||
"end": 998,
|
||||
"start": 992,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge3"
|
||||
},
|
||||
"to": [
|
||||
0.0,
|
||||
73.0
|
||||
],
|
||||
"type": "ToPoint"
|
||||
},
|
||||
"surface": {
|
||||
"faceId": "[uuid]",
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
950,
|
||||
999,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 998,
|
||||
"start": 992,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge3"
|
||||
},
|
||||
"type": "extrudePlane"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
992,
|
||||
998,
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"edge4": {
|
||||
"type": "TagIdentifier",
|
||||
"type": "TagIdentifier",
|
||||
"value": "edge4",
|
||||
"info": {
|
||||
"type": "TagEngineInfo",
|
||||
"id": "[uuid]",
|
||||
"sketch": "[uuid]",
|
||||
"path": {
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
1005,
|
||||
1024,
|
||||
0
|
||||
]
|
||||
},
|
||||
"from": [
|
||||
0.0,
|
||||
73.0
|
||||
],
|
||||
"tag": {
|
||||
"end": 1023,
|
||||
"start": 1017,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge4"
|
||||
},
|
||||
"to": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"type": "ToPoint"
|
||||
},
|
||||
"surface": {
|
||||
"faceId": "[uuid]",
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
1005,
|
||||
1024,
|
||||
0
|
||||
],
|
||||
"tag": {
|
||||
"end": 1023,
|
||||
"start": 1017,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge4"
|
||||
},
|
||||
"type": "extrudePlane"
|
||||
}
|
||||
},
|
||||
"__meta": [
|
||||
{
|
||||
"sourceRange": [
|
||||
1017,
|
||||
1023,
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"m25Screw": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing function_sketch.kcl
|
||||
description: Variables in memory after executing function_sketch.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -626,30 +623,4 @@ description: Program memory after executing function_sketch.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"box": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"fnBox": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing function_sketch_with_position.kcl
|
||||
description: Variables in memory after executing function_sketch_with_position.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -612,30 +609,4 @@ description: Program memory after executing function_sketch_with_position.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"box": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"thing": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -158,14 +154,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -237,14 +233,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing i_shape.kcl
|
||||
snapshot_kind: text
|
||||
description: Variables in memory after executing i_shape.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1988,14 +1984,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -65,14 +62,4 @@ description: Program memory after executing if_else.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -39,53 +36,4 @@ description: Program memory after executing import_constant.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -39,92 +36,4 @@ description: Program memory after executing import_export.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -55,14 +52,4 @@ description: Program memory after executing import_foreign.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -140,453 +137,4 @@ description: Program memory after executing import_function_not_sketch.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"one": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"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": []
|
||||
},
|
||||
"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,
|
||||
"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": {
|
||||
"two": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -88,113 +85,4 @@ description: Program memory after executing import_glob.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -75,203 +72,4 @@ description: Program memory after executing import_side_effect.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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": 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": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -171,40 +167,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"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": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -118,14 +115,4 @@ description: Program memory after executing index_of_array.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing kittycad_svg.kcl
|
||||
snapshot_kind: text
|
||||
description: Variables in memory after executing kittycad_svg.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -8852,14 +8848,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -211,45 +208,4 @@ description: Program memory after executing kw_fn.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"increment": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"add": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"three": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"two": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -143,35 +140,4 @@ description: Program memory after executing kw_fn_with_defaults.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"increment": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"twentyOne": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"two": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing linear_pattern3d_a_pattern.kcl
|
||||
snapshot_kind: text
|
||||
description: Variables in memory after executing linear_pattern3d_a_pattern.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -12295,14 +12291,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing mike_stress_test.kcl
|
||||
snapshot_kind: text
|
||||
description: Variables in memory after executing mike_stress_test.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -31152,14 +31148,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -214,14 +210,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -411,14 +407,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -503,14 +499,4 @@ snapshot_kind: text
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing pentagon_fillet_sugar.kcl
|
||||
description: Variables in memory after executing pentagon_fillet_sugar.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -3442,50 +3439,4 @@ description: Program memory after executing pentagon_fillet_sugar.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"arc_tag": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"c1": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"c2": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"circl": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"plumbus0": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"plumbus1": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing pipe_as_arg.kcl
|
||||
description: Variables in memory after executing pipe_as_arg.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1069,50 +1066,4 @@ description: Program memory after executing pipe_as_arg.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"double": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"myCube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"width": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing poop_chute.kcl
|
||||
description: Variables in memory after executing poop_chute.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"Fx": {
|
||||
"type": "Number",
|
||||
"value": 0.5,
|
||||
@ -1810,14 +1807,4 @@ description: Program memory after executing poop_chute.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -185,14 +182,4 @@ description: Program memory after executing property_of_object.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -480,50 +477,4 @@ description: Program memory after executing riddle_small.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch-on-chamfer-two-times-different-order.kcl
|
||||
description: Variables in memory after executing sketch-on-chamfer-two-times-different-order.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -4491,14 +4488,4 @@ description: Program memory after executing sketch-on-chamfer-two-times-differen
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch-on-chamfer-two-times.kcl
|
||||
description: Variables in memory after executing sketch-on-chamfer-two-times.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -4491,14 +4488,4 @@ description: Program memory after executing sketch-on-chamfer-two-times.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_in_object.kcl
|
||||
description: Variables in memory after executing sketch_in_object.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -990,45 +987,4 @@ description: Program memory after executing sketch_in_object.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"test": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"test2": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"x": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"x2": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face.kcl
|
||||
description: Variables in memory after executing sketch_on_face.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -882,14 +879,4 @@ description: Program memory after executing sketch_on_face.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face_after_fillets_referencing_face.kcl
|
||||
description: Variables in memory after executing sketch_on_face_after_fillets_referencing_face.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"FOS": {
|
||||
"type": "Number",
|
||||
"value": 2.0,
|
||||
@ -1598,14 +1595,4 @@ description: Program memory after executing sketch_on_face_after_fillets_referen
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face_circle_tagged.kcl
|
||||
description: Variables in memory after executing sketch_on_face_circle_tagged.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1037,40 +1034,4 @@ description: Program memory after executing sketch_on_face_circle_tagged.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"myCircle": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part001": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part002": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face_end.kcl
|
||||
description: Variables in memory after executing sketch_on_face_end.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -981,35 +978,4 @@ description: Program memory after executing sketch_on_face_end.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part001": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part002": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face_end_negative_extrude.kcl
|
||||
description: Variables in memory after executing sketch_on_face_end_negative_extrude.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -981,35 +978,4 @@ description: Program memory after executing sketch_on_face_end_negative_extrude.
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part001": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part002": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
description: Program memory after executing sketch_on_face_start.kcl
|
||||
description: Variables in memory after executing sketch_on_face_start.kcl
|
||||
---
|
||||
{
|
||||
"environments": [
|
||||
{
|
||||
"bindings": {
|
||||
"HALF_TURN": {
|
||||
"type": "Number",
|
||||
"value": 180.0,
|
||||
@ -1199,40 +1196,4 @@ description: Program memory after executing sketch_on_face_start.kcl
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [
|
||||
{
|
||||
"parent_snapshot": null,
|
||||
"data": {
|
||||
"cube": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"foo": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part001": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
},
|
||||
"part002": {
|
||||
"type": "Tombstone",
|
||||
"value": null,
|
||||
"__meta": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,11 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -241,14 +238,4 @@ description: Program memory after executing tan_arc_x_line.kcl
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -219,14 +215,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -1,12 +1,8 @@
|
||||
---
|
||||
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,
|
||||
@ -214,14 +210,4 @@ snapshot_kind: text
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"snapshots": [],
|
||||
"parent": null
|
||||
}
|
||||
],
|
||||
"currentEnv": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"callStack": []
|
||||
}
|
||||
|
@ -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> {
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user