Extrude bug (#2986)

* fix bug

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* images

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-07-09 23:39:59 -04:00
committed by GitHub
parent 21e2a92f54
commit 73e26cbb4d
23 changed files with 66 additions and 21 deletions

View File

@ -0,0 +1,29 @@
// create a sketch with name sketch000
const sketch000 = startSketchOn('XY')
|> startProfileAt([0.0, 0.0], %)
|> line([1.0, 1.0], %, $line000)
|> line([0.0, -1.0], %, $line001)
|> line([-1.0, 0.0], %, $line002)
// create an extrusion with name extrude000
const extrude000 = extrude(1.0, sketch000)
// define a plane with name plane005
const plane005 = {
plane: {
origin: [0.0, 0.0, 1.0],
x_axis: [0.707107, 0.707107, 0.0],
y_axis: [-0.0, 0.0, 1.0],
z_axis: [0.707107, -0.707107, 0.0]
}
}
// create a sketch with name sketch001
const sketch001 = startSketchOn(plane005)
|> startProfileAt([0.100000, 0.250000], %)
|> line([0.075545, 0.494260], %, $line003)
|> line([0.741390, -0.113317], %, $line004)
|> line([-0.816935, -0.380943], %, $line005)
// create an extrusion with name extrude001
const extrude001 = extrude(1.0, sketch001)

View File

@ -2501,3 +2501,10 @@ async fn serial_test_order_sketch_extrude_out_of_order() {
0.999,
);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_extrude_custom_plane() {
let code = include_str!("inputs/extrude-custom-plane.kcl");
let result = execute_and_snapshot(code, UnitLength::Mm).await.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/extrude-custom-plane.png", &result, 0.999);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 102 KiB