Neue Positionen für die Kreisel im Test festgelegt. Weniger Überlappungen und leichter durch einen Blick von oben und der seite zu prüfen.

This commit is contained in:
2026-06-19 21:06:02 +02:00
parent 8d32102531
commit 2d6cb788cf
2 changed files with 66 additions and 69 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ class TestKreiselGeometry:
"""Anzahl KR_-Bloecke muss Testfall-Anzahl entsprechen."""
msp = kreisel_dxf.modelspace()
kr_inserts = [e for e in msp if e.dxftype() == "INSERT"
and e.dxf.name.startswith("KR_")]
and e.dxf.name.startswith("KREISEL_")]
expected_count = len(kreisel_testdata)
assert len(kr_inserts) >= expected_count, \
f"Erwartet mind. {expected_count} KR_-Bloecke, gefunden: {len(kr_inserts)}"
@@ -88,7 +88,7 @@ class TestKreiselGeometry:
def test_circle_radius(self, kreisel_dxf):
"""AN8/SP8 Kreise in KR_-Bloecken muessen Radius 400mm haben."""
for block in kreisel_dxf.blocks:
if not block.name.startswith("KR_"):
if not block.name.startswith("KREISEL_"):
continue
circles = [e for e in block if e.dxftype() == "CIRCLE"]
for c in circles:
+64 -67
View File
@@ -1,50 +1,37 @@
[
{
"id": "KR_Insert_Horiz_ObenUnten",
"id": "KR_Kreuz_Q1_0Grad",
"function": "insert",
"x": 500,
"y": 5000,
"y": 500,
"z": 2500,
"abstand": 4200,
"rotation": 270.0,
"abstand": 2000,
"rotation": 0.0,
"typ": "STANDARD",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2500",
"expect_kreiselart": "STANDARD"
},
{
"id": "KR_Insert_Horiz_UntenOben",
"id": "KR_Kreuz_Q2_90Grad",
"function": "insert",
"x": 1500,
"y": 0,
"z": 2500,
"abstand": 4200,
"rotation": 90.0,
"typ": "PIN",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2500",
"expect_kreiselart": "PIN"
},
{
"id": "KR_Insert_Vert_LinksRechts",
"function": "insert",
"x": 0,
"x": -500,
"y": 500,
"z": 2500,
"abstand": 4200,
"rotation": 0.0,
"typ": "PIN",
"abstand": 3000,
"rotation": 90.0,
"typ": "STANDARD",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2500",
"expect_kreiselart": "PIN"
"expect_kreiselart": "STANDARD"
},
{
"id": "KR_Insert_Vert_RechtsLinks",
"id": "KR_Kreuz_Q3_180Grad",
"function": "insert",
"x": 5000,
"y": 1500,
"x": -500,
"y": -500,
"z": 2500,
"abstand": 4200,
"abstand": 4000,
"rotation": 180.0,
"typ": "STANDARD",
"expect_block_prefix": "KREISEL_",
@@ -52,58 +39,68 @@
"expect_kreiselart": "STANDARD"
},
{
"id": "KR_Insert_Schraeg",
"id": "KR_Kreuz_Q4_270Grad",
"function": "insert",
"x": 3000,
"y": 3000,
"z": 2000,
"abstand": 6000,
"rotation": 10.0,
"typ": "PIN",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2000",
"expect_kreiselart": "PIN"
},
{
"id": "KR_Connect_Horizontal",
"function": "connect",
"start_x": 0,
"start_y": 10000,
"start_z": 2500,
"end_x": 5800,
"end_y": 10000,
"end_z": 2500,
"x": 500,
"y": -500,
"z": 2500,
"abstand": 5000,
"rotation": 270.0,
"typ": "STANDARD",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2500",
"expect_kreiselart": "STANDARD"
},
{
"id": "KR_Connect_Vertikal",
"function": "connect",
"start_x": 8000,
"start_y": 0,
"start_z": 3000,
"end_x": 8000,
"end_y": 6000,
"end_z": 3000,
"typ": "PIN",
"id": "KR_Schraeg_Q1_30Grad",
"function": "insert",
"x": 3000,
"y": 3000,
"z": 3000,
"abstand": 3000,
"rotation": 30.0,
"typ": "STANDARD",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "3000",
"expect_kreiselart": "STANDARD"
},
{
"id": "KR_Pin_Q1_0Grad",
"function": "insert",
"x": 500,
"y": 6000,
"z": 1500,
"abstand": 3000,
"rotation": 0.0,
"typ": "PIN",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "1500",
"expect_kreiselart": "PIN"
},
{
"id": "KR_Connect_Schraeg_45",
"function": "connect",
"start_x": 10000,
"start_y": 0,
"start_z": 2000,
"end_x": 14000,
"end_y": 4000,
"end_z": 2000,
"typ": "STANDARD",
"id": "KR_Pin_Q1_90Grad",
"function": "insert",
"x": -500,
"y": 6500,
"z": 1500,
"abstand": 4000,
"rotation": 90.0,
"typ": "PIN",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "2000",
"expect_kreiselart": "STANDARD"
"expect_hoehe": "1500",
"expect_kreiselart": "PIN"
},
{
"id": "KR_Pin_Q1_30Grad_Schraeg",
"function": "insert",
"x": 3000,
"y": 8000,
"z": 1500,
"abstand": 3000,
"rotation": 30.0,
"typ": "PIN",
"expect_block_prefix": "KREISEL_",
"expect_hoehe": "1500",
"expect_kreiselart": "PIN"
}
]