From bbd5739e7a6f11a9dca1c82a7e9d3d2b83cbf652 Mon Sep 17 00:00:00 2001 From: cnc Date: Wed, 3 Jun 2026 09:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=9A=E8=A1=A5=20polar=20=E5=92=8C=20NURBS=20sourc?= =?UTF-8?q?e=20=E8=A6=86=E7=9B=96=EF=BC=8C=E6=B5=8B=E8=AF=95=E9=80=9A?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-linuxcnc-rs274-native.sh | 5 +++++ test-linuxcnc-source-link.sh | 5 +++++ .../gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc | 4 ++++ tests/gcode/linuxcnc_g52_noninteger_l_error.ngc | 3 +++ tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc | 6 ++++++ tests/gcode/linuxcnc_polar_g28_error.ngc | 2 ++ tests/gcode/linuxcnc_polar_g30_error.ngc | 2 ++ 7 files changed, 27 insertions(+) create mode 100644 tests/gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc create mode 100644 tests/gcode/linuxcnc_g52_noninteger_l_error.ngc create mode 100644 tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc create mode 100644 tests/gcode/linuxcnc_polar_g28_error.ngc create mode 100644 tests/gcode/linuxcnc_polar_g30_error.ngc diff --git a/test-linuxcnc-rs274-native.sh b/test-linuxcnc-rs274-native.sh index b37be15..2dd9b40 100755 --- a/test-linuxcnc-rs274-native.sh +++ b/test-linuxcnc-rs274-native.sh @@ -621,6 +621,8 @@ polar_coordinate_error_cases=( "linuxcnc_polar_with_x_error|Cannot specify both polar coordinate and X word" "linuxcnc_polar_with_y_error|Cannot specify both polar coordinate and Y word" "linuxcnc_polar_g92_error|Polar coordinates can only be used for motion" + "linuxcnc_polar_g28_error|Polar coordinates can only be used for motion" + "linuxcnc_polar_g30_error|Polar coordinates can only be used for motion" "linuxcnc_polar_g53_error|Cannot use polar coordinates with G53" "linuxcnc_polar_radius_origin_error|Must specify angle in polar coordinate if at the origin" "linuxcnc_polar_incremental_radius_origin_error|Incremental motion with polar coordinates is indeterminate when at the origin" @@ -971,9 +973,12 @@ nurbs_error_cases=( "linuxcnc_g52_missing_y_control_point_error|You must specify both X and Y coordinates for Control Points" "linuxcnc_g52_p_without_xy_after_start_error|Can specify P without X and Y only for the first control point" "linuxcnc_g52_nonpositive_p_error|Must specify positive weight P for every Control Point" + "linuxcnc_g52_missing_subsequent_weight_error|Must specify positive weight P for every Control Point" + "linuxcnc_g52_noninteger_l_error|Non integer value for integer" "linuxcnc_g52_zero_feed_error|Cannot make a NURBS with 0 feedrate" "linuxcnc_g53_without_g52_error|Cannot use G5.3 without G5.2 first" "linuxcnc_g53_short_control_points_error|You must specify a number of control points at least equal to the order L = 3" + "linuxcnc_g53_after_intervening_motion_error|Cannot use G5.3 without G5.2 first" "linuxcnc_g62_missing_p_order_error|Program the nurbs order P in the first block of instruction" "linuxcnc_g62_p_non_integer_error|nurbs order P number is not an integer" "linuxcnc_g62_missing_q_mode_error|Program the nurbs Q value (1,2,3) in the first block of nurbs instruction" diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index 46eea60..aff4e8a 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -611,6 +611,8 @@ polar_coordinate_error_cases=( "linuxcnc_polar_with_x_error|Cannot specify both polar coordinate and X word" "linuxcnc_polar_with_y_error|Cannot specify both polar coordinate and Y word" "linuxcnc_polar_g92_error|Polar coordinates can only be used for motion" + "linuxcnc_polar_g28_error|Polar coordinates can only be used for motion" + "linuxcnc_polar_g30_error|Polar coordinates can only be used for motion" "linuxcnc_polar_g53_error|Cannot use polar coordinates with G53" "linuxcnc_polar_radius_origin_error|Must specify angle in polar coordinate if at the origin" "linuxcnc_polar_incremental_radius_origin_error|Incremental motion with polar coordinates is indeterminate when at the origin" @@ -1463,9 +1465,12 @@ nurbs_error_cases=( "linuxcnc_g52_missing_y_control_point_error|You must specify both X and Y coordinates for Control Points" "linuxcnc_g52_p_without_xy_after_start_error|Can specify P without X and Y only for the first control point" "linuxcnc_g52_nonpositive_p_error|Must specify positive weight P for every Control Point" + "linuxcnc_g52_missing_subsequent_weight_error|Must specify positive weight P for every Control Point" + "linuxcnc_g52_noninteger_l_error|Non integer value for integer" "linuxcnc_g52_zero_feed_error|Cannot make a NURBS with 0 feedrate" "linuxcnc_g53_without_g52_error|Cannot use G5.3 without G5.2 first" "linuxcnc_g53_short_control_points_error|You must specify a number of control points at least equal to the order L = 3" + "linuxcnc_g53_after_intervening_motion_error|Cannot use G5.3 without G5.2 first" "linuxcnc_g62_missing_p_order_error|Program the nurbs order P in the first block of instruction" "linuxcnc_g62_p_non_integer_error|nurbs order P number is not an integer" "linuxcnc_g62_missing_q_mode_error|Program the nurbs Q value (1,2,3) in the first block of nurbs instruction" diff --git a/tests/gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc b/tests/gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc new file mode 100644 index 0000000..229af3c --- /dev/null +++ b/tests/gcode/linuxcnc_g52_missing_subsequent_weight_error.ngc @@ -0,0 +1,4 @@ +G21 G90 G17 +F100 +G5.2 X1 Y1 P1 +G5.2 X2 Y2 diff --git a/tests/gcode/linuxcnc_g52_noninteger_l_error.ngc b/tests/gcode/linuxcnc_g52_noninteger_l_error.ngc new file mode 100644 index 0000000..b06e921 --- /dev/null +++ b/tests/gcode/linuxcnc_g52_noninteger_l_error.ngc @@ -0,0 +1,3 @@ +G21 G90 G17 +F100 +G5.2 X1 Y1 P1 L1.9999 diff --git a/tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc b/tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc new file mode 100644 index 0000000..d9ac058 --- /dev/null +++ b/tests/gcode/linuxcnc_g53_after_intervening_motion_error.ngc @@ -0,0 +1,6 @@ +G21 G90 G17 +F100 +G5.2 X1 Y1 P1 +G5.2 X2 Y2 P1 +G1 X3 +G5.3 diff --git a/tests/gcode/linuxcnc_polar_g28_error.ngc b/tests/gcode/linuxcnc_polar_g28_error.ngc new file mode 100644 index 0000000..b340ce4 --- /dev/null +++ b/tests/gcode/linuxcnc_polar_g28_error.ngc @@ -0,0 +1,2 @@ +G21 G90 G17 +G28 @1 ^90 diff --git a/tests/gcode/linuxcnc_polar_g30_error.ngc b/tests/gcode/linuxcnc_polar_g30_error.ngc new file mode 100644 index 0000000..fed4be3 --- /dev/null +++ b/tests/gcode/linuxcnc_polar_g30_error.ngc @@ -0,0 +1,2 @@ +G21 G90 G17 +G30 @1 ^90