einige Fehler für cps wurden korrigiert.
This commit is contained in:
@@ -217,7 +217,7 @@ def process_doppelweiche_items(data, BogenProfileWidth, WeichenGerade):
|
||||
item["OFWeiche_CP1_y_mm"] = round(item["Objekt_height_mm"], 4)
|
||||
item["OFWeiche_CP2_x_mm"] = round(round(BogenProfileWidth/2,7) * cos_value, 4)
|
||||
if item["KurvenWinkel"] == 22.5:
|
||||
item["OFWeiche_CP2_y_mm"] =20
|
||||
item["OFWeiche_CP2_y_mm"] =round(round(BogenProfileWidth/2,7) * sin_value, 4)
|
||||
else:
|
||||
item["OFWeiche_CP2_y_mm"] = round(round(BogenProfileWidth/2,7) * sin_value, 4)
|
||||
item["OFWeiche_CP3_x_mm"] = round(round(BogenProfileWidth/2,7) * cos_value + item["OFWeiche_center_line_width_mm"], 4)
|
||||
|
||||
+2
-2
@@ -237,8 +237,8 @@ def process_json_file(input_file, output_file):
|
||||
cp4_y = round(item["OFWeiche_CP4_y_mm"] * scale*scale_RD_H, 3)
|
||||
|
||||
cp1_dir = 180
|
||||
cp2_dir = round(360 - kurven_winkel, 1)
|
||||
cp3_dir = round(kurven_winkel, 1)
|
||||
cp2_dir = 270
|
||||
cp3_dir = 90
|
||||
cp4_dir = 0
|
||||
|
||||
connection_points.extend([
|
||||
|
||||
@@ -69,8 +69,8 @@ def process_lr_file(filepath, filename, stats):
|
||||
# Print all straight paths
|
||||
print("\n 🔍 All straight path details:")
|
||||
for line in straight_lines:
|
||||
print(f" Path{line['index']}: ({line['p1'][0]:.2f},{line['p1'][1]:.2f})→"
|
||||
f"({line['p2'][0]:.2f},{line['p2'][1]:.2f}) length={line['length']:.4f}mm")
|
||||
print(f" Path{line['index']}: ({line['p1'][0]:.3f},{line['p1'][1]:.3f})→"
|
||||
f"({line['p2'][0]:.3f},{line['p2'][1]:.3f}) length={line['length']:.4f}mm")
|
||||
|
||||
# Group by length
|
||||
length_groups = group_lines_by_length(straight_lines)
|
||||
@@ -81,8 +81,8 @@ def process_lr_file(filepath, filename, stats):
|
||||
for group in perfect_pairs:
|
||||
print(f" ┌ Length group ({group[0]['length']:.4f}mm, 2 paths)")
|
||||
for line in group:
|
||||
print(f" │ Path{line['index']}: ({line['p1'][0]:.2f},{line['p1'][1]:.2f})→"
|
||||
f"({line['p2'][0]:.2f},{line['p2'][1]:.2f})")
|
||||
print(f" │ Path{line['index']}: ({line['p1'][0]:.3f},{line['p1'][1]:.3f})→"
|
||||
f"({line['p2'][0]:.3f},{line['p2'][1]:.3f})")
|
||||
print(" └" + "─" * 40)
|
||||
|
||||
if len(perfect_pairs) == 1:
|
||||
@@ -130,8 +130,8 @@ def process_delta_file(filepath, filename, stats):
|
||||
# Print all straight paths
|
||||
print("\n 🔍 All straight path details:")
|
||||
for line in straight_lines:
|
||||
print(f" Path{line['index']}: ({line['p1'][0]:.2f},{line['p1'][1]:.2f})→"
|
||||
f"({line['p2'][0]:.2f},{line['p2'][1]:.2f}) length={line['length']:.4f}mm")
|
||||
print(f" Path{line['index']}: ({line['p1'][0]:.3f},{line['p1'][1]:.3f})→"
|
||||
f"({line['p2'][0]:.3f},{line['p2'][1]:.3f}) length={line['length']:.4f}mm")
|
||||
|
||||
# Group by length
|
||||
length_groups = group_lines_by_length(straight_lines)
|
||||
@@ -142,8 +142,8 @@ def process_delta_file(filepath, filename, stats):
|
||||
for group in perfect_triples:
|
||||
print(f" ┌ Length group ({group[0]['length']:.4f}mm, 3 paths)")
|
||||
for line in group:
|
||||
print(f" │ Path{line['index']}: ({line['p1'][0]:.2f},{line['p1'][1]:.2f})→"
|
||||
f"({line['p2'][0]:.2f},{line['p2'][1]:.2f})")
|
||||
print(f" │ Path{line['index']}: ({line['p1'][0]:.3f},{line['p1'][1]:.3f})→"
|
||||
f"({line['p2'][0]:.3f},{line['p2'][1]:.3f})")
|
||||
print(" └" + "─" * 40)
|
||||
|
||||
if len(perfect_triples) == 1:
|
||||
@@ -202,8 +202,8 @@ def find_straight_lines(root):
|
||||
'index': i,
|
||||
'element': path,
|
||||
'length': round(length, 4), # Keep 4 decimal places
|
||||
'p1': (round(p1[0], 2), round(p1[1], 2)), # Coordinates rounded to 2 decimals
|
||||
'p2': (round(p2[0], 2), round(p2[1], 2))
|
||||
'p1': (round(p1[0], 3), round(p1[1], 3)), # Coordinates rounded to 2 decimals
|
||||
'p2': (round(p2[0], 3), round(p2[1], 3))
|
||||
})
|
||||
return lines
|
||||
|
||||
|
||||
@@ -1203,9 +1203,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20
|
||||
"OFWeiche_CP3_y_mm": 8.0517
|
||||
},
|
||||
{
|
||||
"Sivasnr": "OFWeichenkoerperDoppel",
|
||||
@@ -1222,9 +1222,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20
|
||||
"OFWeiche_CP3_y_mm": 8.0517
|
||||
},
|
||||
{
|
||||
"Sivasnr": 834342101,
|
||||
@@ -1241,9 +1241,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20
|
||||
"OFWeiche_CP3_y_mm": 8.0517
|
||||
},
|
||||
{
|
||||
"Sivasnr": 834342200,
|
||||
|
||||
@@ -2625,13 +2625,13 @@
|
||||
"id": "cp2",
|
||||
"x": 0.0,
|
||||
"y": 500.0,
|
||||
"direction": 360
|
||||
"direction": 270
|
||||
},
|
||||
{
|
||||
"id": "cp3",
|
||||
"x": 1000.0,
|
||||
"y": 500.0,
|
||||
"direction": 0
|
||||
"direction": 90
|
||||
},
|
||||
{
|
||||
"id": "cp4",
|
||||
@@ -2679,13 +2679,13 @@
|
||||
"id": "cp2",
|
||||
"x": 0.0,
|
||||
"y": 500.0,
|
||||
"direction": 360
|
||||
"direction": 270
|
||||
},
|
||||
{
|
||||
"id": "cp3",
|
||||
"x": 1000.0,
|
||||
"y": 500.0,
|
||||
"direction": 0
|
||||
"direction": 90
|
||||
},
|
||||
{
|
||||
"id": "cp4",
|
||||
@@ -2940,9 +2940,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20,
|
||||
"OFWeiche_CP3_y_mm": 8.0517,
|
||||
"Objekt_width_px": 914.1804,
|
||||
"Objekt_height_px": 1315.471,
|
||||
"calculated_SVG_width_px": 694.9453257,
|
||||
@@ -2960,13 +2960,13 @@
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 80.365,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 337.5
|
||||
},
|
||||
{
|
||||
"id": "cp3",
|
||||
"x": 919.635,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 22.5
|
||||
}
|
||||
]
|
||||
@@ -2986,9 +2986,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20,
|
||||
"OFWeiche_CP3_y_mm": 8.0517,
|
||||
"Objekt_width_px": 914.1804,
|
||||
"Objekt_height_px": 1315.471,
|
||||
"calculated_SVG_width_px": 694.9453257,
|
||||
@@ -3006,13 +3006,13 @@
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 80.365,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 337.5
|
||||
},
|
||||
{
|
||||
"id": "cp3",
|
||||
"x": 919.635,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 22.5
|
||||
}
|
||||
]
|
||||
@@ -3032,9 +3032,9 @@
|
||||
"OFWeiche_CP1_x_mm": 120.9385,
|
||||
"OFWeiche_CP1_y_mm": 348.0517,
|
||||
"OFWeiche_CP2_x_mm": 19.4385,
|
||||
"OFWeiche_CP2_y_mm": 20,
|
||||
"OFWeiche_CP2_y_mm": 8.0517,
|
||||
"OFWeiche_CP3_x_mm": 222.4385,
|
||||
"OFWeiche_CP3_y_mm": 20,
|
||||
"OFWeiche_CP3_y_mm": 8.0517,
|
||||
"Objekt_width_px": 914.1804,
|
||||
"Objekt_height_px": 1315.471,
|
||||
"calculated_SVG_width_px": 694.9453257,
|
||||
@@ -3052,13 +3052,13 @@
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 80.365,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 337.5
|
||||
},
|
||||
{
|
||||
"id": "cp3",
|
||||
"x": 919.635,
|
||||
"y": 57.463,
|
||||
"y": 23.134,
|
||||
"direction": 22.5
|
||||
}
|
||||
]
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"TEFWeiche_center_line_height_mm": 722.5864,
|
||||
"OFWeiche_CP1_x_mm": 442.8527,
|
||||
"OFWeiche_CP1_y_mm": 715.0010,
|
||||
"OFWeiche_CP2_x_mm": 92.8502,
|
||||
"OFWeiche_CP2_x_mm": 92.7237,
|
||||
"OFWeiche_CP2_y_mm": 14.8776,
|
||||
"OFWeiche_CP4_x_mm": 442.8527,
|
||||
"OFWeiche_CP4_y_mm": 355.0010,
|
||||
@@ -65,7 +65,7 @@
|
||||
"OFWeiche_CP1_y_mm": 764.8776,
|
||||
"OFWeiche_CP2_x_mm": 39.0827,
|
||||
"OFWeiche_CP2_y_mm": 14.8776,
|
||||
"OFWeiche_CP4_x_mm": 439.8627,
|
||||
"OFWeiche_CP4_x_mm": 439.0827,
|
||||
"OFWeiche_CP4_y_mm": 404.8776,
|
||||
"TEFWeiche_CPL1_x_mm": 339.0727,
|
||||
"TEFWeiche_CPL1_y_mm": 903.9492,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"TEFWeiche_center_line_height_mm": 722.5864,
|
||||
"OFWeiche_CP1_x_mm": 442.8527,
|
||||
"OFWeiche_CP1_y_mm": 715.001,
|
||||
"OFWeiche_CP2_x_mm": 92.8502,
|
||||
"OFWeiche_CP2_x_mm": 92.7237,
|
||||
"OFWeiche_CP2_y_mm": 14.8776,
|
||||
"OFWeiche_CP4_x_mm": 442.8527,
|
||||
"OFWeiche_CP4_y_mm": 355.001,
|
||||
@@ -40,7 +40,7 @@
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 187.049,
|
||||
"x": 186.794,
|
||||
"y": 17.334,
|
||||
"direction": 315,
|
||||
"linkClass": "Omniflo"
|
||||
@@ -153,7 +153,7 @@
|
||||
"OFWeiche_CP1_y_mm": 764.8776,
|
||||
"OFWeiche_CP2_x_mm": 39.0827,
|
||||
"OFWeiche_CP2_y_mm": 14.8776,
|
||||
"OFWeiche_CP4_x_mm": 439.8627,
|
||||
"OFWeiche_CP4_x_mm": 439.0827,
|
||||
"OFWeiche_CP4_y_mm": 404.8776,
|
||||
"TEFWeiche_CPL1_x_mm": 339.0727,
|
||||
"TEFWeiche_CPL1_y_mm": 903.9492,
|
||||
@@ -185,7 +185,7 @@
|
||||
},
|
||||
{
|
||||
"id": "cp4",
|
||||
"x": 892.894,
|
||||
"x": 891.31,
|
||||
"y": 447.899,
|
||||
"direction": 0,
|
||||
"linkClass": "Omniflo"
|
||||
|
||||
Reference in New Issue
Block a user