* add helix

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

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* updates

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

* u[pdates

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

* fixes for camera and batch

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

* fix;

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

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2024-03-25 17:07:53 -07:00
committed by GitHub
parent d8cc57b843
commit 0025349e9a
23 changed files with 4675 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -542,6 +542,82 @@ const pt2 = b2.value[0]
);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_helix_defaults() {
let code = r#"const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0}, %)
"#;
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
.await
.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/helix_defaults.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_helix_defaults_negative_extrude() {
let code = r#"const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> extrude(-10, %)
|> helix({revolutions: 16, angle_start: 0}, %)
"#;
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
.await
.unwrap();
twenty_twenty::assert_image(
"tests/executor/outputs/helix_defaults_negative_extrude.png",
&result,
1.0,
);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_helix_ccw() {
let code = r#"const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0, ccw: true}, %)
"#;
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
.await
.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/helix_ccw.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_helix_with_length() {
let code = r#"const part001 = startSketchOn('XY')
|> circle([5, 5], 10, %)
|> extrude(10, %)
|> helix({revolutions: 16, angle_start: 0, length: 3}, %)
"#;
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
.await
.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/helix_with_length.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_dimensions_match() {
let code = r#"const part001 = startSketchOn('XY')
|> startProfileAt([-10, -10], %)
|> line([20, 0], %)
|> line([0, 20], %)
|> line([-20, 0], %)
|> close(%)
"#;
let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)
.await
.unwrap();
twenty_twenty::assert_image("tests/executor/outputs/dimensions_match.png", &result, 1.0);
}
#[tokio::test(flavor = "multi_thread")]
async fn serial_test_close_arc() {
let code = r#"const center = [0,0]

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB