Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.79"
version = "0.1.80"
rust-version = "1.99.0"

[workspace.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions crates/ares-cli/tests/orca_parity/belt_print/volumes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use std::{

use zip::{ZipArchive, ZipWriter, write::SimpleFileOptions};

#[path = "volumes/stock_multipart_copies.rs"]
mod stock_multipart_copies;
#[path = "volumes/stock_multipart_slots.rs"]
mod stock_multipart_slots;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
use super::{
super::{compare_project, compare_project_with_native},
stock_multipart_slots::uses_only_slot,
};

#[test]
fn prints_two_part_copies_across_the_belt_with_one_slot() {
compare_project(
"ir3-v2-two-part-copies-lateral-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-two-part-copies-lateral-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_two_part_copies_across_the_belt_using_only_slot_two() {
compare_project_with_native(
"ir3-v2-two-part-copies-lateral-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-two-part-copies-lateral-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}

#[test]
fn prints_two_part_copies_along_the_belt_with_one_slot() {
compare_project(
"ir3-v2-two-part-copies-along-belt-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-two-part-copies-along-belt-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_two_part_copies_along_the_belt_using_only_slot_two() {
compare_project_with_native(
"ir3-v2-two-part-copies-along-belt-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-two-part-copies-along-belt-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}

#[test]
fn prints_three_part_copies_across_the_belt_with_one_slot() {
compare_project(
"ir3-v2-three-part-copies-lateral-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-three-part-copies-lateral-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_three_part_copies_across_the_belt_using_only_slot_two() {
compare_project_with_native(
"ir3-v2-three-part-copies-lateral-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-three-part-copies-lateral-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}

#[test]
fn prints_three_part_copies_along_the_belt_with_one_slot() {
compare_project(
"ir3-v2-three-part-copies-along-belt-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-three-part-copies-along-belt-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_three_part_copies_along_the_belt_using_only_slot_two() {
compare_project_with_native(
"ir3-v2-three-part-copies-along-belt-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-three-part-copies-along-belt-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,53 @@ fn prints_multipart_using_last_of_sixty_four_slots_on_stock_ir3_v2() {
);
}

fn uses_only_slot(native: &str, active: usize, configured: usize) {
#[test]
fn prints_three_model_parts_with_one_slot_on_stock_ir3_v2() {
compare_project(
"stock-ir3-v2-multipart-three-parts-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-multipart-three-parts-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_four_model_parts_with_one_slot_on_stock_ir3_v2() {
compare_project(
"stock-ir3-v2-multipart-four-parts-one-slot",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-multipart-four-parts-one-slot.3mf"
)
.to_vec(),
);
}

#[test]
fn prints_three_model_parts_using_only_second_slot_on_stock_ir3_v2() {
compare_project_with_native(
"stock-ir3-v2-multipart-three-parts-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-multipart-three-parts-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}

#[test]
fn prints_four_model_parts_using_only_second_slot_on_stock_ir3_v2() {
compare_project_with_native(
"stock-ir3-v2-multipart-four-parts-two-slots-slot2",
include_bytes!(
"../../../../../../tests/parity/belt-placement/ir3-v2-multipart-four-parts-two-slots-slot2.3mf"
)
.to_vec(),
|native| uses_only_slot(native, 1, 2),
);
}

pub(super) fn uses_only_slot(native: &str, active: usize, configured: usize) {
let tools = native
.lines()
.take_while(|line| *line != "; CONFIG_BLOCK_START")
Expand Down
2 changes: 2 additions & 0 deletions crates/ares-cli/tests/orca_parity/case_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ mod brim_auto_group_clamp;
mod cyclic_toolchange_ordering;
#[path = "fan_mover_custom_fan_state.rs"]
mod fan_mover_custom_fan_state;
#[path = "fan_mover_lead_time_endpoint.rs"]
mod fan_mover_lead_time_endpoint;
#[path = "fast_purge_temperature.rs"]
mod fast_purge_temperature;
#[path = "outer_brim_width_quantization.rs"]
Expand Down
67 changes: 67 additions & 0 deletions crates/ares-cli/tests/orca_parity/fan_mover_lead_time_endpoint.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
use ares_core::GenerationMetadata;

use crate::{OrcaRunner, runner::native_api_cli::NativeCase};

fn compare(project: &[u8], label: &str) {
let Some(runner) = OrcaRunner::from_env().unwrap() else {
return;
};
let case = NativeCase::slice_live(&runner, project, label);
case.compare(GenerationMetadata::default());
}

#[test]
fn end_insertion_follows_linear_move() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/end-window.3mf"),
"fan-mover-lead-time-endpoint-end-window-",
);
}

#[test]
fn end_insertion_follows_rapid_move() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/g0-end-window.3mf"),
"fan-mover-lead-time-endpoint-g0-end-window-",
);
}

#[test]
fn start_insertion_precedes_intact_move() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/start-window.3mf"),
"fan-mover-lead-time-endpoint-start-window-",
);
}

#[test]
fn interior_insertion_splits_linear_move() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/inside-window.3mf"),
"fan-mover-lead-time-endpoint-inside-window-",
);
}

#[test]
fn disabled_timing_preserves_template_order() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/timing-off.3mf"),
"fan-mover-lead-time-endpoint-timing-off-",
);
}

#[test]
fn overhang_only_timing_preserves_template_order() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/overhang-only.3mf"),
"fan-mover-lead-time-endpoint-overhang-only-",
);
}

#[test]
fn lead_time_with_empty_layer_template() {
compare(
include_bytes!("../../../../tests/parity/fan-mover-lead-time-endpoint/empty-template.3mf"),
"fan-mover-lead-time-endpoint-empty-template-",
);
}
3 changes: 3 additions & 0 deletions crates/ares-cli/tests/orca_parity/gcode_regression_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ mod type1_incoming_category_purge_gap;
#[path = "type1_nozzle_depth_spacing.rs"]
mod type1_nozzle_depth_spacing;

#[path = "type1_same_head_skip_points.rs"]
mod type1_same_head_skip_points;

#[path = "type1_zero_area_flat_ironing.rs"]
mod type1_zero_area_flat_ironing;

Expand Down
4 changes: 4 additions & 0 deletions crates/ares-cli/tests/orca_parity/part_source_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use crate::{OrcaRunner, runner::stages};
mod four_part_offsets;
#[path = "part_source_metadata/implicit_offsets.rs"]
mod implicit_offsets;
#[path = "part_source_metadata/mesh_stat_records.rs"]
mod mesh_stat_records;
#[path = "part_source_metadata/multipart_fallback.rs"]
mod multipart_fallback;
#[path = "part_source_metadata/multipart_offsets.rs"]
Expand All @@ -29,6 +31,8 @@ mod three_part_offsets;
mod unsliced_cli;
#[path = "part_source_metadata/volume_metadata_order.rs"]
mod volume_metadata_order;
#[path = "part_source_metadata/volume_type_fallback.rs"]
mod volume_type_fallback;

const FIXTURE: &[u8] = include_bytes!("../../../../tests/parity/seam-paint-spiral/k1-plain.3mf");
const SETTINGS: &str = "Metadata/model_settings.config";
Expand Down
Loading
Loading