Compare commits
1 Commits
jess/test-
...
eslint
Author | SHA1 | Date | |
---|---|---|---|
e5091ebfcb |
@ -17,9 +17,13 @@
|
|||||||
"extends": [
|
"extends": [
|
||||||
"plugin:css-modules/recommended",
|
"plugin:css-modules/recommended",
|
||||||
"plugin:jsx-a11y/recommended",
|
"plugin:jsx-a11y/recommended",
|
||||||
"plugin:react-hooks/recommended"
|
"plugin:react-hooks/recommended",
|
||||||
|
"plugin:react-perf/recommended"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"react-perf/jsx-no-new-object-as-prop": "off", // We don't think this helps anything.
|
||||||
|
"react-perf/jsx-no-new-function-as-prop": "off", // We don't think this helps anything.
|
||||||
|
"react-perf/jsx-no-new-array-as-prop": "off", // We don't think this helps anything.
|
||||||
"no-array-constructor": "off", // This is wrong; use the @typescript-eslint one instead.
|
"no-array-constructor": "off", // This is wrong; use the @typescript-eslint one instead.
|
||||||
"@typescript-eslint/no-array-constructor": "error",
|
"@typescript-eslint/no-array-constructor": "error",
|
||||||
"@typescript-eslint/no-array-delete": "error",
|
"@typescript-eslint/no-array-delete": "error",
|
||||||
|
4
.github/workflows/e2e-tests.yml
vendored
4
.github/workflows/e2e-tests.yml
vendored
@ -281,7 +281,7 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
- "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
|
- "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
|
||||||
- namespace-profile-macos-8-cores
|
- namespace-profile-macos-8-cores
|
||||||
- windows-latest-8-cores
|
- windows-latest
|
||||||
shardIndex: [1, 2, 3, 4]
|
shardIndex: [1, 2, 3, 4]
|
||||||
shardTotal: [4]
|
shardTotal: [4]
|
||||||
# Disable macos and windows tests on hourly e2e tests since we only care
|
# Disable macos and windows tests on hourly e2e tests since we only care
|
||||||
@ -292,7 +292,7 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
- os: namespace-profile-macos-8-cores
|
- os: namespace-profile-macos-8-cores
|
||||||
isScheduled: true
|
isScheduled: true
|
||||||
- os: windows-latest-8-cores
|
- os: windows-latest
|
||||||
isScheduled: true
|
isScheduled: true
|
||||||
# TODO: add ref here for main and latest release tag
|
# TODO: add ref here for main and latest release tag
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -8,8 +8,8 @@ import { expect, test } from '@e2e/playwright/zoo-test'
|
|||||||
|
|
||||||
test.describe('Testing in-app sample loading', () => {
|
test.describe('Testing in-app sample loading', () => {
|
||||||
/**
|
/**
|
||||||
* Note this test implicitly depends on the KCL sample "parametric-bearing-pillow-block",
|
* Note this test implicitly depends on the KCL sample "a-parametric-bearing-pillow-block",
|
||||||
* its title, and its units settings. https://github.com/KittyCAD/kcl-samples/blob/main/parametric-bearing-pillow-block/main.kcl
|
* its title, and its units settings. https://github.com/KittyCAD/kcl-samples/blob/main/a-parametric-bearing-pillow-block/main.kcl
|
||||||
*/
|
*/
|
||||||
test('Web: should overwrite current code, cannot create new file', async ({
|
test('Web: should overwrite current code, cannot create new file', async ({
|
||||||
editor,
|
editor,
|
||||||
@ -29,8 +29,8 @@ test.describe('Testing in-app sample loading', () => {
|
|||||||
|
|
||||||
// Locators and constants
|
// Locators and constants
|
||||||
const newSample = {
|
const newSample = {
|
||||||
file: 'parametric-bearing-pillow-block' + FILE_EXT,
|
file: 'a-parametric-bearing-pillow-block' + FILE_EXT,
|
||||||
title: 'Parametric Bearing Pillow Block',
|
title: 'A Parametric Bearing Pillow Block',
|
||||||
}
|
}
|
||||||
const commandBarButton = page.getByRole('button', { name: 'Commands' })
|
const commandBarButton = page.getByRole('button', { name: 'Commands' })
|
||||||
const samplesCommandOption = page.getByRole('option', {
|
const samplesCommandOption = page.getByRole('option', {
|
||||||
@ -72,7 +72,7 @@ test.describe('Testing in-app sample loading', () => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Note this test implicitly depends on the KCL samples:
|
* Note this test implicitly depends on the KCL samples:
|
||||||
* "parametric-bearing-pillow-block": https://github.com/KittyCAD/kcl-samples/blob/main/parametric-bearing-pillow-block/main.kcl
|
* "a-parametric-bearing-pillow-block": https://github.com/KittyCAD/kcl-samples/blob/main/a-parametric-bearing-pillow-block/main.kcl
|
||||||
* "gear-rack": https://github.com/KittyCAD/kcl-samples/blob/main/gear-rack/main.kcl
|
* "gear-rack": https://github.com/KittyCAD/kcl-samples/blob/main/gear-rack/main.kcl
|
||||||
*/
|
*/
|
||||||
test(
|
test(
|
||||||
@ -90,8 +90,8 @@ test.describe('Testing in-app sample loading', () => {
|
|||||||
|
|
||||||
// Locators and constants
|
// Locators and constants
|
||||||
const sampleOne = {
|
const sampleOne = {
|
||||||
file: 'parametric-bearing-pillow-block' + FILE_EXT,
|
file: 'a-parametric-bearing-pillow-block' + FILE_EXT,
|
||||||
title: 'Parametric Bearing Pillow Block',
|
title: 'A Parametric Bearing Pillow Block',
|
||||||
}
|
}
|
||||||
const sampleTwo = {
|
const sampleTwo = {
|
||||||
file: 'gear-rack' + FILE_EXT,
|
file: 'gear-rack' + FILE_EXT,
|
||||||
|
@ -4,7 +4,6 @@ directories:
|
|||||||
buildResources: assets
|
buildResources: assets
|
||||||
files:
|
files:
|
||||||
- .vite/**
|
- .vite/**
|
||||||
- "!node_modules/win-ca/pem/**"
|
|
||||||
mac:
|
mac:
|
||||||
category: public.app-category.developer-tools
|
category: public.app-category.developer-tools
|
||||||
artifactName: "${productName}-${version}-${arch}-${os}.${ext}"
|
artifactName: "${productName}-${version}-${arch}-${os}.${ext}"
|
||||||
|
@ -66,7 +66,6 @@
|
|||||||
"vscode-languageserver-protocol": "^3.17.5",
|
"vscode-languageserver-protocol": "^3.17.5",
|
||||||
"vscode-uri": "^3.1.0",
|
"vscode-uri": "^3.1.0",
|
||||||
"web-vitals": "^3.5.2",
|
"web-vitals": "^3.5.2",
|
||||||
"win-ca": "^3.5.1",
|
|
||||||
"xstate": "^5.19.2",
|
"xstate": "^5.19.2",
|
||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
},
|
},
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
20
rust/Cargo.lock
generated
20
rust/Cargo.lock
generated
@ -1907,7 +1907,6 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
"tabled",
|
"tabled",
|
||||||
"tempdir",
|
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-tungstenite",
|
"tokio-tungstenite",
|
||||||
@ -3085,15 +3084,6 @@ version = "0.8.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "remove_dir_all"
|
|
||||||
version = "0.5.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
|
||||||
dependencies = [
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.12.15"
|
version = "0.12.15"
|
||||||
@ -3789,16 +3779,6 @@ version = "0.13.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tempdir"
|
|
||||||
version = "0.3.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
|
|
||||||
dependencies = [
|
|
||||||
"rand 0.4.6",
|
|
||||||
"remove_dir_all",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.19.0"
|
version = "3.19.0"
|
||||||
|
@ -22,6 +22,7 @@ debug = 0
|
|||||||
|
|
||||||
[profile.dev.package]
|
[profile.dev.package]
|
||||||
insta = { opt-level = 3 }
|
insta = { opt-level = 3 }
|
||||||
|
similar = { opt-level = 3 }
|
||||||
|
|
||||||
[profile.test]
|
[profile.test]
|
||||||
debug = "line-tables-only"
|
debug = "line-tables-only"
|
||||||
|
@ -69,7 +69,6 @@ serde = { workspace = true }
|
|||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
sha2 = "0.10.8"
|
sha2 = "0.10.8"
|
||||||
tabled = { version = "0.18.0", optional = true }
|
tabled = { version = "0.18.0", optional = true }
|
||||||
tempdir = "0.3.7"
|
|
||||||
thiserror = "2.0.0"
|
thiserror = "2.0.0"
|
||||||
toml = "0.8.19"
|
toml = "0.8.19"
|
||||||
ts-rs = { version = "10.1.0", features = [
|
ts-rs = { version = "10.1.0", features = [
|
||||||
|
@ -18,7 +18,7 @@ use tokio::sync::{mpsc, oneshot, RwLock};
|
|||||||
use tokio_tungstenite::tungstenite::Message as WsMsg;
|
use tokio_tungstenite::tungstenite::Message as WsMsg;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use super::EngineStats;
|
use super::{EngineStats, ExecutionKind};
|
||||||
use crate::{
|
use crate::{
|
||||||
engine::EngineManager,
|
engine::EngineManager,
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
@ -51,6 +51,7 @@ pub struct EngineConnection {
|
|||||||
/// If the server sends session data, it'll be copied to here.
|
/// If the server sends session data, it'll be copied to here.
|
||||||
session_data: Arc<RwLock<Option<ModelingSessionData>>>,
|
session_data: Arc<RwLock<Option<ModelingSessionData>>>,
|
||||||
|
|
||||||
|
execution_kind: Arc<RwLock<ExecutionKind>>,
|
||||||
stats: EngineStats,
|
stats: EngineStats,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,6 +344,7 @@ impl EngineConnection {
|
|||||||
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
||||||
default_planes: Default::default(),
|
default_planes: Default::default(),
|
||||||
session_data,
|
session_data,
|
||||||
|
execution_kind: Default::default(),
|
||||||
stats: Default::default(),
|
stats: Default::default(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -366,6 +368,18 @@ impl EngineManager for EngineConnection {
|
|||||||
self.artifact_commands.clone()
|
self.artifact_commands.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn execution_kind(&self) -> ExecutionKind {
|
||||||
|
let guard = self.execution_kind.read().await;
|
||||||
|
*guard
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind {
|
||||||
|
let mut guard = self.execution_kind.write().await;
|
||||||
|
let original = *guard;
|
||||||
|
*guard = execution_kind;
|
||||||
|
original
|
||||||
|
}
|
||||||
|
|
||||||
fn stats(&self) -> &EngineStats {
|
fn stats(&self) -> &EngineStats {
|
||||||
&self.stats
|
&self.stats
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ use kittycad_modeling_cmds::{self as kcmc};
|
|||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use super::EngineStats;
|
use super::{EngineStats, ExecutionKind};
|
||||||
use crate::{
|
use crate::{
|
||||||
errors::KclError,
|
errors::KclError,
|
||||||
exec::DefaultPlanes,
|
exec::DefaultPlanes,
|
||||||
@ -29,6 +29,7 @@ pub struct EngineConnection {
|
|||||||
batch: Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>,
|
batch: Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>,
|
||||||
batch_end: Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>,
|
batch_end: Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>,
|
||||||
artifact_commands: Arc<RwLock<Vec<ArtifactCommand>>>,
|
artifact_commands: Arc<RwLock<Vec<ArtifactCommand>>>,
|
||||||
|
execution_kind: Arc<RwLock<ExecutionKind>>,
|
||||||
/// The default planes for the scene.
|
/// The default planes for the scene.
|
||||||
default_planes: Arc<RwLock<Option<DefaultPlanes>>>,
|
default_planes: Arc<RwLock<Option<DefaultPlanes>>>,
|
||||||
stats: EngineStats,
|
stats: EngineStats,
|
||||||
@ -40,6 +41,7 @@ impl EngineConnection {
|
|||||||
batch: Arc::new(RwLock::new(Vec::new())),
|
batch: Arc::new(RwLock::new(Vec::new())),
|
||||||
batch_end: Arc::new(RwLock::new(IndexMap::new())),
|
batch_end: Arc::new(RwLock::new(IndexMap::new())),
|
||||||
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
||||||
|
execution_kind: Default::default(),
|
||||||
default_planes: Default::default(),
|
default_planes: Default::default(),
|
||||||
stats: Default::default(),
|
stats: Default::default(),
|
||||||
})
|
})
|
||||||
@ -68,6 +70,18 @@ impl crate::engine::EngineManager for EngineConnection {
|
|||||||
self.artifact_commands.clone()
|
self.artifact_commands.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn execution_kind(&self) -> ExecutionKind {
|
||||||
|
let guard = self.execution_kind.read().await;
|
||||||
|
*guard
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind {
|
||||||
|
let mut guard = self.execution_kind.write().await;
|
||||||
|
let original = *guard;
|
||||||
|
*guard = execution_kind;
|
||||||
|
original
|
||||||
|
}
|
||||||
|
|
||||||
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>> {
|
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>> {
|
||||||
self.default_planes.clone()
|
self.default_planes.clone()
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ use uuid::Uuid;
|
|||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
engine::EngineStats,
|
engine::{EngineStats, ExecutionKind},
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
execution::{ArtifactCommand, DefaultPlanes, IdGenerator},
|
execution::{ArtifactCommand, DefaultPlanes, IdGenerator},
|
||||||
SourceRange,
|
SourceRange,
|
||||||
@ -42,6 +42,7 @@ pub struct EngineConnection {
|
|||||||
batch_end: Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>,
|
batch_end: Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>,
|
||||||
responses: Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>,
|
responses: Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>,
|
||||||
artifact_commands: Arc<RwLock<Vec<ArtifactCommand>>>,
|
artifact_commands: Arc<RwLock<Vec<ArtifactCommand>>>,
|
||||||
|
execution_kind: Arc<RwLock<ExecutionKind>>,
|
||||||
/// The default planes for the scene.
|
/// The default planes for the scene.
|
||||||
default_planes: Arc<RwLock<Option<DefaultPlanes>>>,
|
default_planes: Arc<RwLock<Option<DefaultPlanes>>>,
|
||||||
stats: EngineStats,
|
stats: EngineStats,
|
||||||
@ -60,6 +61,7 @@ impl EngineConnection {
|
|||||||
batch_end: Arc::new(RwLock::new(IndexMap::new())),
|
batch_end: Arc::new(RwLock::new(IndexMap::new())),
|
||||||
responses: Arc::new(RwLock::new(IndexMap::new())),
|
responses: Arc::new(RwLock::new(IndexMap::new())),
|
||||||
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
artifact_commands: Arc::new(RwLock::new(Vec::new())),
|
||||||
|
execution_kind: Default::default(),
|
||||||
default_planes: Default::default(),
|
default_planes: Default::default(),
|
||||||
stats: Default::default(),
|
stats: Default::default(),
|
||||||
})
|
})
|
||||||
@ -162,6 +164,18 @@ impl crate::engine::EngineManager for EngineConnection {
|
|||||||
self.artifact_commands.clone()
|
self.artifact_commands.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn execution_kind(&self) -> ExecutionKind {
|
||||||
|
let guard = self.execution_kind.read().await;
|
||||||
|
*guard
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind {
|
||||||
|
let mut guard = self.execution_kind.write().await;
|
||||||
|
let original = *guard;
|
||||||
|
*guard = execution_kind;
|
||||||
|
original
|
||||||
|
}
|
||||||
|
|
||||||
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>> {
|
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>> {
|
||||||
self.default_planes.clone()
|
self.default_planes.clone()
|
||||||
}
|
}
|
||||||
@ -204,6 +218,11 @@ impl crate::engine::EngineManager for EngineConnection {
|
|||||||
.do_send_modeling_cmd(id, source_range, cmd, id_to_source_range)
|
.do_send_modeling_cmd(id, source_range, cmd, id_to_source_range)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
// In isolated mode, we don't save the response.
|
||||||
|
if self.execution_kind().await.is_isolated() {
|
||||||
|
return Ok(ws_result);
|
||||||
|
}
|
||||||
|
|
||||||
let mut responses = self.responses.write().await;
|
let mut responses = self.responses.write().await;
|
||||||
responses.insert(id, ws_result.clone());
|
responses.insert(id, ws_result.clone());
|
||||||
drop(responses);
|
drop(responses);
|
||||||
|
@ -47,6 +47,23 @@ lazy_static::lazy_static! {
|
|||||||
pub static ref GRID_SCALE_TEXT_OBJECT_ID: uuid::Uuid = uuid::Uuid::parse_str("10782f33-f588-4668-8bcd-040502d26590").unwrap();
|
pub static ref GRID_SCALE_TEXT_OBJECT_ID: uuid::Uuid = uuid::Uuid::parse_str("10782f33-f588-4668-8bcd-040502d26590").unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The mode of execution. When isolated, like during an import, attempting to
|
||||||
|
/// send a command results in an error.
|
||||||
|
#[derive(Debug, Default, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, ts_rs::TS, JsonSchema)]
|
||||||
|
#[ts(export)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub enum ExecutionKind {
|
||||||
|
#[default]
|
||||||
|
Normal,
|
||||||
|
Isolated,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ExecutionKind {
|
||||||
|
pub fn is_isolated(&self) -> bool {
|
||||||
|
matches!(self, ExecutionKind::Isolated)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default, Debug)]
|
||||||
pub struct EngineStats {
|
pub struct EngineStats {
|
||||||
pub commands_batched: AtomicUsize,
|
pub commands_batched: AtomicUsize,
|
||||||
@ -67,17 +84,9 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
/// Get the batch of commands to be sent to the engine.
|
/// Get the batch of commands to be sent to the engine.
|
||||||
fn batch(&self) -> Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>;
|
fn batch(&self) -> Arc<RwLock<Vec<(WebSocketRequest, SourceRange)>>>;
|
||||||
|
|
||||||
async fn take_batch(&self) -> Vec<(WebSocketRequest, SourceRange)> {
|
|
||||||
std::mem::take(&mut *self.batch().write().await)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the batch of end commands to be sent to the engine.
|
/// Get the batch of end commands to be sent to the engine.
|
||||||
fn batch_end(&self) -> Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>;
|
fn batch_end(&self) -> Arc<RwLock<IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)>>>;
|
||||||
|
|
||||||
async fn take_batch_end(&self) -> IndexMap<uuid::Uuid, (WebSocketRequest, SourceRange)> {
|
|
||||||
std::mem::take(&mut *self.batch_end().write().await)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the command responses from the engine.
|
/// Get the command responses from the engine.
|
||||||
fn responses(&self) -> Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>;
|
fn responses(&self) -> Arc<RwLock<IndexMap<Uuid, WebSocketResponse>>>;
|
||||||
|
|
||||||
@ -99,6 +108,13 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
std::mem::take(&mut *self.responses().write().await)
|
std::mem::take(&mut *self.responses().write().await)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the current execution kind.
|
||||||
|
async fn execution_kind(&self) -> ExecutionKind;
|
||||||
|
|
||||||
|
/// Replace the current execution kind with a new value and return the
|
||||||
|
/// existing value.
|
||||||
|
async fn replace_execution_kind(&self, execution_kind: ExecutionKind) -> ExecutionKind;
|
||||||
|
|
||||||
/// Get the default planes.
|
/// Get the default planes.
|
||||||
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>>;
|
fn get_default_planes(&self) -> Arc<RwLock<Option<DefaultPlanes>>>;
|
||||||
|
|
||||||
@ -263,6 +279,11 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
cmd: &ModelingCmd,
|
cmd: &ModelingCmd,
|
||||||
) -> Result<(), crate::errors::KclError> {
|
) -> Result<(), crate::errors::KclError> {
|
||||||
|
// In isolated mode, we don't send the command to the engine.
|
||||||
|
if self.execution_kind().await.is_isolated() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let req = WebSocketRequest::ModelingCmdReq(ModelingCmdReq {
|
let req = WebSocketRequest::ModelingCmdReq(ModelingCmdReq {
|
||||||
cmd: cmd.clone(),
|
cmd: cmd.clone(),
|
||||||
cmd_id: id.into(),
|
cmd_id: id.into(),
|
||||||
@ -284,6 +305,11 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
cmds: &[ModelingCmdReq],
|
cmds: &[ModelingCmdReq],
|
||||||
) -> Result<(), crate::errors::KclError> {
|
) -> Result<(), crate::errors::KclError> {
|
||||||
|
// In isolated mode, we don't send the command to the engine.
|
||||||
|
if self.execution_kind().await.is_isolated() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
// Add cmds to the batch.
|
// Add cmds to the batch.
|
||||||
let mut extended_cmds = Vec::with_capacity(cmds.len());
|
let mut extended_cmds = Vec::with_capacity(cmds.len());
|
||||||
for cmd in cmds {
|
for cmd in cmds {
|
||||||
@ -306,6 +332,11 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
cmd: &ModelingCmd,
|
cmd: &ModelingCmd,
|
||||||
) -> Result<(), crate::errors::KclError> {
|
) -> Result<(), crate::errors::KclError> {
|
||||||
|
// In isolated mode, we don't send the command to the engine.
|
||||||
|
if self.execution_kind().await.is_isolated() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let req = WebSocketRequest::ModelingCmdReq(ModelingCmdReq {
|
let req = WebSocketRequest::ModelingCmdReq(ModelingCmdReq {
|
||||||
cmd: cmd.clone(),
|
cmd: cmd.clone(),
|
||||||
cmd_id: id.into(),
|
cmd_id: id.into(),
|
||||||
@ -339,11 +370,11 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
) -> Result<OkWebSocketResponseData, crate::errors::KclError> {
|
) -> Result<OkWebSocketResponseData, crate::errors::KclError> {
|
||||||
let all_requests = if batch_end {
|
let all_requests = if batch_end {
|
||||||
let mut requests = self.take_batch().await.clone();
|
let mut requests = self.batch().read().await.clone();
|
||||||
requests.extend(self.take_batch_end().await.values().cloned());
|
requests.extend(self.batch_end().read().await.values().cloned());
|
||||||
requests
|
requests
|
||||||
} else {
|
} else {
|
||||||
self.take_batch().await.clone()
|
self.batch().read().await.clone()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return early if we have no commands to send.
|
// Return early if we have no commands to send.
|
||||||
@ -412,6 +443,10 @@ pub trait EngineManager: std::fmt::Debug + Send + Sync + 'static {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Throw away the old batch queue.
|
// Throw away the old batch queue.
|
||||||
|
self.batch().write().await.clear();
|
||||||
|
if batch_end {
|
||||||
|
self.batch_end().write().await.clear();
|
||||||
|
}
|
||||||
self.stats().batches_sent.fetch_add(1, Ordering::Relaxed);
|
self.stats().batches_sent.fetch_add(1, Ordering::Relaxed);
|
||||||
|
|
||||||
// We pop off the responses to cleanup our mappings.
|
// We pop off the responses to cleanup our mappings.
|
||||||
|
@ -5,6 +5,7 @@ use indexmap::IndexMap;
|
|||||||
|
|
||||||
use super::{cad_op::Group, kcl_value::TypeDef, types::PrimitiveType};
|
use super::{cad_op::Group, kcl_value::TypeDef, types::PrimitiveType};
|
||||||
use crate::{
|
use crate::{
|
||||||
|
engine::ExecutionKind,
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
execution::{
|
execution::{
|
||||||
annotations,
|
annotations,
|
||||||
@ -61,13 +62,15 @@ impl ExecutorContext {
|
|||||||
exec_state.mod_local.explicit_length_units = true;
|
exec_state.mod_local.explicit_length_units = true;
|
||||||
}
|
}
|
||||||
let new_units = exec_state.length_unit();
|
let new_units = exec_state.length_unit();
|
||||||
self.engine
|
if !self.engine.execution_kind().await.is_isolated() {
|
||||||
.set_units(
|
self.engine
|
||||||
new_units.into(),
|
.set_units(
|
||||||
annotation.as_source_range(),
|
new_units.into(),
|
||||||
exec_state.id_generator(),
|
annotation.as_source_range(),
|
||||||
)
|
exec_state.id_generator(),
|
||||||
.await?;
|
)
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
exec_state.err(CompilationError::err(
|
exec_state.err(CompilationError::err(
|
||||||
annotation.as_source_range(),
|
annotation.as_source_range(),
|
||||||
@ -97,13 +100,15 @@ impl ExecutorContext {
|
|||||||
&self,
|
&self,
|
||||||
program: &Node<Program>,
|
program: &Node<Program>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
|
exec_kind: ExecutionKind,
|
||||||
preserve_mem: bool,
|
preserve_mem: bool,
|
||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
path: &ModulePath,
|
path: &ModulePath,
|
||||||
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
||||||
crate::log::log(format!("enter module {path} {}", exec_state.stack()));
|
crate::log::log(format!("enter module {path} {} {exec_kind:?}", exec_state.stack()));
|
||||||
|
|
||||||
let old_units = exec_state.length_unit();
|
let old_units = exec_state.length_unit();
|
||||||
|
let original_execution = self.engine.replace_execution_kind(exec_kind).await;
|
||||||
|
|
||||||
let mut local_state = ModuleState::new(path.std_path(), exec_state.stack().memory.clone(), Some(module_id));
|
let mut local_state = ModuleState::new(path.std_path(), exec_state.stack().memory.clone(), Some(module_id));
|
||||||
if !preserve_mem {
|
if !preserve_mem {
|
||||||
@ -136,11 +141,12 @@ impl ExecutorContext {
|
|||||||
// If we reset at the end of the main path, then we just add on an extra
|
// If we reset at the end of the main path, then we just add on an extra
|
||||||
// command and we'd need to flush the batch again.
|
// command and we'd need to flush the batch again.
|
||||||
// This avoids that.
|
// This avoids that.
|
||||||
if new_units != old_units && *path != ModulePath::Main {
|
if !exec_kind.is_isolated() && new_units != old_units && *path != ModulePath::Main {
|
||||||
self.engine
|
self.engine
|
||||||
.set_units(old_units.into(), Default::default(), exec_state.id_generator())
|
.set_units(old_units.into(), Default::default(), exec_state.id_generator())
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
self.engine.replace_execution_kind(original_execution).await;
|
||||||
|
|
||||||
crate::log::log(format!("leave {path}"));
|
crate::log::log(format!("leave {path}"));
|
||||||
|
|
||||||
@ -151,7 +157,7 @@ impl ExecutorContext {
|
|||||||
#[async_recursion]
|
#[async_recursion]
|
||||||
pub(super) async fn exec_block<'a>(
|
pub(super) async fn exec_block<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
program: NodeRef<'a, Program>,
|
program: NodeRef<'a, crate::parsing::ast::types::Program>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
body_type: BodyType,
|
body_type: BodyType,
|
||||||
) -> Result<Option<KclValue>, KclError> {
|
) -> Result<Option<KclValue>, KclError> {
|
||||||
@ -175,8 +181,9 @@ impl ExecutorContext {
|
|||||||
|
|
||||||
match &import_stmt.selector {
|
match &import_stmt.selector {
|
||||||
ImportSelector::List { items } => {
|
ImportSelector::List { items } => {
|
||||||
let (env_ref, module_exports) =
|
let (env_ref, module_exports) = self
|
||||||
self.exec_module_for_items(module_id, exec_state, source_range).await?;
|
.exec_module_for_items(module_id, exec_state, ExecutionKind::Isolated, source_range)
|
||||||
|
.await?;
|
||||||
for import_item in items {
|
for import_item in items {
|
||||||
// Extract the item from the module.
|
// Extract the item from the module.
|
||||||
let item = exec_state
|
let item = exec_state
|
||||||
@ -217,8 +224,9 @@ impl ExecutorContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImportSelector::Glob(_) => {
|
ImportSelector::Glob(_) => {
|
||||||
let (env_ref, module_exports) =
|
let (env_ref, module_exports) = self
|
||||||
self.exec_module_for_items(module_id, exec_state, source_range).await?;
|
.exec_module_for_items(module_id, exec_state, ExecutionKind::Isolated, source_range)
|
||||||
|
.await?;
|
||||||
for name in module_exports.iter() {
|
for name in module_exports.iter() {
|
||||||
let item = exec_state
|
let item = exec_state
|
||||||
.stack()
|
.stack()
|
||||||
@ -409,7 +417,7 @@ impl ExecutorContext {
|
|||||||
Ok(last_expr)
|
Ok(last_expr)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn open_module(
|
pub(super) async fn open_module(
|
||||||
&self,
|
&self,
|
||||||
path: &ImportPath,
|
path: &ImportPath,
|
||||||
attrs: &[Node<Annotation>],
|
attrs: &[Node<Annotation>],
|
||||||
@ -417,7 +425,6 @@ impl ExecutorContext {
|
|||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
) -> Result<ModuleId, KclError> {
|
) -> Result<ModuleId, KclError> {
|
||||||
let resolved_path = ModulePath::from_import_path(path, &self.settings.project_directory);
|
let resolved_path = ModulePath::from_import_path(path, &self.settings.project_directory);
|
||||||
|
|
||||||
match path {
|
match path {
|
||||||
ImportPath::Kcl { .. } => {
|
ImportPath::Kcl { .. } => {
|
||||||
exec_state.global.mod_loader.cycle_check(&resolved_path, source_range)?;
|
exec_state.global.mod_loader.cycle_check(&resolved_path, source_range)?;
|
||||||
@ -474,6 +481,7 @@ impl ExecutorContext {
|
|||||||
&self,
|
&self,
|
||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
|
exec_kind: ExecutionKind,
|
||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
) -> Result<(EnvironmentRef, Vec<String>), KclError> {
|
) -> Result<(EnvironmentRef, Vec<String>), KclError> {
|
||||||
let path = exec_state.global.module_infos[&module_id].path.clone();
|
let path = exec_state.global.module_infos[&module_id].path.clone();
|
||||||
@ -482,12 +490,12 @@ impl ExecutorContext {
|
|||||||
|
|
||||||
let result = match &mut repr {
|
let result = match &mut repr {
|
||||||
ModuleRepr::Root => Err(exec_state.circular_import_error(&path, source_range)),
|
ModuleRepr::Root => Err(exec_state.circular_import_error(&path, source_range)),
|
||||||
ModuleRepr::Kcl(_, Some((_, env_ref, items))) => Ok((*env_ref, items.clone())),
|
ModuleRepr::Kcl(_, Some((env_ref, items))) => Ok((*env_ref, items.clone())),
|
||||||
ModuleRepr::Kcl(program, cache) => self
|
ModuleRepr::Kcl(program, cache) => self
|
||||||
.exec_module_from_ast(program, module_id, &path, exec_state, source_range)
|
.exec_module_from_ast(program, module_id, &path, exec_state, exec_kind, source_range)
|
||||||
.await
|
.await
|
||||||
.map(|(val, er, items)| {
|
.map(|(_, er, items)| {
|
||||||
*cache = Some((val, er, items.clone()));
|
*cache = Some((er, items.clone()));
|
||||||
(er, items)
|
(er, items)
|
||||||
}),
|
}),
|
||||||
ModuleRepr::Foreign(geom) => Err(KclError::Semantic(KclErrorDetails {
|
ModuleRepr::Foreign(geom) => Err(KclError::Semantic(KclErrorDetails {
|
||||||
@ -506,6 +514,7 @@ impl ExecutorContext {
|
|||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
module_name: &BoxNode<Name>,
|
module_name: &BoxNode<Name>,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
|
exec_kind: ExecutionKind,
|
||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
) -> Result<Option<KclValue>, KclError> {
|
) -> Result<Option<KclValue>, KclError> {
|
||||||
exec_state.global.operations.push(Operation::GroupBegin {
|
exec_state.global.operations.push(Operation::GroupBegin {
|
||||||
@ -522,14 +531,13 @@ impl ExecutorContext {
|
|||||||
|
|
||||||
let result = match &mut repr {
|
let result = match &mut repr {
|
||||||
ModuleRepr::Root => Err(exec_state.circular_import_error(&path, source_range)),
|
ModuleRepr::Root => Err(exec_state.circular_import_error(&path, source_range)),
|
||||||
ModuleRepr::Kcl(_, Some((val, _, _))) => Ok(val.clone()),
|
|
||||||
ModuleRepr::Kcl(program, cached_items) => {
|
ModuleRepr::Kcl(program, cached_items) => {
|
||||||
let result = self
|
let result = self
|
||||||
.exec_module_from_ast(program, module_id, &path, exec_state, source_range)
|
.exec_module_from_ast(program, module_id, &path, exec_state, exec_kind, source_range)
|
||||||
.await;
|
.await;
|
||||||
match result {
|
match result {
|
||||||
Ok((val, env, items)) => {
|
Ok((val, env, items)) => {
|
||||||
*cached_items = Some((val.clone(), env, items));
|
*cached_items = Some((env, items));
|
||||||
Ok(val)
|
Ok(val)
|
||||||
}
|
}
|
||||||
Err(e) => Err(e),
|
Err(e) => Err(e),
|
||||||
@ -548,16 +556,19 @@ impl ExecutorContext {
|
|||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn exec_module_from_ast(
|
async fn exec_module_from_ast(
|
||||||
&self,
|
&self,
|
||||||
program: &Node<Program>,
|
program: &Node<Program>,
|
||||||
module_id: ModuleId,
|
module_id: ModuleId,
|
||||||
path: &ModulePath,
|
path: &ModulePath,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
|
exec_kind: ExecutionKind,
|
||||||
source_range: SourceRange,
|
source_range: SourceRange,
|
||||||
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
) -> Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError> {
|
||||||
exec_state.global.mod_loader.enter_module(path);
|
exec_state.global.mod_loader.enter_module(path);
|
||||||
let result = self.exec_module_body(program, exec_state, false, module_id, path).await;
|
let result = self
|
||||||
|
.exec_module_body(program, exec_state, exec_kind, false, module_id, path)
|
||||||
|
.await;
|
||||||
exec_state.global.mod_loader.leave_module(path);
|
exec_state.global.mod_loader.leave_module(path);
|
||||||
|
|
||||||
result.map_err(|err| {
|
result.map_err(|err| {
|
||||||
@ -593,7 +604,7 @@ impl ExecutorContext {
|
|||||||
Expr::Name(name) => {
|
Expr::Name(name) => {
|
||||||
let value = name.get_result(exec_state, self).await?.clone();
|
let value = name.get_result(exec_state, self).await?.clone();
|
||||||
if let KclValue::Module { value: module_id, meta } = value {
|
if let KclValue::Module { value: module_id, meta } = value {
|
||||||
self.exec_module_for_result(module_id, name, exec_state, metadata.source_range)
|
self.exec_module_for_result(module_id, name, exec_state, ExecutionKind::Normal, metadata.source_range)
|
||||||
.await?
|
.await?
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
exec_state.warn(CompilationError::err(
|
exec_state.warn(CompilationError::err(
|
||||||
@ -781,7 +792,7 @@ impl Node<Name> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
mem_spec = Some(
|
mem_spec = Some(
|
||||||
ctx.exec_module_for_items(*module_id, exec_state, p.as_source_range())
|
ctx.exec_module_for_items(*module_id, exec_state, ExecutionKind::Normal, p.as_source_range())
|
||||||
.await?,
|
.await?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -1262,7 +1273,7 @@ impl Node<CallExpressionKw> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let op = if func.feature_tree_operation() {
|
let op = if func.feature_tree_operation() && !ctx.is_isolated_execution().await {
|
||||||
let op_labeled_args = args
|
let op_labeled_args = args
|
||||||
.kw_args
|
.kw_args
|
||||||
.labeled
|
.labeled
|
||||||
@ -1348,7 +1359,7 @@ impl Node<CallExpressionKw> {
|
|||||||
e.add_source_ranges(vec![callsite])
|
e.add_source_ranges(vec![callsite])
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if matches!(fn_src, FunctionSource::User { .. }) {
|
if matches!(fn_src, FunctionSource::User { .. }) && !ctx.is_isolated_execution().await {
|
||||||
// Track return operation.
|
// Track return operation.
|
||||||
exec_state.global.operations.push(Operation::GroupEnd);
|
exec_state.global.operations.push(Operation::GroupEnd);
|
||||||
}
|
}
|
||||||
@ -1400,7 +1411,7 @@ impl Node<CallExpression> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
let op = if func.feature_tree_operation() {
|
let op = if func.feature_tree_operation() && !ctx.is_isolated_execution().await {
|
||||||
let op_labeled_args = func
|
let op_labeled_args = func
|
||||||
.args(false)
|
.args(false)
|
||||||
.iter()
|
.iter()
|
||||||
@ -1458,17 +1469,19 @@ impl Node<CallExpression> {
|
|||||||
// exec_state.
|
// exec_state.
|
||||||
let func = fn_name.get_result(exec_state, ctx).await?.clone();
|
let func = fn_name.get_result(exec_state, ctx).await?.clone();
|
||||||
|
|
||||||
// Track call operation.
|
if !ctx.is_isolated_execution().await {
|
||||||
exec_state.global.operations.push(Operation::GroupBegin {
|
// Track call operation.
|
||||||
group: Group::FunctionCall {
|
exec_state.global.operations.push(Operation::GroupBegin {
|
||||||
name: Some(fn_name.to_string()),
|
group: Group::FunctionCall {
|
||||||
function_source_range: func.function_def_source_range().unwrap_or_default(),
|
name: Some(fn_name.to_string()),
|
||||||
unlabeled_arg: None,
|
function_source_range: func.function_def_source_range().unwrap_or_default(),
|
||||||
// TODO: Add the arguments for legacy positional parameters.
|
unlabeled_arg: None,
|
||||||
labeled_args: Default::default(),
|
// TODO: Add the arguments for legacy positional parameters.
|
||||||
},
|
labeled_args: Default::default(),
|
||||||
source_range: callsite,
|
},
|
||||||
});
|
source_range: callsite,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let Some(fn_src) = func.as_fn() else {
|
let Some(fn_src) = func.as_fn() else {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
@ -1497,8 +1510,10 @@ impl Node<CallExpression> {
|
|||||||
})
|
})
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// Track return operation.
|
if !ctx.is_isolated_execution().await {
|
||||||
exec_state.global.operations.push(Operation::GroupEnd);
|
// Track return operation.
|
||||||
|
exec_state.global.operations.push(Operation::GroupEnd);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
@ -2226,7 +2241,7 @@ impl FunctionSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let op = if props.include_in_feature_tree {
|
let op = if props.include_in_feature_tree && !ctx.is_isolated_execution().await {
|
||||||
let op_labeled_args = args
|
let op_labeled_args = args
|
||||||
.kw_args
|
.kw_args
|
||||||
.labeled
|
.labeled
|
||||||
@ -2270,26 +2285,28 @@ impl FunctionSource {
|
|||||||
Ok(Some(result))
|
Ok(Some(result))
|
||||||
}
|
}
|
||||||
FunctionSource::User { ast, memory, .. } => {
|
FunctionSource::User { ast, memory, .. } => {
|
||||||
// Track call operation.
|
if !ctx.is_isolated_execution().await {
|
||||||
let op_labeled_args = args
|
// Track call operation.
|
||||||
.kw_args
|
let op_labeled_args = args
|
||||||
.labeled
|
.kw_args
|
||||||
.iter()
|
.labeled
|
||||||
.map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range)))
|
.iter()
|
||||||
.collect();
|
.map(|(k, arg)| (k.clone(), OpArg::new(OpKclValue::from(&arg.value), arg.source_range)))
|
||||||
exec_state.global.operations.push(Operation::GroupBegin {
|
.collect();
|
||||||
group: Group::FunctionCall {
|
exec_state.global.operations.push(Operation::GroupBegin {
|
||||||
name: fn_name,
|
group: Group::FunctionCall {
|
||||||
function_source_range: ast.as_source_range(),
|
name: fn_name,
|
||||||
unlabeled_arg: args
|
function_source_range: ast.as_source_range(),
|
||||||
.kw_args
|
unlabeled_arg: args
|
||||||
.unlabeled
|
.kw_args
|
||||||
.as_ref()
|
.unlabeled
|
||||||
.map(|arg| OpArg::new(OpKclValue::from(&arg.value), arg.source_range)),
|
.as_ref()
|
||||||
labeled_args: op_labeled_args,
|
.map(|arg| OpArg::new(OpKclValue::from(&arg.value), arg.source_range)),
|
||||||
},
|
labeled_args: op_labeled_args,
|
||||||
source_range: callsite,
|
},
|
||||||
});
|
source_range: callsite,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
call_user_defined_function_kw(args.kw_args, *memory, ast, exec_state, ctx).await
|
call_user_defined_function_kw(args.kw_args, *memory, ast, exec_state, ctx).await
|
||||||
}
|
}
|
||||||
@ -2302,13 +2319,10 @@ impl FunctionSource {
|
|||||||
mod test {
|
mod test {
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use tokio::io::AsyncWriteExt;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
execution::{memory::Stack, parse_execute, ContextType},
|
execution::{memory::Stack, parse_execute, ContextType},
|
||||||
parsing::ast::types::{DefaultParamVal, Identifier, Parameter},
|
parsing::ast::types::{DefaultParamVal, Identifier, Parameter},
|
||||||
ExecutorSettings,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
#[tokio::test(flavor = "multi_thread")]
|
||||||
@ -2418,7 +2432,7 @@ mod test {
|
|||||||
// Run each test.
|
// Run each test.
|
||||||
let func_expr = &Node::no_src(FunctionExpression {
|
let func_expr = &Node::no_src(FunctionExpression {
|
||||||
params,
|
params,
|
||||||
body: Program::empty(),
|
body: crate::parsing::ast::types::Program::empty(),
|
||||||
return_type: None,
|
return_type: None,
|
||||||
digest: None,
|
digest: None,
|
||||||
});
|
});
|
||||||
@ -2520,100 +2534,4 @@ a = foo()
|
|||||||
let result = parse_execute(program).await;
|
let result = parse_execute(program).await;
|
||||||
assert!(result.unwrap_err().to_string().contains("return"));
|
assert!(result.unwrap_err().to_string().contains("return"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test(flavor = "multi_thread")]
|
|
||||||
async fn load_all_modules() {
|
|
||||||
// program a.kcl
|
|
||||||
let programa_kcl = r#"
|
|
||||||
export a = 1
|
|
||||||
"#;
|
|
||||||
// program b.kcl
|
|
||||||
let programb_kcl = r#"
|
|
||||||
import a from 'a.kcl'
|
|
||||||
|
|
||||||
export b = a + 1
|
|
||||||
"#;
|
|
||||||
// program c.kcl
|
|
||||||
let programc_kcl = r#"
|
|
||||||
import a from 'a.kcl'
|
|
||||||
|
|
||||||
export c = a + 2
|
|
||||||
"#;
|
|
||||||
|
|
||||||
// program main.kcl
|
|
||||||
let main_kcl = r#"
|
|
||||||
import b from 'b.kcl'
|
|
||||||
import c from 'c.kcl'
|
|
||||||
|
|
||||||
d = b + c
|
|
||||||
"#;
|
|
||||||
|
|
||||||
let main = crate::parsing::parse_str(main_kcl, ModuleId::default())
|
|
||||||
.parse_errs_as_err()
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let tmpdir = tempdir::TempDir::new("zma_kcl_load_all_modules").unwrap();
|
|
||||||
|
|
||||||
tokio::fs::File::create(tmpdir.path().join("main.kcl"))
|
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.write_all(main_kcl.as_bytes())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
tokio::fs::File::create(tmpdir.path().join("a.kcl"))
|
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.write_all(programa_kcl.as_bytes())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
tokio::fs::File::create(tmpdir.path().join("b.kcl"))
|
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.write_all(programb_kcl.as_bytes())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
tokio::fs::File::create(tmpdir.path().join("c.kcl"))
|
|
||||||
.await
|
|
||||||
.unwrap()
|
|
||||||
.write_all(programc_kcl.as_bytes())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let exec_ctxt = ExecutorContext {
|
|
||||||
engine: Arc::new(Box::new(
|
|
||||||
crate::engine::conn_mock::EngineConnection::new()
|
|
||||||
.await
|
|
||||||
.map_err(|err| {
|
|
||||||
KclError::Internal(crate::errors::KclErrorDetails {
|
|
||||||
message: format!("Failed to create mock engine connection: {}", err),
|
|
||||||
source_ranges: vec![SourceRange::default()],
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.unwrap(),
|
|
||||||
)),
|
|
||||||
fs: Arc::new(crate::fs::FileManager::new()),
|
|
||||||
settings: ExecutorSettings {
|
|
||||||
project_directory: Some(tmpdir.path().into()),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
stdlib: Arc::new(crate::std::StdLib::new()),
|
|
||||||
context_type: ContextType::Mock,
|
|
||||||
};
|
|
||||||
let mut exec_state = ExecState::new(&exec_ctxt);
|
|
||||||
|
|
||||||
exec_ctxt
|
|
||||||
.run_concurrent(
|
|
||||||
&crate::Program {
|
|
||||||
ast: main.clone(),
|
|
||||||
original_file_contents: "".to_owned(),
|
|
||||||
},
|
|
||||||
&mut exec_state,
|
|
||||||
false,
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,13 @@ use anyhow::Result;
|
|||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
|
use super::{types::UnitLen, EnvironmentRef, ExecState, MetaSettings};
|
||||||
use crate::{
|
use crate::{
|
||||||
errors::KclErrorDetails,
|
errors::KclErrorDetails,
|
||||||
execution::{
|
execution::{
|
||||||
annotations::{SETTINGS, SETTINGS_UNIT_LENGTH},
|
annotations::{SETTINGS, SETTINGS_UNIT_LENGTH},
|
||||||
types::{NumericType, PrimitiveType, RuntimeType, UnitLen},
|
types::{NumericType, PrimitiveType, RuntimeType},
|
||||||
EnvironmentRef, ExecState, Face, Helix, ImportedGeometry, MetaSettings, Metadata, Plane, Sketch, Solid,
|
Face, Helix, ImportedGeometry, Metadata, Plane, Sketch, Solid, TagIdentifier,
|
||||||
TagIdentifier,
|
|
||||||
},
|
},
|
||||||
parsing::ast::types::{
|
parsing::ast::types::{
|
||||||
DefaultParamVal, FunctionExpression, KclNone, Literal, LiteralValue, Node, TagDeclarator, TagNode,
|
DefaultParamVal, FunctionExpression, KclNone, Literal, LiteralValue, Node, TagDeclarator, TagNode,
|
||||||
|
@ -30,18 +30,18 @@ pub use state::{ExecState, MetaSettings};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
engine::EngineManager,
|
engine::EngineManager,
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::KclError,
|
||||||
execution::{
|
execution::{
|
||||||
artifact::build_artifact_graph,
|
artifact::build_artifact_graph,
|
||||||
cache::{CacheInformation, CacheResult},
|
cache::{CacheInformation, CacheResult},
|
||||||
types::{UnitAngle, UnitLen},
|
types::{UnitAngle, UnitLen},
|
||||||
},
|
},
|
||||||
fs::FileManager,
|
fs::FileManager,
|
||||||
modules::{ModuleId, ModulePath, ModuleRepr},
|
modules::{ModuleId, ModulePath},
|
||||||
parsing::ast::types::{Expr, ImportPath, NodeRef},
|
parsing::ast::types::{Expr, ImportPath, NodeRef},
|
||||||
source_range::SourceRange,
|
source_range::SourceRange,
|
||||||
std::StdLib,
|
std::StdLib,
|
||||||
CompilationError, ExecError, KclErrorWithOutputs,
|
CompilationError, ExecError, ExecutionKind, KclErrorWithOutputs,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) mod annotations;
|
pub(crate) mod annotations;
|
||||||
@ -497,9 +497,13 @@ impl ExecutorContext {
|
|||||||
self.context_type == ContextType::Mock || self.context_type == ContextType::MockCustomForwarded
|
self.context_type == ContextType::Mock || self.context_type == ContextType::MockCustomForwarded
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn is_isolated_execution(&self) -> bool {
|
||||||
|
self.engine.execution_kind().await.is_isolated()
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if we should not send engine commands for any reason.
|
/// Returns true if we should not send engine commands for any reason.
|
||||||
pub async fn no_engine_commands(&self) -> bool {
|
pub async fn no_engine_commands(&self) -> bool {
|
||||||
self.is_mock()
|
self.is_mock() || self.is_isolated_execution().await
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn send_clear_scene(
|
pub async fn send_clear_scene(
|
||||||
@ -670,7 +674,7 @@ impl ExecutorContext {
|
|||||||
(program, exec_state, false)
|
(program, exec_state, false)
|
||||||
};
|
};
|
||||||
|
|
||||||
let result = self.run_concurrent(&program, &mut exec_state, preserve_mem).await;
|
let result = self.inner_run(&program, &mut exec_state, preserve_mem).await;
|
||||||
|
|
||||||
if result.is_err() {
|
if result.is_err() {
|
||||||
cache::bust_cache().await;
|
cache::bust_cache().await;
|
||||||
@ -703,138 +707,7 @@ impl ExecutorContext {
|
|||||||
program: &crate::Program,
|
program: &crate::Program,
|
||||||
exec_state: &mut ExecState,
|
exec_state: &mut ExecState,
|
||||||
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
|
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
|
||||||
self.run_concurrent(program, exec_state, false).await
|
self.inner_run(program, exec_state, false).await
|
||||||
}
|
|
||||||
|
|
||||||
/// Perform the execution of a program using an (experimental!) concurrent
|
|
||||||
/// execution model. This has the same signature as [Self::run].
|
|
||||||
///
|
|
||||||
/// For now -- do not use this unless you're willing to accept some
|
|
||||||
/// breakage.
|
|
||||||
///
|
|
||||||
/// You can optionally pass in some initialization memory for partial
|
|
||||||
/// execution.
|
|
||||||
///
|
|
||||||
/// To access non-fatal errors and warnings, extract them from the `ExecState`.
|
|
||||||
pub async fn run_concurrent(
|
|
||||||
&self,
|
|
||||||
program: &crate::Program,
|
|
||||||
exec_state: &mut ExecState,
|
|
||||||
preserve_mem: bool,
|
|
||||||
) -> Result<(EnvironmentRef, Option<ModelingSessionData>), KclErrorWithOutputs> {
|
|
||||||
self.prepare_mem(exec_state).await.unwrap();
|
|
||||||
|
|
||||||
let mut universe = std::collections::HashMap::new();
|
|
||||||
|
|
||||||
crate::walk::import_universe(self, &program.ast, &mut universe, exec_state)
|
|
||||||
.await
|
|
||||||
.map_err(KclErrorWithOutputs::no_outputs)?;
|
|
||||||
|
|
||||||
for modules in crate::walk::import_graph(&universe, self)
|
|
||||||
.map_err(KclErrorWithOutputs::no_outputs)?
|
|
||||||
.into_iter()
|
|
||||||
{
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
let mut set = tokio::task::JoinSet::new();
|
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
let (results_tx, mut results_rx): (
|
|
||||||
tokio::sync::mpsc::Sender<(
|
|
||||||
ModuleId,
|
|
||||||
ModulePath,
|
|
||||||
Result<(Option<KclValue>, EnvironmentRef, Vec<String>), KclError>,
|
|
||||||
)>,
|
|
||||||
tokio::sync::mpsc::Receiver<_>,
|
|
||||||
) = tokio::sync::mpsc::channel(1);
|
|
||||||
|
|
||||||
for module in modules {
|
|
||||||
let Some((import_stmt, module_id, module_path, program)) = universe.get(&module) else {
|
|
||||||
return Err(KclErrorWithOutputs::no_outputs(KclError::Internal(KclErrorDetails {
|
|
||||||
message: format!("Module {module} not found in universe"),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
})));
|
|
||||||
};
|
|
||||||
let module_id = *module_id;
|
|
||||||
let module_path = module_path.clone();
|
|
||||||
let program = program.clone();
|
|
||||||
let exec_state = exec_state.clone();
|
|
||||||
let exec_ctxt = self.clone();
|
|
||||||
let results_tx = results_tx.clone();
|
|
||||||
let source_range = SourceRange::from(import_stmt);
|
|
||||||
|
|
||||||
#[cfg(target_arch = "wasm32")]
|
|
||||||
{
|
|
||||||
wasm_bindgen_futures::spawn_local(async move {
|
|
||||||
//set.spawn(async move {
|
|
||||||
let mut exec_state = exec_state;
|
|
||||||
let exec_ctxt = exec_ctxt;
|
|
||||||
|
|
||||||
let result = exec_ctxt
|
|
||||||
.exec_module_from_ast(&program, module_id, &module_path, &mut exec_state, source_range)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
results_tx
|
|
||||||
.send((module_id, module_path, result))
|
|
||||||
.await
|
|
||||||
.unwrap_or_default();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
|
||||||
{
|
|
||||||
set.spawn(async move {
|
|
||||||
let mut exec_state = exec_state;
|
|
||||||
let exec_ctxt = exec_ctxt;
|
|
||||||
|
|
||||||
let result = exec_ctxt
|
|
||||||
.exec_module_from_ast(&program, module_id, &module_path, &mut exec_state, source_range)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
results_tx
|
|
||||||
.send((module_id, module_path, result))
|
|
||||||
.await
|
|
||||||
.unwrap_or_default();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
drop(results_tx);
|
|
||||||
|
|
||||||
while let Some((module_id, _, result)) = results_rx.recv().await {
|
|
||||||
match result {
|
|
||||||
Ok((val, session_data, variables)) => {
|
|
||||||
let mut repr = exec_state.global.module_infos[&module_id].take_repr();
|
|
||||||
|
|
||||||
let ModuleRepr::Kcl(_, cache) = &mut repr else {
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
*cache = Some((val, session_data, variables.clone()));
|
|
||||||
|
|
||||||
exec_state.global.module_infos[&module_id].restore_repr(repr);
|
|
||||||
}
|
|
||||||
Err(e) => {
|
|
||||||
let module_id_to_module_path: IndexMap<ModuleId, ModulePath> = exec_state
|
|
||||||
.global
|
|
||||||
.path_to_source_id
|
|
||||||
.iter()
|
|
||||||
.map(|(k, v)| ((*v), k.clone()))
|
|
||||||
.collect();
|
|
||||||
let default_planes = self.engine.get_default_planes().read().await.clone();
|
|
||||||
|
|
||||||
return Err(KclErrorWithOutputs::new(
|
|
||||||
e,
|
|
||||||
exec_state.global.operations.clone(),
|
|
||||||
exec_state.global.artifact_commands.clone(),
|
|
||||||
exec_state.global.artifact_graph.clone(),
|
|
||||||
module_id_to_module_path,
|
|
||||||
exec_state.global.id_to_source.clone(),
|
|
||||||
default_planes,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.inner_run(program, exec_state, preserve_mem).await
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Perform the execution of a program. Accept all possible parameters and
|
/// Perform the execution of a program. Accept all possible parameters and
|
||||||
@ -885,12 +758,11 @@ impl ExecutorContext {
|
|||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
// TODO: fix this
|
if !self.is_mock() {
|
||||||
/* if !self.is_mock() {
|
|
||||||
let mut mem = exec_state.stack().deep_clone();
|
let mut mem = exec_state.stack().deep_clone();
|
||||||
mem.restore_env(env_ref);
|
mem.restore_env(env_ref);
|
||||||
cache::write_old_memory((mem, exec_state.global.module_infos.clone())).await;
|
cache::write_old_memory((mem, exec_state.global.module_infos.clone())).await;
|
||||||
}*/
|
}
|
||||||
let session_data = self.engine.get_session_data().await;
|
let session_data = self.engine.get_session_data().await;
|
||||||
Ok((env_ref, session_data))
|
Ok((env_ref, session_data))
|
||||||
}
|
}
|
||||||
@ -913,6 +785,7 @@ impl ExecutorContext {
|
|||||||
.exec_module_body(
|
.exec_module_body(
|
||||||
program,
|
program,
|
||||||
exec_state,
|
exec_state,
|
||||||
|
ExecutionKind::Normal,
|
||||||
preserve_mem,
|
preserve_mem,
|
||||||
ModuleId::default(),
|
ModuleId::default(),
|
||||||
&ModulePath::Main,
|
&ModulePath::Main,
|
||||||
@ -966,7 +839,9 @@ impl ExecutorContext {
|
|||||||
source_range,
|
source_range,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let (module_memory, _) = self.exec_module_for_items(id, exec_state, source_range).await?;
|
let (module_memory, _) = self
|
||||||
|
.exec_module_for_items(id, exec_state, ExecutionKind::Isolated, source_range)
|
||||||
|
.await?;
|
||||||
|
|
||||||
exec_state.mut_stack().memory.set_std(module_memory);
|
exec_state.mut_stack().memory.set_std(module_memory);
|
||||||
}
|
}
|
||||||
|
@ -228,10 +228,6 @@ impl ExecState {
|
|||||||
self.global.module_infos.insert(id, module_info);
|
self.global.module_infos.insert(id, module_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_module(&mut self, id: ModuleId) -> Option<&ModuleInfo> {
|
|
||||||
self.global.module_infos.get(&id)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn length_unit(&self) -> UnitLen {
|
pub fn length_unit(&self) -> UnitLen {
|
||||||
self.mod_local.settings.default_length_units
|
self.mod_local.settings.default_length_units
|
||||||
}
|
}
|
||||||
|
@ -76,12 +76,12 @@ pub mod std;
|
|||||||
pub mod test_server;
|
pub mod test_server;
|
||||||
mod thread;
|
mod thread;
|
||||||
mod unparser;
|
mod unparser;
|
||||||
pub mod walk;
|
mod walk;
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
mod wasm;
|
mod wasm;
|
||||||
|
|
||||||
pub use coredump::CoreDump;
|
pub use coredump::CoreDump;
|
||||||
pub use engine::{EngineManager, EngineStats};
|
pub use engine::{EngineManager, EngineStats, ExecutionKind};
|
||||||
pub use errors::{
|
pub use errors::{
|
||||||
CompilationError, ConnectionError, ExecError, KclError, KclErrorWithOutputs, Report, ReportWithOutputs,
|
CompilationError, ConnectionError, ExecError, KclError, KclErrorWithOutputs, Report, ReportWithOutputs,
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
errors::{KclError, KclErrorDetails},
|
errors::{KclError, KclErrorDetails},
|
||||||
exec::KclValue,
|
|
||||||
execution::{EnvironmentRef, PreImportedGeometry},
|
execution::{EnvironmentRef, PreImportedGeometry},
|
||||||
fs::{FileManager, FileSystem},
|
fs::{FileManager, FileSystem},
|
||||||
parsing::ast::types::{ImportPath, Node, Program},
|
parsing::ast::types::{ImportPath, Node, Program},
|
||||||
@ -95,7 +94,7 @@ pub(crate) fn read_std(mod_name: &str) -> Option<&'static str> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Info about a module.
|
/// Info about a module.
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
||||||
pub struct ModuleInfo {
|
pub struct ModuleInfo {
|
||||||
/// The ID of the module.
|
/// The ID of the module.
|
||||||
pub(crate) id: ModuleId,
|
pub(crate) id: ModuleId,
|
||||||
@ -118,11 +117,11 @@ impl ModuleInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize)]
|
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
|
||||||
pub enum ModuleRepr {
|
pub enum ModuleRepr {
|
||||||
Root,
|
Root,
|
||||||
// AST, memory, exported names
|
// AST, memory, exported names
|
||||||
Kcl(Node<Program>, Option<(Option<KclValue>, EnvironmentRef, Vec<String>)>),
|
Kcl(Node<Program>, Option<(EnvironmentRef, Vec<String>)>),
|
||||||
Foreign(PreImportedGeometry),
|
Foreign(PreImportedGeometry),
|
||||||
Dummy,
|
Dummy,
|
||||||
}
|
}
|
||||||
|
@ -6,37 +6,31 @@ use std::{
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
errors::KclErrorDetails,
|
parsing::ast::types::{ImportPath, NodeRef, Program},
|
||||||
modules::{ModulePath, ModuleRepr},
|
|
||||||
parsing::ast::types::{ImportPath, ImportStatement, Node as AstNode, NodeRef, Program},
|
|
||||||
walk::{Node, Visitable},
|
walk::{Node, Visitable},
|
||||||
ExecState, ExecutorContext, KclError, ModuleId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Specific dependency between two modules. The 0th element of this info
|
/// Specific dependency between two modules. The 0th element of this tuple
|
||||||
/// is the "importing" module, the 1st is the "imported" module. The 0th
|
/// is the "importing" module, the 1st is the "imported" module. The 0th
|
||||||
/// module *depends on* the 1st module.
|
/// module *depends on* the 1st module.
|
||||||
type Dependency = (String, String);
|
type Dependency = (String, String);
|
||||||
|
|
||||||
type Graph = Vec<Dependency>;
|
type Graph = Vec<Dependency>;
|
||||||
|
|
||||||
type DependencyInfo = (AstNode<ImportStatement>, ModuleId, ModulePath, AstNode<Program>);
|
|
||||||
type Universe = HashMap<String, DependencyInfo>;
|
|
||||||
|
|
||||||
/// Process a number of programs, returning the graph of dependencies.
|
/// Process a number of programs, returning the graph of dependencies.
|
||||||
///
|
///
|
||||||
/// This will (currently) return a list of lists of IDs that can be safely
|
/// This will (currently) return a list of lists of IDs that can be safely
|
||||||
/// run concurrently. Each "stage" is blocking in this model, which will
|
/// run concurrently. Each "stage" is blocking in this model, which will
|
||||||
/// change in the future. Don't use this function widely, yet.
|
/// change in the future. Don't use this function widely, yet.
|
||||||
#[allow(clippy::iter_over_hash_type)]
|
#[allow(clippy::iter_over_hash_type)]
|
||||||
pub fn import_graph(progs: &Universe, ctx: &ExecutorContext) -> Result<Vec<Vec<String>>, KclError> {
|
pub fn import_graph(progs: HashMap<String, NodeRef<'_, Program>>) -> Result<Vec<Vec<String>>> {
|
||||||
let mut graph = Graph::new();
|
let mut graph = Graph::new();
|
||||||
|
|
||||||
for (name, (_, _, _, program)) in progs.iter() {
|
for (name, program) in progs.iter() {
|
||||||
graph.extend(
|
graph.extend(
|
||||||
import_dependencies(program, ctx)?
|
import_dependencies(program)?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(dependency, _, _)| (name.clone(), dependency))
|
.map(|dependency| (name.clone(), dependency))
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -46,10 +40,7 @@ pub fn import_graph(progs: &Universe, ctx: &ExecutorContext) -> Result<Vec<Vec<S
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::iter_over_hash_type)]
|
#[allow(clippy::iter_over_hash_type)]
|
||||||
fn topsort(all_modules: &[&str], graph: Graph) -> Result<Vec<Vec<String>>, KclError> {
|
fn topsort(all_modules: &[&str], graph: Graph) -> Result<Vec<Vec<String>>> {
|
||||||
if all_modules.is_empty() {
|
|
||||||
return Ok(vec![]);
|
|
||||||
}
|
|
||||||
let mut dep_map = HashMap::<String, Vec<String>>::new();
|
let mut dep_map = HashMap::<String, Vec<String>>::new();
|
||||||
|
|
||||||
for (dependent, dependency) in graph.iter() {
|
for (dependent, dependency) in graph.iter() {
|
||||||
@ -92,10 +83,7 @@ fn topsort(all_modules: &[&str], graph: Graph) -> Result<Vec<Vec<String>>, KclEr
|
|||||||
}
|
}
|
||||||
|
|
||||||
if stage_modules.is_empty() {
|
if stage_modules.is_empty() {
|
||||||
return Err(KclError::Internal(KclErrorDetails {
|
anyhow::bail!("imports are acyclic");
|
||||||
message: "Circular import detected".to_string(),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// not strictly needed here, but perhaps helpful to avoid thinking
|
// not strictly needed here, but perhaps helpful to avoid thinking
|
||||||
@ -113,98 +101,33 @@ fn topsort(all_modules: &[&str], graph: Graph) -> Result<Vec<Vec<String>>, KclEr
|
|||||||
Ok(order)
|
Ok(order)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ImportDependencies = Vec<(String, AstNode<ImportStatement>, ModulePath)>;
|
pub(crate) fn import_dependencies(prog: NodeRef<'_, Program>) -> Result<Vec<String>> {
|
||||||
|
|
||||||
pub(crate) fn import_dependencies(
|
|
||||||
prog: NodeRef<Program>,
|
|
||||||
ctx: &ExecutorContext,
|
|
||||||
) -> Result<ImportDependencies, KclError> {
|
|
||||||
let ret = Arc::new(Mutex::new(vec![]));
|
let ret = Arc::new(Mutex::new(vec![]));
|
||||||
|
|
||||||
fn walk(ret: Arc<Mutex<ImportDependencies>>, node: Node<'_>, ctx: &ExecutorContext) -> Result<(), KclError> {
|
fn walk(ret: Arc<Mutex<Vec<String>>>, node: Node<'_>) {
|
||||||
if let Node::ImportStatement(is) = node {
|
if let Node::ImportStatement(is) = node {
|
||||||
// We only care about Kcl imports for now.
|
let dependency = match &is.path {
|
||||||
if let ImportPath::Kcl { filename } = &is.path {
|
ImportPath::Kcl { filename } => filename.to_string(),
|
||||||
let resolved_path = ModulePath::from_import_path(&is.path, &ctx.settings.project_directory);
|
ImportPath::Foreign { path } => path.to_string(),
|
||||||
|
ImportPath::Std { path } => path.join("::"),
|
||||||
|
};
|
||||||
|
|
||||||
// We need to lock the mutex to push the dependency.
|
ret.lock().unwrap().push(dependency);
|
||||||
// This is a bit of a hack, but it works for now.
|
|
||||||
ret.lock()
|
|
||||||
.map_err(|err| {
|
|
||||||
KclError::Internal(KclErrorDetails {
|
|
||||||
message: format!("Failed to lock mutex: {}", err),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
})
|
|
||||||
})?
|
|
||||||
.push((filename.to_string(), is.clone(), resolved_path));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for child in node.children().iter() {
|
for child in node.children().iter() {
|
||||||
walk(ret.clone(), *child, ctx)?;
|
walk(ret.clone(), *child)
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
walk(ret.clone(), prog.into(), ctx)?;
|
walk(ret.clone(), prog.into());
|
||||||
|
|
||||||
let ret = ret.lock().map_err(|err| {
|
let ret = ret.lock().unwrap().clone();
|
||||||
KclError::Internal(KclErrorDetails {
|
Ok(ret)
|
||||||
message: format!("Failed to lock mutex: {}", err),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
})
|
|
||||||
})?;
|
|
||||||
|
|
||||||
Ok(ret.clone())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) async fn import_universe(
|
|
||||||
ctx: &ExecutorContext,
|
|
||||||
prog: NodeRef<'_, Program>,
|
|
||||||
out: &mut Universe,
|
|
||||||
exec_state: &mut ExecState,
|
|
||||||
) -> Result<(), KclError> {
|
|
||||||
let modules = import_dependencies(prog, ctx)?;
|
|
||||||
for (filename, import_stmt, module_path) in modules {
|
|
||||||
if out.contains_key(&filename) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let module_id = ctx
|
|
||||||
.open_module(&import_stmt.path, &[], exec_state, Default::default())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
let program = {
|
|
||||||
let Some(module_info) = exec_state.get_module(module_id) else {
|
|
||||||
return Err(KclError::Internal(KclErrorDetails {
|
|
||||||
message: format!("Module {} not found", module_id),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
let ModuleRepr::Kcl(program, _) = &module_info.repr else {
|
|
||||||
return Err(KclError::Internal(KclErrorDetails {
|
|
||||||
message: format!("Module {} is not a KCL module", module_id),
|
|
||||||
source_ranges: Default::default(),
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
program.clone()
|
|
||||||
};
|
|
||||||
|
|
||||||
out.insert(
|
|
||||||
filename.clone(),
|
|
||||||
(import_stmt.clone(), module_id, module_path.clone(), program.clone()),
|
|
||||||
);
|
|
||||||
Box::pin(import_universe(ctx, &program, out, exec_state)).await?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::parsing::ast::types::ImportSelector;
|
|
||||||
|
|
||||||
macro_rules! kcl {
|
macro_rules! kcl {
|
||||||
( $kcl:expr ) => {{
|
( $kcl:expr ) => {{
|
||||||
@ -212,41 +135,26 @@ mod tests {
|
|||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn into_module_info(program: AstNode<Program>) -> DependencyInfo {
|
#[test]
|
||||||
(
|
fn order_imports() {
|
||||||
AstNode::no_src(ImportStatement {
|
|
||||||
selector: ImportSelector::None { alias: None },
|
|
||||||
path: ImportPath::Kcl { filename: "".into() },
|
|
||||||
visibility: Default::default(),
|
|
||||||
digest: None,
|
|
||||||
}),
|
|
||||||
ModuleId::default(),
|
|
||||||
ModulePath::Local { value: "".into() },
|
|
||||||
program,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::test]
|
|
||||||
async fn order_imports() {
|
|
||||||
let mut modules = HashMap::new();
|
let mut modules = HashMap::new();
|
||||||
|
|
||||||
let a = kcl!("");
|
let a = kcl!("");
|
||||||
modules.insert("a.kcl".to_owned(), into_module_info(a));
|
modules.insert("a.kcl".to_owned(), &a);
|
||||||
|
|
||||||
let b = kcl!(
|
let b = kcl!(
|
||||||
"
|
"
|
||||||
import \"a.kcl\"
|
import \"a.kcl\"
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("b.kcl".to_owned(), into_module_info(b));
|
modules.insert("b.kcl".to_owned(), &b);
|
||||||
|
|
||||||
let ctx = ExecutorContext::new_mock().await;
|
let order = import_graph(modules).unwrap();
|
||||||
let order = import_graph(&modules, &ctx).unwrap();
|
|
||||||
assert_eq!(vec![vec!["a.kcl".to_owned()], vec!["b.kcl".to_owned()]], order);
|
assert_eq!(vec![vec!["a.kcl".to_owned()], vec!["b.kcl".to_owned()]], order);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[test]
|
||||||
async fn order_imports_none() {
|
fn order_imports_none() {
|
||||||
let mut modules = HashMap::new();
|
let mut modules = HashMap::new();
|
||||||
|
|
||||||
let a = kcl!(
|
let a = kcl!(
|
||||||
@ -254,51 +162,49 @@ import \"a.kcl\"
|
|||||||
y = 2
|
y = 2
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("a.kcl".to_owned(), into_module_info(a));
|
modules.insert("a.kcl".to_owned(), &a);
|
||||||
|
|
||||||
let b = kcl!(
|
let b = kcl!(
|
||||||
"
|
"
|
||||||
x = 1
|
x = 1
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("b.kcl".to_owned(), into_module_info(b));
|
modules.insert("b.kcl".to_owned(), &b);
|
||||||
|
|
||||||
let ctx = ExecutorContext::new_mock().await;
|
let order = import_graph(modules).unwrap();
|
||||||
let order = import_graph(&modules, &ctx).unwrap();
|
|
||||||
assert_eq!(vec![vec!["a.kcl".to_owned(), "b.kcl".to_owned()]], order);
|
assert_eq!(vec![vec!["a.kcl".to_owned(), "b.kcl".to_owned()]], order);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[test]
|
||||||
async fn order_imports_2() {
|
fn order_imports_2() {
|
||||||
let mut modules = HashMap::new();
|
let mut modules = HashMap::new();
|
||||||
|
|
||||||
let a = kcl!("");
|
let a = kcl!("");
|
||||||
modules.insert("a.kcl".to_owned(), into_module_info(a));
|
modules.insert("a.kcl".to_owned(), &a);
|
||||||
|
|
||||||
let b = kcl!(
|
let b = kcl!(
|
||||||
"
|
"
|
||||||
import \"a.kcl\"
|
import \"a.kcl\"
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("b.kcl".to_owned(), into_module_info(b));
|
modules.insert("b.kcl".to_owned(), &b);
|
||||||
|
|
||||||
let c = kcl!(
|
let c = kcl!(
|
||||||
"
|
"
|
||||||
import \"a.kcl\"
|
import \"a.kcl\"
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("c.kcl".to_owned(), into_module_info(c));
|
modules.insert("c.kcl".to_owned(), &c);
|
||||||
|
|
||||||
let ctx = ExecutorContext::new_mock().await;
|
let order = import_graph(modules).unwrap();
|
||||||
let order = import_graph(&modules, &ctx).unwrap();
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
vec![vec!["a.kcl".to_owned()], vec!["b.kcl".to_owned(), "c.kcl".to_owned()]],
|
vec![vec!["a.kcl".to_owned()], vec!["b.kcl".to_owned(), "c.kcl".to_owned()]],
|
||||||
order
|
order
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[test]
|
||||||
async fn order_imports_cycle() {
|
fn order_imports_cycle() {
|
||||||
let mut modules = HashMap::new();
|
let mut modules = HashMap::new();
|
||||||
|
|
||||||
let a = kcl!(
|
let a = kcl!(
|
||||||
@ -306,16 +212,15 @@ import \"a.kcl\"
|
|||||||
import \"b.kcl\"
|
import \"b.kcl\"
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("a.kcl".to_owned(), into_module_info(a));
|
modules.insert("a.kcl".to_owned(), &a);
|
||||||
|
|
||||||
let b = kcl!(
|
let b = kcl!(
|
||||||
"
|
"
|
||||||
import \"a.kcl\"
|
import \"a.kcl\"
|
||||||
"
|
"
|
||||||
);
|
);
|
||||||
modules.insert("b.kcl".to_owned(), into_module_info(b));
|
modules.insert("b.kcl".to_owned(), &b);
|
||||||
|
|
||||||
let ctx = ExecutorContext::new_mock().await;
|
import_graph(modules).unwrap_err();
|
||||||
import_graph(&modules, &ctx).unwrap_err();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,3 @@ mod import_graph;
|
|||||||
pub use ast_node::Node;
|
pub use ast_node::Node;
|
||||||
pub use ast_visitor::Visitable;
|
pub use ast_visitor::Visitable;
|
||||||
pub use ast_walk::walk;
|
pub use ast_walk::walk;
|
||||||
pub use import_graph::import_graph;
|
|
||||||
pub(crate) use import_graph::import_universe;
|
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands angled_line.kcl
|
description: Artifact commands angled_line.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands argument_error.kcl
|
description: Artifact commands argument_error.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_elem_pop.kcl
|
description: Artifact commands array_elem_pop.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_elem_pop_empty_fail.kcl
|
description: Artifact commands array_elem_pop_empty_fail.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_elem_pop_fail.kcl
|
description: Artifact commands array_elem_pop_fail.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_elem_push.kcl
|
description: Artifact commands array_elem_push.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_elem_push_fail.kcl
|
description: Artifact commands array_elem_push_fail.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_index_oob.kcl
|
description: Artifact commands array_index_oob.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_range_expr.kcl
|
description: Artifact commands array_range_expr.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands array_range_negative_expr.kcl
|
description: Artifact commands array_range_negative_expr.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands artifact_graph_example_code1.kcl
|
description: Artifact commands artifact_graph_example_code1.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands artifact_graph_example_code_no_3d.kcl
|
description: Artifact commands artifact_graph_example_code_no_3d.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands artifact_graph_example_code_offset_planes.kcl
|
description: Artifact commands artifact_graph_example_code_offset_planes.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
|
description: Artifact commands artifact_graph_sketch_on_face_etc.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -7,16 +7,26 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "edge_lines_visible",
|
||||||
"unit": "mm"
|
"hidden": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "object_visible",
|
||||||
"unit": "mm"
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -32,7 +42,7 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "set_scene_units",
|
||||||
"unit": "mm"
|
"unit": "in"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -60,6 +70,263 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"hide": true
|
"hide": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "enable_sketch_mode",
|
||||||
|
"entity_id": "[uuid]",
|
||||||
|
"ortho": false,
|
||||||
|
"animated": false,
|
||||||
|
"adjust_camera": false,
|
||||||
|
"planar_normal": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "start_path"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "move_path_pen",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"to": {
|
||||||
|
"x": -10.0,
|
||||||
|
"y": -10.0,
|
||||||
|
"z": 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "sketch_mode_disable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extend_path",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"segment": {
|
||||||
|
"type": "line",
|
||||||
|
"end": {
|
||||||
|
"x": 5.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"relative": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extend_path",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"segment": {
|
||||||
|
"type": "line",
|
||||||
|
"end": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": -5.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"relative": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extend_path",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"segment": {
|
||||||
|
"type": "line",
|
||||||
|
"end": {
|
||||||
|
"x": -5.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"relative": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extend_path",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"segment": {
|
||||||
|
"type": "line",
|
||||||
|
"end": {
|
||||||
|
"x": -10.0,
|
||||||
|
"y": -10.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"relative": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "close_path",
|
||||||
|
"path_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "enable_sketch_mode",
|
||||||
|
"entity_id": "[uuid]",
|
||||||
|
"ortho": false,
|
||||||
|
"animated": false,
|
||||||
|
"adjust_camera": false,
|
||||||
|
"planar_normal": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extrude",
|
||||||
|
"target": "[uuid]",
|
||||||
|
"distance": 5.0,
|
||||||
|
"faces": null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "sketch_mode_disable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_bring_to_front",
|
||||||
|
"object_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_extrusion_face_info",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_opposite_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_next_adjacent_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_opposite_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_next_adjacent_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_opposite_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_next_adjacent_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_opposite_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "solid3d_get_next_adjacent_edge",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"edge_id": "[uuid]",
|
||||||
|
"face_id": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "set_scene_units",
|
||||||
|
"unit": "mm"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -128,66 +395,6 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"type": "sketch_mode_disable"
|
"type": "sketch_mode_disable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "enable_sketch_mode",
|
|
||||||
"entity_id": "[uuid]",
|
|
||||||
"ortho": false,
|
|
||||||
"animated": false,
|
|
||||||
"adjust_camera": false,
|
|
||||||
"planar_normal": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "start_path"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "move_path_pen",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"to": {
|
|
||||||
"x": -10.0,
|
|
||||||
"y": -10.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "sketch_mode_disable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 5.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -222,40 +429,6 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": -5.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": -5.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -290,31 +463,6 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": -10.0,
|
|
||||||
"y": -10.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "close_path",
|
|
||||||
"path_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -373,56 +521,6 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"edge_id": "[uuid]"
|
"edge_id": "[uuid]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "enable_sketch_mode",
|
|
||||||
"entity_id": "[uuid]",
|
|
||||||
"ortho": false,
|
|
||||||
"animated": false,
|
|
||||||
"adjust_camera": false,
|
|
||||||
"planar_normal": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extrude",
|
|
||||||
"target": "[uuid]",
|
|
||||||
"distance": 5.0,
|
|
||||||
"faces": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "sketch_mode_disable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_bring_to_front",
|
|
||||||
"object_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_extrusion_face_info",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -503,120 +601,6 @@ description: Artifact commands assembly_mixed_units_cubes.kcl
|
|||||||
"face_id": "[uuid]"
|
"face_id": "[uuid]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "edge_lines_visible",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path3 [Path]
|
subgraph path2 [Path]
|
||||||
3["Path<br>[76, 111, 6]"]
|
2["Path<br>[76, 113, 5]"]
|
||||||
5["Segment<br>[117, 134, 6]"]
|
3["Segment<br>[119, 136, 5]"]
|
||||||
7["Segment<br>[140, 158, 6]"]
|
4["Segment<br>[142, 160, 5]"]
|
||||||
9["Segment<br>[164, 182, 6]"]
|
5["Segment<br>[166, 184, 5]"]
|
||||||
11["Segment<br>[188, 244, 6]"]
|
6["Segment<br>[190, 246, 5]"]
|
||||||
13["Segment<br>[250, 257, 6]"]
|
7["Segment<br>[252, 259, 5]"]
|
||||||
14[Solid2d]
|
8[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path4 [Path]
|
subgraph path25 [Path]
|
||||||
4["Path<br>[76, 113, 5]"]
|
25["Path<br>[76, 111, 6]"]
|
||||||
6["Segment<br>[119, 136, 5]"]
|
26["Segment<br>[117, 134, 6]"]
|
||||||
8["Segment<br>[142, 160, 5]"]
|
27["Segment<br>[140, 158, 6]"]
|
||||||
10["Segment<br>[166, 184, 5]"]
|
28["Segment<br>[164, 182, 6]"]
|
||||||
12["Segment<br>[190, 246, 5]"]
|
29["Segment<br>[188, 244, 6]"]
|
||||||
15["Segment<br>[252, 259, 5]"]
|
30["Segment<br>[250, 257, 6]"]
|
||||||
16[Solid2d]
|
31[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[47, 66, 6]"]
|
1["Plane<br>[47, 66, 5]"]
|
||||||
2["Plane<br>[47, 66, 5]"]
|
9["Sweep Extrusion<br>[265, 287, 5]"]
|
||||||
17["Sweep Extrusion<br>[263, 285, 6]"]
|
10[Wall]
|
||||||
18[Wall]
|
11[Wall]
|
||||||
19[Wall]
|
12[Wall]
|
||||||
20[Wall]
|
13[Wall]
|
||||||
21[Wall]
|
14["Cap Start"]
|
||||||
22["Cap Start"]
|
15["Cap End"]
|
||||||
23["Cap End"]
|
16["SweepEdge Opposite"]
|
||||||
24["Sweep Extrusion<br>[265, 287, 5]"]
|
17["SweepEdge Adjacent"]
|
||||||
25[Wall]
|
18["SweepEdge Opposite"]
|
||||||
26[Wall]
|
19["SweepEdge Adjacent"]
|
||||||
27[Wall]
|
20["SweepEdge Opposite"]
|
||||||
28[Wall]
|
21["SweepEdge Adjacent"]
|
||||||
29["Cap Start"]
|
22["SweepEdge Opposite"]
|
||||||
30["Cap End"]
|
23["SweepEdge Adjacent"]
|
||||||
31["SweepEdge Opposite"]
|
24["Plane<br>[47, 66, 6]"]
|
||||||
32["SweepEdge Adjacent"]
|
32["Sweep Extrusion<br>[263, 285, 6]"]
|
||||||
33["SweepEdge Opposite"]
|
33[Wall]
|
||||||
34["SweepEdge Adjacent"]
|
34[Wall]
|
||||||
35["SweepEdge Opposite"]
|
35[Wall]
|
||||||
36["SweepEdge Adjacent"]
|
36[Wall]
|
||||||
37["SweepEdge Opposite"]
|
37["Cap Start"]
|
||||||
38["SweepEdge Adjacent"]
|
38["Cap End"]
|
||||||
39["SweepEdge Opposite"]
|
39["SweepEdge Opposite"]
|
||||||
40["SweepEdge Adjacent"]
|
40["SweepEdge Adjacent"]
|
||||||
41["SweepEdge Opposite"]
|
41["SweepEdge Opposite"]
|
||||||
@ -50,72 +50,72 @@ flowchart LR
|
|||||||
44["SweepEdge Adjacent"]
|
44["SweepEdge Adjacent"]
|
||||||
45["SweepEdge Opposite"]
|
45["SweepEdge Opposite"]
|
||||||
46["SweepEdge Adjacent"]
|
46["SweepEdge Adjacent"]
|
||||||
1 --- 3
|
1 --- 2
|
||||||
|
2 --- 3
|
||||||
2 --- 4
|
2 --- 4
|
||||||
3 --- 5
|
2 --- 5
|
||||||
3 --- 7
|
2 --- 6
|
||||||
3 --- 9
|
2 --- 7
|
||||||
3 --- 11
|
2 ---- 9
|
||||||
|
2 --- 8
|
||||||
3 --- 13
|
3 --- 13
|
||||||
3 ---- 17
|
3 --- 22
|
||||||
3 --- 14
|
3 --- 23
|
||||||
4 --- 6
|
|
||||||
4 --- 8
|
|
||||||
4 --- 10
|
|
||||||
4 --- 12
|
4 --- 12
|
||||||
4 --- 15
|
4 --- 20
|
||||||
4 ---- 24
|
4 --- 21
|
||||||
4 --- 16
|
5 --- 11
|
||||||
5 --- 21
|
5 --- 18
|
||||||
5 --- 37
|
5 --- 19
|
||||||
5 --- 38
|
6 --- 10
|
||||||
6 --- 28
|
6 --- 16
|
||||||
6 --- 45
|
6 --- 17
|
||||||
6 --- 46
|
9 --- 10
|
||||||
7 --- 20
|
9 --- 11
|
||||||
7 --- 35
|
9 --- 12
|
||||||
7 --- 36
|
9 --- 13
|
||||||
8 --- 27
|
9 --- 14
|
||||||
8 --- 43
|
9 --- 15
|
||||||
8 --- 44
|
9 --- 16
|
||||||
|
9 --- 17
|
||||||
|
9 --- 18
|
||||||
9 --- 19
|
9 --- 19
|
||||||
9 --- 33
|
9 --- 20
|
||||||
9 --- 34
|
9 --- 21
|
||||||
10 --- 26
|
9 --- 22
|
||||||
10 --- 41
|
9 --- 23
|
||||||
10 --- 42
|
|
||||||
11 --- 18
|
|
||||||
11 --- 31
|
|
||||||
11 --- 32
|
|
||||||
12 --- 25
|
|
||||||
12 --- 39
|
|
||||||
12 --- 40
|
|
||||||
17 --- 18
|
|
||||||
17 --- 19
|
|
||||||
17 --- 20
|
|
||||||
17 --- 21
|
|
||||||
17 --- 22
|
|
||||||
17 --- 23
|
|
||||||
17 --- 31
|
|
||||||
17 --- 32
|
|
||||||
17 --- 33
|
|
||||||
17 --- 34
|
|
||||||
17 --- 35
|
|
||||||
17 --- 36
|
|
||||||
17 --- 37
|
|
||||||
17 --- 38
|
|
||||||
24 --- 25
|
24 --- 25
|
||||||
24 --- 26
|
25 --- 26
|
||||||
24 --- 27
|
25 --- 27
|
||||||
24 --- 28
|
25 --- 28
|
||||||
24 --- 29
|
25 --- 29
|
||||||
24 --- 30
|
25 --- 30
|
||||||
24 --- 39
|
25 ---- 32
|
||||||
24 --- 40
|
25 --- 31
|
||||||
24 --- 41
|
26 --- 36
|
||||||
24 --- 42
|
26 --- 45
|
||||||
24 --- 43
|
26 --- 46
|
||||||
24 --- 44
|
27 --- 35
|
||||||
24 --- 45
|
27 --- 43
|
||||||
24 --- 46
|
27 --- 44
|
||||||
|
28 --- 34
|
||||||
|
28 --- 41
|
||||||
|
28 --- 42
|
||||||
|
29 --- 33
|
||||||
|
29 --- 39
|
||||||
|
29 --- 40
|
||||||
|
32 --- 33
|
||||||
|
32 --- 34
|
||||||
|
32 --- 35
|
||||||
|
32 --- 36
|
||||||
|
32 --- 37
|
||||||
|
32 --- 38
|
||||||
|
32 --- 39
|
||||||
|
32 --- 40
|
||||||
|
32 --- 41
|
||||||
|
32 --- 42
|
||||||
|
32 --- 43
|
||||||
|
32 --- 44
|
||||||
|
32 --- 45
|
||||||
|
32 --- 46
|
||||||
```
|
```
|
||||||
|
@ -12,6 +12,53 @@ description: Operations executed assembly_mixed_units_cubes.kcl
|
|||||||
},
|
},
|
||||||
"sourceRange": []
|
"sourceRange": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"data": {
|
||||||
|
"value": {
|
||||||
|
"type": "String",
|
||||||
|
"value": "XY"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 5.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Inches"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "GroupEnd"
|
"type": "GroupEnd"
|
||||||
},
|
},
|
||||||
@ -24,6 +71,53 @@ description: Operations executed assembly_mixed_units_cubes.kcl
|
|||||||
},
|
},
|
||||||
"sourceRange": []
|
"sourceRange": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"data": {
|
||||||
|
"value": {
|
||||||
|
"type": "String",
|
||||||
|
"value": "XY"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 5.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Mm"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "GroupEnd"
|
"type": "GroupEnd"
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 35 KiB |
@ -7,16 +7,26 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "edge_lines_visible",
|
||||||
"unit": "mm"
|
"hidden": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "object_visible",
|
||||||
"unit": "mm"
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -83,131 +93,6 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"type": "start_path"
|
"type": "start_path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "move_path_pen",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"to": {
|
|
||||||
"x": 1.0,
|
|
||||||
"y": 2.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "sketch_mode_disable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "arc",
|
|
||||||
"center": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 2.0
|
|
||||||
},
|
|
||||||
"radius": 1.0,
|
|
||||||
"start": {
|
|
||||||
"unit": "degrees",
|
|
||||||
"value": 0.0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"unit": "degrees",
|
|
||||||
"value": 360.0
|
|
||||||
},
|
|
||||||
"relative": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "close_path",
|
|
||||||
"path_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "in"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "make_plane",
|
|
||||||
"origin": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"x_axis": {
|
|
||||||
"x": 1.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"y_axis": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 1.0
|
|
||||||
},
|
|
||||||
"size": 60.0,
|
|
||||||
"clobber": false,
|
|
||||||
"hide": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "enable_sketch_mode",
|
|
||||||
"entity_id": "[uuid]",
|
|
||||||
"ortho": false,
|
|
||||||
"animated": false,
|
|
||||||
"adjust_camera": false,
|
|
||||||
"planar_normal": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": -1.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "start_path"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -261,40 +146,6 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"path_id": "[uuid]"
|
"path_id": "[uuid]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "edge_lines_visible",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
@ -302,5 +153,106 @@ description: Artifact commands assembly_non_default_units.kcl
|
|||||||
"type": "set_scene_units",
|
"type": "set_scene_units",
|
||||||
"unit": "in"
|
"unit": "in"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "make_plane",
|
||||||
|
"origin": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"x_axis": {
|
||||||
|
"x": 1.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 0.0
|
||||||
|
},
|
||||||
|
"y_axis": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 0.0,
|
||||||
|
"z": 1.0
|
||||||
|
},
|
||||||
|
"size": 60.0,
|
||||||
|
"clobber": false,
|
||||||
|
"hide": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "enable_sketch_mode",
|
||||||
|
"entity_id": "[uuid]",
|
||||||
|
"ortho": false,
|
||||||
|
"animated": false,
|
||||||
|
"adjust_camera": false,
|
||||||
|
"planar_normal": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": -1.0,
|
||||||
|
"z": 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "start_path"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "move_path_pen",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"to": {
|
||||||
|
"x": 1.0,
|
||||||
|
"y": 2.0,
|
||||||
|
"z": 0.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "sketch_mode_disable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "extend_path",
|
||||||
|
"path": "[uuid]",
|
||||||
|
"segment": {
|
||||||
|
"type": "arc",
|
||||||
|
"center": {
|
||||||
|
"x": 0.0,
|
||||||
|
"y": 2.0
|
||||||
|
},
|
||||||
|
"radius": 1.0,
|
||||||
|
"start": {
|
||||||
|
"unit": "degrees",
|
||||||
|
"value": 0.0
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"unit": "degrees",
|
||||||
|
"value": 360.0
|
||||||
|
},
|
||||||
|
"relative": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "close_path",
|
||||||
|
"path_id": "[uuid]"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
subgraph path2 [Path]
|
||||||
2["Path<br>[113, 148, 7]"]
|
2["Path<br>[197, 232, 5]"]
|
||||||
3["Segment<br>[113, 148, 7]"]
|
3["Segment<br>[197, 232, 5]"]
|
||||||
4[Solid2d]
|
4[Solid2d]
|
||||||
end
|
end
|
||||||
subgraph path6 [Path]
|
subgraph path6 [Path]
|
||||||
6["Path<br>[197, 232, 5]"]
|
6["Path<br>[113, 148, 6]"]
|
||||||
7["Segment<br>[197, 232, 5]"]
|
7["Segment<br>[113, 148, 6]"]
|
||||||
8[Solid2d]
|
8[Solid2d]
|
||||||
end
|
end
|
||||||
1["Plane<br>[88, 107, 7]"]
|
1["Plane<br>[172, 191, 5]"]
|
||||||
5["Plane<br>[172, 191, 5]"]
|
5["Plane<br>[88, 107, 6]"]
|
||||||
1 --- 2
|
1 --- 2
|
||||||
2 --- 3
|
2 --- 3
|
||||||
2 --- 4
|
2 --- 4
|
||||||
|
@ -12,6 +12,21 @@ description: Operations executed assembly_non_default_units.kcl
|
|||||||
},
|
},
|
||||||
"sourceRange": []
|
"sourceRange": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"data": {
|
||||||
|
"value": {
|
||||||
|
"type": "String",
|
||||||
|
"value": "XZ"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "GroupEnd"
|
"type": "GroupEnd"
|
||||||
},
|
},
|
||||||
@ -20,10 +35,25 @@ description: Operations executed assembly_non_default_units.kcl
|
|||||||
"group": {
|
"group": {
|
||||||
"type": "ModuleInstance",
|
"type": "ModuleInstance",
|
||||||
"name": "other2",
|
"name": "other2",
|
||||||
"moduleId": 7
|
"moduleId": 6
|
||||||
},
|
},
|
||||||
"sourceRange": []
|
"sourceRange": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"data": {
|
||||||
|
"value": {
|
||||||
|
"type": "String",
|
||||||
|
"value": "XZ"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "GroupEnd"
|
"type": "GroupEnd"
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,6 @@ description: Variables in memory after executing assembly_non_default_units.kcl
|
|||||||
},
|
},
|
||||||
"other2": {
|
"other2": {
|
||||||
"type": "Module",
|
"type": "Module",
|
||||||
"value": 7
|
"value": 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands bad_units_in_annotation.kcl
|
description: Artifact commands bad_units_in_annotation.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands basic_fillet_cube_close_opposite.kcl
|
description: Artifact commands basic_fillet_cube_close_opposite.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands basic_fillet_cube_end.kcl
|
description: Artifact commands basic_fillet_cube_end.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands basic_fillet_cube_next_adjacent.kcl
|
description: Artifact commands basic_fillet_cube_next_adjacent.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
|
description: Artifact commands basic_fillet_cube_previous_adjacent.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands basic_fillet_cube_start.kcl
|
description: Artifact commands basic_fillet_cube_start.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands big_number_angle_to_match_length_x.kcl
|
description: Artifact commands big_number_angle_to_match_length_x.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands big_number_angle_to_match_length_y.kcl
|
description: Artifact commands big_number_angle_to_match_length_y.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands boolean_logical_and.kcl
|
description: Artifact commands boolean_logical_and.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands boolean_logical_multiple.kcl
|
description: Artifact commands boolean_logical_multiple.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands boolean_logical_or.kcl
|
description: Artifact commands boolean_logical_or.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands circle_three_point.kcl
|
description: Artifact commands circle_three_point.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands circular_pattern3d_a_pattern.kcl
|
description: Artifact commands circular_pattern3d_a_pattern.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands comparisons.kcl
|
description: Artifact commands comparisons.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands comparisons_multiple.kcl
|
description: Artifact commands comparisons_multiple.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands computed_var.kcl
|
description: Artifact commands computed_var.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands crazy_multi_profile.kcl
|
description: Artifact commands crazy_multi_profile.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands cube.kcl
|
description: Artifact commands cube.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands cube_with_error.kcl
|
description: Artifact commands cube_with_error.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands double_map_fn.kcl
|
description: Artifact commands double_map_fn.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands fillet-and-shell.kcl
|
description: Artifact commands fillet-and-shell.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands flush_batch_on_end.kcl
|
description: Artifact commands flush_batch_on_end.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands function_sketch.kcl
|
description: Artifact commands function_sketch.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands function_sketch_with_position.kcl
|
description: Artifact commands function_sketch_with_position.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands helix_ccw.kcl
|
description: Artifact commands helix_ccw.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands helix_simple.kcl
|
description: Artifact commands helix_simple.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands i_shape.kcl
|
description: Artifact commands i_shape.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands if_else.kcl
|
description: Artifact commands if_else.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_constant.kcl
|
description: Artifact commands import_constant.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_export.kcl
|
description: Artifact commands import_export.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -2,4 +2,31 @@
|
|||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
description: Artifact commands import_file_not_exist_error.kcl
|
description: Artifact commands import_file_not_exist_error.kcl
|
||||||
---
|
---
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "edge_lines_visible",
|
||||||
|
"hidden": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Error from executing import_file_not_exist_error.kcl
|
description: Error from executing import_file_not_exist_error.kcl
|
||||||
---
|
---
|
||||||
KCL I/O error
|
KCL I/O error
|
||||||
@ -8,6 +8,6 @@ KCL I/O error
|
|||||||
│ exist.kcl`: No such file or directory (os error 2)
|
│ exist.kcl`: No such file or directory (os error 2)
|
||||||
╭────
|
╭────
|
||||||
1 │ import hotdog from "not-exist.kcl"
|
1 │ import hotdog from "not-exist.kcl"
|
||||||
· ▲
|
· ─────────────────┬────────────────
|
||||||
· ╰── main
|
· ╰── tests/import_file_not_exist_error/input.kcl
|
||||||
╰────
|
╰────
|
||||||
|
@ -2,4 +2,31 @@
|
|||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl-lib/src/simulation_tests.rs
|
||||||
description: Artifact commands import_file_parse_error.kcl
|
description: Artifact commands import_file_parse_error.kcl
|
||||||
---
|
---
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "edge_lines_visible",
|
||||||
|
"hidden": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
description: Error from executing import_file_parse_error.kcl
|
description: Error from executing import_file_parse_error.kcl
|
||||||
---
|
---
|
||||||
KCL Syntax error
|
KCL Syntax error
|
||||||
|
|
||||||
× syntax: Unexpected token: }
|
× syntax: Unexpected token: }
|
||||||
╭────
|
╭─[3:1]
|
||||||
1 │ import hotdog from "parse-failure.kcl"
|
2 │ return
|
||||||
· ┬
|
3 │ }
|
||||||
· ╰── main
|
· ┬
|
||||||
|
· ╰── tests/import_file_parse_error/parse-failure.kcl
|
||||||
╰────
|
╰────
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_foreign.kcl
|
description: Artifact commands import_foreign.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,426 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_function_not_sketch.kcl
|
description: Artifact commands import_function_not_sketch.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "make_plane",
|
|
||||||
"origin": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"x_axis": {
|
|
||||||
"x": 1.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"y_axis": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 1.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"size": 60.0,
|
|
||||||
"clobber": false,
|
|
||||||
"hide": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "enable_sketch_mode",
|
|
||||||
"entity_id": "[uuid]",
|
|
||||||
"ortho": false,
|
|
||||||
"animated": false,
|
|
||||||
"adjust_camera": false,
|
|
||||||
"planar_normal": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "start_path"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "move_path_pen",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"to": {
|
|
||||||
"x": 4.0,
|
|
||||||
"y": 12.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "sketch_mode_disable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 2.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": -6.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 4.0,
|
|
||||||
"y": -6.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": -6.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": -3.75,
|
|
||||||
"y": -4.5,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": -5.5,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "line",
|
|
||||||
"end": {
|
|
||||||
"x": -2.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"relative": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "close_path",
|
|
||||||
"path_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "revolve",
|
|
||||||
"target": "[uuid]",
|
|
||||||
"origin": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"axis": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 1.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"axis_is_2d": true,
|
|
||||||
"angle": {
|
|
||||||
"unit": "degrees",
|
|
||||||
"value": 360.0
|
|
||||||
},
|
|
||||||
"tolerance": 0.0000001
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_bring_to_front",
|
|
||||||
"object_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_extrusion_face_info",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_opposite_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "solid3d_get_next_adjacent_edge",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"edge_id": "[uuid]",
|
|
||||||
"face_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
|
assertion_line: 189
|
||||||
description: Artifact graph flowchart import_function_not_sketch.kcl
|
description: Artifact graph flowchart import_function_not_sketch.kcl
|
||||||
extension: md
|
extension: md
|
||||||
snapshot_kind: binary
|
snapshot_kind: binary
|
||||||
|
@ -1,82 +1,3 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
|
||||||
2["Path<br>[75, 101, 5]"]
|
|
||||||
3["Segment<br>[107, 125, 5]"]
|
|
||||||
4["Segment<br>[131, 150, 5]"]
|
|
||||||
5["Segment<br>[156, 175, 5]"]
|
|
||||||
6["Segment<br>[181, 200, 5]"]
|
|
||||||
7["Segment<br>[206, 231, 5]"]
|
|
||||||
8["Segment<br>[237, 258, 5]"]
|
|
||||||
9["Segment<br>[264, 283, 5]"]
|
|
||||||
10["Segment<br>[289, 296, 5]"]
|
|
||||||
11[Solid2d]
|
|
||||||
end
|
|
||||||
1["Plane<br>[52, 69, 5]"]
|
|
||||||
12["Sweep Revolve<br>[302, 319, 5]"]
|
|
||||||
13[Wall]
|
|
||||||
14[Wall]
|
|
||||||
15[Wall]
|
|
||||||
16[Wall]
|
|
||||||
17[Wall]
|
|
||||||
18[Wall]
|
|
||||||
19[Wall]
|
|
||||||
20[Wall]
|
|
||||||
21["SweepEdge Adjacent"]
|
|
||||||
22["SweepEdge Adjacent"]
|
|
||||||
23["SweepEdge Adjacent"]
|
|
||||||
24["SweepEdge Adjacent"]
|
|
||||||
25["SweepEdge Adjacent"]
|
|
||||||
26["SweepEdge Adjacent"]
|
|
||||||
27["SweepEdge Adjacent"]
|
|
||||||
1 --- 2
|
|
||||||
2 --- 3
|
|
||||||
2 --- 4
|
|
||||||
2 --- 5
|
|
||||||
2 --- 6
|
|
||||||
2 --- 7
|
|
||||||
2 --- 8
|
|
||||||
2 --- 9
|
|
||||||
2 --- 10
|
|
||||||
2 ---- 12
|
|
||||||
2 --- 11
|
|
||||||
3 --- 13
|
|
||||||
3 x--> 21
|
|
||||||
4 --- 14
|
|
||||||
4 --- 21
|
|
||||||
5 --- 15
|
|
||||||
5 --- 22
|
|
||||||
6 --- 16
|
|
||||||
6 --- 23
|
|
||||||
7 --- 17
|
|
||||||
7 --- 24
|
|
||||||
8 --- 18
|
|
||||||
8 --- 25
|
|
||||||
9 --- 19
|
|
||||||
9 --- 26
|
|
||||||
10 --- 20
|
|
||||||
10 --- 27
|
|
||||||
12 --- 13
|
|
||||||
12 --- 14
|
|
||||||
12 --- 15
|
|
||||||
12 --- 16
|
|
||||||
12 --- 17
|
|
||||||
12 --- 18
|
|
||||||
12 --- 19
|
|
||||||
12 --- 20
|
|
||||||
12 <--x 3
|
|
||||||
12 --- 21
|
|
||||||
12 <--x 4
|
|
||||||
12 <--x 5
|
|
||||||
12 --- 22
|
|
||||||
12 <--x 6
|
|
||||||
12 --- 23
|
|
||||||
12 <--x 7
|
|
||||||
12 --- 24
|
|
||||||
12 <--x 8
|
|
||||||
12 --- 25
|
|
||||||
12 <--x 9
|
|
||||||
12 --- 26
|
|
||||||
12 <--x 10
|
|
||||||
12 --- 27
|
|
||||||
```
|
```
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 19 KiB |
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_glob.kcl
|
description: Artifact commands import_glob.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,123 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_side_effect.kcl
|
description: Artifact commands import_side_effect.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "make_plane",
|
|
||||||
"origin": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"x_axis": {
|
|
||||||
"x": 1.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"y_axis": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 1.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"size": 60.0,
|
|
||||||
"clobber": false,
|
|
||||||
"hide": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "enable_sketch_mode",
|
|
||||||
"entity_id": "[uuid]",
|
|
||||||
"ortho": false,
|
|
||||||
"animated": false,
|
|
||||||
"adjust_camera": false,
|
|
||||||
"planar_normal": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "start_path"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "move_path_pen",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"to": {
|
|
||||||
"x": 10.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "sketch_mode_disable"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "extend_path",
|
|
||||||
"path": "[uuid]",
|
|
||||||
"segment": {
|
|
||||||
"type": "arc",
|
|
||||||
"center": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0
|
|
||||||
},
|
|
||||||
"radius": 10.0,
|
|
||||||
"start": {
|
|
||||||
"unit": "degrees",
|
|
||||||
"value": 0.0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"unit": "degrees",
|
|
||||||
"value": 360.0
|
|
||||||
},
|
|
||||||
"relative": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "close_path",
|
|
||||||
"path_id": "[uuid]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: kcl-lib/src/simulation_tests.rs
|
source: kcl/src/simulation_tests.rs
|
||||||
|
assertion_line: 189
|
||||||
description: Artifact graph flowchart import_side_effect.kcl
|
description: Artifact graph flowchart import_side_effect.kcl
|
||||||
extension: md
|
extension: md
|
||||||
snapshot_kind: binary
|
snapshot_kind: binary
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
subgraph path2 [Path]
|
|
||||||
2["Path<br>[102, 138, 5]"]
|
|
||||||
3["Segment<br>[102, 138, 5]"]
|
|
||||||
4[Solid2d]
|
|
||||||
end
|
|
||||||
1["Plane<br>[77, 96, 5]"]
|
|
||||||
1 --- 2
|
|
||||||
2 --- 3
|
|
||||||
2 --- 4
|
|
||||||
```
|
```
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands import_transform.kcl
|
description: Artifact commands import_transform.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -7,8 +7,26 @@ description: Artifact commands import_whole.kcl
|
|||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
"command": {
|
"command": {
|
||||||
"type": "set_scene_units",
|
"type": "edge_lines_visible",
|
||||||
"unit": "mm"
|
"hidden": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cmdId": "[uuid]",
|
||||||
|
"range": [],
|
||||||
|
"command": {
|
||||||
|
"type": "object_visible",
|
||||||
|
"object_id": "[uuid]",
|
||||||
|
"hidden": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -206,40 +224,6 @@ description: Artifact commands import_whole.kcl
|
|||||||
"unit": "mm"
|
"unit": "mm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "edge_lines_visible",
|
|
||||||
"hidden": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "object_visible",
|
|
||||||
"object_id": "[uuid]",
|
|
||||||
"hidden": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -12,6 +12,53 @@ description: Operations executed import_whole.kcl
|
|||||||
},
|
},
|
||||||
"sourceRange": []
|
"sourceRange": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"data": {
|
||||||
|
"value": {
|
||||||
|
"type": "Plane",
|
||||||
|
"artifact_id": "[uuid]"
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "startSketchOn",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"labeledArgs": {
|
||||||
|
"length": {
|
||||||
|
"value": {
|
||||||
|
"type": "Number",
|
||||||
|
"value": 10.0,
|
||||||
|
"ty": {
|
||||||
|
"type": "Default",
|
||||||
|
"len": {
|
||||||
|
"type": "Inches"
|
||||||
|
},
|
||||||
|
"angle": {
|
||||||
|
"type": "Degrees"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "extrude",
|
||||||
|
"sourceRange": [],
|
||||||
|
"type": "StdLibCall",
|
||||||
|
"unlabeledArg": {
|
||||||
|
"value": {
|
||||||
|
"type": "Sketch",
|
||||||
|
"value": {
|
||||||
|
"artifactId": "[uuid]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourceRange": []
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "GroupEnd"
|
"type": "GroupEnd"
|
||||||
},
|
},
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands index_of_array.kcl
|
description: Artifact commands index_of_array.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands intersect_cubes.kcl
|
description: Artifact commands intersect_cubes.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands invalid_index_fractional.kcl
|
description: Artifact commands invalid_index_fractional.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands invalid_index_negative.kcl
|
description: Artifact commands invalid_index_negative.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands invalid_index_str.kcl
|
description: Artifact commands invalid_index_str.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands invalid_member_object.kcl
|
description: Artifact commands invalid_member_object.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands invalid_member_object_prop.kcl
|
description: Artifact commands invalid_member_object_prop.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands 80-20-rail.kcl
|
description: Artifact commands 80-20-rail.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,22 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands ball-bearing.kcl
|
description: Artifact commands ball-bearing.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
@ -3,30 +3,6 @@ source: kcl-lib/src/simulation_tests.rs
|
|||||||
description: Artifact commands bench.kcl
|
description: Artifact commands bench.kcl
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cmdId": "[uuid]",
|
|
||||||
"range": [],
|
|
||||||
"command": {
|
|
||||||
"type": "set_scene_units",
|
|
||||||
"unit": "mm"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cmdId": "[uuid]",
|
"cmdId": "[uuid]",
|
||||||
"range": [],
|
"range": [],
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user