Die Code zur automatischen Erzeungung der SVG für OFWeiche wurde funitoniert.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
@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 weichen 2D...
|
||||
echo calculations to standardize the dimensions and add connection points...
|
||||
echo update dimensions_and_connection_points_in_props...
|
||||
|
||||
echo "[DEBUG] OFWeiche_PATH: %OFWeiche_PATH%"
|
||||
echo "[DEBUG] PROPS_PATH: %PROPS_PATH%"
|
||||
echo "[DEBUG] JSON_PATH: %JSON_PATH%"
|
||||
|
||||
python %OFWeiche_PATH%\01_props_step1_omniflo_weichen.py
|
||||
python %OFWeiche_PATH%\01_props_step2_calculations_to_standardize_the_dimensions_and_add_connection_points.py
|
||||
python %OFWeiche_PATH%\01_props_step3_update_dimensions_and_connection_points_in_props.py
|
||||
|
||||
pause
|
||||
+7
-3
@@ -34,10 +34,14 @@ if %ERRORLEVEL% equ 2 set "arg=--tefbogen"
|
||||
if %ERRORLEVEL% equ 3 set "arg=--weichen"
|
||||
if %ERRORLEVEL% equ 4 set "arg=--tefweichen"
|
||||
|
||||
|
||||
REM Execute Python script with selected argument
|
||||
python %RD_CONF_LIB%\3_svg_optimizer_Step1.py %*
|
||||
python %RD_CONF_LIB%\3_svg_scaler_Step2.py %*
|
||||
python %RD_CONF_LIB%\3_svg_scaler_Step3.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step1_convert_polylines_to_lines.py %arg%
|
||||
python %OFWeiche_PATH%\02_svg_step2_find_and_mark_auxiliary_lines.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step3_scaler.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step4_format_optimization.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step5_automatic_svg_generation_for_P_switches.py %*
|
||||
|
||||
REM Check execution status
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo SVG optimization completed successfully!
|
||||
+5
-3
@@ -13,9 +13,11 @@ if %ERRORLEVEL% neq 0 (
|
||||
|
||||
:: Run the Python script
|
||||
echo Running SVG optimizer...
|
||||
python %RD_CONF_LIB%\3_svg_optimizer_Step1.py %*
|
||||
python %RD_CONF_LIB%\3_svg_scaler_Step2.py %*
|
||||
python %RD_CONF_LIB%\3_svg_scaler_Step3.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step1_convert_polylines_to_lines.py %arg%
|
||||
python %OFWeiche_PATH%\02_svg_step2_find_and_mark_auxiliary_lines.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step3_scaler.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step4_format_optimization.py %*
|
||||
python %OFWeiche_PATH%\02_svg_step5_automatic_svg_generation_for_P_switches.py %*
|
||||
:: Check if Python script succeeded
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo SVG optimization completed successfully
|
||||
@@ -0,0 +1,23 @@
|
||||
@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 convert svgs to xml and update xml path in Props...
|
||||
|
||||
echo "[DEBUG] OFWeiche_PATH: %OFWeiche_PATH%"
|
||||
echo "[DEBUG] PROPS_PATH: %PROPS_PATH%"
|
||||
echo "[DEBUG] SVG_PATH: %SVG_PATH%"
|
||||
echo "[DEBUG] RD_CONF_OUTPUT: %RD_CONF_OUTPUT%"
|
||||
|
||||
python %OFWeiche_PATH%\03_convert_svgs_to_xml_and_update_xml_path_in_props.py
|
||||
|
||||
pause
|
||||
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
echo Copy operation:
|
||||
echo Source folder: C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG
|
||||
echo Destination folder: C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\Editor2DLibrary\SSG
|
||||
echo/
|
||||
choice /c YN /m "Confirm overwrite? (Y/N)"
|
||||
if errorlevel 2 exit /b
|
||||
|
||||
robocopy "C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG" "C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\Editor2DLibrary\SSG" /E /COPY:DAT /IS /NP
|
||||
echo Operation complete!
|
||||
pause
|
||||
@@ -6,10 +6,17 @@ set RD_CONF=%cd%
|
||||
set RD_CONF_BIN=%RD_CONF%\bin
|
||||
set RD_CONF_CFG=%RD_CONF%\cfg
|
||||
set RD_CONF_WORK=%RD_CONF%\work
|
||||
set RD_CONF_OUTPUT=%RD_CONF%\Weichen\outputdir
|
||||
set RD_CONF_OUTPUT_OFWEICHEN=%RD_CONF%\Weichen\outputdir
|
||||
set RD_CONF_LIB=%RD_CONF%\lib
|
||||
|
||||
|
||||
|
||||
set "OFWeiche_PATH=%RD_CONF%\lib\OFWeiche"
|
||||
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 RD_CONF_BOGEN=%RD_CONF%\Bogen
|
||||
set RD_CONF_TEFBOGEN=%RD_CONF%\TEFBogen
|
||||
set RD_CONF_WEICHEN=%RD_CONF%\Weichen\neu_original_backup
|
||||
|
||||
Reference in New Issue
Block a user