Replace plane strings with literals (#6592)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -9,7 +9,7 @@ A solid is a collection of extrude surfaces.
|
||||
When you define a solid to a variable like:
|
||||
|
||||
```js
|
||||
myPart = startSketchOn('XY')
|
||||
myPart = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -28,7 +28,7 @@ you can use a function.
|
||||
|
||||
```js
|
||||
fn createPart() {
|
||||
return startSketchOn('XY')
|
||||
return startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
|
@ -3643,7 +3643,7 @@ sketch002 = startSketchOn(extrude001, face = rectangleSegmentA001)
|
||||
sketch002 = startSketchOn(XY)
|
||||
|> startProfile(at = [-2.02, 1.79])
|
||||
|> xLine(length = 2.6)
|
||||
sketch001 = startSketchOn('-XY')
|
||||
sketch001 = startSketchOn(-XY)
|
||||
|> startProfile(at = [-0.48, 1.25])
|
||||
|> angledLine(angle = 0, length = 2.38, tag = $rectangleSegmentA001)
|
||||
|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 2.4, tag = $rectangleSegmentB001)
|
||||
|
@ -27,8 +27,8 @@ test.describe('Regression tests', () => {
|
||||
await context.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`sketch2 = startSketchOn("XY")
|
||||
sketch001 = startSketchOn("XY")
|
||||
`sketch2 = startSketchOn(XY)
|
||||
sketch001 = startSketchOn(XY)
|
||||
|> startProfile(at = [-0, -0])
|
||||
|> line(end = [0, 0])
|
||||
|> line(end = [-4.84, -5.29])
|
||||
@ -234,7 +234,7 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
await context.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
`exampleSketch = startSketchOn("XZ")
|
||||
`exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(angle = 50, length = 45 )
|
||||
|> yLine(endAbsolute = 0)
|
||||
@ -291,7 +291,7 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
|
||||
await expect(
|
||||
page.locator('.cm-content')
|
||||
).toContainText(`exampleSketch = startSketchOn("XZ")
|
||||
).toContainText(`exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> angledLine(angle = 50, length = 45 )
|
||||
|> yLine(endAbsolute = 0)
|
||||
|
@ -104,7 +104,7 @@ height = 30
|
||||
thickness = 2
|
||||
keychainHoleSize = 3
|
||||
|
||||
keychain = startSketchOn("XY")
|
||||
keychain = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [width, 0])
|
||||
|> line(endAbsolute = [width, height])
|
||||
@ -112,7 +112,7 @@ keychain = startSketchOn("XY")
|
||||
|> close()
|
||||
|> extrude(length = thickness)
|
||||
|
||||
keychain1 = startSketchOn("XY")
|
||||
keychain1 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [width, 0])
|
||||
|> line(endAbsolute = [width, height])
|
||||
@ -120,7 +120,7 @@ keychain1 = startSketchOn("XY")
|
||||
|> close()
|
||||
|> extrude(length = thickness)
|
||||
|
||||
keychain2 = startSketchOn("XY")
|
||||
keychain2 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [width, 0])
|
||||
|> line(endAbsolute = [width, height])
|
||||
|
@ -216,7 +216,7 @@ test.describe('Testing Camera Movement', () => {
|
||||
// select a plane
|
||||
await page.mouse.click(700, 325)
|
||||
|
||||
let code = `sketch001 = startSketchOn('XY')`
|
||||
let code = `sketch001 = startSketchOn(XY)`
|
||||
await expect(u.codeLocator).toHaveText(code)
|
||||
await u.closeDebugPanel()
|
||||
|
||||
|
@ -43,7 +43,7 @@ fn slot(sketch1, start, end, width) {
|
||||
return slotSketch
|
||||
}
|
||||
|
||||
// Create a sketch on the "XY" plane for the flipper
|
||||
// Create a sketch on the XY plane for the flipper
|
||||
flipperSketch = startSketchOn(XY)
|
||||
|
||||
// Create a profile of the flipper
|
||||
@ -82,7 +82,7 @@ fillet(
|
||||
],
|
||||
)
|
||||
|
||||
// Create a sketch on the "XZ" plane offset by half the thickness
|
||||
// Create a sketch on the XZ plane offset by half the thickness
|
||||
handleSketch = startSketchOn(offsetPlane(XZ, offset = -handleWidth / 2))
|
||||
|
||||
// Create a profile of the spatula handle
|
||||
|
@ -10,7 +10,7 @@ outerDiameter = 20
|
||||
bendRadius = 30
|
||||
bendAngle = 90
|
||||
|
||||
// Create a sketch in the 'XZ' plane
|
||||
// Create a sketch in the XZ plane
|
||||
sketch000 = startSketchOn(XZ)
|
||||
|
||||
// Create a profile for the outer diameter
|
||||
|
@ -78,7 +78,7 @@ async fn cache_test(
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_cache_change_grid_visualizes_grid_off_to_on() {
|
||||
let code = r#"part001 = startSketchOn('XY')
|
||||
let code = r#"part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [5.5229, 5.25217])
|
||||
|> line(end = [10.50433, -1.19122])
|
||||
|> line(end = [8.01362, -5.48731])
|
||||
@ -254,7 +254,7 @@ extrude(profile001, length = 100)"#
|
||||
#[cfg(feature = "artifact-graph")]
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_cache_add_line_preserves_artifact_commands() {
|
||||
let code = r#"sketch001 = startSketchOn('XY')
|
||||
let code = r#"sketch001 = startSketchOn(XY)
|
||||
|> startProfile(at = [5.5229, 5.25217])
|
||||
|> line(end = [10.50433, -1.19122])
|
||||
|> line(end = [8.01362, -5.48731])
|
||||
|
@ -1,4 +1,4 @@
|
||||
startProfile(startSketchOn("XY"), at = [0, 0])
|
||||
startProfile(startSketchOn(XY), at = [0, 0])
|
||||
|> xLine(length = 10, tag = $line000)
|
||||
|> yLine(length = 10, tag = $line001)
|
||||
|> xLine(endAbsolute = profileStartX(%), tag = $line002)
|
||||
|
@ -15,7 +15,7 @@ tabThk = 4
|
||||
|
||||
// define a rectangular shape func
|
||||
fn rectShape(pos, w, l) {
|
||||
rr = startSketchOn('xy')
|
||||
rr = startSketchOn(XY)
|
||||
|> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)
|
||||
|
@ -15,7 +15,7 @@ tabThk = 4
|
||||
|
||||
// define a rectangular shape func
|
||||
fn rectShape(pos, w, l) {
|
||||
rr = startSketchOn('xy')
|
||||
rr = startSketchOn(XY)
|
||||
|> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge01)
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge02)
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('-XZ')
|
||||
part001 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [100, 100])
|
||||
|> line(endAbsolute = [100, 0])
|
||||
|
@ -10,7 +10,7 @@ plane94894440791888 = {
|
||||
}
|
||||
|
||||
// create a sketch with UID 94894440902176
|
||||
sketch94894440902176 = startSketchOn('-XZ')
|
||||
sketch94894440902176 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [-0.005, -0.005])
|
||||
|> line(end = [0.01, 0.0], tag = $line94894439494384)
|
||||
|> line(end = [0.0, 0.01], tag = $line94894439429616)
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
// create a sketch with UID 94894440902176
|
||||
sketch94894440902176 = startSketchOn('-XZ')
|
||||
sketch94894440902176 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [-0.005, -0.005])
|
||||
|> line(end = [0.01, 0.0], tag = $line94894439494384)
|
||||
|> line(end = [0.0, 0.01], tag = $line94894439429616)
|
||||
|
@ -9,7 +9,7 @@ front_length = 6
|
||||
Fx = 0.5
|
||||
Fy = 0.5
|
||||
|
||||
sketch001 = startSketchOn('-YZ')
|
||||
sketch001 = startSketchOn(-YZ)
|
||||
|> startProfile(at = [back_walls_width / 2, 0])
|
||||
|> xLine(length = wall_thickness / 2)
|
||||
|> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg01)
|
||||
@ -34,7 +34,7 @@ part001 = revolve({
|
||||
}
|
||||
}, sketch001)
|
||||
|
||||
sketch002 = startSketchOn('-YZ')
|
||||
sketch002 = startSketchOn(-YZ)
|
||||
|> startProfile(at = [back_walls_width / 2, 0])
|
||||
|> xLine(length = wall_thickness / 2)
|
||||
|> angledLine(angle = 45, endAbsoluteX = back_walls_width, tag = $seg02)
|
||||
|
@ -197,11 +197,11 @@ fn box(sk1, sk2, scale, plane) {
|
||||
return boxsketch
|
||||
}
|
||||
|
||||
box(0, 0, 5, 'xy')
|
||||
box(10, 23, 8, 'xz')
|
||||
box(30, 43, 18, '-xy')
|
||||
thing = box(-12, -15, 10, 'yz')
|
||||
box(-20, -5, 10, 'xy')"#;
|
||||
box(0, 0, 5, XY)
|
||||
box(10, 23, 8, XZ)
|
||||
box(30, 43, 18, -XY)
|
||||
thing = box(-12, -15, 10, YZ)
|
||||
box(-20, -5, 10, XY)"#;
|
||||
|
||||
let result = execute_and_snapshot(code, None).await.unwrap();
|
||||
assert_out("different_planes_same_drawing", &result);
|
||||
@ -242,13 +242,13 @@ part001 = startSketchOn(XY)
|
||||
|> close()
|
||||
|> extrude(length = 4)
|
||||
|
||||
part002 = startSketchOn('-XZ')
|
||||
part002 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [-9.35, 19.18])
|
||||
|> line(end = [32.14, -2.47])
|
||||
|> line(end = [8.39, -3.73])
|
||||
|> close()
|
||||
|
||||
part003 = startSketchOn('-XZ')
|
||||
part003 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [13.82, 16.51])
|
||||
|> line(end = [-6.24, -30.82])
|
||||
|> line(end = [8.39, -3.73])
|
||||
@ -818,55 +818,6 @@ part002 = startSketchOn(part001, face = END)
|
||||
assert_out("sketch_on_face_circle", &result);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_stdlib_kcl_error_circle() {
|
||||
let code = r#"// Mounting Plate
|
||||
// A flat piece of material, often metal or plastic, that serves as a support or base for attaching, securing, or mounting various types of equipment, devices, or components.
|
||||
|
||||
// Create a function that defines the body width and length of the mounting plate. Tag the corners so they can be passed through the fillet function.
|
||||
fn rectShape(pos, w, l) {
|
||||
rr = startSketchOn(XY)
|
||||
|> startProfile(at = [pos[0] - (w / 2), pos[1] - (l / 2)])
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1)
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2)
|
||||
|> line(endAbsolute = [pos[0] - (w / 2), pos[1] + l / 2], tag = $edge3)
|
||||
|> close(tag = $edge4)
|
||||
return rr
|
||||
}
|
||||
|
||||
// Define the hole radius and x, y location constants
|
||||
holeRadius = 1
|
||||
holeIndex = 6
|
||||
|
||||
// Create the mounting plate extrusion, holes, and fillets
|
||||
part = rectShape([0, 0], 20, 20)
|
||||
|> subtract2d(tool = circle('XY', center = [-holeIndex, holeIndex], radius = holeRadius))
|
||||
|> subtract2d(tool = circle('XY', center = [holeIndex, holeIndex], radius = holeRadius))
|
||||
|> subtract2d(tool = circle('XY', center = [-holeIndex, -holeIndex], radius = holeRadius))
|
||||
|> subtract2d(tool = circle('XY', center = [holeIndex, -holeIndex], radius = holeRadius))
|
||||
|> extrude(length = 2)
|
||||
|> fillet(
|
||||
radius = 4,
|
||||
tags = [
|
||||
getNextAdjacentEdge(edge1),
|
||||
getNextAdjacentEdge(edge2),
|
||||
getNextAdjacentEdge(edge3),
|
||||
getNextAdjacentEdge(edge4)
|
||||
]
|
||||
)
|
||||
"#;
|
||||
|
||||
let result = execute_and_snapshot(code, None).await;
|
||||
let err = result.err().unwrap();
|
||||
let ExecError::Kcl(err) = err else {
|
||||
panic!("Expected KCL error, found {err}");
|
||||
};
|
||||
assert_eq!(
|
||||
err.error.message(),
|
||||
"This function expected the input argument to be of type SketchOrSurface but it's actually of type string (text)"
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_simple_revolve() {
|
||||
let code = r#"part001 = startSketchOn(XY)
|
||||
@ -1334,7 +1285,7 @@ bracket = startSketchOn(XY)
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_error_empty_start_sketch_on_string() {
|
||||
let code = r#"part001 = startSketchOn('-XZ')
|
||||
let code = r#"part001 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [75.75, 184.25])
|
||||
|> line(end = [190.03, -118.13])
|
||||
|> line(end = [-33.38, -202.86])
|
||||
|
@ -736,7 +736,7 @@ fn get_autocomplete_string_from_schema(schema: &schemars::schema::Schema) -> Res
|
||||
for enum_value in enum_values {
|
||||
if let serde_json::value::Value::String(enum_value) = enum_value {
|
||||
had_enum_string = true;
|
||||
parsed_enum_values.push(format!("\"{}\"", enum_value));
|
||||
parsed_enum_values.push(enum_value.to_owned());
|
||||
} else {
|
||||
had_enum_string = false;
|
||||
break;
|
||||
@ -925,7 +925,7 @@ mod tests {
|
||||
fn get_autocomplete_snippet_start_sketch_on() {
|
||||
let start_sketch_on_fn: Box<dyn StdLibFn> = Box::new(crate::std::sketch::StartSketchOn);
|
||||
let snippet = start_sketch_on_fn.to_autocomplete_snippet().unwrap();
|
||||
assert_eq!(snippet, r#"startSketchOn(${0:"XY"})"#);
|
||||
assert_eq!(snippet, r#"startSketchOn(${0:XY})"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -248,7 +248,7 @@ mod tests {
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code() {
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -279,7 +279,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_changed_whitespace() {
|
||||
let old = r#" // Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -291,7 +291,7 @@ firstSketch = startSketchOn('XY')
|
||||
shell(firstSketch, faces = [END], thickness = 0.25) "#;
|
||||
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -324,7 +324,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_changed_code_comment_start_of_program() {
|
||||
let old = r#" // Removed the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -336,7 +336,7 @@ firstSketch = startSketchOn('XY')
|
||||
shell(firstSketch, faces = [END], thickness = 0.25) "#;
|
||||
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -371,7 +371,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
let old = r#"@foo(whatever = whatever)
|
||||
@bar
|
||||
// Removed the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -385,7 +385,7 @@ shell(firstSketch, faces = [END], thickness = 0.25) "#;
|
||||
let new = r#"@foo(whatever = 42)
|
||||
@baz
|
||||
// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -419,7 +419,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_but_different_grid_setting() {
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -456,7 +456,7 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_but_different_edge_visiblity_setting() {
|
||||
let new = r#"// Remove the end face for the extrusion.
|
||||
firstSketch = startSketchOn('XY')
|
||||
firstSketch = startSketchOn(XY)
|
||||
|> startProfile(at = [-12, 12])
|
||||
|> line(end = [24, 0])
|
||||
|> line(end = [0, -24])
|
||||
@ -530,10 +530,10 @@ shell(firstSketch, faces = [END], thickness = 0.25)"#;
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_but_different_unit_setting_using_annotation() {
|
||||
let old_code = r#"@settings(defaultLengthUnit = in)
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
let new_code = r#"@settings(defaultLengthUnit = mm)
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
|
||||
let ExecTestResults { program, exec_ctxt, .. } = parse_execute(old_code).await.unwrap();
|
||||
@ -568,10 +568,10 @@ startSketchOn('XY')
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_get_changed_program_same_code_but_removed_unit_setting_using_annotation() {
|
||||
let old_code = r#"@settings(defaultLengthUnit = in)
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
let new_code = r#"
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
|
||||
let ExecTestResults { program, exec_ctxt, .. } = parse_execute(old_code).await.unwrap();
|
||||
|
@ -2057,7 +2057,7 @@ w = f() + f()
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn kcl_test_changing_a_setting_updates_the_cached_state() {
|
||||
let code = r#"sketch001 = startSketchOn('XZ')
|
||||
let code = r#"sketch001 = startSketchOn(XZ)
|
||||
|> startProfile(at = [61.74, 206.13])
|
||||
|> xLine(length = 305.11, tag = $seg01)
|
||||
|> yLine(length = -291.85)
|
||||
|
@ -527,13 +527,13 @@ impl ElseIf {
|
||||
mod test {
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_parse_digest() {
|
||||
let prog1_string = r#"startSketchOn('XY')
|
||||
let prog1_string = r#"startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
let prog1_digest = crate::parsing::top_level_parse(prog1_string).unwrap().compute_digest();
|
||||
|
||||
let prog2_string = r#"startSketchOn('XY')
|
||||
let prog2_string = r#"startSketchOn(XY)
|
||||
|> startProfile(at = [0, 2])
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
@ -541,7 +541,7 @@ mod test {
|
||||
|
||||
assert!(prog1_digest != prog2_digest);
|
||||
|
||||
let prog3_string = r#"startSketchOn('XY')
|
||||
let prog3_string = r#"startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line([5, 5], %)
|
||||
"#;
|
||||
@ -554,12 +554,12 @@ mod test {
|
||||
async fn test_annotations_digest() {
|
||||
// Settings annotations should be included in the digest.
|
||||
let prog1_string = r#"@settings(defaultLengthUnit = in)
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
let prog1_digest = crate::parsing::top_level_parse(prog1_string).unwrap().compute_digest();
|
||||
|
||||
let prog2_string = r#"@settings(defaultLengthUnit = mm)
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
"#;
|
||||
let prog2_digest = crate::parsing::top_level_parse(prog2_string).unwrap().compute_digest();
|
||||
|
||||
|
@ -4104,7 +4104,7 @@ mySk1 = startSketchOn(XY)
|
||||
#[test]
|
||||
fn test_parse_half_pipe_small() {
|
||||
assert_err_contains(
|
||||
"secondExtrude = startSketchOn('XY')
|
||||
"secondExtrude = startSketchOn(XY)
|
||||
|> startProfileAt([0,0], %)
|
||||
|",
|
||||
"Unexpected token: |",
|
||||
@ -4197,7 +4197,7 @@ height = [obj["a"] -1, 0]"#;
|
||||
fn test_parse_half_pipe() {
|
||||
let code = "height = 10
|
||||
|
||||
firstExtrude = startSketchOn('XY')
|
||||
firstExtrude = startSketchOn(XY)
|
||||
|> startProfileAt([0,0], %)
|
||||
|> line([0, 8], %)
|
||||
|> line([20, 0], %)
|
||||
@ -4205,7 +4205,7 @@ firstExtrude = startSketchOn('XY')
|
||||
|> close()
|
||||
|> extrude(length=2)
|
||||
|
||||
secondExtrude = startSketchOn('XY')
|
||||
secondExtrude = startSketchOn(XY)
|
||||
|> startProfileAt([0,0], %)
|
||||
|";
|
||||
assert_err_contains(code, "Unexpected token: |");
|
||||
@ -4476,7 +4476,7 @@ e
|
||||
let code = r#"/// Compute the cosine of a number (in radians).
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> angledLine(
|
||||
/// angle = 30,
|
||||
@ -4628,7 +4628,7 @@ thing(false)
|
||||
|
||||
#[test]
|
||||
fn random_words_fail() {
|
||||
let test_program = r#"part001 = startSketchOn('-XZ')
|
||||
let test_program = r#"part001 = startSketchOn(-XZ)
|
||||
|> startProfileAt([8.53, 11.8], %)
|
||||
asdasd asdasd
|
||||
|> line([11.12, -14.82], %)
|
||||
@ -4642,7 +4642,7 @@ thing(false)
|
||||
#[test]
|
||||
fn test_member_expression_sketch() {
|
||||
let some_program_string = r#"fn cube(pos, scale) {
|
||||
sg = startSketchOn('XY')
|
||||
sg = startSketchOn(XY)
|
||||
|> startProfileAt(pos, %)
|
||||
|> line([0, scale], %)
|
||||
|> line([scale, 0], %)
|
||||
@ -4670,7 +4670,7 @@ let other_thing = 2 * cos(3)"#;
|
||||
#[test]
|
||||
fn test_negative_arguments() {
|
||||
let some_program_string = r#"fn box(p, h, l, w) {
|
||||
myBox = startSketchOn('XY')
|
||||
myBox = startSketchOn(XY)
|
||||
|> startProfileAt(p, %)
|
||||
|> line([0, l], %)
|
||||
|> line([w, 0], %)
|
||||
@ -4696,89 +4696,89 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
|
||||
#[test]
|
||||
fn test_parse_tag_named_std_lib() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %, $xLine)
|
||||
"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Cannot assign a tag to a reserved keyword: xLine",
|
||||
[76, 82],
|
||||
[74, 80],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_empty_tag_brace() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not be empty", [67, 68]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_empty_tag_whitespace() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $ ,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not be empty", [67, 68]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_empty_tag_comma() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $,)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not be empty", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not be empty", [67, 68]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_digit() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $01)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Tag names must not start with a number. Tag starts with `01`",
|
||||
[74, 76],
|
||||
[72, 74],
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_including_digit() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $var01)"#;
|
||||
assert_no_err(some_program_string);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_bang() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $!var,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a bang", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not start with a bang", [67, 68]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_dollar() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $$,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a dollar", [69, 70]);
|
||||
assert_err(some_program_string, "Tag names must not start with a dollar", [67, 68]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_fn() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $fn,01)
|
||||
"#;
|
||||
assert_err(some_program_string, "Tag names must not start with a keyword", [69, 71]);
|
||||
assert_err(some_program_string, "Tag names must not start with a keyword", [67, 69]);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_tag_starting_with_a_comment() {
|
||||
let some_program_string = r#"startSketchOn('XY')
|
||||
let some_program_string = r#"startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line(%, $//
|
||||
,01)
|
||||
@ -4786,14 +4786,14 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Tag names must not start with a lineComment",
|
||||
[69, 71],
|
||||
[67, 69],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_tag_with_reserved_in_middle_works() {
|
||||
let some_program_string = r#"
|
||||
startSketchOn('XY')
|
||||
startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> line([5, 5], %, $sketching)
|
||||
"#;
|
||||
@ -4803,21 +4803,21 @@ let myBox = box([0,0], -3, -16, -10)
|
||||
#[test]
|
||||
fn test_parse_array_missing_closing_bracket() {
|
||||
let some_program_string = r#"
|
||||
sketch001 = startSketchOn('XZ') |> startProfileAt([90.45, 119.09, %)"#;
|
||||
sketch001 = startSketchOn(XZ) |> startProfileAt([90.45, 119.09, %)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Encountered an unexpected character(s) before finding a closing bracket(`]`) for the array",
|
||||
[51, 67],
|
||||
[49, 65],
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_array_missing_comma() {
|
||||
let some_program_string = r#"
|
||||
sketch001 = startSketchOn('XZ') |> startProfileAt([90.45 119.09], %)"#;
|
||||
sketch001 = startSketchOn(XZ) |> startProfileAt([90.45 119.09], %)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Unexpected character encountered. You might be missing a comma in between elements.",
|
||||
[52, 65],
|
||||
[50, 63],
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
@ -4825,21 +4825,21 @@ sketch001 = startSketchOn('XZ') |> startProfileAt([90.45 119.09], %)"#;
|
||||
// since there is an early exit if encountering a reserved word, the error should be about
|
||||
// that and not the missing comma
|
||||
let some_program_string = r#"
|
||||
sketch001 = startSketchOn('XZ') |> startProfileAt([90.45 $struct], %)"#;
|
||||
sketch001 = startSketchOn(XZ) |> startProfileAt([90.45 $struct], %)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Encountered an unexpected character(s) before finding a closing bracket(`]`) for the array",
|
||||
[51, 52],
|
||||
[49, 50],
|
||||
);
|
||||
}
|
||||
#[test]
|
||||
fn test_parse_array_random_brace() {
|
||||
let some_program_string = r#"
|
||||
sketch001 = startSketchOn('XZ') |> startProfileAt([}], %)"#;
|
||||
sketch001 = startSketchOn(XZ) |> startProfileAt([}], %)"#;
|
||||
assert_err(
|
||||
some_program_string,
|
||||
"Encountered an unexpected character(s) before finding a closing bracket(`]`) for the array",
|
||||
[51, 52],
|
||||
[49, 50],
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ pub async fn map(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
||||
/// ```no_run
|
||||
/// r = 10 // radius
|
||||
/// fn drawCircle(id) {
|
||||
/// return startSketchOn("XY")
|
||||
/// return startSketchOn(XY)
|
||||
/// |> circle( center= [id * 2 * r, 0], radius= r)
|
||||
/// }
|
||||
///
|
||||
@ -45,7 +45,7 @@ pub async fn map(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kcl
|
||||
/// circles = map(
|
||||
/// [1..3],
|
||||
/// f = fn(id) {
|
||||
/// return startSketchOn("XY")
|
||||
/// return startSketchOn(XY)
|
||||
/// |> circle( center= [id * 2 * r, 0], radius= r)
|
||||
/// }
|
||||
/// )
|
||||
|
@ -40,7 +40,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// // Union two cubes using the stdlib functions.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -62,7 +62,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// // Codemods will generate the stdlib function call instead.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -85,7 +85,7 @@ pub async fn union(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// // Codemods will generate the stdlib function call instead.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -190,7 +190,7 @@ pub async fn intersect(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// // Intersect two cubes using the stdlib functions.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -212,7 +212,7 @@ pub async fn intersect(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// // Codemods will generate the stdlib function call instead.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -323,7 +323,7 @@ pub async fn subtract(exec_state: &mut ExecState, args: Args) -> Result<KclValue
|
||||
/// // Subtract a cylinder from a cube using the stdlib functions.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
@ -345,7 +345,7 @@ pub async fn subtract(exec_state: &mut ExecState, args: Args) -> Result<KclValue
|
||||
/// // Codemods will generate the stdlib function call instead.
|
||||
///
|
||||
/// fn cube(center, size) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [center[0] - size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] - size])
|
||||
/// |> line(endAbsolute = [center[0] + size, center[1] + size])
|
||||
|
@ -26,7 +26,7 @@ pub async fn get_opposite_edge(exec_state: &mut ExecState, args: Args) -> Result
|
||||
/// Get the opposite edge to the edge given.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> angledLine(
|
||||
@ -109,7 +109,7 @@ pub async fn get_next_adjacent_edge(exec_state: &mut ExecState, args: Args) -> R
|
||||
/// Get the next adjacent edge to the edge given.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> angledLine(
|
||||
@ -201,7 +201,7 @@ pub async fn get_previous_adjacent_edge(exec_state: &mut ExecState, args: Args)
|
||||
/// Get the previous adjacent edge to the edge given.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> angledLine(
|
||||
@ -295,7 +295,7 @@ pub async fn get_common_edge(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// // Get an edge shared between two faces, created after a chamfer.
|
||||
///
|
||||
/// scale = 20
|
||||
/// part001 = startSketchOn('XY')
|
||||
/// part001 = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, scale])
|
||||
/// |> line(end = [scale, 0])
|
||||
|
@ -59,7 +59,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// extruded in the same direction.
|
||||
///
|
||||
/// ```no_run
|
||||
/// example = startSketchOn('XZ')
|
||||
/// example = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> arc(
|
||||
@ -80,7 +80,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [-10, 0])
|
||||
/// |> arc(
|
||||
/// angleStart = 120,
|
||||
@ -102,7 +102,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [-10, 0])
|
||||
/// |> arc(
|
||||
/// angleStart = 120,
|
||||
@ -124,7 +124,7 @@ pub async fn extrude(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [-10, 0])
|
||||
/// |> arc(
|
||||
/// angleStart = 120,
|
||||
|
@ -58,7 +58,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square and a triangle.
|
||||
/// squareSketch = startSketchOn('XY')
|
||||
/// squareSketch = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
@ -66,7 +66,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// triangleSketch = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
/// triangleSketch = startSketchOn(offsetPlane(XY, offset = 75))
|
||||
/// |> startProfile(at = [0, 125])
|
||||
/// |> line(end = [-15, -30])
|
||||
/// |> line(end = [30, 0])
|
||||
@ -78,7 +78,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square, a circle, and another circle.
|
||||
/// squareSketch = startSketchOn('XY')
|
||||
/// squareSketch = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
@ -86,10 +86,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
/// circleSketch0 = startSketchOn(offsetPlane(XY, offset = 75))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// circleSketch1 = startSketchOn(offsetPlane(XY, offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 20 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch0, circleSketch1])
|
||||
@ -97,7 +97,7 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square, a circle, and another circle with options.
|
||||
/// squareSketch = startSketchOn('XY')
|
||||
/// squareSketch = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
@ -105,10 +105,10 @@ pub async fn loft(exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch0 = startSketchOn(offsetPlane('XY', offset = 75))
|
||||
/// circleSketch0 = startSketchOn(offsetPlane(XY, offset = 75))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// circleSketch1 = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// circleSketch1 = startSketchOn(offsetPlane(XY, offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 20 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch0, circleSketch1],
|
||||
|
@ -101,7 +101,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
|
||||
/// }
|
||||
///
|
||||
/// // Sketch 4 cylinders.
|
||||
/// sketch001 = startSketchOn('XZ')
|
||||
/// sketch001 = startSketchOn(XZ)
|
||||
/// |> circle(center = [0, 0], radius = 2)
|
||||
/// |> extrude(length = 5)
|
||||
/// |> patternTransform(instances = 4, transform = transform)
|
||||
@ -169,7 +169,7 @@ pub async fn pattern_transform_2d(exec_state: &mut ExecState, args: Args) -> Res
|
||||
/// p2 = [ l + x, l + y]
|
||||
/// p3 = [ l + x, -l + y]
|
||||
///
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = p0)
|
||||
/// |> line(endAbsolute = p1)
|
||||
/// |> line(endAbsolute = p2)
|
||||
|
@ -26,7 +26,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
///
|
||||
/// ```no_run
|
||||
/// w = 15
|
||||
/// cube = startSketchOn('XY')
|
||||
/// cube = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [w, 0], tag = $line1)
|
||||
/// |> line(end = [0, w], tag = $line2)
|
||||
@ -36,7 +36,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// |> extrude(length = 5)
|
||||
///
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> circle(radius = radius, center = segEnd(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
@ -78,7 +78,7 @@ pub async fn segment_end_x(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the ending point of the provided line segment along the 'x' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0], tag = $thing)
|
||||
/// |> line(end = [0, 5])
|
||||
@ -119,7 +119,7 @@ pub async fn segment_end_y(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the ending point of the provided line segment along the 'y' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, 3], tag = $thing)
|
||||
@ -162,7 +162,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
///
|
||||
/// ```no_run
|
||||
/// w = 15
|
||||
/// cube = startSketchOn('XY')
|
||||
/// cube = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [w, 0], tag = $line1)
|
||||
/// |> line(end = [0, w], tag = $line2)
|
||||
@ -172,7 +172,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// |> extrude(length = 5)
|
||||
///
|
||||
/// fn cylinder(radius, tag) {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> circle( radius = radius, center = segStart(tag) )
|
||||
/// |> extrude(length = radius)
|
||||
@ -214,7 +214,7 @@ pub async fn segment_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// Compute the starting point of the provided line segment along the 'x' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0], tag = $thing)
|
||||
/// |> line(end = [0, 5])
|
||||
@ -255,7 +255,7 @@ pub async fn segment_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// Compute the starting point of the provided line segment along the 'y' axis.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, 3], tag = $thing)
|
||||
@ -298,7 +298,7 @@ pub async fn last_segment_x(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// sketch.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [5, 0])
|
||||
/// |> line(end = [20, 5])
|
||||
@ -344,7 +344,7 @@ pub async fn last_segment_y(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// sketch.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [5, 0])
|
||||
/// |> line(end = [20, 5])
|
||||
@ -387,7 +387,7 @@ pub async fn segment_length(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// Compute the length of the provided line segment.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XZ")
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 60,
|
||||
@ -434,7 +434,7 @@ pub async fn segment_angle(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// Compute the angle (in degrees) of the provided line segment.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn('XZ')
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> line(end = [5, 10], tag = $seg01)
|
||||
@ -480,7 +480,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Horizontal pill.
|
||||
/// pillSketch = startSketchOn('XZ')
|
||||
/// pillSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> tangentialArc(end = [0, 10], tag = $arc1)
|
||||
@ -496,7 +496,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Vertical pill. Use absolute coordinate for arc.
|
||||
/// pillSketch = startSketchOn('XZ')
|
||||
/// pillSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20])
|
||||
/// |> tangentialArc(endAbsolute = [10, 20], tag = $arc1)
|
||||
@ -511,7 +511,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// rectangleSketch = startSketchOn('XZ')
|
||||
/// rectangleSketch = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0], tag = $seg1)
|
||||
/// |> angledLine(
|
||||
@ -526,7 +526,7 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// bottom = startSketchOn("XY")
|
||||
/// bottom = startSketchOn(XY)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> arc(
|
||||
/// endAbsolute = [10, 10],
|
||||
@ -538,10 +538,10 @@ pub async fn tangent_to_end(exec_state: &mut ExecState, args: Args) -> Result<Kc
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// circSketch = startSketchOn("XY")
|
||||
/// circSketch = startSketchOn(XY)
|
||||
/// |> circle( center= [0, 0], radius= 3 , tag= $circ)
|
||||
///
|
||||
/// triangleSketch = startSketchOn("XY")
|
||||
/// triangleSketch = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-5, 0])
|
||||
/// |> angledLine(angle = tangentToEnd(circ), length = 10)
|
||||
/// |> line(end = [-15, 0])
|
||||
|
@ -140,7 +140,7 @@ pub async fn circle_three_point(exec_state: &mut ExecState, args: Args) -> Resul
|
||||
/// Construct a circle derived from 3 points.
|
||||
///
|
||||
/// ```no_run
|
||||
/// exampleSketch = startSketchOn("XY")
|
||||
/// exampleSketch = startSketchOn(XY)
|
||||
/// |> circleThreePoint(p1 = [10,10], p2 = [20,8], p3 = [15,5])
|
||||
/// |> extrude(length = 5)
|
||||
/// ```
|
||||
@ -278,7 +278,7 @@ pub async fn polygon(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Create a regular hexagon inscribed in a circle of radius 10
|
||||
/// hex = startSketchOn('XY')
|
||||
/// hex = startSketchOn(XY)
|
||||
/// |> polygon(
|
||||
/// radius = 10,
|
||||
/// numSides = 6,
|
||||
@ -291,7 +291,7 @@ pub async fn polygon(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Create a square circumscribed around a circle of radius 5
|
||||
/// square = startSketchOn('XY')
|
||||
/// square = startSketchOn(XY)
|
||||
/// |> polygon(
|
||||
/// radius = 5.0,
|
||||
/// numSides = 4,
|
||||
|
@ -139,7 +139,7 @@ pub async fn sweep(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
|
||||
///
|
||||
/// sketch002 = startSketchOn('YZ')
|
||||
/// sketch002 = startSketchOn(YZ)
|
||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
|
||||
/// |> yLine(length = 231.81)
|
||||
/// |> tangentialArc(radius = 80, angle = -90)
|
||||
|
@ -74,7 +74,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// // Scale a pipe.
|
||||
///
|
||||
/// // Create a path for the sweep.
|
||||
/// sweepPath = startSketchOn('XZ')
|
||||
/// sweepPath = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0.05, 0.05])
|
||||
/// |> line(end = [0, 7])
|
||||
/// |> tangentialArc(angle = 90, radius = 5)
|
||||
@ -83,13 +83,13 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// pipeHole = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// sweepSketch = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
@ -115,7 +115,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
/// ```
|
||||
/// // Sweep two sketches along the same path.
|
||||
///
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
|
||||
/// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
@ -131,7 +131,7 @@ pub async fn scale(exec_state: &mut ExecState, args: Args) -> Result<KclValue, K
|
||||
///
|
||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
|
||||
///
|
||||
/// sketch002 = startSketchOn('YZ')
|
||||
/// sketch002 = startSketchOn(YZ)
|
||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
|
||||
/// |> yLine(length = 231.81)
|
||||
/// |> tangentialArc(radius = 80, angle = -90)
|
||||
@ -240,7 +240,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// // Move a pipe.
|
||||
///
|
||||
/// // Create a path for the sweep.
|
||||
/// sweepPath = startSketchOn('XZ')
|
||||
/// sweepPath = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0.05, 0.05])
|
||||
/// |> line(end = [0, 7])
|
||||
/// |> tangentialArc(angle = 90, radius = 5)
|
||||
@ -249,13 +249,13 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// pipeHole = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// sweepSketch = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
@ -275,7 +275,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// import "tests/inputs/cube.sldprt" as cube
|
||||
///
|
||||
/// // Circle so you actually see the move.
|
||||
/// startSketchOn('XY')
|
||||
/// startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [-10, -10],
|
||||
/// radius = 10,
|
||||
@ -295,7 +295,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
/// ```
|
||||
/// // Sweep two sketches along the same path.
|
||||
///
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
|
||||
/// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
@ -311,7 +311,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
///
|
||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
|
||||
///
|
||||
/// sketch002 = startSketchOn('YZ')
|
||||
/// sketch002 = startSketchOn(YZ)
|
||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
|
||||
/// |> yLine(length = 231.81)
|
||||
/// |> tangentialArc(radius = 80, angle = -90)
|
||||
@ -353,7 +353,7 @@ pub async fn translate(exec_state: &mut ExecState, args: Args) -> Result<KclValu
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Translate and rotate a sketch to create a loft.
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
///
|
||||
/// fn square() {
|
||||
/// return startProfile(sketch001, at = [-10, 10])
|
||||
@ -579,7 +579,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// // Rotate a pipe with roll, pitch, and yaw.
|
||||
///
|
||||
/// // Create a path for the sweep.
|
||||
/// sweepPath = startSketchOn('XZ')
|
||||
/// sweepPath = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0.05, 0.05])
|
||||
/// |> line(end = [0, 7])
|
||||
/// |> tangentialArc(angle = 90, radius = 5)
|
||||
@ -588,13 +588,13 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// pipeHole = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// sweepSketch = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
@ -612,7 +612,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// // Rotate a pipe with just roll.
|
||||
///
|
||||
/// // Create a path for the sweep.
|
||||
/// sweepPath = startSketchOn('XZ')
|
||||
/// sweepPath = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0.05, 0.05])
|
||||
/// |> line(end = [0, 7])
|
||||
/// |> tangentialArc(angle = 90, radius = 5)
|
||||
@ -621,13 +621,13 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// pipeHole = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// sweepSketch = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
@ -643,7 +643,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// // Rotate a pipe about an axis with an angle.
|
||||
///
|
||||
/// // Create a path for the sweep.
|
||||
/// sweepPath = startSketchOn('XZ')
|
||||
/// sweepPath = startSketchOn(XZ)
|
||||
/// |> startProfile(at = [0.05, 0.05])
|
||||
/// |> line(end = [0, 7])
|
||||
/// |> tangentialArc(angle = 90, radius = 5)
|
||||
@ -652,13 +652,13 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> line(end = [0, 7])
|
||||
///
|
||||
/// // Create a hole for the pipe.
|
||||
/// pipeHole = startSketchOn('XY')
|
||||
/// pipeHole = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 1.5,
|
||||
/// )
|
||||
///
|
||||
/// sweepSketch = startSketchOn('XY')
|
||||
/// sweepSketch = startSketchOn(XY)
|
||||
/// |> circle(
|
||||
/// center = [0, 0],
|
||||
/// radius = 2,
|
||||
@ -686,7 +686,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// ```
|
||||
/// // Sweep two sketches along the same path.
|
||||
///
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// rectangleSketch = startProfile(sketch001, at = [-200, 23.86])
|
||||
/// |> angledLine(angle = 0, length = 73.47, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
@ -702,7 +702,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// circleSketch = circle(sketch001, center = [200, -30.29], radius = 32.63)
|
||||
///
|
||||
/// sketch002 = startSketchOn('YZ')
|
||||
/// sketch002 = startSketchOn(YZ)
|
||||
/// sweepPath = startProfile(sketch002, at = [0, 0])
|
||||
/// |> yLine(length = 231.81)
|
||||
/// |> tangentialArc(radius = 80, angle = -90)
|
||||
@ -716,7 +716,7 @@ pub async fn rotate(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Translate and rotate a sketch to create a loft.
|
||||
/// sketch001 = startSketchOn('XY')
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
///
|
||||
/// fn square() {
|
||||
/// return startProfile(sketch001, at = [-10, 10])
|
||||
@ -830,7 +830,7 @@ mod tests {
|
||||
|
||||
use crate::execution::parse_execute;
|
||||
|
||||
const PIPE: &str = r#"sweepPath = startSketchOn('XZ')
|
||||
const PIPE: &str = r#"sweepPath = startSketchOn(XZ)
|
||||
|> startProfile(at = [0.05, 0.05])
|
||||
|> line(end = [0, 7])
|
||||
|> tangentialArc(angle = 90, radius = 5)
|
||||
@ -839,12 +839,12 @@ mod tests {
|
||||
|> line(end = [0, 7])
|
||||
|
||||
// Create a hole for the pipe.
|
||||
pipeHole = startSketchOn('XY')
|
||||
pipeHole = startSketchOn(XY)
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 1.5,
|
||||
)
|
||||
sweepSketch = startSketchOn('XY')
|
||||
sweepSketch = startSketchOn(XY)
|
||||
|> circle(
|
||||
center = [0, 0],
|
||||
radius = 2,
|
||||
|
@ -1612,7 +1612,7 @@ thk = 5
|
||||
hole_diam = 5
|
||||
// define a rectangular shape func
|
||||
fn rectShape(pos, w, l) {
|
||||
rr = startSketchOn('xy')
|
||||
rr = startSketchOn(XY)
|
||||
|> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] - (l / 2)], tag = $edge1)
|
||||
|> line(endAbsolute = [pos[0] + w / 2, pos[1] + l / 2], tag = $edge2)
|
||||
|
@ -179,7 +179,7 @@ export type Sketch
|
||||
/// When you define a solid to a variable like:
|
||||
///
|
||||
/// ```kcl,inline
|
||||
/// myPart = startSketchOn('XY')
|
||||
/// myPart = startSketchOn(XY)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
@ -198,7 +198,7 @@ export type Sketch
|
||||
///
|
||||
/// ```kcl,inline
|
||||
/// fn createPart() {
|
||||
/// return startSketchOn('XY')
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
|
@ -1,17 +1,17 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 67, 0]"]
|
||||
3["Segment<br>[73, 97, 0]"]
|
||||
4["Segment<br>[103, 142, 0]"]
|
||||
5["Segment<br>[148, 174, 0]"]
|
||||
6["Segment<br>[180, 229, 0]"]
|
||||
7["Segment<br>[235, 262, 0]"]
|
||||
8["Segment<br>[268, 275, 0]"]
|
||||
2["Path<br>[33, 65, 0]"]
|
||||
3["Segment<br>[71, 95, 0]"]
|
||||
4["Segment<br>[101, 140, 0]"]
|
||||
5["Segment<br>[146, 172, 0]"]
|
||||
6["Segment<br>[178, 227, 0]"]
|
||||
7["Segment<br>[233, 260, 0]"]
|
||||
8["Segment<br>[266, 273, 0]"]
|
||||
9[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
10["Sweep Extrusion<br>[281, 300, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
10["Sweep Extrusion<br>[279, 298, 0]"]
|
||||
11[Wall]
|
||||
12[Wall]
|
||||
13[Wall]
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing angled_line.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [4.83, 12.56])
|
||||
|> line(end = [15.1, 2.48])
|
||||
|> line(end = [3.15, -9.85], tag = $seg01)
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed angled_line.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -22,9 +22,9 @@ description: Variables in memory after executing angled_line.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 135,
|
||||
"end": 141,
|
||||
"start": 135,
|
||||
"commentStart": 133,
|
||||
"end": 139,
|
||||
"start": 133,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -92,9 +92,9 @@ description: Variables in memory after executing angled_line.kcl
|
||||
15.04
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 135,
|
||||
"end": 141,
|
||||
"start": 135,
|
||||
"commentStart": 133,
|
||||
"end": 139,
|
||||
"start": 133,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
|
@ -1,26 +1,26 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[37, 64, 0]"]
|
||||
5["Segment<br>[70, 89, 0]"]
|
||||
6["Segment<br>[95, 131, 0]"]
|
||||
7["Segment<br>[137, 171, 0]"]
|
||||
8["Segment<br>[177, 233, 0]"]
|
||||
9["Segment<br>[239, 246, 0]"]
|
||||
3["Path<br>[35, 62, 0]"]
|
||||
5["Segment<br>[68, 87, 0]"]
|
||||
6["Segment<br>[93, 129, 0]"]
|
||||
7["Segment<br>[135, 169, 0]"]
|
||||
8["Segment<br>[175, 231, 0]"]
|
||||
9["Segment<br>[237, 244, 0]"]
|
||||
15[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[390, 417, 0]"]
|
||||
10["Segment<br>[423, 441, 0]"]
|
||||
11["Segment<br>[447, 466, 0]"]
|
||||
12["Segment<br>[472, 528, 0]"]
|
||||
13["Segment<br>[534, 541, 0]"]
|
||||
4["Path<br>[388, 415, 0]"]
|
||||
10["Segment<br>[421, 439, 0]"]
|
||||
11["Segment<br>[445, 464, 0]"]
|
||||
12["Segment<br>[470, 526, 0]"]
|
||||
13["Segment<br>[532, 539, 0]"]
|
||||
14[Solid2d]
|
||||
end
|
||||
1["Plane<br>[12, 31, 0]"]
|
||||
2["StartSketchOnFace<br>[345, 384, 0]"]
|
||||
16["Sweep Extrusion<br>[260, 292, 0]"]
|
||||
17["Sweep Extrusion<br>[555, 585, 0]"]
|
||||
1["Plane<br>[12, 29, 0]"]
|
||||
2["StartSketchOnFace<br>[343, 382, 0]"]
|
||||
16["Sweep Extrusion<br>[258, 290, 0]"]
|
||||
17["Sweep Extrusion<br>[553, 583, 0]"]
|
||||
18[Wall]
|
||||
19[Wall]
|
||||
20[Wall]
|
||||
@ -45,7 +45,7 @@ flowchart LR
|
||||
39["SweepEdge Adjacent"]
|
||||
40["SweepEdge Adjacent"]
|
||||
41["SweepEdge Adjacent"]
|
||||
42["EdgeCut Fillet<br>[298, 332, 0]"]
|
||||
42["EdgeCut Fillet<br>[296, 330, 0]"]
|
||||
1 --- 3
|
||||
21 x--> 2
|
||||
3 --- 5
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing artifact_graph_example_code1.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
sketch001 = startSketchOn('XY')
|
||||
sketch001 = startSketchOn(XY)
|
||||
|> startProfile(at = [-5, -5])
|
||||
|> line(end = [0, 10])
|
||||
|> line(end = [10.55, 0], tag = $seg01)
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed artifact_graph_example_code1.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -22,9 +22,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -35,9 +35,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -84,9 +84,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -109,9 +109,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -404,9 +404,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -417,9 +417,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -466,9 +466,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -491,9 +491,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -719,9 +719,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -744,9 +744,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -984,9 +984,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -997,9 +997,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
@ -1046,9 +1046,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 124,
|
||||
"end": 130,
|
||||
"start": 124,
|
||||
"commentStart": 122,
|
||||
"end": 128,
|
||||
"start": 122,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg01"
|
||||
},
|
||||
@ -1071,9 +1071,9 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
|
||||
5.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 164,
|
||||
"end": 170,
|
||||
"start": 164,
|
||||
"commentStart": 162,
|
||||
"end": 168,
|
||||
"start": 162,
|
||||
"type": "TagDeclarator",
|
||||
"value": "seg02"
|
||||
},
|
||||
|
@ -1,22 +1,22 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[37, 65, 0]"]
|
||||
5["Segment<br>[71, 139, 0]"]
|
||||
6["Segment<br>[145, 242, 0]"]
|
||||
7["Segment<br>[248, 365, 0]"]
|
||||
8["Segment<br>[371, 427, 0]"]
|
||||
9["Segment<br>[433, 440, 0]"]
|
||||
3["Path<br>[35, 63, 0]"]
|
||||
5["Segment<br>[69, 137, 0]"]
|
||||
6["Segment<br>[143, 240, 0]"]
|
||||
7["Segment<br>[246, 363, 0]"]
|
||||
8["Segment<br>[369, 425, 0]"]
|
||||
9["Segment<br>[431, 438, 0]"]
|
||||
13[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[479, 508, 0]"]
|
||||
10["Segment<br>[514, 539, 0]"]
|
||||
11["Segment<br>[545, 580, 0]"]
|
||||
12["Segment<br>[586, 627, 0]"]
|
||||
4["Path<br>[475, 504, 0]"]
|
||||
10["Segment<br>[510, 535, 0]"]
|
||||
11["Segment<br>[541, 576, 0]"]
|
||||
12["Segment<br>[582, 623, 0]"]
|
||||
end
|
||||
1["Plane<br>[12, 31, 0]"]
|
||||
2["Plane<br>[453, 473, 0]"]
|
||||
1["Plane<br>[12, 29, 0]"]
|
||||
2["Plane<br>[451, 469, 0]"]
|
||||
1 --- 3
|
||||
2 --- 4
|
||||
3 --- 5
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'YZ'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "YZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "YZ"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -655,13 +662,28 @@ description: Result of parsing artifact_graph_example_code_no_3d.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"argument": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'-XZ'",
|
||||
"operator": "-",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "-XZ"
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,11 +1,11 @@
|
||||
sketch003 = startSketchOn('YZ')
|
||||
sketch003 = startSketchOn(YZ)
|
||||
|> startProfile(at = [5.82, 0])
|
||||
|> angledLine(angle = 180, length = 11.54, tag = $rectangleSegmentA001)
|
||||
|> angledLine(angle = segAng(rectangleSegmentA001) - 90, length = 8.21, tag = $rectangleSegmentB001)
|
||||
|> angledLine(angle = segAng(rectangleSegmentA001), length = -segLen(rectangleSegmentA001), tag = $rectangleSegmentC001)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
sketch004 = startSketchOn('-XZ')
|
||||
sketch004 = startSketchOn(-XZ)
|
||||
|> startProfile(at = [0, 14.36])
|
||||
|> line(end = [15.49, 0.05])
|
||||
|> tangentialArc(endAbsolute = [0, 0])
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed artifact_graph_example_code_no_3d.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "YZ"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
@ -22,8 +22,8 @@ description: Operations executed artifact_graph_example_code_no_3d.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "-XZ"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 117,
|
||||
"end": 138,
|
||||
"start": 117,
|
||||
"commentStart": 115,
|
||||
"end": 136,
|
||||
"start": 115,
|
||||
"type": "TagDeclarator",
|
||||
"value": "rectangleSegmentA001"
|
||||
},
|
||||
@ -59,9 +59,9 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 220,
|
||||
"end": 241,
|
||||
"start": 220,
|
||||
"commentStart": 218,
|
||||
"end": 239,
|
||||
"start": 218,
|
||||
"type": "TagDeclarator",
|
||||
"value": "rectangleSegmentB001"
|
||||
},
|
||||
@ -84,9 +84,9 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
8.21
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 343,
|
||||
"end": 364,
|
||||
"start": 343,
|
||||
"commentStart": 341,
|
||||
"end": 362,
|
||||
"start": 341,
|
||||
"type": "TagDeclarator",
|
||||
"value": "rectangleSegmentC001"
|
||||
},
|
||||
|
@ -1,13 +1,13 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path5 [Path]
|
||||
5["Path<br>[193, 218, 0]"]
|
||||
6["Segment<br>[224, 249, 0]"]
|
||||
5["Path<br>[187, 212, 0]"]
|
||||
6["Segment<br>[218, 243, 0]"]
|
||||
end
|
||||
1["Plane<br>[17, 47, 0]"]
|
||||
2["Plane<br>[65, 96, 0]"]
|
||||
3["Plane<br>[114, 144, 0]"]
|
||||
4["StartSketchOnPlane<br>[158, 187, 0]"]
|
||||
1["Plane<br>[17, 45, 0]"]
|
||||
2["Plane<br>[63, 92, 0]"]
|
||||
3["Plane<br>[110, 138, 0]"]
|
||||
4["StartSketchOnPlane<br>[152, 181, 0]"]
|
||||
1 <--x 4
|
||||
1 --- 5
|
||||
5 --- 6
|
||||
|
@ -63,13 +63,20 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "\"XY\"",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
@ -147,13 +154,20 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "\"XZ\"",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XZ"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
@ -223,13 +237,20 @@ description: Result of parsing artifact_graph_example_code_offset_planes.kcl
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "\"YZ\"",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "YZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "YZ"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
},
|
||||
"start": 0,
|
||||
|
@ -1,6 +1,6 @@
|
||||
offsetPlane001 = offsetPlane("XY", offset = 20)
|
||||
offsetPlane002 = offsetPlane("XZ", offset = -50)
|
||||
offsetPlane003 = offsetPlane("YZ", offset = 10)
|
||||
offsetPlane001 = offsetPlane(XY, offset = 20)
|
||||
offsetPlane002 = offsetPlane(XZ, offset = -50)
|
||||
offsetPlane003 = offsetPlane(YZ, offset = 10)
|
||||
|
||||
sketch002 = startSketchOn(offsetPlane001)
|
||||
|> startProfile(at = [0, 0])
|
||||
|
@ -8,8 +8,8 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
@ -38,8 +38,8 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XZ"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
@ -68,8 +68,8 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "YZ"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
|
@ -1,27 +1,27 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[76, 116, 8]"]
|
||||
5["Segment<br>[122, 139, 8]"]
|
||||
6["Segment<br>[145, 163, 8]"]
|
||||
7["Segment<br>[169, 187, 8]"]
|
||||
8["Segment<br>[193, 249, 8]"]
|
||||
9["Segment<br>[255, 262, 8]"]
|
||||
3["Path<br>[74, 114, 8]"]
|
||||
5["Segment<br>[120, 137, 8]"]
|
||||
6["Segment<br>[143, 161, 8]"]
|
||||
7["Segment<br>[167, 185, 8]"]
|
||||
8["Segment<br>[191, 247, 8]"]
|
||||
9["Segment<br>[253, 260, 8]"]
|
||||
15[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[76, 114, 9]"]
|
||||
10["Segment<br>[120, 137, 9]"]
|
||||
11["Segment<br>[143, 161, 9]"]
|
||||
12["Segment<br>[167, 185, 9]"]
|
||||
13["Segment<br>[191, 247, 9]"]
|
||||
14["Segment<br>[253, 260, 9]"]
|
||||
4["Path<br>[74, 112, 9]"]
|
||||
10["Segment<br>[118, 135, 9]"]
|
||||
11["Segment<br>[141, 159, 9]"]
|
||||
12["Segment<br>[165, 183, 9]"]
|
||||
13["Segment<br>[189, 245, 9]"]
|
||||
14["Segment<br>[251, 258, 9]"]
|
||||
16[Solid2d]
|
||||
end
|
||||
1["Plane<br>[47, 66, 8]"]
|
||||
2["Plane<br>[47, 66, 9]"]
|
||||
17["Sweep Extrusion<br>[268, 290, 8]"]
|
||||
18["Sweep Extrusion<br>[266, 288, 9]"]
|
||||
1["Plane<br>[47, 64, 8]"]
|
||||
2["Plane<br>[47, 64, 9]"]
|
||||
17["Sweep Extrusion<br>[266, 288, 8]"]
|
||||
18["Sweep Extrusion<br>[264, 286, 9]"]
|
||||
19[Wall]
|
||||
20[Wall]
|
||||
21[Wall]
|
||||
|
@ -1,6 +1,6 @@
|
||||
@settings(defaultLengthUnit = in)
|
||||
|
||||
sketch001 = startSketchOn('XY')
|
||||
sketch001 = startSketchOn(XY)
|
||||
cubeIn = startProfile(sketch001, at = [-10, -10])
|
||||
|> xLine(length = 5)
|
||||
|> yLine(length = -5)
|
||||
|
@ -1,6 +1,6 @@
|
||||
@settings(defaultLengthUnit = mm)
|
||||
|
||||
sketch001 = startSketchOn('XY')
|
||||
sketch001 = startSketchOn(XY)
|
||||
cubeMm = startProfile(sketch001, at = [10, 10])
|
||||
|> xLine(length = 5)
|
||||
|> yLine(length = -5)
|
||||
|
@ -1,17 +1,17 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path3 [Path]
|
||||
3["Path<br>[197, 232, 8]"]
|
||||
5["Segment<br>[197, 232, 8]"]
|
||||
3["Path<br>[195, 230, 8]"]
|
||||
5["Segment<br>[195, 230, 8]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
subgraph path4 [Path]
|
||||
4["Path<br>[113, 148, 10]"]
|
||||
6["Segment<br>[113, 148, 10]"]
|
||||
4["Path<br>[111, 146, 10]"]
|
||||
6["Segment<br>[111, 146, 10]"]
|
||||
8[Solid2d]
|
||||
end
|
||||
1["Plane<br>[172, 191, 8]"]
|
||||
2["Plane<br>[88, 107, 10]"]
|
||||
1["Plane<br>[172, 189, 8]"]
|
||||
2["Plane<br>[88, 105, 10]"]
|
||||
1 --- 3
|
||||
2 --- 4
|
||||
3 --- 5
|
||||
|
@ -4,5 +4,5 @@
|
||||
import radius from "globals.kcl"
|
||||
|
||||
// Use the same units as in the main importing file.
|
||||
startSketchOn('XZ')
|
||||
startSketchOn(XZ)
|
||||
|> circle(center = [0, 0], radius = 1)
|
||||
|
@ -1,5 +1,5 @@
|
||||
@settings(defaultLengthUnit = in)
|
||||
|
||||
// Use the same units as in the main importing file.
|
||||
startSketchOn('XZ')
|
||||
startSketchOn(XZ)
|
||||
|> circle(center = [0, 2], radius = 1)
|
||||
|
@ -164,13 +164,20 @@ description: Result of parsing bad_units_in_annotation.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -11,7 +11,7 @@ bondAngle = 104.5 // Bond angle in degrees
|
||||
|
||||
// Function to create a sphere representing an atom
|
||||
fn createAtom(center, radius) {
|
||||
return startSketchOn('XY')
|
||||
return startSketchOn(XY)
|
||||
|> circle(center = center, radius = radius)
|
||||
|> extrude(length = radius * 2)
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 60, 0]"]
|
||||
3["Segment<br>[66, 99, 0]"]
|
||||
4["Segment<br>[105, 124, 0]"]
|
||||
5["Segment<br>[130, 165, 0]"]
|
||||
6["Segment<br>[171, 191, 0]"]
|
||||
2["Path<br>[33, 58, 0]"]
|
||||
3["Segment<br>[64, 97, 0]"]
|
||||
4["Segment<br>[103, 122, 0]"]
|
||||
5["Segment<br>[128, 163, 0]"]
|
||||
6["Segment<br>[169, 189, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
8["Sweep Extrusion<br>[197, 217, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
8["Sweep Extrusion<br>[195, 215, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
@ -24,8 +24,8 @@ flowchart LR
|
||||
20["SweepEdge Adjacent"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Adjacent"]
|
||||
23["EdgeCut Fillet<br>[223, 283, 0]"]
|
||||
24["EdgeCut Fillet<br>[223, 283, 0]"]
|
||||
23["EdgeCut Fillet<br>[221, 281, 0]"]
|
||||
24["EdgeCut Fillet<br>[221, 281, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing basic_fillet_cube_close_opposite.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 10], tag = $thing)
|
||||
|> line(end = [10, 0])
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed basic_fillet_cube_close_opposite.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -35,9 +35,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -48,9 +48,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 183,
|
||||
"end": 190,
|
||||
"start": 183,
|
||||
"commentStart": 181,
|
||||
"end": 188,
|
||||
"start": 181,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
@ -71,9 +71,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -115,9 +115,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -140,9 +140,9 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 183,
|
||||
"end": 190,
|
||||
"start": 183,
|
||||
"commentStart": 181,
|
||||
"end": 188,
|
||||
"start": 181,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 60, 0]"]
|
||||
3["Segment<br>[66, 99, 0]"]
|
||||
4["Segment<br>[105, 124, 0]"]
|
||||
5["Segment<br>[130, 165, 0]"]
|
||||
6["Segment<br>[171, 179, 0]"]
|
||||
2["Path<br>[33, 58, 0]"]
|
||||
3["Segment<br>[64, 97, 0]"]
|
||||
4["Segment<br>[103, 122, 0]"]
|
||||
5["Segment<br>[128, 163, 0]"]
|
||||
6["Segment<br>[169, 177, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
8["Sweep Extrusion<br>[185, 205, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
8["Sweep Extrusion<br>[183, 203, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
@ -24,8 +24,8 @@ flowchart LR
|
||||
20["SweepEdge Adjacent"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Adjacent"]
|
||||
23["EdgeCut Fillet<br>[211, 269, 0]"]
|
||||
24["EdgeCut Fillet<br>[211, 269, 0]"]
|
||||
23["EdgeCut Fillet<br>[209, 267, 0]"]
|
||||
24["EdgeCut Fillet<br>[209, 267, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing basic_fillet_cube_end.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 10], tag = $thing)
|
||||
|> line(end = [10, 0])
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed basic_fillet_cube_end.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -35,9 +35,9 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -65,9 +65,9 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -109,9 +109,9 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 60, 0]"]
|
||||
3["Segment<br>[66, 99, 0]"]
|
||||
4["Segment<br>[105, 139, 0]"]
|
||||
5["Segment<br>[145, 180, 0]"]
|
||||
6["Segment<br>[186, 206, 0]"]
|
||||
2["Path<br>[33, 58, 0]"]
|
||||
3["Segment<br>[64, 97, 0]"]
|
||||
4["Segment<br>[103, 137, 0]"]
|
||||
5["Segment<br>[143, 178, 0]"]
|
||||
6["Segment<br>[184, 204, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
8["Sweep Extrusion<br>[212, 232, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
8["Sweep Extrusion<br>[210, 230, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
@ -24,7 +24,7 @@ flowchart LR
|
||||
20["SweepEdge Adjacent"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Adjacent"]
|
||||
23["EdgeCut Fillet<br>[238, 294, 0]"]
|
||||
23["EdgeCut Fillet<br>[236, 292, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing basic_fillet_cube_next_adjacent.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 10], tag = $thing)
|
||||
|> line(end = [10, 0], tag = $thing1)
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed basic_fillet_cube_next_adjacent.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -28,9 +28,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 131,
|
||||
"end": 138,
|
||||
"start": 131,
|
||||
"commentStart": 129,
|
||||
"end": 136,
|
||||
"start": 129,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing1"
|
||||
},
|
||||
@ -41,9 +41,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 172,
|
||||
"end": 179,
|
||||
"start": 172,
|
||||
"commentStart": 170,
|
||||
"end": 177,
|
||||
"start": 170,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -54,9 +54,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 198,
|
||||
"end": 205,
|
||||
"start": 198,
|
||||
"commentStart": 196,
|
||||
"end": 203,
|
||||
"start": 196,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
@ -77,9 +77,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -102,9 +102,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 131,
|
||||
"end": 138,
|
||||
"start": 131,
|
||||
"commentStart": 129,
|
||||
"end": 136,
|
||||
"start": 129,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing1"
|
||||
},
|
||||
@ -127,9 +127,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 172,
|
||||
"end": 179,
|
||||
"start": 172,
|
||||
"commentStart": 170,
|
||||
"end": 177,
|
||||
"start": 170,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -152,9 +152,9 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 198,
|
||||
"end": 205,
|
||||
"start": 198,
|
||||
"commentStart": 196,
|
||||
"end": 203,
|
||||
"start": 196,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 60, 0]"]
|
||||
3["Segment<br>[66, 99, 0]"]
|
||||
4["Segment<br>[105, 139, 0]"]
|
||||
5["Segment<br>[145, 180, 0]"]
|
||||
6["Segment<br>[186, 206, 0]"]
|
||||
2["Path<br>[33, 58, 0]"]
|
||||
3["Segment<br>[64, 97, 0]"]
|
||||
4["Segment<br>[103, 137, 0]"]
|
||||
5["Segment<br>[143, 178, 0]"]
|
||||
6["Segment<br>[184, 204, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
8["Sweep Extrusion<br>[212, 232, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
8["Sweep Extrusion<br>[210, 230, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
@ -24,7 +24,7 @@ flowchart LR
|
||||
20["SweepEdge Adjacent"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Adjacent"]
|
||||
23["EdgeCut Fillet<br>[238, 298, 0]"]
|
||||
23["EdgeCut Fillet<br>[236, 296, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing basic_fillet_cube_previous_adjacent.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 10], tag = $thing)
|
||||
|> line(end = [10, 0], tag = $thing1)
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed basic_fillet_cube_previous_adjacent.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -28,9 +28,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 131,
|
||||
"end": 138,
|
||||
"start": 131,
|
||||
"commentStart": 129,
|
||||
"end": 136,
|
||||
"start": 129,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing1"
|
||||
},
|
||||
@ -41,9 +41,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 172,
|
||||
"end": 179,
|
||||
"start": 172,
|
||||
"commentStart": 170,
|
||||
"end": 177,
|
||||
"start": 170,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -54,9 +54,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 198,
|
||||
"end": 205,
|
||||
"start": 198,
|
||||
"commentStart": 196,
|
||||
"end": 203,
|
||||
"start": 196,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
@ -77,9 +77,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -102,9 +102,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 131,
|
||||
"end": 138,
|
||||
"start": 131,
|
||||
"commentStart": 129,
|
||||
"end": 136,
|
||||
"start": 129,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing1"
|
||||
},
|
||||
@ -127,9 +127,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 172,
|
||||
"end": 179,
|
||||
"start": 172,
|
||||
"commentStart": 170,
|
||||
"end": 177,
|
||||
"start": 170,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -152,9 +152,9 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 198,
|
||||
"end": 205,
|
||||
"start": 198,
|
||||
"commentStart": 196,
|
||||
"end": 203,
|
||||
"start": 196,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing3"
|
||||
},
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[35, 60, 0]"]
|
||||
3["Segment<br>[66, 99, 0]"]
|
||||
4["Segment<br>[105, 124, 0]"]
|
||||
5["Segment<br>[130, 165, 0]"]
|
||||
6["Segment<br>[171, 179, 0]"]
|
||||
2["Path<br>[33, 58, 0]"]
|
||||
3["Segment<br>[64, 97, 0]"]
|
||||
4["Segment<br>[103, 122, 0]"]
|
||||
5["Segment<br>[128, 163, 0]"]
|
||||
6["Segment<br>[169, 177, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[10, 29, 0]"]
|
||||
8["Sweep Extrusion<br>[185, 205, 0]"]
|
||||
1["Plane<br>[10, 27, 0]"]
|
||||
8["Sweep Extrusion<br>[183, 203, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
@ -24,8 +24,8 @@ flowchart LR
|
||||
20["SweepEdge Adjacent"]
|
||||
21["SweepEdge Adjacent"]
|
||||
22["SweepEdge Adjacent"]
|
||||
23["EdgeCut Fillet<br>[211, 253, 0]"]
|
||||
24["EdgeCut Fillet<br>[211, 253, 0]"]
|
||||
23["EdgeCut Fillet<br>[209, 251, 0]"]
|
||||
24["EdgeCut Fillet<br>[209, 251, 0]"]
|
||||
1 --- 2
|
||||
2 --- 3
|
||||
2 --- 4
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing basic_fillet_cube_start.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 10], tag = $thing)
|
||||
|> line(end = [10, 0])
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed basic_fillet_cube_start.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -35,9 +35,9 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
@ -65,9 +65,9 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 92,
|
||||
"end": 98,
|
||||
"start": 92,
|
||||
"commentStart": 90,
|
||||
"end": 96,
|
||||
"start": 90,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing"
|
||||
},
|
||||
@ -109,9 +109,9 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
|
||||
10.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 157,
|
||||
"end": 164,
|
||||
"start": 157,
|
||||
"commentStart": 155,
|
||||
"end": 162,
|
||||
"start": 155,
|
||||
"type": "TagDeclarator",
|
||||
"value": "thing2"
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [1, 3.82], tag = $seg01)
|
||||
|> angledLine(angle = -angleToMatchLengthX(seg01, 3, %), endAbsoluteX = 3)
|
||||
|
@ -1,4 +1,4 @@
|
||||
part001 = startSketchOn('XY')
|
||||
part001 = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [1, 3.82], tag = $seg01)
|
||||
|> angledLine(angle = -angleToMatchLengthY(seg01, 3, %), endAbsoluteX = 3)
|
||||
|
@ -1,12 +1,12 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[37, 98, 0]"]
|
||||
3["Segment<br>[37, 98, 0]"]
|
||||
2["Path<br>[35, 96, 0]"]
|
||||
3["Segment<br>[35, 96, 0]"]
|
||||
4[Solid2d]
|
||||
end
|
||||
1["Plane<br>[12, 31, 0]"]
|
||||
5["Sweep Extrusion<br>[104, 124, 0]"]
|
||||
1["Plane<br>[12, 29, 0]"]
|
||||
5["Sweep Extrusion<br>[102, 122, 0]"]
|
||||
6[Wall]
|
||||
7["Cap Start"]
|
||||
8["Cap End"]
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,3 +1,3 @@
|
||||
sketch001 = startSketchOn('XY')
|
||||
sketch001 = startSketchOn(XY)
|
||||
|> circleThreePoint(p1 = [25, 25], p2 = [30, 20], p3 = [27, 15])
|
||||
|> extrude(length = 10)
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed circle_three_point.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph path2 [Path]
|
||||
2["Path<br>[41, 66, 0]"]
|
||||
3["Segment<br>[72, 90, 0]"]
|
||||
4["Segment<br>[96, 114, 0]"]
|
||||
5["Segment<br>[120, 139, 0]"]
|
||||
6["Segment<br>[145, 153, 0]"]
|
||||
2["Path<br>[39, 64, 0]"]
|
||||
3["Segment<br>[70, 88, 0]"]
|
||||
4["Segment<br>[94, 112, 0]"]
|
||||
5["Segment<br>[118, 137, 0]"]
|
||||
6["Segment<br>[143, 151, 0]"]
|
||||
7[Solid2d]
|
||||
end
|
||||
1["Plane<br>[16, 35, 0]"]
|
||||
8["Sweep Extrusion<br>[159, 178, 0]"]
|
||||
1["Plane<br>[16, 33, 0]"]
|
||||
8["Sweep Extrusion<br>[157, 176, 0]"]
|
||||
9[Wall]
|
||||
10[Wall]
|
||||
11[Wall]
|
||||
|
@ -22,13 +22,20 @@ description: Result of parsing circular_pattern3d_a_pattern.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XZ'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XZ"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
exampleSketch = startSketchOn('XZ')
|
||||
exampleSketch = startSketchOn(XZ)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(end = [0, 2])
|
||||
|> line(end = [3, 1])
|
||||
|
@ -7,8 +7,8 @@ description: Operations executed circular_pattern3d_a_pattern.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XZ"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -9,76 +9,76 @@ flowchart LR
|
||||
40[Solid2d]
|
||||
end
|
||||
subgraph path8 [Path]
|
||||
8["Path<br>[808, 833, 0]"]
|
||||
25["Segment<br>[839, 887, 0]"]
|
||||
26["Segment<br>[893, 950, 0]"]
|
||||
27["Segment<br>[956, 1005, 0]"]
|
||||
28["Segment<br>[1011, 1030, 0]"]
|
||||
8["Path<br>[806, 831, 0]"]
|
||||
25["Segment<br>[837, 885, 0]"]
|
||||
26["Segment<br>[891, 948, 0]"]
|
||||
27["Segment<br>[954, 1003, 0]"]
|
||||
28["Segment<br>[1009, 1028, 0]"]
|
||||
45[Solid2d]
|
||||
end
|
||||
subgraph path9 [Path]
|
||||
9["Path<br>[1343, 1368, 0]"]
|
||||
9["Path<br>[1339, 1364, 0]"]
|
||||
end
|
||||
subgraph path10 [Path]
|
||||
10["Path<br>[1343, 1368, 0]"]
|
||||
10["Path<br>[1339, 1364, 0]"]
|
||||
end
|
||||
subgraph path11 [Path]
|
||||
11["Path<br>[1343, 1368, 0]"]
|
||||
11["Path<br>[1339, 1364, 0]"]
|
||||
end
|
||||
subgraph path12 [Path]
|
||||
12["Path<br>[1343, 1368, 0]"]
|
||||
12["Path<br>[1339, 1364, 0]"]
|
||||
end
|
||||
subgraph path13 [Path]
|
||||
13["Path<br>[1376, 1413, 0]"]
|
||||
29["Segment<br>[1376, 1413, 0]"]
|
||||
13["Path<br>[1372, 1409, 0]"]
|
||||
29["Segment<br>[1372, 1409, 0]"]
|
||||
38[Solid2d]
|
||||
end
|
||||
subgraph path14 [Path]
|
||||
14["Path<br>[1376, 1413, 0]"]
|
||||
31["Segment<br>[1376, 1413, 0]"]
|
||||
14["Path<br>[1372, 1409, 0]"]
|
||||
31["Segment<br>[1372, 1409, 0]"]
|
||||
42[Solid2d]
|
||||
end
|
||||
subgraph path15 [Path]
|
||||
15["Path<br>[1376, 1413, 0]"]
|
||||
30["Segment<br>[1376, 1413, 0]"]
|
||||
15["Path<br>[1372, 1409, 0]"]
|
||||
30["Segment<br>[1372, 1409, 0]"]
|
||||
44[Solid2d]
|
||||
end
|
||||
subgraph path16 [Path]
|
||||
16["Path<br>[1376, 1413, 0]"]
|
||||
32["Segment<br>[1376, 1413, 0]"]
|
||||
16["Path<br>[1372, 1409, 0]"]
|
||||
32["Segment<br>[1372, 1409, 0]"]
|
||||
46[Solid2d]
|
||||
end
|
||||
subgraph path17 [Path]
|
||||
17["Path<br>[1439, 1477, 0]"]
|
||||
35["Segment<br>[1439, 1477, 0]"]
|
||||
17["Path<br>[1435, 1473, 0]"]
|
||||
35["Segment<br>[1435, 1473, 0]"]
|
||||
37[Solid2d]
|
||||
end
|
||||
subgraph path18 [Path]
|
||||
18["Path<br>[1439, 1477, 0]"]
|
||||
34["Segment<br>[1439, 1477, 0]"]
|
||||
18["Path<br>[1435, 1473, 0]"]
|
||||
34["Segment<br>[1435, 1473, 0]"]
|
||||
39[Solid2d]
|
||||
end
|
||||
subgraph path19 [Path]
|
||||
19["Path<br>[1439, 1477, 0]"]
|
||||
36["Segment<br>[1439, 1477, 0]"]
|
||||
19["Path<br>[1435, 1473, 0]"]
|
||||
36["Segment<br>[1435, 1473, 0]"]
|
||||
41[Solid2d]
|
||||
end
|
||||
subgraph path20 [Path]
|
||||
20["Path<br>[1439, 1477, 0]"]
|
||||
33["Segment<br>[1439, 1477, 0]"]
|
||||
20["Path<br>[1435, 1473, 0]"]
|
||||
33["Segment<br>[1435, 1473, 0]"]
|
||||
43[Solid2d]
|
||||
end
|
||||
1["Plane<br>[373, 390, 0]"]
|
||||
2["Plane<br>[783, 802, 0]"]
|
||||
3["Plane<br>[1316, 1335, 0]"]
|
||||
4["Plane<br>[1316, 1335, 0]"]
|
||||
5["Plane<br>[1316, 1335, 0]"]
|
||||
6["Plane<br>[1316, 1335, 0]"]
|
||||
47["Sweep Extrusion<br>[1036, 1064, 0]"]
|
||||
48["Sweep Extrusion<br>[1486, 1510, 0]"]
|
||||
49["Sweep Extrusion<br>[1486, 1510, 0]"]
|
||||
50["Sweep Extrusion<br>[1486, 1510, 0]"]
|
||||
51["Sweep Extrusion<br>[1486, 1510, 0]"]
|
||||
2["Plane<br>[783, 800, 0]"]
|
||||
3["Plane<br>[1314, 1331, 0]"]
|
||||
4["Plane<br>[1314, 1331, 0]"]
|
||||
5["Plane<br>[1314, 1331, 0]"]
|
||||
6["Plane<br>[1314, 1331, 0]"]
|
||||
47["Sweep Extrusion<br>[1034, 1062, 0]"]
|
||||
48["Sweep Extrusion<br>[1482, 1506, 0]"]
|
||||
49["Sweep Extrusion<br>[1482, 1506, 0]"]
|
||||
50["Sweep Extrusion<br>[1482, 1506, 0]"]
|
||||
51["Sweep Extrusion<br>[1482, 1506, 0]"]
|
||||
52[Wall]
|
||||
53[Wall]
|
||||
54[Wall]
|
||||
@ -113,10 +113,10 @@ flowchart LR
|
||||
83["SweepEdge Adjacent"]
|
||||
84["SweepEdge Adjacent"]
|
||||
85["SweepEdge Adjacent"]
|
||||
86["EdgeCut Fillet<br>[1070, 1276, 0]"]
|
||||
87["EdgeCut Fillet<br>[1070, 1276, 0]"]
|
||||
88["EdgeCut Fillet<br>[1070, 1276, 0]"]
|
||||
89["EdgeCut Fillet<br>[1070, 1276, 0]"]
|
||||
86["EdgeCut Fillet<br>[1068, 1274, 0]"]
|
||||
87["EdgeCut Fillet<br>[1068, 1274, 0]"]
|
||||
88["EdgeCut Fillet<br>[1068, 1274, 0]"]
|
||||
89["EdgeCut Fillet<br>[1068, 1274, 0]"]
|
||||
1 --- 7
|
||||
2 --- 8
|
||||
3 --- 9
|
||||
|
@ -1327,13 +1327,20 @@ description: Result of parsing fillet-and-shell.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -2067,13 +2074,20 @@ description: Result of parsing fillet-and-shell.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "\"XY\"",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XY",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -38,7 +38,7 @@ miniHdmiHole = startSketchOn(XY)
|
||||
])
|
||||
|> close(%)
|
||||
|
||||
case = startSketchOn('XY')
|
||||
case = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> line(endAbsolute = [caseWidth, 0], tag = $edge1)
|
||||
|> line(endAbsolute = [caseWidth, caseLength], tag = $edge2)
|
||||
@ -56,7 +56,7 @@ case = startSketchOn('XY')
|
||||
)
|
||||
|
||||
fn m25Screw(x, y, height) {
|
||||
screw = startSketchOn("XY")
|
||||
screw = startSketchOn(XY)
|
||||
|> startProfile(at = [0, 0])
|
||||
|> circle(center = [x, y], radius = 2.5)
|
||||
|> subtract2d(tool = circle(center = [x, y], radius = 1.25))
|
||||
|
@ -22,8 +22,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
@ -125,8 +125,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
@ -140,8 +140,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
@ -155,8 +155,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
@ -170,8 +170,8 @@ description: Operations executed fillet-and-shell.kcl
|
||||
"labeledArgs": {
|
||||
"planeOrSolid": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
|
@ -28,9 +28,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 880,
|
||||
"end": 886,
|
||||
"start": 880,
|
||||
"commentStart": 878,
|
||||
"end": 884,
|
||||
"start": 878,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge1"
|
||||
},
|
||||
@ -41,9 +41,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 943,
|
||||
"end": 949,
|
||||
"start": 943,
|
||||
"commentStart": 941,
|
||||
"end": 947,
|
||||
"start": 941,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge2"
|
||||
},
|
||||
@ -54,9 +54,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 998,
|
||||
"end": 1004,
|
||||
"start": 998,
|
||||
"commentStart": 996,
|
||||
"end": 1002,
|
||||
"start": 996,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge3"
|
||||
},
|
||||
@ -67,9 +67,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [],
|
||||
"tag": {
|
||||
"commentStart": 1023,
|
||||
"end": 1029,
|
||||
"start": 1023,
|
||||
"commentStart": 1021,
|
||||
"end": 1027,
|
||||
"start": 1021,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge4"
|
||||
},
|
||||
@ -90,9 +90,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 880,
|
||||
"end": 886,
|
||||
"start": 880,
|
||||
"commentStart": 878,
|
||||
"end": 884,
|
||||
"start": 878,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge1"
|
||||
},
|
||||
@ -115,9 +115,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
0.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 943,
|
||||
"end": 949,
|
||||
"start": 943,
|
||||
"commentStart": 941,
|
||||
"end": 947,
|
||||
"start": 941,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge2"
|
||||
},
|
||||
@ -140,9 +140,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
73.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 998,
|
||||
"end": 1004,
|
||||
"start": 998,
|
||||
"commentStart": 996,
|
||||
"end": 1002,
|
||||
"start": 996,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge3"
|
||||
},
|
||||
@ -165,9 +165,9 @@ description: Variables in memory after executing fillet-and-shell.kcl
|
||||
73.0
|
||||
],
|
||||
"tag": {
|
||||
"commentStart": 1023,
|
||||
"end": 1029,
|
||||
"start": 1023,
|
||||
"commentStart": 1021,
|
||||
"end": 1027,
|
||||
"start": 1021,
|
||||
"type": "TagDeclarator",
|
||||
"value": "edge4"
|
||||
},
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user