die cpID wurde umbenannt.

This commit is contained in:
2025-09-25 13:36:34 +02:00
parent abadf0dea8
commit 51ce51a5a4
68 changed files with 4190 additions and 4161 deletions
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 888.593,
"y": 55.556,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 306.872,
"y": 0.0,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 888.593,
"y": 55.556,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 306.872,
"y": 0.0,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 693.128,
"y": 0.0,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 693.128,
"y": 0.0,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 872.073,
"y": 496.504,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 872.073,
"y": 496.504,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 964.454,
"y": 20.808,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 127.927,
"y": 496.504,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 964.454,
"y": 20.808,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 127.927,
"y": 496.504,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 885.693,
"y": 529.336,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 885.693,
"y": 529.336,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 968.239,
"y": 19.451,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 114.307,
"y": 529.336,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 968.239,
"y": 19.451,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 114.307,
"y": 529.336,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 903.311,
"y": 420.511,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 903.311,
"y": 420.511,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 1000.0,
"y": 33.868,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 96.689,
"y": 420.511,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 1000.0,
"y": 33.868,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 96.689,
"y": 420.511,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 928.979,
"y": 500.849,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 928.979,
"y": 500.849,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 1000.0,
"y": 29.173,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 71.021,
"y": 500.849,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 1000.0,
"y": 29.173,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 71.021,
"y": 500.849,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 805.006,
"y": 519.872,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 805.006,
"y": 519.872,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 923.377,
"y": 0.0,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 194.995,
"y": 519.872,
"z": 0.0,
@@ -31,7 +31,7 @@
"isDimension": true
},
{
"id": "cp2",
"id": "cp3",
"x": 923.377,
"y": 0.0,
"z": 0.0,
@@ -50,7 +50,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 194.995,
"y": 519.872,
"z": 0.0,
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Delta 1400/700 M",
"family": "OFWeiche",
@@ -45,7 +45,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 270.0,
"direction": 270,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -64,7 +64,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 90.0,
"direction": 90,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Doppel 45° 350/700 M",
"family": "OFWeiche",
@@ -45,7 +45,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 315.0,
"direction": 315,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -64,7 +64,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 45.0,
"direction": 45,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Doppel 90° 700/700 M",
"family": "OFWeiche",
@@ -45,7 +45,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 270.0,
"direction": 270,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -64,7 +64,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 90.0,
"direction": 90,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Dreiwege 45° 350/700 M",
"family": "OFWeiche",
@@ -45,7 +45,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 315.0,
"direction": 315,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -64,7 +64,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 45.0,
"direction": 45,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Dreiwege 90° 700/700 M",
"family": "OFWeiche",
@@ -45,7 +45,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 270.0,
"direction": 270,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -64,7 +64,7 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 90.0,
"direction": 90,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Einfach 45° 350/700 links M",
"family": "OFWeiche",
@@ -45,13 +45,13 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 315.0,
"direction": 315,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 872.073,
"y": 496.504,
"z": 0.0,
@@ -1,4 +1,4 @@
{
{
"shapeMode": 0,
"name": "Einfach 90° 700/700 links M",
"family": "OFWeiche",
@@ -45,13 +45,13 @@
"zMin": "",
"zMax": "",
"zStep": "",
"direction": 270.0,
"direction": 270,
"linkClass": "Omniflo",
"label": "",
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 928.979,
"y": 500.849,
"z": 0.0,
@@ -51,7 +51,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 805.006,
"y": 519.872,
"z": 0.0,
@@ -51,7 +51,7 @@
"isDimension": true
},
{
"id": "cp3",
"id": "cp4",
"x": 693.128,
"y": 0.0,
"z": 0.0,
@@ -0,0 +1,30 @@
@echo off
call setenv.bat
setlocal
:: Check if Python is available
where python >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Error: Python is not found in your PATH
pause
exit /b 1
)
echo "[DEBUG] OFBOGEN_PATH: %OFBogen_PATH%"
echo "[DEBUG] PROPS_PATH: %PROPS_PATH%"
echo "[DEBUG] JSON_PATH: %JSON_PATH_OFBogen%"
:: Run the Python script
echo Step1: calculations to standardize the dimensions and add connection points...
python %OFBogen_PATH%\01_props_step1_calculations_to_standardize_the_dimensions_and_add_connection_points.py
echo Step2: update dimensions_and_connection_points_in_props...
python %OFBogen_PATH%\01_props_step2_update_dimensions_and_connection_points_in_props.py
:: Check if Python script succeeded
if %ERRORLEVEL% equ 0 (
echo update dimensions and connection points in props completed successfully
) else (
echo update dimensions and connection points in props failed with error %ERRORLEVEL%
)
pause
@@ -0,0 +1,32 @@
@echo off
call setenv.bat
setlocal
:: Check if Python is available
where python >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo Error: Python is not found in your PATH
pause
exit /b 1
)
:: Run the Python script
echo Running omnfilo TEF Bogen 2D...
echo calculations to standardize the dimensions and add connection points...
echo update dimensions_and_connection_points_in_props...
echo "[DEBUG] TEFBOGEN_PATH: %TEFBOGEN_PATH%"
echo "[DEBUG] PROPS_PATH: %PROPS_PATH%"
echo "[DEBUG] JSON_PATH: %JSON_PATH_TEFBOGEN%"
python %TEFBOGEN_PATH%\01_props_step1_process_TEFBogen_json.py
python %TEFBOGEN_PATH%\01_props_step2_update_props_TEF_Boegen_from_json.py
:: Check if Python script succeeded
if %ERRORLEVEL% equ 0 (
echo update dimensions and connection points in props completed successfully
) else (
echo update dimensions and connection points in props failed with error %ERRORLEVEL%
)
pause
-19
View File
@@ -1,19 +0,0 @@
@echo off
set OFBogen_PATH=%~dp0
set PROPS_PATH=C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props
set JSON_PATH_BOGEN=%OFBogen_PATH%JSON
python 01_props_step1_calculations_to_standardize_the_dimensions_and_add_connection_points.py
python 01_props_step2_update_dimensions_and_connection_points_in_props.py
:: Check if Python script succeeded
if %ERRORLEVEL% equ 0 (
echo update dimensions and connection points in props completed successfully
) else (
echo update dimensions and connection points in props failed with error %ERRORLEVEL%
)
pause
@@ -87,20 +87,23 @@ def process_files(json_file_path, txt_files_dir):
json_cp = json_item["connectionPoints"][i]
# 记录旧值
old_id = cp["id"]
old_x = cp["x"]
old_y = cp["y"]
old_dir = cp["direction"]
# 更新为新值
cp["id"] = json_cp["id"]
cp["x"] = json_cp["x"]
cp["y"] = json_cp["y"]
if json_cp["direction"]==360:
if json_cp["direction"] == 360:
cp["direction"] = 0
else:
cp["direction"] = json_cp["direction"]
# 记录变更
cp_changes.append({
"id": cp["id"],
"id": (old_id, cp["id"]),
"x": (old_x, cp["x"]),
"y": (old_y, cp["y"]),
"direction": (old_dir, cp["direction"])
@@ -1,17 +0,0 @@
@echo off
set TEFBogen_PATH=%~dp0
set PROPS_PATH=C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props
set JSON_PATH_TEFBOGEN=%TEFBogen_PATH%JSON
python 01_props_step1_process_TEFBogen_json.py
python 01_props_step2_update_props_TEF_Boegen_from_json.py
:: Check if Python script succeeded
if %ERRORLEVEL% equ 0 (
echo update dimensions and connection points in props completed successfully
) else (
echo update dimensions and connection points in props failed with error %ERRORLEVEL%
)
pause