Declare appearance function in KCL (#7220)

Move appearance to KCL

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-05-28 11:25:27 +12:00
committed by GitHub
parent 889c72ec60
commit 9dfb67cf61
68 changed files with 3999 additions and 11936 deletions

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,6 @@ layout: manual
### Functions
* [**std**](/docs/kcl-std/modules/std)
* [`appearance`](/docs/kcl-std/appearance)
* [`assert`](/docs/kcl-std/assert)
* [`assertIs`](/docs/kcl-std/assertIs)
* [`clone`](/docs/kcl-std/functions/std-clone)
@ -90,6 +89,7 @@ layout: manual
* [`xLine`](/docs/kcl-std/xLine)
* [`yLine`](/docs/kcl-std/yLine)
* [**std::solid**](/docs/kcl-std/modules/std-solid)
* [`appearance`](/docs/kcl-std/functions/std-solid-appearance)
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)

View File

@ -12,6 +12,7 @@ This module contains functions for modifying solids, e.g., by adding a fillet or
## Functions and constants
* [`appearance`](/docs/kcl-std/functions/std-solid-appearance)
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)

View File

@ -36,7 +36,6 @@ You might also want the [KCL language reference](/docs/kcl-lang) or the [KCL gui
* [`Y`](/docs/kcl-std/consts/std-Y)
* [`YZ`](/docs/kcl-std/consts/std-YZ)
* [`Z`](/docs/kcl-std/consts/std-Z)
* [`appearance`](/docs/kcl-std/appearance)
* [`assert`](/docs/kcl-std/assert)
* [`assertIs`](/docs/kcl-std/assertIs)
* [`clone`](/docs/kcl-std/functions/std-clone)

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -113,6 +113,16 @@ pub const TEST_NAMES: &[&str] = &[
"std-sketch-revolve-7",
"std-sketch-revolve-8",
"std-sketch-revolve-9",
"std-solid-appearance-0",
"std-solid-appearance-1",
"std-solid-appearance-2",
"std-solid-appearance-3",
"std-solid-appearance-4",
"std-solid-appearance-5",
"std-solid-appearance-6",
"std-solid-appearance-7",
"std-solid-appearance-8",
"std-solid-appearance-9",
"std-solid-chamfer-0",
"std-solid-chamfer-1",
"std-solid-fillet-0",

View File

@ -463,7 +463,11 @@ impl ModData {
}
pub fn find_by_name(&self, name: &str) -> Option<&DocData> {
if let Some(result) = self.children.values().find(|dd| dd.name() == name) {
if let Some(result) = self
.children
.values()
.find(|dd| dd.name() == name && !matches!(dd, DocData::Mod(_)))
{
return Some(result);
}
@ -824,7 +828,13 @@ impl ArgData {
Some("[Edge; 1+]") => Some((index, format!(r#"{label}[${{{index}:tag_or_edge_fn}}]"#))),
Some("Plane") => Some((index, format!(r#"{label}${{{}:XY}}"#, index))),
Some("string") => Some((index, format!(r#"{label}${{{}:"string"}}"#, index))),
Some("string") => {
if self.name == "color" {
Some((index, format!(r#"{label}${{{}:"ff0000"}}"#, index)))
} else {
Some((index, format!(r#"{label}${{{}:"string"}}"#, index)))
}
}
Some("bool") => Some((index, format!(r#"{label}${{{}:false}}"#, index))),
_ => None,
}

View File

@ -1074,12 +1074,12 @@ mod tests {
#[test]
fn get_autocomplete_snippet_appearance() {
let appearance_fn: Box<dyn StdLibFn> = Box::new(crate::std::appearance::Appearance);
let snippet = appearance_fn.to_autocomplete_snippet().unwrap();
assert_eq!(
snippet,
r#"appearance(${0:%}, color = ${1:"#.to_owned() + "\"#" + r#"ff0000"})"#
);
let data = kcl_doc::walk_prelude();
let DocData::Fn(helix_fn) = data.find_by_name("appearance").unwrap() else {
panic!();
};
let snippet = helix_fn.to_autocomplete_snippet();
assert_eq!(snippet, r#"appearance(color = ${0:"ff0000"})"#);
}
#[test]

View File

@ -160,8 +160,10 @@ impl ExecutorContext {
.cloned();
let ty_name = format!("{}{}", memory::TYPE_PREFIX, import_item.name.name);
let mut ty = mem.get_from(&ty_name, env_ref, import_item.into(), 0).cloned();
let mod_name = format!("{}{}", memory::MODULE_PREFIX, import_item.name.name);
let mut mod_value = mem.get_from(&mod_name, env_ref, import_item.into(), 0).cloned();
if value.is_err() && ty.is_err() {
if value.is_err() && ty.is_err() && mod_value.is_err() {
return Err(KclError::UndefinedValue(KclErrorDetails::new(
format!("{} is not defined in module", import_item.name.name),
vec![SourceRange::from(&import_item.name)],
@ -180,10 +182,22 @@ impl ExecutorContext {
}
if ty.is_ok() && !module_exports.contains(&ty_name) {
ty = Err(KclError::Semantic(KclErrorDetails::new(String::new(), vec![])));
ty = Err(KclError::Semantic(KclErrorDetails::new(format!(
"Cannot import \"{}\" from module because it is not exported. Add \"export\" before the definition to export it.",
import_item.name.name
),
vec![SourceRange::from(&import_item.name)],)));
}
if value.is_err() && ty.is_err() {
if mod_value.is_ok() && !module_exports.contains(&mod_name) {
mod_value = Err(KclError::Semantic(KclErrorDetails::new(format!(
"Cannot import \"{}\" from module because it is not exported. Add \"export\" before the definition to export it.",
import_item.name.name
),
vec![SourceRange::from(&import_item.name)],)));
}
if value.is_err() && ty.is_err() && mod_value.is_err() {
return value.map(Option::Some);
}
@ -205,7 +219,6 @@ impl ExecutorContext {
if let Ok(ty) = ty {
let ty_name = format!("{}{}", memory::TYPE_PREFIX, import_item.identifier());
// Add the item to the current module.
exec_state.mut_stack().add(
ty_name.clone(),
ty,
@ -216,6 +229,19 @@ impl ExecutorContext {
exec_state.mod_local.module_exports.push(ty_name);
}
}
if let Ok(mod_value) = mod_value {
let mod_name = format!("{}{}", memory::MODULE_PREFIX, import_item.identifier());
exec_state.mut_stack().add(
mod_name.clone(),
mod_value,
SourceRange::from(&import_item.name),
)?;
if let ItemVisibility::Export = import_stmt.visibility {
exec_state.mod_local.module_exports.push(mod_name);
}
}
}
}
ImportSelector::Glob(_) => {
@ -246,7 +272,11 @@ impl ExecutorContext {
value: module_id,
meta: vec![source_range.into()],
};
exec_state.mut_stack().add(name, item, source_range)?;
exec_state.mut_stack().add(
format!("{}{}", memory::MODULE_PREFIX, name),
item,
source_range,
)?;
}
}
last_expr = None;
@ -780,8 +810,14 @@ impl Node<Name> {
)));
}
let mod_name = format!("{}{}", memory::MODULE_PREFIX, self.name.name);
if self.path.is_empty() {
return exec_state.stack().get(&self.name.name, self.into());
let item_value = exec_state.stack().get(&self.name.name, self.into());
if item_value.is_ok() {
return item_value;
}
return exec_state.stack().get(&mod_name, self.into());
}
let mut mem_spec: Option<(EnvironmentRef, Vec<String>)> = None;
@ -800,7 +836,9 @@ impl Node<Name> {
.memory
.get_from(&p.name, env, p.as_source_range(), 0)?
}
None => exec_state.stack().get(&p.name, self.into())?,
None => exec_state
.stack()
.get(&format!("{}{}", memory::MODULE_PREFIX, p.name), self.into())?,
};
let KclValue::Module { value: module_id, .. } = value else {
@ -820,17 +858,40 @@ impl Node<Name> {
}
let (env, exports) = mem_spec.unwrap();
if !exports.contains(&self.name.name) {
return Err(KclError::Semantic(KclErrorDetails::new(
format!("Item {} not found in module's exported items", self.name.name),
self.name.as_source_ranges(),
)));
}
exec_state
let item_exported = exports.contains(&self.name.name);
let item_value = exec_state
.stack()
.memory
.get_from(&self.name.name, env, self.name.as_source_range(), 0)
.get_from(&self.name.name, env, self.name.as_source_range(), 0);
// Item is defined and exported.
if item_exported && item_value.is_ok() {
return item_value;
}
let mod_exported = exports.contains(&mod_name);
let mod_value = exec_state
.stack()
.memory
.get_from(&mod_name, env, self.name.as_source_range(), 0);
// Module is defined and exported.
if mod_exported && mod_value.is_ok() {
return mod_value;
}
// Neither item or module is defined.
if item_value.is_err() && mod_value.is_err() {
return item_value;
}
// Either item or module is defined, but not exported.
debug_assert!((item_value.is_ok() && !item_exported) || (mod_value.is_ok() && !mod_exported));
Err(KclError::Semantic(KclErrorDetails::new(
format!("Item {} not found in module's exported items", self.name.name),
self.name.as_source_ranges(),
)))
}
}

View File

@ -226,8 +226,9 @@ use crate::{
/// The distinguished name of the return value of a function.
pub(crate) const RETURN_NAME: &str = "__return";
/// Low-budget namespacing for types.
/// Low-budget namespacing for types and modules.
pub(crate) const TYPE_PREFIX: &str = "__ty_";
pub(crate) const MODULE_PREFIX: &str = "__mod_";
/// KCL memory. There should be only one ProgramMemory for the interpretation of a program (
/// including other modules). Multiple interpretation runs should have fresh instances.
@ -364,8 +365,10 @@ impl ProgramMemory {
};
}
let name = var.trim_start_matches(TYPE_PREFIX).trim_start_matches(MODULE_PREFIX);
Err(KclError::UndefinedValue(KclErrorDetails::new(
format!("`{}` is not defined", var),
format!("`{name}` is not defined"),
vec![source_range],
)))
}

View File

@ -194,7 +194,10 @@ async fn execute_test(test: &Test, render_to_png: bool, export_step: bool) {
".**[].x[]" => rounded_redaction(3),
".**[].y[]" => rounded_redaction(3),
".**[].z[]" => rounded_redaction(3),
".**.sourceRange" => Vec::new(),
".**.x" => rounded_redaction(3),
".**.y" => rounded_redaction(3),
".**.z" => rounded_redaction(3),
".**.sourceRange" => Vec::new(),
})
})
}));

View File

@ -1,7 +1,6 @@
//! Standard library appearance.
use anyhow::Result;
use kcl_derive_docs::stdlib;
use kcmc::{each_cmd as mcmd, ModelingCmd};
use kittycad_modeling_cmds::{self as kcmc, shared::Color};
use regex::Regex;
@ -57,7 +56,7 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
exec_state,
)?;
let color: String = args.get_kw_arg("color")?;
let color: String = args.get_kw_arg_typed("color", &RuntimeType::string(), exec_state)?;
let metalness: Option<TyF64> = args.get_kw_arg_opt_typed("metalness", &RuntimeType::count(), exec_state)?;
let roughness: Option<TyF64> = args.get_kw_arg_opt_typed("roughness", &RuntimeType::count(), exec_state)?;
@ -81,224 +80,6 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
Ok(result.into())
}
/// Set the appearance of a solid. This only works on solids, not sketches or individual paths.
///
/// This will work on any solid, including extruded solids, revolved solids, and shelled solids.
/// ```no_run
/// // Add color to an extruded solid.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(endAbsolute = [10, 0])
/// |> line(endAbsolute = [0, 10])
/// |> line(endAbsolute = [-10, 0])
/// |> close()
///
/// example = extrude(exampleSketch, length = 5)
/// // There are other options besides 'color', but they're optional.
/// |> appearance(color='#ff0000')
/// ```
///
/// ```no_run
/// // Add color to a revolved solid.
/// sketch001 = startSketchOn(XY)
/// |> circle( center = [15, 0], radius = 5 )
/// |> revolve( angle = 360, axis = Y)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```no_run
/// // Add color to different solids.
/// fn cube(center) {
/// return startSketchOn(XY)
/// |> startProfile(at = [center[0] - 10, center[1] - 10])
/// |> line(endAbsolute = [center[0] + 10, center[1] - 10])
/// |> line(endAbsolute = [center[0] + 10, center[1] + 10])
/// |> line(endAbsolute = [center[0] - 10, center[1] + 10])
/// |> close()
/// |> extrude(length = 10)
/// }
///
/// example0 = cube(center = [0, 0])
/// example1 = cube(center = [20, 0])
/// example2 = cube(center = [40, 0])
///
/// appearance([example0, example1], color='#ff0000', metalness=50, roughness=50)
/// appearance(example2, color='#00ff00', metalness=50, roughness=50)
/// ```
///
/// ```no_run
/// // You can set the appearance before or after you shell it will yield the same result.
/// // This example shows setting the appearance _after_ the shell.
/// firstSketch = startSketchOn(XY)
/// |> startProfile(at = [-12, 12])
/// |> line(end = [24, 0])
/// |> line(end = [0, -24])
/// |> line(end = [-24, 0])
/// |> close()
/// |> extrude(length = 6)
///
/// shell(
/// firstSketch,
/// faces = [END],
/// thickness = 0.25,
/// )
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```no_run
/// // You can set the appearance before or after you shell it will yield the same result.
/// // This example shows setting the appearance _before_ the shell.
/// firstSketch = startSketchOn(XY)
/// |> startProfile(at = [-12, 12])
/// |> line(end = [24, 0])
/// |> line(end = [0, -24])
/// |> line(end = [-24, 0])
/// |> close()
/// |> extrude(length = 6)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
///
/// shell(
/// firstSketch,
/// faces = [END],
/// thickness = 0.25,
/// )
/// ```
///
/// ```no_run
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
/// // This example shows _before_ the pattern.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(end = [0, 2])
/// |> line(end = [3, 1])
/// |> line(end = [0, -4])
/// |> close()
///
/// example = extrude(exampleSketch, length = 1)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// |> patternLinear3d(
/// axis = [1, 0, 1],
/// instances = 7,
/// distance = 6
/// )
/// ```
///
/// ```no_run
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
/// // This example shows _after_ the pattern.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(end = [0, 2])
/// |> line(end = [3, 1])
/// |> line(end = [0, -4])
/// |> close()
///
/// example = extrude(exampleSketch, length = 1)
/// |> patternLinear3d(
/// axis = [1, 0, 1],
/// instances = 7,
/// distance = 6
/// )
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```no_run
/// // Color the result of a 2D pattern that was extruded.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [.5, 25])
/// |> line(end = [0, 5])
/// |> line(end = [-1, 0])
/// |> line(end = [0, -5])
/// |> close()
/// |> patternCircular2d(
/// center = [0, 0],
/// instances = 13,
/// arcDegrees = 360,
/// rotateDuplicates = true
/// )
///
/// example = extrude(exampleSketch, length = 1)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```no_run
/// // Color the result of a sweep.
///
/// // Create a path for the sweep.
/// sweepPath = startSketchOn(XZ)
/// |> startProfile(at = [0.05, 0.05])
/// |> line(end = [0, 7])
/// |> tangentialArc(angle = 90, radius = 5)
/// |> line(end = [-3, 0])
/// |> tangentialArc(angle = -90, radius = 5)
/// |> line(end = [0, 7])
///
/// pipeHole = startSketchOn(XY)
/// |> circle(
/// center = [0, 0],
/// radius = 1.5,
/// )
///
/// sweepSketch = startSketchOn(XY)
/// |> circle(
/// center = [0, 0],
/// radius = 2,
/// )
/// |> subtract2d(tool = pipeHole)
/// |> sweep(path = sweepPath)
/// |> appearance(
/// color = "#ff0000",
/// metalness = 50,
/// roughness = 50
/// )
/// ```
///
/// ```no_run
/// // Change the appearance of an imported model.
///
/// import "tests/inputs/cube.sldprt" as cube
///
/// cube
/// |> appearance(
/// color = "#ff0000",
/// metalness = 50,
/// roughness = 50
/// )
/// ```
#[stdlib {
name = "appearance",
unlabeled_first = true,
args = {
solids = { docs = "The solid(s) whose appearance is being set" },
color = { docs = "Color of the new material, a hex string like '#ff0000'"},
metalness = { docs = "Metalness of the new material, a percentage like 95.7." },
roughness = { docs = "Roughness of the new material, a percentage like 95.7." },
}
}]
async fn inner_appearance(
solids: SolidOrImportedGeometry,
color: String,

View File

@ -45,7 +45,6 @@ pub type StdFn = fn(
lazy_static! {
static ref CORE_FNS: Vec<Box<dyn StdLibFn>> = vec![
Box::new(crate::std::appearance::Appearance),
Box::new(crate::std::extrude::Extrude),
Box::new(crate::std::segment::SegEnd),
Box::new(crate::std::segment::SegEndX),
@ -277,6 +276,10 @@ pub(crate) fn std_fn(path: &str, fn_name: &str) -> (crate::std::StdFn, StdFnProp
|e, a| Box::pin(crate::std::patterns::pattern_circular_3d(e, a)),
StdFnProps::default("std::solid::patternCircular3d").include_in_feature_tree(),
),
("solid", "appearance") => (
|e, a| Box::pin(crate::std::appearance::appearance(e, a)),
StdFnProps::default("std::solid::appearance"),
),
("array", "map") => (
|e, a| Box::pin(crate::std::array::map(e, a)),
StdFnProps::default("std::array::map"),

View File

@ -920,3 +920,224 @@ export fn subtract(
/// The tolerance to use for the subtraction operation.
tolerance?: number(Length),
): [Solid; 1+] {}
/// Set the appearance of a solid. This only works on solids, not sketches or individual paths.
///
/// This will work on any solid, including extruded solids, revolved solids, and shelled solids.
///
/// ```kcl
/// // Add color to an extruded solid.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(endAbsolute = [10, 0])
/// |> line(endAbsolute = [0, 10])
/// |> line(endAbsolute = [-10, 0])
/// |> close()
///
/// example = extrude(exampleSketch, length = 5)
/// // There are other options besides 'color', but they're optional.
/// |> appearance(color='#ff0000')
/// ```
///
/// ```kcl
/// // Add color to a revolved solid.
/// sketch001 = startSketchOn(XY)
/// |> circle( center = [15, 0], radius = 5 )
/// |> revolve( angle = 360, axis = Y)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```kcl
/// // Add color to different solids.
/// fn cube(center) {
/// return startSketchOn(XY)
/// |> startProfile(at = [center[0] - 10, center[1] - 10])
/// |> line(endAbsolute = [center[0] + 10, center[1] - 10])
/// |> line(endAbsolute = [center[0] + 10, center[1] + 10])
/// |> line(endAbsolute = [center[0] - 10, center[1] + 10])
/// |> close()
/// |> extrude(length = 10)
/// }
///
/// example0 = cube(center = [0, 0])
/// example1 = cube(center = [20, 0])
/// example2 = cube(center = [40, 0])
///
/// appearance([example0, example1], color='#ff0000', metalness=50, roughness=50)
/// appearance(example2, color='#00ff00', metalness=50, roughness=50)
/// ```
///
/// ```kcl
/// // You can set the appearance before or after you shell it will yield the same result.
/// // This example shows setting the appearance _after_ the shell.
/// firstSketch = startSketchOn(XY)
/// |> startProfile(at = [-12, 12])
/// |> line(end = [24, 0])
/// |> line(end = [0, -24])
/// |> line(end = [-24, 0])
/// |> close()
/// |> extrude(length = 6)
///
/// shell(
/// firstSketch,
/// faces = [END],
/// thickness = 0.25,
/// )
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```kcl
/// // You can set the appearance before or after you shell it will yield the same result.
/// // This example shows setting the appearance _before_ the shell.
/// firstSketch = startSketchOn(XY)
/// |> startProfile(at = [-12, 12])
/// |> line(end = [24, 0])
/// |> line(end = [0, -24])
/// |> line(end = [-24, 0])
/// |> close()
/// |> extrude(length = 6)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
///
/// shell(
/// firstSketch,
/// faces = [END],
/// thickness = 0.25,
/// )
/// ```
///
/// ```kcl
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
/// // This example shows _before_ the pattern.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(end = [0, 2])
/// |> line(end = [3, 1])
/// |> line(end = [0, -4])
/// |> close()
///
/// example = extrude(exampleSketch, length = 1)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// |> patternLinear3d(
/// axis = [1, 0, 1],
/// instances = 7,
/// distance = 6
/// )
/// ```
///
/// ```kcl
/// // Setting the appearance of a 3D pattern can be done _before_ or _after_ the pattern.
/// // This example shows _after_ the pattern.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [0, 0])
/// |> line(end = [0, 2])
/// |> line(end = [3, 1])
/// |> line(end = [0, -4])
/// |> close()
///
/// example = extrude(exampleSketch, length = 1)
/// |> patternLinear3d(
/// axis = [1, 0, 1],
/// instances = 7,
/// distance = 6
/// )
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```kcl
/// // Color the result of a 2D pattern that was extruded.
/// exampleSketch = startSketchOn(XZ)
/// |> startProfile(at = [.5, 25])
/// |> line(end = [0, 5])
/// |> line(end = [-1, 0])
/// |> line(end = [0, -5])
/// |> close()
/// |> patternCircular2d(
/// center = [0, 0],
/// instances = 13,
/// arcDegrees = 360,
/// rotateDuplicates = true
/// )
///
/// example = extrude(exampleSketch, length = 1)
/// |> appearance(
/// color = '#ff0000',
/// metalness = 90,
/// roughness = 90
/// )
/// ```
///
/// ```kcl
/// // Color the result of a sweep.
///
/// // Create a path for the sweep.
/// sweepPath = startSketchOn(XZ)
/// |> startProfile(at = [0.05, 0.05])
/// |> line(end = [0, 7])
/// |> tangentialArc(angle = 90, radius = 5)
/// |> line(end = [-3, 0])
/// |> tangentialArc(angle = -90, radius = 5)
/// |> line(end = [0, 7])
///
/// pipeHole = startSketchOn(XY)
/// |> circle(
/// center = [0, 0],
/// radius = 1.5,
/// )
///
/// sweepSketch = startSketchOn(XY)
/// |> circle(
/// center = [0, 0],
/// radius = 2,
/// )
/// |> subtract2d(tool = pipeHole)
/// |> sweep(path = sweepPath)
/// |> appearance(
/// color = "#ff0000",
/// metalness = 50,
/// roughness = 50
/// )
/// ```
///
/// ```kcl
/// // Change the appearance of an imported model.
///
/// import "tests/inputs/cube.sldprt" as cube
///
/// cube
/// |> appearance(
/// color = "#ff0000",
/// metalness = 50,
/// roughness = 50
/// )
/// ```
@(impl = std_rust)
export fn appearance(
/// The The solid(s) whose appearance is being set.
@solids: [Solid; 1+] | ImportedGeometry,
/// Color of the new material, a hex string like '#ff0000'.
color: string,
/// Metalness of the new material, a percentage like 95.7.
metalness?: number(Count),
/// Roughness of the new material, a percentage like 95.7.
roughness?: number(Count),
): [Solid; 1+] | ImportedGeometry {}

View File

@ -3,11 +3,11 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing assembly_mixed_units_cubes.kcl
---
{
"cubeIn": {
"__mod_cubeIn": {
"type": "Module",
"value": 1
},
"cubeMm": {
"__mod_cubeMm": {
"type": "Module",
"value": 2
}

View File

@ -3,11 +3,11 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing assembly_non_default_units.kcl
---
{
"other1": {
"__mod_other1": {
"type": "Module",
"value": 1
},
"other2": {
"__mod_other2": {
"type": "Module",
"value": 3
}

View File

@ -3,6 +3,10 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_async.kcl
---
{
"__mod_screw": {
"type": "Module",
"value": 1
},
"helicalGear": {
"type": "Function",
"value": null
@ -13,9 +17,5 @@ description: Variables in memory after executing import_async.kcl
"value": [
"2-5-long-m8-chc-screw.stl"
]
},
"screw": {
"type": "Module",
"value": 1
}
}

View File

@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_foreign.kcl
---
{
"cube": {
"__mod_cube": {
"type": "Module",
"value": 1
},

View File

@ -3,6 +3,10 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_mesh_clone.kcl
---
{
"__mod_yellow": {
"type": "Module",
"value": 1
},
"blue": {
"type": "ImportedGeometry",
"id": "[uuid]",
@ -23,9 +27,5 @@ description: Variables in memory after executing import_mesh_clone.kcl
"value": [
"cube.obj"
]
},
"yellow": {
"type": "Module",
"value": 1
}
}

View File

@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_transform.kcl
---
{
"screw": {
"__mod_screw": {
"type": "Module",
"value": 1
}

View File

@ -3,6 +3,10 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_whole_simple.kcl
---
{
"__mod_foo": {
"type": "Module",
"value": 1
},
"bar": {
"type": "Solid",
"value": {
@ -110,9 +114,5 @@ description: Variables in memory after executing import_whole_simple.kcl
},
"sectional": false
}
},
"foo": {
"type": "Module",
"value": 1
}
}

View File

@ -3,6 +3,10 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing import_whole_transitive_import.kcl
---
{
"__mod_part": {
"type": "Module",
"value": 1
},
"bar": {
"type": "Solid",
"value": {
@ -110,9 +114,5 @@ description: Variables in memory after executing import_whole_transitive_import.
},
"sectional": false
}
},
"part": {
"type": "Module",
"value": 1
}
}

View File

@ -3,15 +3,15 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing axial-fan.kcl
---
{
"fan": {
"__mod_fan": {
"type": "Module",
"value": 4
},
"fanHousing": {
"__mod_fanHousing": {
"type": "Module",
"value": 1
},
"motor": {
"__mod_motor": {
"type": "Module",
"value": 3
}

View File

@ -3540,7 +3540,7 @@ description: Variables in memory after executing ball-bearing.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.9751,
"z": -3.975,
"units": {
"type": "Mm"
}
@ -3635,7 +3635,7 @@ description: Variables in memory after executing ball-bearing.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.9751,
"z": -3.975,
"units": {
"type": "Mm"
}
@ -4946,7 +4946,7 @@ description: Variables in memory after executing ball-bearing.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.9751,
"z": -3.975,
"units": {
"type": "Mm"
}
@ -5041,7 +5041,7 @@ description: Variables in memory after executing ball-bearing.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.9751,
"z": -3.975,
"units": {
"type": "Mm"
}

View File

@ -456,267 +456,272 @@ description: Variables in memory after executing bottle.kcl
}
},
"bottleShell": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
22.5,
0.0
],
"radius": 22.5,
"tag": null,
"to": [
22.5,
0.0
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"type": "face",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [],
"sketch": {
"type": "Sketch",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-62.5,
0.0
],
"tag": null,
"to": [
-62.5,
26.667
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-62.5,
26.667
],
"p1": [
-62.5,
26.666666666666668
],
"p2": [
0.0,
40.0
],
"p3": [
62.5,
26.666666666666668
],
"tag": null,
"to": [
62.5,
26.667
],
"type": "ArcThreePoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
62.5,
26.667
],
"tag": null,
"to": [
62.5,
0.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
62.5,
0.0
],
"tag": null,
"to": [
-62.5,
0.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XY",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-62.5,
0.0
],
"to": [
-62.5,
0.0
],
"units": {
"type": "Mm"
},
"tag": null,
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
22.5,
0.0
],
"radius": 22.5,
"tag": null,
"to": [
22.5,
0.0
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"type": "face",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-62.5,
0.0
],
"tag": null,
"to": [
-62.5,
26.667
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-62.5,
26.667
],
"p1": [
-62.5,
26.666666666666668
],
"p2": [
0.0,
40.0
],
"p3": [
62.5,
26.666666666666668
],
"tag": null,
"to": [
62.5,
26.667
],
"type": "ArcThreePoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
62.5,
26.667
],
"tag": null,
"to": [
62.5,
0.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
62.5,
0.0
],
"tag": null,
"to": [
-62.5,
0.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XY",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-62.5,
0.0
],
"to": [
-62.5,
0.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
}
},
"height": 202.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"sectional": false
},
"units": {
"type": "Mm"
}
},
"height": 202.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"start": {
"from": [
22.5,
0.0
],
"to": [
22.5,
0.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
},
"sectional": false
}
},
"units": {
"type": "Mm"
}
},
"start": {
"from": [
22.5,
0.0
],
"to": [
22.5,
0.0
],
"height": 18.0,
"startCapId": null,
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"sectional": false
}
},
"height": 18.0,
"startCapId": null,
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"sectional": false
}
}
]
},
"bottleWidth": {
"type": "Number",

View File

@ -53,10 +53,15 @@ description: Operations executed car-wheel-assembly.kcl
"name": "patternCircular3d",
"unlabeledArg": {
"value": {
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
"type": "Array",
"value": [
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
}
]
},
"sourceRange": []
},

View File

@ -3,6 +3,26 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing car-wheel-assembly.kcl
---
{
"__mod_brakeCaliper": {
"type": "Module",
"value": 4
},
"__mod_carRotor": {
"type": "Module",
"value": 3
},
"__mod_carTire": {
"type": "Module",
"value": 6
},
"__mod_carWheel": {
"type": "Module",
"value": 1
},
"__mod_lugNut": {
"type": "Module",
"value": 5
},
"backSpacing": {
"type": "Number",
"value": 6.38,
@ -29,10 +49,6 @@ description: Variables in memory after executing car-wheel-assembly.kcl
}
}
},
"brakeCaliper": {
"type": "Module",
"value": 4
},
"c1": {
"type": "TagIdentifier",
"type": "TagIdentifier",
@ -103,18 +119,6 @@ description: Variables in memory after executing car-wheel-assembly.kcl
}
}
},
"carRotor": {
"type": "Module",
"value": 3
},
"carTire": {
"type": "Module",
"value": 6
},
"carWheel": {
"type": "Module",
"value": 1
},
"drillAndSlotCount": {
"type": "Number",
"value": 5.0,
@ -181,10 +185,6 @@ description: Variables in memory after executing car-wheel-assembly.kcl
"type": "Mm"
}
},
"lugNut": {
"type": "Module",
"value": 5
},
"lugSpacing": {
"type": "Number",
"value": 114.3,

View File

@ -1651,112 +1651,117 @@ description: Variables in memory after executing cold-plate.kcl
}
},
"tubeWall": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": []
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
-3.0,
0.625
],
"from": [
-2.688,
0.625
],
"radius": 0.3125,
"tag": null,
"to": [
-2.688,
0.625
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -186.69,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"ccw": true,
"center": [
-3.0,
0.625
],
"from": [
-2.688,
0.625
],
"radius": 0.3125,
"tag": null,
"to": [
-2.688,
0.625
],
"type": "Circle",
"start": {
"from": [
-2.688,
0.625
],
"to": [
-2.688,
0.625
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -186.68999999999997,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-2.688,
0.625
],
"to": [
-2.688,
0.625
],
"height": 0.0,
"startCapId": "[uuid]",
"endCapId": null,
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
"sectional": false
}
},
"height": 0.0,
"startCapId": "[uuid]",
"endCapId": null,
"units": {
"type": "Inches"
},
"sectional": false
}
}
]
},
"wallThickness": {
"type": "Number",

View File

@ -445,16 +445,26 @@ description: Operations executed cpu-cooler.kcl
"type": "Array",
"value": [
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
"type": "Array",
"value": [
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
}
]
},
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
"type": "Array",
"value": [
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
}
]
}
]
},

View File

@ -3,6 +3,30 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing cpu-cooler.kcl
---
{
"__mod_fan": {
"type": "Module",
"value": 4
},
"__mod_fanHousing": {
"type": "Module",
"value": 2
},
"__mod_heatSink": {
"type": "Module",
"value": 5
},
"__mod_motor": {
"type": "Module",
"value": 3
},
"__mod_mountingWire": {
"type": "Module",
"value": 6
},
"__mod_removableSticker": {
"type": "Module",
"value": 7
},
"bendRadius": {
"type": "Number",
"value": 15.0,
@ -16,10 +40,6 @@ description: Variables in memory after executing cpu-cooler.kcl
}
}
},
"fan": {
"type": "Module",
"value": 4
},
"fanHeight": {
"type": "Number",
"value": 25.0,
@ -33,10 +53,6 @@ description: Variables in memory after executing cpu-cooler.kcl
}
}
},
"fanHousing": {
"type": "Module",
"value": 2
},
"fanSize": {
"type": "Number",
"value": 120.0,
@ -50,10 +66,6 @@ description: Variables in memory after executing cpu-cooler.kcl
}
}
},
"heatSink": {
"type": "Module",
"value": 5
},
"heatSinkDepth": {
"type": "Number",
"value": 55.0,
@ -67,10 +79,6 @@ description: Variables in memory after executing cpu-cooler.kcl
}
}
},
"motor": {
"type": "Module",
"value": 3
},
"mountingHoleSize": {
"type": "Number",
"value": 4.5,
@ -97,14 +105,6 @@ description: Variables in memory after executing cpu-cooler.kcl
}
}
},
"mountingWire": {
"type": "Module",
"value": 6
},
"removableSticker": {
"type": "Module",
"value": 7
},
"sheetThickness": {
"type": "Number",
"value": 2.125,

View File

@ -777,9 +777,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 208.593833,
"x": 208.594,
"y": 0.0,
"z": 75.921946,
"z": 75.922,
"units": {
"type": "Mm"
}
@ -787,9 +787,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -991,9 +991,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"value": "gripEdgeTop",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -1284,9 +1284,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 208.593833,
"x": 208.594,
"y": 0.0,
"z": 75.921946,
"z": 75.922,
"units": {
"type": "Mm"
}
@ -1294,9 +1294,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -1602,9 +1602,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 208.593833,
"x": 208.594,
"y": 0.0,
"z": 75.921946,
"z": 75.922,
"units": {
"type": "Mm"
}
@ -1612,9 +1612,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -1665,18 +1665,18 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 208.593833,
"x": 208.594,
"y": 0.0,
"z": 75.921946,
"z": 75.922,
"units": {
"type": "Mm"
}
},
"value": "Custom",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -2469,9 +2469,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"value": "gripEdgeTop",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}
@ -2762,9 +2762,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 208.593833,
"x": 208.594,
"y": 0.0,
"z": 75.921946,
"z": 75.922,
"units": {
"type": "Mm"
}
@ -2772,9 +2772,9 @@ description: Variables in memory after executing food-service-spatula.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.342019894888923,
"x": 0.342,
"y": -0.0,
"z": -0.9396927112094517,
"z": -0.94,
"units": {
"type": "Unknown"
}

View File

@ -4120,7 +4120,7 @@ description: Variables in memory after executing french-press.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -8.254999999999999,
"y": -8.255,
"z": 0.0,
"units": {
"type": "Mm"
@ -5226,8 +5226,8 @@ description: Variables in memory after executing french-press.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7071067811865475,
"y": 0.7071067811865475,
"x": 0.707,
"y": 0.707,
"z": 0.0,
"units": {
"type": "Unknown"
@ -5887,8 +5887,8 @@ description: Variables in memory after executing french-press.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7071067811865475,
"y": 0.7071067811865475,
"x": 0.707,
"y": 0.707,
"z": 0.0,
"units": {
"type": "Unknown"
@ -6548,8 +6548,8 @@ description: Variables in memory after executing french-press.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7071067811865475,
"y": 0.7071067811865475,
"x": 0.707,
"y": 0.707,
"z": 0.0,
"units": {
"type": "Unknown"
@ -7209,8 +7209,8 @@ description: Variables in memory after executing french-press.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7071067811865475,
"y": 0.7071067811865475,
"x": 0.707,
"y": 0.707,
"z": 0.0,
"units": {
"type": "Unknown"
@ -11659,7 +11659,7 @@ description: Variables in memory after executing french-press.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -8.254999999999999,
"y": -8.255,
"z": 0.0,
"units": {
"type": "Mm"

View File

@ -79,7 +79,7 @@ description: Variables in memory after executing hammer.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": 292.09999999999997,
"z": 292.1,
"units": {
"type": "Mm"
}
@ -1344,270 +1344,275 @@ description: Variables in memory after executing hammer.kcl
}
},
"handle": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
0.0
],
"tag": null,
"to": [
0.573,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.573,
0.05
],
"from": [
0.573,
0.0
],
"tag": null,
"to": [
0.623,
0.05
],
"type": "TangentialArc",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
-127.868,
0.05
],
"from": [
0.623,
0.05
],
"tag": null,
"to": [
0.38,
7.94
],
"type": "TangentialArcTo",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": false,
"center": [
59.745,
11.593
],
"from": [
0.38,
7.94
],
"tag": null,
"to": [
0.28,
12.8
],
"type": "TangentialArcTo",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.28,
12.8
],
"tag": null,
"to": [
0.01,
12.8
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
12.8
],
"tag": null,
"to": [
0.01,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
0.0
],
"tag": null,
"to": [
0.01,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
0.0
],
"tag": null,
"to": [
0.573,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.573,
0.05
],
"from": [
0.573,
0.0
],
"tag": null,
"to": [
0.623,
0.05
],
"type": "TangentialArc",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
-127.868,
0.05
],
"from": [
0.623,
0.05
],
"tag": null,
"to": [
0.38,
7.94
],
"type": "TangentialArcTo",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": false,
"center": [
59.745,
11.593
],
"from": [
0.38,
7.94
],
"tag": null,
"to": [
0.28,
12.8
],
"type": "TangentialArcTo",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.28,
12.8
],
"tag": null,
"to": [
0.01,
12.8
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
12.8
],
"tag": null,
"to": [
0.01,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
0.01,
0.0
],
"tag": null,
"to": [
0.01,
0.0
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
0.01,
0.0
],
"to": [
0.01,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"type": "Inches"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
0.01,
0.0
],
"to": [
0.01,
0.0
],
"height": 0.0,
"startCapId": null,
"endCapId": null,
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
"sectional": false
}
},
"height": 0.0,
"startCapId": null,
"endCapId": null,
"units": {
"type": "Inches"
},
"sectional": false
}
}
]
},
"handleHole": {
"type": "Solid",

View File

@ -53,10 +53,15 @@ description: Operations executed keyboard.kcl
"name": "fillet",
"unlabeledArg": {
"value": {
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
"type": "Array",
"value": [
{
"type": "Solid",
"value": {
"artifactId": "[uuid]"
}
}
]
},
"sourceRange": []
},

View File

@ -3,19 +3,19 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing multi-axis-robot.kcl
---
{
"j2RobotArm": {
"__mod_j2RobotArm": {
"type": "Module",
"value": 4
},
"j3RobotArm": {
"__mod_j3RobotArm": {
"type": "Module",
"value": 5
},
"robotArmBase": {
"__mod_robotArmBase": {
"type": "Module",
"value": 1
},
"rotatingBase": {
"__mod_rotatingBase": {
"type": "Module",
"value": 3
}

View File

@ -17014,215 +17014,220 @@ description: Variables in memory after executing pdu-faceplate.kcl
}
},
"switchButtonBody": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
13.0
],
"tag": null,
"to": [
6.0,
12.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
6.0,
12.0
],
"p1": [
6.0,
12.0
],
"p2": [
6.0,
0.0
],
"p3": [
12.0,
-9.0
],
"tag": null,
"to": [
12.0,
-9.0
],
"type": "ArcThreePoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
12.0,
-9.0
],
"tag": null,
"to": [
3.0,
-13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
-13.0
],
"tag": null,
"to": [
3.0,
13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
13.0
],
"tag": null,
"to": [
3.0,
13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 7.5,
"y": 0.0,
"z": 0.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
13.0
],
"tag": null,
"to": [
6.0,
12.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
6.0,
12.0
],
"p1": [
6.0,
12.0
],
"p2": [
6.0,
0.0
],
"p3": [
12.0,
-9.0
],
"tag": null,
"to": [
12.0,
-9.0
],
"type": "ArcThreePoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
12.0,
-9.0
],
"tag": null,
"to": [
3.0,
-13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
-13.0
],
"tag": null,
"to": [
3.0,
13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.0,
13.0
],
"tag": null,
"to": [
3.0,
13.0
],
"type": "ToPoint",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 7.5,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
3.0,
13.0
],
"to": [
3.0,
13.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
3.0,
13.0
],
"to": [
3.0,
13.0
],
"height": 15.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"sectional": false
}
},
"height": 15.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Mm"
},
"sectional": false
}
}
]
},
"switchButtonHeight": {
"type": "Number",

View File

@ -3,10 +3,14 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing pillow-block-bearing.kcl
---
{
"ballBearing": {
"__mod_ballBearing": {
"type": "Module",
"value": 2
},
"__mod_block": {
"type": "Module",
"value": 3
},
"bearingBoreDiameter": {
"type": "Number",
"value": 1.75,
@ -33,10 +37,6 @@ description: Variables in memory after executing pillow-block-bearing.kcl
}
}
},
"block": {
"type": "Module",
"value": 3
},
"boltDiameter": {
"type": "Number",
"value": 0.375,

View File

@ -3,6 +3,10 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing pipe-flange-assembly.kcl
---
{
"__mod_gasket": {
"type": "Module",
"value": 2
},
"bolt": {
"type": "Function",
"value": null
@ -198,10 +202,6 @@ description: Variables in memory after executing pipe-flange-assembly.kcl
}
}
},
"gasket": {
"type": "Module",
"value": 2
},
"gasketInnerDiameter": {
"type": "Number",
"value": 2.375,

View File

@ -4,212 +4,217 @@ description: Variables in memory after executing pipe.kcl
---
{
"pipe": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
1.0,
0.0
],
"radius": 1.0,
"tag": null,
"to": [
1.0,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "face",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
1.188,
0.0
],
"radius": 1.1875,
"tag": null,
"to": [
1.188,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
1.188,
0.0
],
"to": [
1.188,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
1.0,
0.0
],
"radius": 1.0,
"tag": null,
"to": [
1.0,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "face",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
1.188,
0.0
],
"radius": 1.1875,
"tag": null,
"to": [
1.188,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
1.188,
0.0
],
"to": [
1.188,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": 6.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Inches"
},
"sectional": false
},
"units": {
"type": "Inches"
}
},
"height": 6.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"start": {
"from": [
1.0,
0.0
],
"to": [
1.0,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
},
"sectional": false
}
},
"units": {
"type": "Inches"
}
},
"start": {
"from": [
1.0,
0.0
],
"to": [
1.0,
0.0
],
"height": -6.0,
"startCapId": null,
"endCapId": null,
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
"sectional": false
}
},
"height": -6.0,
"startCapId": null,
"endCapId": null,
"units": {
"type": "Inches"
},
"sectional": false
}
}
]
},
"pipeBase": {
"type": "Solid",

View File

@ -1785,7 +1785,7 @@ description: Variables in memory after executing poopy-shoe.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -1.4375,
"y": -1.438,
"z": 0.0,
"units": {
"type": "Inches"

View File

@ -536,7 +536,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}
@ -800,7 +800,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}
@ -862,7 +862,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}
@ -1195,7 +1195,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}
@ -1393,7 +1393,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}
@ -1562,7 +1562,7 @@ description: Variables in memory after executing shepherds-hook-bolt.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": -22.13777608090537,
"z": -22.138,
"units": {
"type": "Mm"
}

View File

@ -4,306 +4,311 @@ description: Variables in memory after executing socket-head-cap-screw.kcl
---
{
"boltBody": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 1519,
"end": 1530,
"start": 1519,
"type": "TagDeclarator",
"value": "filletEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.095,
0.0
],
"radius": 0.095,
"tag": {
"commentStart": 1519,
"end": 1530,
"start": 1519,
"type": "TagDeclarator",
"value": "filletEdge"
},
"to": [
0.095,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"type": "face",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 1519,
"end": 1530,
"start": 1519,
"type": "TagDeclarator",
"value": "filletEdge"
},
"type": "extrudeArc"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
"paths": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 744,
"end": 752,
"start": 744,
"type": "TagDeclarator",
"value": "topEdge"
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"type": "extrudeArc"
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.095,
0.0
],
"radius": 0.095,
"tag": {
"commentStart": 1519,
"end": 1530,
"start": 1519,
"type": "TagDeclarator",
"value": "filletEdge"
},
"to": [
0.095,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"sketch": {
"type": "Sketch",
"on": {
"type": "face",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"artifactId": "[uuid]",
"value": "end",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
},
"solid": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": []
"sourceRange": [],
"tag": {
"commentStart": 744,
"end": 752,
"start": 744,
"type": "TagDeclarator",
"value": "topEdge"
},
"type": "extrudeArc"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.157,
0.0
],
"radius": 0.1565,
"tag": {
"commentStart": 744,
"end": 752,
"start": 744,
"type": "TagDeclarator",
"value": "topEdge"
},
"to": [
0.157,
0.0
],
"type": "Circle",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"ccw": true,
"center": [
0.0,
0.0
],
"from": [
0.157,
0.0
],
"radius": 0.1565,
"tag": {
"commentStart": 744,
"end": 752,
"start": 744,
"type": "TagDeclarator",
"value": "topEdge"
"start": {
"from": [
0.157,
0.0
],
"to": [
0.157,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"to": [
0.157,
0.0
],
"type": "Circle",
"tags": {
"topEdge": {
"type": "TagIdentifier",
"value": "topEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XZ",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
"height": -0.19,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
0.157,
0.0
],
"to": [
0.157,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
"sectional": false
},
"tags": {
"topEdge": {
"type": "TagIdentifier",
"value": "topEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": -0.19,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
},
"units": {
"type": "Inches"
}
},
"start": {
"from": [
0.095,
0.0
],
"to": [
0.095,
0.0
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"filletEdge": {
"type": "TagIdentifier",
"value": "filletEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": 1.0,
"startCapId": null,
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"start": {
"from": [
0.095,
0.0
],
"to": [
0.095,
0.0
],
"units": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"filletEdge": {
"type": "TagIdentifier",
"value": "filletEdge"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"edgeId": "[uuid]",
"tag": null
"height": 1.0,
"startCapId": null,
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 0.02,
"ty": {
"type": "Default",
"len": {
"type": "Inches"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Inches"
},
"sectional": false
}
],
"units": {
"type": "Inches"
},
"sectional": false
}
}
]
},
"boltDiameter": {
"type": "Number",

View File

@ -17,203 +17,208 @@ description: Variables in memory after executing spinning-highrise-tower.kcl
}
},
"baseSlab": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
15.0
],
"tag": null,
"to": [
15.0,
15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
15.0,
15.0
],
"tag": null,
"to": [
15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
15.0
],
"tag": null,
"to": [
15.0,
15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
15.0,
15.0
],
"tag": null,
"to": [
15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-15.0,
-15.0
],
"tag": null,
"to": [
-15.0,
-15.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "XY",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-15.0,
-15.0
],
"to": [
-15.0,
-15.0
],
"units": {
"type": "M"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"type": "M"
}
},
"type": "plane",
"value": "XY",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-15.0,
-15.0
],
"to": [
-15.0,
-15.0
],
"height": -0.2,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "M"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "M"
"sectional": false
}
},
"height": -0.2,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "M"
},
"sectional": false
}
}
]
},
"baseThickness": {
"type": "Number",
@ -3937,203 +3942,208 @@ description: Variables in memory after executing spinning-highrise-tower.kcl
}
},
"groundBody": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
25.0
],
"tag": null,
"to": [
25.0,
25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
25.0,
25.0
],
"tag": null,
"to": [
25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": -200.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
25.0
],
"tag": null,
"to": [
25.0,
25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
25.0,
25.0
],
"tag": null,
"to": [
25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
-25.0,
-25.0
],
"tag": null,
"to": [
-25.0,
-25.0
],
"type": "ToPoint",
"units": {
"type": "M"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": -200.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-25.0,
-25.0
],
"to": [
-25.0,
-25.0
],
"units": {
"type": "M"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"type": "M"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
-25.0,
-25.0
],
"to": [
-25.0,
-25.0
],
"height": -5.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "M"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "M"
"sectional": false
}
},
"height": -5.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "M"
},
"sectional": false
}
}
]
},
"groundSize": {
"type": "Number",

View File

@ -219,7 +219,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495190528383297,
"y": -28.495,
"z": 0.0,
"units": {
"type": "Mm"
@ -1047,7 +1047,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495190528383297,
"y": -28.495,
"z": 0.0,
"units": {
"type": "Mm"
@ -1715,400 +1715,410 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"value": "capStart003"
},
"grip01": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2743,
"end": 2749,
"start": 2743,
"type": "TagDeclarator",
"value": "seg11"
},
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2896,
"end": 2908,
"start": 2896,
"type": "TagDeclarator",
"value": "capStart003"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2873,
"end": 2883,
"start": 2873,
"type": "TagDeclarator",
"value": "capEnd005"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
53.151
],
"from": [
16.216,
53.151
],
"radius": 16.216216216216214,
"tag": {
"commentStart": 2743,
"end": 2749,
"start": 2743,
"type": "TagDeclarator",
"value": "seg11"
},
"to": [
16.216,
53.151
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -47.4951905283833,
"z": 0.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2743,
"end": 2749,
"start": 2743,
"type": "TagDeclarator",
"value": "seg11"
},
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2896,
"end": 2908,
"start": 2896,
"type": "TagDeclarator",
"value": "capStart003"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 2873,
"end": 2883,
"start": 2873,
"type": "TagDeclarator",
"value": "capEnd005"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
53.151
],
"from": [
16.216,
53.151
],
"radius": 16.216216216216214,
"tag": {
"commentStart": 2743,
"end": 2749,
"start": 2743,
"type": "TagDeclarator",
"value": "seg11"
},
"to": [
16.216,
53.151
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -47.495,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
16.216,
53.151
],
"to": [
16.216,
53.151
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"capEnd005": {
"type": "TagIdentifier",
"value": "capEnd005"
},
"capStart003": {
"type": "TagIdentifier",
"value": "capStart003"
},
"seg11": {
"type": "TagIdentifier",
"value": "seg11"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
"height": -10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
16.216,
53.151
],
"to": [
16.216,
53.151
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"capEnd005": {
"type": "TagIdentifier",
"value": "capEnd005"
},
"capStart003": {
"type": "TagIdentifier",
"value": "capStart003"
},
"seg11": {
"type": "TagIdentifier",
"value": "seg11"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"sectional": false
}
},
"height": -10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"sectional": false
}
}
]
},
"grip02": {
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"type": "HomArray",
"value": [
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4073,
"end": 4079,
"start": 4073,
"type": "TagDeclarator",
"value": "seg08"
},
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4200,
"end": 4212,
"start": 4200,
"type": "TagDeclarator",
"value": "capStart002"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4223,
"end": 4233,
"start": 4223,
"type": "TagDeclarator",
"value": "capEnd002"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
150.0
],
"from": [
16.216,
150.0
],
"radius": 16.216216216216214,
"tag": {
"commentStart": 4073,
"end": 4079,
"start": 4073,
"type": "TagDeclarator",
"value": "seg08"
},
"to": [
16.216,
150.0
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.0,
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4073,
"end": 4079,
"start": 4073,
"type": "TagDeclarator",
"value": "seg08"
},
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4200,
"end": 4212,
"start": 4200,
"type": "TagDeclarator",
"value": "capStart002"
},
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": {
"commentStart": 4223,
"end": 4233,
"start": 4223,
"type": "TagDeclarator",
"value": "capEnd002"
},
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"ccw": true,
"center": [
0.0,
150.0
],
"from": [
16.216,
150.0
],
"radius": 16.216216216216214,
"tag": {
"commentStart": 4073,
"end": 4079,
"start": 4073,
"type": "TagDeclarator",
"value": "seg08"
},
"to": [
16.216,
150.0
],
"type": "Circle",
"units": {
"type": "Mm"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": -3.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
16.216,
150.0
],
"to": [
16.216,
150.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"capEnd002": {
"type": "TagIdentifier",
"value": "capEnd002"
},
"capStart002": {
"type": "TagIdentifier",
"value": "capStart002"
},
"seg08": {
"type": "TagIdentifier",
"value": "seg08"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
"height": -10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
},
"yAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
16.216,
150.0
],
"to": [
16.216,
150.0
],
"units": {
"type": "Mm"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"tags": {
"capEnd002": {
"type": "TagIdentifier",
"value": "capEnd002"
},
"capStart002": {
"type": "TagIdentifier",
"value": "capStart002"
},
"seg08": {
"type": "TagIdentifier",
"value": "seg08"
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Mm"
"sectional": false
}
},
"height": -10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"edgeCuts": [
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
},
{
"type": "fillet",
"id": "[uuid]",
"radius": {
"n": 1.0,
"ty": {
"type": "Default",
"len": {
"type": "Mm"
},
"angle": {
"type": "Degrees"
}
}
},
"edgeId": "[uuid]",
"tag": null
}
],
"units": {
"type": "Mm"
},
"sectional": false
}
}
]
},
"handle": {
"type": "Solid",
@ -2791,7 +2801,7 @@ description: Variables in memory after executing surgical-drill-guide.kcl
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": -28.495190528383297,
"y": -28.495,
"z": 0.0,
"units": {
"type": "Mm"

View File

@ -3,10 +3,26 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing walkie-talkie.kcl
---
{
"antenna": {
"__mod_antenna": {
"type": "Module",
"value": 5
},
"__mod_body": {
"type": "Module",
"value": 2
},
"__mod_case": {
"type": "Module",
"value": 3
},
"__mod_knob": {
"type": "Module",
"value": 7
},
"__mod_talkButton": {
"type": "Module",
"value": 6
},
"antennaBaseHeight": {
"type": "Number",
"value": 0.25,
@ -72,10 +88,6 @@ description: Variables in memory after executing walkie-talkie.kcl
}
}
},
"body": {
"type": "Module",
"value": 2
},
"button": {
"type": "Function",
"value": null
@ -119,10 +131,6 @@ description: Variables in memory after executing walkie-talkie.kcl
}
}
},
"case": {
"type": "Module",
"value": 3
},
"caseTolerance": {
"type": "Number",
"value": 0.01,
@ -162,10 +170,6 @@ description: Variables in memory after executing walkie-talkie.kcl
}
}
},
"knob": {
"type": "Module",
"value": 7
},
"knobBend": {
"type": "TagIdentifier",
"type": "TagIdentifier",
@ -334,10 +338,6 @@ description: Variables in memory after executing walkie-talkie.kcl
"type": "TagIdentifier",
"value": "tag4"
},
"talkButton": {
"type": "Module",
"value": 6
},
"talkButtonHeight": {
"type": "Number",
"value": 0.05,

View File

@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing module_return_using_var.kcl
---
{
"cube": {
"__mod_cube": {
"type": "Module",
"value": 1
}

View File

@ -3,23 +3,23 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing multiple-foreign-imports-all-render.kcl
---
{
"anothercube": {
"__mod_anothercube": {
"type": "Module",
"value": 3
},
"cube": {
"__mod_cube": {
"type": "Module",
"value": 1
},
"__mod_othercube": {
"type": "Module",
"value": 2
},
"model": {
"type": "ImportedGeometry",
"id": "[uuid]",
"value": [
"cube.step"
]
},
"othercube": {
"type": "Module",
"value": 2
}
}

View File

@ -1,9 +1,9 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing nested_main_kcl.kcl
description: Variables in memory after executing nested_assembly.kcl
---
{
"bar": {
"__mod_bar": {
"type": "Module",
"value": 1
}

View File

@ -3,7 +3,7 @@ source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing nested_main_kcl.kcl
---
{
"bar": {
"__mod_bar": {
"type": "Module",
"value": 1
}

View File

@ -1,9 +1,9 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing nested_main_kcl.kcl
description: Variables in memory after executing nested_windows_main_kcl.kcl
---
{
"bar": {
"__mod_bar": {
"type": "Module",
"value": 1
}

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -52,8 +52,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"y": -0.264924,
"x": -0.504,
"y": -0.265,
"z": 0.0,
"units": {
"type": "Inches"
@ -62,8 +62,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7435091262737867,
"y": 0.6687257877094245,
"x": 0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -225,7 +225,7 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"x": -0.504,
"y": -0.28,
"z": 0.0,
"units": {
@ -235,8 +235,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.7435091262737867,
"y": 0.6687257877094245,
"x": -0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -333,8 +333,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"y": -0.264924,
"x": -0.504,
"y": -0.265,
"z": 0.0,
"units": {
"type": "Inches"
@ -343,8 +343,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7435091262737867,
"y": 0.6687257877094245,
"x": 0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -516,8 +516,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.6025804201392091,
"y": -0.7980581665924197,
"x": -0.603,
"y": -0.798,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1114,8 +1114,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"y": -0.264924,
"x": -0.504,
"y": -0.265,
"z": 0.0,
"units": {
"type": "Inches"
@ -1123,8 +1123,8 @@ description: Variables in memory after executing subtract_regression03.kcl
},
"value": "Custom",
"xAxis": {
"x": 0.7435091262737867,
"y": 0.6687257877094245,
"x": 0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1176,8 +1176,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"y": -0.264924,
"x": -0.504,
"y": -0.265,
"z": 0.0,
"units": {
"type": "Inches"
@ -1186,8 +1186,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7435091262737867,
"y": 0.6687257877094245,
"x": 0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1478,7 +1478,7 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"x": -0.504,
"y": -0.28,
"z": 0.0,
"units": {
@ -1487,8 +1487,8 @@ description: Variables in memory after executing subtract_regression03.kcl
},
"value": "Custom",
"xAxis": {
"x": -0.7435091262737867,
"y": 0.6687257877094245,
"x": -0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1591,7 +1591,7 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"x": -0.504,
"y": -0.28,
"z": 0.0,
"units": {
@ -1601,8 +1601,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.7435091262737867,
"y": 0.6687257877094245,
"x": -0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1657,8 +1657,8 @@ description: Variables in memory after executing subtract_regression03.kcl
},
"value": "Custom",
"xAxis": {
"x": -0.6025804201392091,
"y": -0.7980581665924197,
"x": -0.603,
"y": -0.798,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1771,8 +1771,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.6025804201392091,
"y": -0.7980581665924197,
"x": -0.603,
"y": -0.798,
"z": 0.0,
"units": {
"type": "Unknown"
@ -1861,8 +1861,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": -0.503704,
"y": -0.264924,
"x": -0.504,
"y": -0.265,
"z": 0.0,
"units": {
"type": "Inches"
@ -1871,8 +1871,8 @@ description: Variables in memory after executing subtract_regression03.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": 0.7435091262737867,
"y": 0.6687257877094245,
"x": 0.744,
"y": 0.669,
"z": 0.0,
"units": {
"type": "Unknown"

View File

@ -57,7 +57,7 @@ description: Variables in memory after executing subtract_regression10.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": 232.09247866942073,
"z": 232.092,
"units": {
"type": "Mm"
}
@ -65,9 +65,9 @@ description: Variables in memory after executing subtract_regression10.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.9778288277170034,
"x": -0.978,
"y": 0.0,
"z": -0.2094057871349092,
"z": -0.209,
"units": {
"type": "Unknown"
}
@ -157,7 +157,7 @@ description: Variables in memory after executing subtract_regression10.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": 232.09247866942073,
"z": 232.092,
"units": {
"type": "Mm"
}
@ -165,9 +165,9 @@ description: Variables in memory after executing subtract_regression10.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.9778288277170034,
"x": -0.978,
"y": 0.0,
"z": -0.2094057871349092,
"z": -0.209,
"units": {
"type": "Unknown"
}
@ -1943,7 +1943,7 @@ description: Variables in memory after executing subtract_regression10.kcl
"origin": {
"x": 0.0,
"y": 0.0,
"z": 232.09247866942073,
"z": 232.092,
"units": {
"type": "Mm"
}
@ -1951,9 +1951,9 @@ description: Variables in memory after executing subtract_regression10.kcl
"type": "plane",
"value": "Custom",
"xAxis": {
"x": -0.9778288277170034,
"x": -0.978,
"y": 0.0,
"z": -0.2094057871349092,
"z": -0.209,
"units": {
"type": "Unknown"
}

View File

@ -1125,7 +1125,9 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
)
},
validation: async ({ data }: { data: string }) => {
const variableExists = kclManager.variables[data]
// Be conservative and error out if there is an item or module with the same name.
const variableExists =
kclManager.variables[data] || kclManager.variables['__mod_' + data]
if (variableExists) {
return 'This variable name is already in use.'
}

View File

@ -128,7 +128,8 @@ export function kclCommands(commandProps: KclCommandConfig): Command[] {
return getPathFilenameInVariableCase(path)
},
validation: async ({ data }) => {
const variableExists = kclManager.variables[data.localName]
const variableExists =
kclManager.variables['__mod_' + data.localName]
if (variableExists) {
return 'This variable name is already in use.'
}