die cpID wurde umbenannt.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
+6
-3
@@ -87,24 +87,27 @@ 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"])
|
||||
})
|
||||
})
|
||||
# Write back to TXT file
|
||||
with open(txt_file_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(txt_content, f, indent=2, ensure_ascii=False)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user