CPs für Dreiwegeweichen und 180°Bogen sind angepasst.

This commit is contained in:
2025-09-17 10:11:50 +02:00
parent c5dafdae75
commit 64858e8a50
25 changed files with 483 additions and 465 deletions
+3 -1
View File
@@ -12,9 +12,11 @@ set RD_CONF_LIB=%RD_CONF%\lib
set "OFWeiche_PATH=%RD_CONF%\lib\OFWeiche"
set "TEFWeiche_PATH=%RD_CONF%\lib\TEFWeiche"
set "PROPS_PATH=C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props"
set "SVG_PATH=C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\svg"
set "JSON_PATH=%OFWeiche_PATH%\json"
set "JSON_PATH_OFWEICHE=%OFWeiche_PATH%\json"
set "JSON_PATH_TEFWEICHE=%TEFWeiche_PATH%\json"
set RD_CONF_BOGEN=%RD_CONF%\Bogen
@@ -195,7 +195,7 @@
"Winkel":180,
"center_line_width_mm": 800,
"center_line_height_mm": 1300,
"Objekt_width_mm":821.040,
"Objekt_width_mm":800,
"Objekt_height_mm":1342.080
},
{
@@ -236,9 +236,9 @@
"Winkel": 180.0,
"center_line_width_mm": 800.0,
"center_line_height_mm": 1300.0,
"Objekt_width_mm": 821.04,
"Objekt_width_mm": 800,
"Objekt_height_mm": 1342.08,
"calculated_objekt_width_mm": 821.04,
"calculated_objekt_width_mm": 800,
"calculated_objekt_height_mm": 1342.08
},
{
@@ -635,14 +635,14 @@
"Winkel": 180.0,
"center_line_width_mm": 800.0,
"center_line_height_mm": 1300.0,
"Objekt_width_mm": 821.04,
"Objekt_width_mm": 800,
"Objekt_height_mm": 1342.08,
"calculated_objekt_width_mm": 821.04,
"calculated_objekt_width_mm": 800,
"calculated_objekt_height_mm": 1342.08,
"Objekt_width_px": 3103.121,
"Objekt_width_px": 3023.5998,
"Objekt_height_px": 5072.391,
"calculated_SVG_height_px": 1000,
"calculated_SVG_width_px": 613.657,
"calculated_SVG_width_px": 596.0897,
"scale_factor": 0.7451121,
"connectionPoints": [
{
@@ -507,7 +507,7 @@ def process_sternweiche_items(data):
for field in fields_to_copy:
similar[field] = item[field]
if __name__ == "__main__":
json_path = os.environ.get("JSON_PATH", "JSON")
json_path = os.environ.get("JSON_PATH_OFWEICHE", "JSON")
input_filename = os.path.join(json_path, "omniflo_weichen.json")
modify_json_values(input_filename)
@@ -88,7 +88,7 @@ def process_json_file(input_file, output_file):
# CP4 exists for Dreiwegeweiche
cp4_x = round(item["OFWeiche_CP4_x_mm"] * scale*scale_RD_W, 3)
cp4_y = round(item["OFWeiche_CP4_y_mm"] * scale*scale_RD_H, 3)
cp4_dir = 90.0
cp4_dir = 0.0
connection_points.append({
"id": "cp4",
@@ -142,7 +142,7 @@ def process_json_file(input_file, output_file):
json.dump(data, f, indent=2, ensure_ascii=False)
if __name__ == "__main__":
json_path = os.environ.get("JSON_PATH", "JSON")
json_path = os.environ.get("JSON_PATH_OFWEICHE", "JSON")
input_filename = os.path.join(json_path, "omniflo_weichen.json")
output_filename = os.path.join(json_path, "omniflo_weichen_output.json")
@@ -183,7 +183,7 @@ def process_files(json_file_path, txt_files_dir):
f.write("\n".join(report_content))
if __name__ == "__main__":
json_path = os.environ.get("JSON_PATH", "JSON")
json_path = os.environ.get("JSON_PATH_OFWEICHE", "JSON")
json_file_path = os.path.join(json_path, "omniflo_weichen_output.json")
# txt_files_dir = r"C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props"
@@ -108,7 +108,7 @@ def process_svg_files(svg_folder, json_file_path):
if __name__ == "__main__":
# Configure paths (update these with your actual paths)
svg_folder = os.environ.get('RD_CONF_OUTPUT_OFWEICHEN')
json_path = os.environ.get("JSON_PATH", "JSON")
json_path = os.environ.get("JSON_PATH_OFWEICHE", "JSON")
input_filename = os.path.join(json_path, "omniflo_weichen_output.json")
process_svg_files(svg_folder, input_filename)
print("Processing complete")
@@ -2847,7 +2847,7 @@
"id": "cp2",
"x": 47.592,
"y": 0.0,
"direction": 360
"direction": 0
},
{
"id": "cp3",
@@ -2901,7 +2901,7 @@
"id": "cp2",
"x": 47.592,
"y": 0.0,
"direction": 360
"direction": 0
},
{
"id": "cp3",
@@ -2955,7 +2955,7 @@
"id": "cp2",
"x": 47.592,
"y": 0.0,
"direction": 360
"direction": 0
},
{
"id": "cp3",