按源扩展坐标偏置UVW覆盖
This commit is contained in:
@@ -2970,29 +2970,35 @@ if not any(event["type"] == "program-end" and event["line"] == 5 for event in co
|
||||
l20 = load("cnc_sim_linuxcnc_coordinate_l20.json")
|
||||
if not any(
|
||||
event["type"] == "set-g5x-offset" and
|
||||
event["line"] == 4 and
|
||||
event["line"] == 5 and
|
||||
event["tool"] == 2 and
|
||||
event["start"]["x"] == 4 and
|
||||
event["start"]["y"] == 4 and
|
||||
event["start"]["z"] == 4
|
||||
event["start"]["z"] == 4 and
|
||||
event["start"]["u"] == 4 and
|
||||
event["start"]["v"] == 4 and
|
||||
event["start"]["w"] == 4
|
||||
for event in l20
|
||||
):
|
||||
raise SystemExit("missing G10 L20 P2 offset event after G55 selection")
|
||||
if not any(event["type"] == "program-end" and event["line"] == 5 for event in l20):
|
||||
if not any(event["type"] == "program-end" and event["line"] == 6 for event in l20):
|
||||
raise SystemExit("missing G10 L20 program end line number")
|
||||
|
||||
p0 = load("cnc_sim_linuxcnc_coordinate_p0.json")
|
||||
if not any(
|
||||
event["type"] == "set-g5x-offset" and
|
||||
event["line"] == 3 and
|
||||
event["line"] == 4 and
|
||||
event["tool"] == 2 and
|
||||
event["start"]["x"] == 7 and
|
||||
event["start"]["y"] == 8 and
|
||||
event["start"]["z"] == 9
|
||||
event["start"]["z"] == 9 and
|
||||
event["start"]["u"] == 10 and
|
||||
event["start"]["v"] == 11 and
|
||||
event["start"]["w"] == 12
|
||||
for event in p0
|
||||
):
|
||||
raise SystemExit("missing G10 L2 P0 active G55 offset event")
|
||||
if not any(event["type"] == "program-end" and event["line"] == 4 for event in p0):
|
||||
if not any(event["type"] == "program-end" and event["line"] == 5 for event in p0):
|
||||
raise SystemExit("missing G10 P0 program end line number")
|
||||
|
||||
select_all = load("cnc_sim_linuxcnc_coordinate_select_all.json")
|
||||
@@ -3035,20 +3041,28 @@ if not any(event["type"] == "program-end" and event["line"] == 7 for event in g9
|
||||
|
||||
g52_offset = load("cnc_sim_linuxcnc_g52_offset.json")
|
||||
g52_states = [
|
||||
(event["line"], event["start"]["x"], event["start"]["y"], event["start"]["z"])
|
||||
(
|
||||
event["line"],
|
||||
event["start"]["x"],
|
||||
event["start"]["y"],
|
||||
event["start"]["z"],
|
||||
event["start"]["u"],
|
||||
event["start"]["v"],
|
||||
event["start"]["w"],
|
||||
)
|
||||
for event in g52_offset
|
||||
if event["type"] == "set-g92-offset" and event["line"] > 0
|
||||
]
|
||||
expected_g52_states = [
|
||||
(2, 1, 2, 0),
|
||||
(3, 1, 3, 0),
|
||||
(4, 0, 0, 0),
|
||||
(5, 1, 3, 0),
|
||||
(6, 0, 0, 0),
|
||||
(3, 1, 2, 0, 4, 5, 0),
|
||||
(4, 1, 3, 0, 4, 6, 0),
|
||||
(5, 0, 0, 0, 0, 0, 0),
|
||||
(6, 1, 3, 0, 4, 6, 0),
|
||||
(7, 0, 0, 0, 0, 0, 0),
|
||||
]
|
||||
if g52_states != expected_g52_states:
|
||||
raise SystemExit(f"unexpected G52 shared offset sequence: {g52_states!r}")
|
||||
if not any(event["type"] == "program-end" and event["line"] == 7 for event in g52_offset):
|
||||
if not any(event["type"] == "program-end" and event["line"] == 8 for event in g52_offset):
|
||||
raise SystemExit("missing G52 offset program end line number")
|
||||
|
||||
g52_xz_nurbs = load("cnc_sim_linuxcnc_g52_xz_nurbs.json")
|
||||
|
||||
Reference in New Issue
Block a user