diff --git a/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1400_700_M_834372400.dwg b/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1400_700_M_834372400.dwg index 344e7a5..9dd6ba8 100644 Binary files a/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1400_700_M_834372400.dwg and b/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1400_700_M_834372400.dwg differ diff --git a/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1600_800_M_834372403.dwg b/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1600_800_M_834372403.dwg index 5b1a1e5..f3b6579 100644 Binary files a/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1600_800_M_834372403.dwg and b/CAD/OmnifloCAD/DeltaWeiche/DeltaWeiche_1600_800_M_834372403.dwg differ diff --git a/Editor2DLibrary/SSG/shapes/props/834342001.txt b/Editor2DLibrary/SSG/shapes/props/834342001.txt index 8c2597b..e8764ff 100644 --- a/Editor2DLibrary/SSG/shapes/props/834342001.txt +++ b/Editor2DLibrary/SSG/shapes/props/834342001.txt @@ -62,7 +62,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 22.5, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834342002.txt b/Editor2DLibrary/SSG/shapes/props/834342002.txt index 24b633b..e1f3f4f 100644 --- a/Editor2DLibrary/SSG/shapes/props/834342002.txt +++ b/Editor2DLibrary/SSG/shapes/props/834342002.txt @@ -62,7 +62,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 22.5, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372004.txt b/Editor2DLibrary/SSG/shapes/props/834372004.txt index c81e3d0..89d0bbd 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372004.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372004.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 45, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372005.txt b/Editor2DLibrary/SSG/shapes/props/834372005.txt index 3dd8a74..e271776 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372005.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372005.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 45, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372010.txt b/Editor2DLibrary/SSG/shapes/props/834372010.txt index 91136b9..08865bd 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372010.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372010.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 45, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372011.txt b/Editor2DLibrary/SSG/shapes/props/834372011.txt index 5c42f32..e345860 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372011.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372011.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 45, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372024.txt b/Editor2DLibrary/SSG/shapes/props/834372024.txt index 252e951..2fd0056 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372024.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372024.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 90, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372025.txt b/Editor2DLibrary/SSG/shapes/props/834372025.txt index dd4eeac..d4e4ba4 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372025.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372025.txt @@ -62,7 +62,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 90, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372030.txt b/Editor2DLibrary/SSG/shapes/props/834372030.txt index 42893f9..ecfe303 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372030.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372030.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 90, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372031.txt b/Editor2DLibrary/SSG/shapes/props/834372031.txt index 7bfd7ad..95a63b1 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372031.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372031.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 90, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372050.txt b/Editor2DLibrary/SSG/shapes/props/834372050.txt index 1c1602c..3a1bed9 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372050.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372050.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372051.txt b/Editor2DLibrary/SSG/shapes/props/834372051.txt index 5031746..7975693 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372051.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372051.txt @@ -63,7 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372400.txt b/Editor2DLibrary/SSG/shapes/props/834372400.txt index 6fcd06e..d742463 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372400.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372400.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.001, "z": 0.0, "xMin": "", "xMax": "", @@ -25,7 +25,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180.0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -33,7 +33,7 @@ { "id": "cp2", "x": 0.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", @@ -52,7 +52,7 @@ { "id": "cp3", "x": 1000.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", diff --git a/Editor2DLibrary/SSG/shapes/props/834372401.txt b/Editor2DLibrary/SSG/shapes/props/834372401.txt index 31ddcbb..d52cf13 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372401.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372401.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.001, "z": 0.0, "xMin": "", "xMax": "", @@ -25,7 +25,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180.0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -33,7 +33,7 @@ { "id": "cp2", "x": 0.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", @@ -52,7 +52,7 @@ { "id": "cp3", "x": 1000.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", diff --git a/Editor2DLibrary/SSG/shapes/props/834372403.txt b/Editor2DLibrary/SSG/shapes/props/834372403.txt index 3c19e25..09bd061 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372403.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372403.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.001, "z": 0.0, "xMin": "", "xMax": "", @@ -25,7 +25,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180.0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -33,7 +33,7 @@ { "id": "cp2", "x": 0.0, - "y": 937.289, + "y": 62.712, "z": 0.0, "xMin": "", "xMax": "", @@ -52,7 +52,7 @@ { "id": "cp3", "x": 1000.0, - "y": 937.289, + "y": 62.712, "z": 0.0, "xMin": "", "xMax": "", diff --git a/Editor2DLibrary/SSG/shapes/props/834372404.txt b/Editor2DLibrary/SSG/shapes/props/834372404.txt index 8088a5a..95a6080 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372404.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372404.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.001, "z": 0.0, "xMin": "", "xMax": "", @@ -25,7 +25,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180.0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -33,7 +33,7 @@ { "id": "cp2", "x": 0.0, - "y": 937.289, + "y": 62.712, "z": 0.0, "xMin": "", "xMax": "", @@ -52,7 +52,7 @@ { "id": "cp3", "x": 1000.0, - "y": 937.289, + "y": 62.712, "z": 0.0, "xMin": "", "xMax": "", diff --git a/Editor2DLibrary/SSG/shapes/props/834372420.txt b/Editor2DLibrary/SSG/shapes/props/834372420.txt index 7eca6bd..bcc9d39 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372420.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372420.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.0, "z": 0.0, "xMin": "", "xMax": "", @@ -25,13 +25,32 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180, "linkClass": "Omniflo", "label": "", "isDimension": true }, { "id": "cp2", + "x": 0.0, + "y": 500.0, + "z": 0.0, + "xMin": "", + "xMax": "", + "xStep": "", + "yMin": "", + "yMax": "", + "yStep": "", + "zMin": "", + "zMax": "", + "zStep": "", + "direction": 360, + "linkClass": "Omniflo", + "label": "", + "isDimension": true + }, + { + "id": "cp3", "x": 1000.0, "y": 500.0, "z": 0.0, @@ -44,26 +63,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 270, - "linkClass": "Omniflo", - "label": "", - "isDimension": true - }, - { - "id": "cp3", - "x": 500.0, - "y": 1000.0, - "z": 0.0, - "xMin": "", - "xMax": "", - "xStep": "", - "yMin": "", - "yMax": "", - "yStep": "", - "zMin": "", - "zMax": "", - "zStep": "", - "direction": 90, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -82,7 +82,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/834372421.txt b/Editor2DLibrary/SSG/shapes/props/834372421.txt index faed026..e5b5fa1 100644 --- a/Editor2DLibrary/SSG/shapes/props/834372421.txt +++ b/Editor2DLibrary/SSG/shapes/props/834372421.txt @@ -13,7 +13,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.0, "z": 0.0, "xMin": "", "xMax": "", @@ -24,13 +24,32 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180, "linkClass": "Omniflo", "label": "", "isDimension": true }, { "id": "cp2", + "x": 0.0, + "y": 500.0, + "z": 0.0, + "xMin": "", + "xMax": "", + "xStep": "", + "yMin": "", + "yMax": "", + "yStep": "", + "zMin": "", + "zMax": "", + "zStep": "", + "direction": 360, + "linkClass": "Omniflo", + "label": "", + "isDimension": true + }, + { + "id": "cp3", "x": 1000.0, "y": 500.0, "z": 0.0, @@ -43,26 +62,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 270, - "linkClass": "Omniflo", - "label": "", - "isDimension": true - }, - { - "id": "cp3", - "x": 500.0, - "y": 1000.0, - "z": 0.0, - "xMin": "", - "xMax": "", - "xStep": "", - "yMin": "", - "yMax": "", - "yStep": "", - "zMin": "", - "zMax": "", - "zStep": "", - "direction": 90, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -81,7 +81,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0.0, + "direction": 0, "linkClass": "Omniflo", "label": "", "isDimension": true diff --git a/Editor2DLibrary/SSG/shapes/props/OFDeltaWeiche.txt b/Editor2DLibrary/SSG/shapes/props/OFDeltaWeiche.txt index 64da224..353c467 100644 --- a/Editor2DLibrary/SSG/shapes/props/OFDeltaWeiche.txt +++ b/Editor2DLibrary/SSG/shapes/props/OFDeltaWeiche.txt @@ -14,7 +14,7 @@ { "id": "cp1", "x": 500.0, - "y": 0.0, + "y": 1000.001, "z": 0.0, "xMin": "", "xMax": "", @@ -25,7 +25,7 @@ "zMin": "", "zMax": "", "zStep": "", - "direction": 0, + "direction": 180.0, "linkClass": "Omniflo", "label": "", "isDimension": true @@ -33,7 +33,7 @@ { "id": "cp2", "x": 0.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", @@ -52,7 +52,7 @@ { "id": "cp3", "x": 1000.0, - "y": 928.967, + "y": 71.034, "z": 0.0, "xMin": "", "xMax": "", diff --git a/Editor2DLibrary/SSG/shapes/svg/834342001.xml b/Editor2DLibrary/SSG/shapes/svg/834342001.xml index 22e62f7..8fecf2f 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342001.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342001.xml @@ -1,13 +1,14 @@ + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342002.xml b/Editor2DLibrary/SSG/shapes/svg/834342002.xml index 66d2af0..51bba23 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342002.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342002.xml @@ -1,13 +1,14 @@ + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342011.xml b/Editor2DLibrary/SSG/shapes/svg/834342011.xml index 42d8955..1f8c561 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342011.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342011.xml @@ -1,13 +1,14 @@ + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342012.xml b/Editor2DLibrary/SSG/shapes/svg/834342012.xml index 43e94ee..556a162 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342012.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342012.xml @@ -1,13 +1,14 @@ + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342100.xml b/Editor2DLibrary/SSG/shapes/svg/834342100.xml index 52a6b89..71bafa3 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342100.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342100.xml @@ -1,14 +1,14 @@ - + - - - - - - - + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342101.xml b/Editor2DLibrary/SSG/shapes/svg/834342101.xml index 05e2644..1e819a0 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342101.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342101.xml @@ -1,14 +1,14 @@ - + - - - - - - - + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342200.xml b/Editor2DLibrary/SSG/shapes/svg/834342200.xml index 66b8d05..0d9b363 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342200.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342200.xml @@ -1,15 +1,15 @@ - + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834342201.xml b/Editor2DLibrary/SSG/shapes/svg/834342201.xml index 798fd25..cc3c899 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834342201.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834342201.xml @@ -1,15 +1,15 @@ - + - - - - - - - - + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372001.xml b/Editor2DLibrary/SSG/shapes/svg/834372001.xml index cb04209..dda59c7 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372001.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372001.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372002.xml b/Editor2DLibrary/SSG/shapes/svg/834372002.xml index e0c9b11..17d4552 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372002.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372002.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372004.xml b/Editor2DLibrary/SSG/shapes/svg/834372004.xml index ce23933..eab39e7 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372004.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372004.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372005.xml b/Editor2DLibrary/SSG/shapes/svg/834372005.xml index 5abba61..f836445 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372005.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372005.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372007.xml b/Editor2DLibrary/SSG/shapes/svg/834372007.xml index dc3c59b..70299e6 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372007.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372007.xml @@ -1,18 +1,17 @@ + - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372008.xml b/Editor2DLibrary/SSG/shapes/svg/834372008.xml index 51bdfeb..ff57d98 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372008.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372008.xml @@ -1,18 +1,17 @@ + - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372010.xml b/Editor2DLibrary/SSG/shapes/svg/834372010.xml index 1e9e18a..5da14e6 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372010.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372010.xml @@ -1,18 +1,17 @@ + - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372011.xml b/Editor2DLibrary/SSG/shapes/svg/834372011.xml index 2ca6e5b..4cb3584 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372011.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372011.xml @@ -1,18 +1,17 @@ + - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372021.xml b/Editor2DLibrary/SSG/shapes/svg/834372021.xml index 736b5e3..b33fb94 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372021.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372021.xml @@ -1,18 +1,19 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372022.xml b/Editor2DLibrary/SSG/shapes/svg/834372022.xml index f047108..406788c 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372022.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372022.xml @@ -1,18 +1,19 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372024.xml b/Editor2DLibrary/SSG/shapes/svg/834372024.xml index 896cae2..2271763 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372024.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372024.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372025.xml b/Editor2DLibrary/SSG/shapes/svg/834372025.xml index ccfd778..33b8631 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372025.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372025.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372027.xml b/Editor2DLibrary/SSG/shapes/svg/834372027.xml index 1c4c265..269bbec 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372027.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372027.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372028.xml b/Editor2DLibrary/SSG/shapes/svg/834372028.xml index bc33392..c3d4456 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372028.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372028.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372030.xml b/Editor2DLibrary/SSG/shapes/svg/834372030.xml index 128dd29..4e27850 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372030.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372030.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372031.xml b/Editor2DLibrary/SSG/shapes/svg/834372031.xml index 7814189..b87e0d1 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372031.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372031.xml @@ -1,18 +1,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372047.xml b/Editor2DLibrary/SSG/shapes/svg/834372047.xml index 52bdac2..9244557 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372047.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372047.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372048.xml b/Editor2DLibrary/SSG/shapes/svg/834372048.xml index 75a60b1..1e2a38a 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372048.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372048.xml @@ -1,18 +1,25 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372050.xml b/Editor2DLibrary/SSG/shapes/svg/834372050.xml index 91cd47d..e677a53 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372050.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372050.xml @@ -1,16 +1,25 @@ + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372051.xml b/Editor2DLibrary/SSG/shapes/svg/834372051.xml index 2e718b0..50611cd 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372051.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372051.xml @@ -1,16 +1,25 @@ + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372100.xml b/Editor2DLibrary/SSG/shapes/svg/834372100.xml index 2a73680..2c250b3 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372100.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372100.xml @@ -1,20 +1,24 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372101.xml b/Editor2DLibrary/SSG/shapes/svg/834372101.xml index 8896aa3..ab7a90c 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372101.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372101.xml @@ -1,20 +1,24 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372103.xml b/Editor2DLibrary/SSG/shapes/svg/834372103.xml index 8a8717d..2cdbf3e 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372103.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372103.xml @@ -1,20 +1,20 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372104.xml b/Editor2DLibrary/SSG/shapes/svg/834372104.xml index a62502c..1e2ade7 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372104.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372104.xml @@ -1,20 +1,20 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372106.xml b/Editor2DLibrary/SSG/shapes/svg/834372106.xml index 2398ae0..07164ef 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372106.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372106.xml @@ -1,20 +1,28 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372107.xml b/Editor2DLibrary/SSG/shapes/svg/834372107.xml index a96ddde..1d15ffb 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372107.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372107.xml @@ -1,20 +1,28 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372109.xml b/Editor2DLibrary/SSG/shapes/svg/834372109.xml index 9b39da3..00e4b56 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372109.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372109.xml @@ -1,20 +1,24 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372110.xml b/Editor2DLibrary/SSG/shapes/svg/834372110.xml index a306232..b0fef28 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372110.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372110.xml @@ -1,20 +1,24 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372115.xml b/Editor2DLibrary/SSG/shapes/svg/834372115.xml index 3742f35..55328ce 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372115.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372115.xml @@ -1,27 +1,28 @@ + - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372116.xml b/Editor2DLibrary/SSG/shapes/svg/834372116.xml index 4f159de..036fdb3 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372116.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372116.xml @@ -1,20 +1,28 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372200.xml b/Editor2DLibrary/SSG/shapes/svg/834372200.xml index 022cfda..9f76045 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372200.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372200.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372201.xml b/Editor2DLibrary/SSG/shapes/svg/834372201.xml index 09c4bbb..f99c2b7 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372201.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372201.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372203.xml b/Editor2DLibrary/SSG/shapes/svg/834372203.xml index 32c8feb..c75e1a5 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372203.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372203.xml @@ -1,21 +1,21 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372204.xml b/Editor2DLibrary/SSG/shapes/svg/834372204.xml index 5cb6827..64df862 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372204.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372204.xml @@ -1,21 +1,21 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372206.xml b/Editor2DLibrary/SSG/shapes/svg/834372206.xml index 72ef027..91bda30 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372206.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372206.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372207.xml b/Editor2DLibrary/SSG/shapes/svg/834372207.xml index 5c995b7..d7014e7 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372207.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372207.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372209.xml b/Editor2DLibrary/SSG/shapes/svg/834372209.xml index 1242623..c7f076f 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372209.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372209.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372210.xml b/Editor2DLibrary/SSG/shapes/svg/834372210.xml index 655c79f..1e93722 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372210.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372210.xml @@ -1,21 +1,29 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372215.xml b/Editor2DLibrary/SSG/shapes/svg/834372215.xml index 55b21b1..e3704f0 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372215.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372215.xml @@ -1,32 +1,33 @@ + - - + + - - + + - - + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372216.xml b/Editor2DLibrary/SSG/shapes/svg/834372216.xml index a8ca62a..ac785f4 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372216.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372216.xml @@ -1,21 +1,33 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372400.xml b/Editor2DLibrary/SSG/shapes/svg/834372400.xml index 5cc2f42..542f62a 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372400.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372400.xml @@ -1,20 +1,25 @@ + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372401.xml b/Editor2DLibrary/SSG/shapes/svg/834372401.xml index 7c81067..34ea74f 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372401.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372401.xml @@ -1,20 +1,25 @@ + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372403.xml b/Editor2DLibrary/SSG/shapes/svg/834372403.xml index 82c7acf..13e5bce 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372403.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372403.xml @@ -1,24 +1,37 @@ + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372404.xml b/Editor2DLibrary/SSG/shapes/svg/834372404.xml index 0545aa3..b4edce6 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372404.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372404.xml @@ -1,24 +1,37 @@ + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372420.xml b/Editor2DLibrary/SSG/shapes/svg/834372420.xml index f48a3c0..5e60423 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372420.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372420.xml @@ -1,28 +1,42 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Editor2DLibrary/SSG/shapes/svg/834372421.xml b/Editor2DLibrary/SSG/shapes/svg/834372421.xml index a45b741..0ca7e78 100644 --- a/Editor2DLibrary/SSG/shapes/svg/834372421.xml +++ b/Editor2DLibrary/SSG/shapes/svg/834372421.xml @@ -1,28 +1,42 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MAIN_SSG.rdx b/MAIN_SSG.rdx index a1c6ffe..82d9c5e 100644 --- a/MAIN_SSG.rdx +++ b/MAIN_SSG.rdx @@ -1,6 +1,6 @@  - + @@ -26466,7 +26466,9 @@ SSGConnectionPoint.x_M - + + $=$Shape_Prototype.OFWeicheDefinition.Hoehe + $=$Shape_Prototype.OFWeicheDefinition.KurvenWinkel diff --git a/SVGs/Omniflo/Bogen/Umbrennung für neue 2D shapes.xlsx b/SVGs/Omniflo/Bogen/Umbrennung für neue 2D shapes.xlsx deleted file mode 100644 index ef4ea72..0000000 Binary files a/SVGs/Omniflo/Bogen/Umbrennung für neue 2D shapes.xlsx and /dev/null differ diff --git a/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1400_700_M_834372400.svg b/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1400_700_M_834372400.svg index 4a1f8a7..9331391 100644 --- a/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1400_700_M_834372400.svg +++ b/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1400_700_M_834372400.svg @@ -6,22 +6,22 @@ - - - - + + + + - - + + - - - - - - - + + + + + + + diff --git a/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1600_800_M_834372403.svg b/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1600_800_M_834372403.svg index 75c0005..5692568 100644 --- a/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1600_800_M_834372403.svg +++ b/SVGs/Omniflo/Weichen/neu_original_backup/DeltaWeiche_1600_800_M_834372403.svg @@ -6,34 +6,34 @@ - + - + - + - - - + + + - + - - + + - - - - - - - - + + + + + + + + diff --git a/SVGs/Omniflo/bin/01_update_props_OFWeiche.bat b/SVGs/Omniflo/bin/01_update_props_OFWeiche.bat new file mode 100644 index 0000000..f21b4b6 --- /dev/null +++ b/SVGs/Omniflo/bin/01_update_props_OFWeiche.bat @@ -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 \ No newline at end of file diff --git a/SVGs/Omniflo/bin/optimize_easy.bat b/SVGs/Omniflo/bin/02_svg_optimizer_easy_OFWeiche.bat similarity index 77% rename from SVGs/Omniflo/bin/optimize_easy.bat rename to SVGs/Omniflo/bin/02_svg_optimizer_easy_OFWeiche.bat index 2aed708..743e178 100644 --- a/SVGs/Omniflo/bin/optimize_easy.bat +++ b/SVGs/Omniflo/bin/02_svg_optimizer_easy_OFWeiche.bat @@ -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! diff --git a/SVGs/Omniflo/bin/01_svg_optimze.bat b/SVGs/Omniflo/bin/02_svg_optimzier_OFWeiche.bat similarity index 55% rename from SVGs/Omniflo/bin/01_svg_optimze.bat rename to SVGs/Omniflo/bin/02_svg_optimzier_OFWeiche.bat index 05ac0c7..48400cb 100644 --- a/SVGs/Omniflo/bin/01_svg_optimze.bat +++ b/SVGs/Omniflo/bin/02_svg_optimzier_OFWeiche.bat @@ -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 diff --git a/SVGs/Omniflo/bin/03_update_xml_and_props_in_SSGLib_OFWeiche.bat b/SVGs/Omniflo/bin/03_update_xml_and_props_in_SSGLib_OFWeiche.bat new file mode 100644 index 0000000..5b9465a --- /dev/null +++ b/SVGs/Omniflo/bin/03_update_xml_and_props_in_SSGLib_OFWeiche.bat @@ -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 \ No newline at end of file diff --git a/SVGs/Omniflo/bin/04_copy_SSG_folder_confirm.bat b/SVGs/Omniflo/bin/04_copy_SSG_folder_confirm.bat new file mode 100644 index 0000000..59915cb --- /dev/null +++ b/SVGs/Omniflo/bin/04_copy_SSG_folder_confirm.bat @@ -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 \ No newline at end of file diff --git a/SVGs/Omniflo/bin/setenv.bat b/SVGs/Omniflo/bin/setenv.bat index 266226c..d257882 100644 --- a/SVGs/Omniflo/bin/setenv.bat +++ b/SVGs/Omniflo/bin/setenv.bat @@ -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 diff --git a/SVGs/Omniflo/python/OFWeiche/1_omniflo_weichen.py b/SVGs/Omniflo/lib/OFWeiche/01_props_step1_omniflo_weichen.py similarity index 82% rename from SVGs/Omniflo/python/OFWeiche/1_omniflo_weichen.py rename to SVGs/Omniflo/lib/OFWeiche/01_props_step1_omniflo_weichen.py index add4a7e..3891f22 100644 --- a/SVGs/Omniflo/python/OFWeiche/1_omniflo_weichen.py +++ b/SVGs/Omniflo/lib/OFWeiche/01_props_step1_omniflo_weichen.py @@ -16,7 +16,7 @@ def modify_json_values(json_file): process_einzelweiche_items(data, WeichenKoerperWidth, WeichenkProfileWidth, BogenProfileWidth, WeichenGerade) process_doppelweiche_items(data, BogenProfileWidth, WeichenGerade) process_deltaweiche_items(data, WeichenkProfileWidth) - + process_sternweiche_items(data) # Save changes without confirmation with open(json_file, 'w', encoding='utf-8') as f: json.dump(data, f, indent=2, ensure_ascii=False) @@ -219,9 +219,7 @@ def process_doppelweiche_items(data, BogenProfileWidth, WeichenGerade): item["OFWeiche_CP1_y_mm"] = round(item["Objekt_height_mm"], 3) item["OFWeiche_CP2_x_mm"] = round(BogenProfileWidth/2 * math.cos(angle_rad), 3) item["OFWeiche_CP2_y_mm"] = round(BogenProfileWidth/2 * math.sin(angle_rad), 3) - item["OFWeiche_CP3_x_mm"] = round( - BogenProfileWidth/2 * math.cos(angle_rad) + - item["OFWeiche_center_line_width_mm"], 3) + item["OFWeiche_CP3_x_mm"] = round(BogenProfileWidth/2 * math.cos(angle_rad) + item["OFWeiche_center_line_width_mm"], 3) item["OFWeiche_CP3_y_mm"] = item["OFWeiche_CP2_y_mm"] # Update items with identical ProfilTyp @@ -368,10 +366,10 @@ def process_deltaweiche_items(data, WeichenkProfileWidth): # Calculate control points item["OFWeiche_CP1_x_mm"] = round(item["Objekt_width_mm"]/2, 3) - item["OFWeiche_CP1_y_mm"] = 0 + item["OFWeiche_CP1_y_mm"] = round(item["Objekt_height_mm"], 3) item["OFWeiche_CP2_x_mm"] = 0 - item["OFWeiche_CP2_y_mm"] = round(item["OFWeiche_center_line_height_mm"], 3) - item["OFWeiche_CP3_x_mm"] = round(item["OFWeiche_center_line_width_mm"], 3) + item["OFWeiche_CP2_y_mm"] = round(WeichenkProfileWidth/2+32.5437 , 3) + item["OFWeiche_CP3_x_mm"] = round(item["Objekt_width_mm"], 3) item["OFWeiche_CP3_y_mm"] = item["OFWeiche_CP2_y_mm"] # Update items with identical ProfilTyp @@ -423,7 +421,91 @@ def process_deltaweiche_items(data, WeichenkProfileWidth): for field in fields_to_copy: similar[field] = item[field] - +def process_sternweiche_items(data): + # Filter sternweiche type items + filtered_items = [ + item for item in data + if (item.get("WeichenTyp") == "Sternweiche" and + item.get("Schaltungstyp") == "M" and + item.get("SivasnrTEF") is None and + str(item.get("Sivasnr", "")).isdigit()) + ] + + print(f"\nFound {len(filtered_items)} sternweiche type records") + + for item in filtered_items: + # Calculate related values + if (item["OFWeiche_center_line_width_mm"] is not None and + item["OFWeiche_center_line_height_mm"] is not None): + + # Calculate basic dimensions + item["Objekt_width_mm"] = round(item["OFWeiche_center_line_width_mm"], 3) + item["Objekt_height_mm"] = round(item["OFWeiche_center_line_height_mm"], 3) + + # Calculate control points + + item["OFWeiche_CP1_x_mm"] = round(item["Objekt_width_mm"]/2, 3) + item["OFWeiche_CP1_y_mm"] = round(item["Objekt_height_mm"], 3) + item["OFWeiche_CP2_x_mm"] = 0 + item["OFWeiche_CP2_y_mm"] = round(item["OFWeiche_center_line_height_mm"]/2, 3) + item["OFWeiche_CP3_x_mm"] = round(item["OFWeiche_center_line_width_mm"], 3) + item["OFWeiche_CP3_y_mm"] = item["OFWeiche_CP2_y_mm"] + item["OFWeiche_CP4_x_mm"] = item["OFWeiche_CP1_x_mm"] + item["OFWeiche_CP4_y_mm"] = 0 + + # Update items with identical ProfilTyp + current_profil = item["ProfilTyp"] + exact_matches = [x for x in data + if x["ProfilTyp"] == current_profil and + x is not item and + x.get("SivasnrTEF") is None] + + if exact_matches: + for match in exact_matches: + fields_to_copy = [ + "OFWeiche_center_line_width_mm", + "OFWeiche_center_line_height_mm", + "Objekt_width_mm", + "Objekt_height_mm", + "OFWeiche_CP1_x_mm", + "OFWeiche_CP1_y_mm", + "OFWeiche_CP2_x_mm", + "OFWeiche_CP2_y_mm", + "OFWeiche_CP3_x_mm", + "OFWeiche_CP3_y_mm", + "OFWeiche_CP4_x_mm", + "OFWeiche_CP4_y_mm" + ] + + for field in fields_to_copy: + match[field] = item[field] + + # Find similar items (P-type) + if "WEICHE S C STERN" in item["ProfilTyp"]: + similar_profil = item["ProfilTyp"].replace("KPL. MIT M", "KPL. MIT P") + + similar_items = [x for x in data + if x["ProfilTyp"] == similar_profil and + x.get("SivasnrTEF") is None] + + for similar in similar_items: + fields_to_copy = [ + "OFWeiche_center_line_width_mm", + "OFWeiche_center_line_height_mm", + "Objekt_width_mm", + "Objekt_height_mm", + "OFWeiche_CP1_x_mm", + "OFWeiche_CP1_y_mm", + "OFWeiche_CP2_x_mm", + "OFWeiche_CP2_y_mm", + "OFWeiche_CP3_x_mm", + "OFWeiche_CP3_y_mm", + "OFWeiche_CP4_x_mm", + "OFWeiche_CP4_y_mm" + ] + + for field in fields_to_copy: + similar[field] = item[field] if __name__ == "__main__": json_path = os.environ.get("JSON_PATH", "JSON") input_filename = os.path.join(json_path, "omniflo_weichen.json") diff --git a/SVGs/Omniflo/python/OFWeiche/2_calculations_to_standardize_the_dimensions_and_add_connection_points.py b/SVGs/Omniflo/lib/OFWeiche/01_props_step2_calculations_to_standardize_the_dimensions_and_add_connection_points.py similarity index 87% rename from SVGs/Omniflo/python/OFWeiche/2_calculations_to_standardize_the_dimensions_and_add_connection_points.py rename to SVGs/Omniflo/lib/OFWeiche/01_props_step2_calculations_to_standardize_the_dimensions_and_add_connection_points.py index 6d53903..7bbab53 100644 --- a/SVGs/Omniflo/python/OFWeiche/2_calculations_to_standardize_the_dimensions_and_add_connection_points.py +++ b/SVGs/Omniflo/lib/OFWeiche/01_props_step2_calculations_to_standardize_the_dimensions_and_add_connection_points.py @@ -68,7 +68,7 @@ def process_json_file(input_file, output_file): cp2_dir = 180.0 if "-L-" in profil_typ: cp3_dir = round(360 - kurven_winkel, 1) - elif "--" in profil_typ: + elif "-R-" in profil_typ: cp3_dir = round(kurven_winkel, 1) else: cp3_dir = 0.0 # Default if pattern not found @@ -76,6 +76,11 @@ def process_json_file(input_file, output_file): cp1_dir = 180.0 cp2_dir = round(360 - kurven_winkel, 1) cp3_dir = round(kurven_winkel, 1) + elif weichen_typ == "Dreifachweiche": + cp1_dir = 180.0 + cp2_dir = round(360 - kurven_winkel, 1) + cp3_dir = round(kurven_winkel, 1) + elif weichen_typ == "Dreiwegeweiche": cp1_dir = 180.0 cp2_dir = round(360 - kurven_winkel, 1) @@ -91,11 +96,24 @@ def process_json_file(input_file, output_file): "y": cp4_y, "direction": cp4_dir }) - elif weichen_typ == "Dreifachweiche": - cp1_dir = 0 + + # Add common connection points + elif weichen_typ == "Sternweiche": + cp1_dir = 180 cp2_dir = round(360 - kurven_winkel, 1) cp3_dir = round(kurven_winkel, 1) - # Add common connection points + # 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 = 0 + + connection_points.append({ + "id": "cp4", + "x": cp4_x, + "y": cp4_y, + "direction": cp4_dir + }) + connection_points.extend([ { "id": "cp1", diff --git a/SVGs/Omniflo/python/OFWeiche/3_update_dimensions_and_connection_points_in_props.py b/SVGs/Omniflo/lib/OFWeiche/01_props_step3_update_dimensions_and_connection_points_in_props.py similarity index 97% rename from SVGs/Omniflo/python/OFWeiche/3_update_dimensions_and_connection_points_in_props.py rename to SVGs/Omniflo/lib/OFWeiche/01_props_step3_update_dimensions_and_connection_points_in_props.py index b12352a..aa535ff 100644 --- a/SVGs/Omniflo/python/OFWeiche/3_update_dimensions_and_connection_points_in_props.py +++ b/SVGs/Omniflo/lib/OFWeiche/01_props_step3_update_dimensions_and_connection_points_in_props.py @@ -186,6 +186,6 @@ if __name__ == "__main__": json_path = os.environ.get("JSON_PATH", "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" - + # txt_files_dir = r"C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props" + txt_files_dir= os.environ.get("PROPS_PATH", "props") process_files(json_file_path, txt_files_dir) \ No newline at end of file diff --git a/SVGs/Omniflo/lib/3_svg_optimizer_Step1.py b/SVGs/Omniflo/lib/OFWeiche/02_svg_step1_convert_polylines_to_lines.py similarity index 85% rename from SVGs/Omniflo/lib/3_svg_optimizer_Step1.py rename to SVGs/Omniflo/lib/OFWeiche/02_svg_step1_convert_polylines_to_lines.py index b93071b..f5cf436 100644 --- a/SVGs/Omniflo/lib/3_svg_optimizer_Step1.py +++ b/SVGs/Omniflo/lib/OFWeiche/02_svg_step1_convert_polylines_to_lines.py @@ -177,69 +177,7 @@ def analyze_and_normalize_path(d, path_type, path_id=""): full_report.append("Path not modified") return new_d, '\n'.join(full_report) -''' def analyze_and_normalize_path(d, path_type, path_id=""): - """Strictly normalize path direction and generate detailed report""" - original_d = d - report = [] - normalized = [] - changed = False - - # First check if path contains any arc commands - if 'A' in d or 'a' in d: - report.append(" Path contains arc commands - leaving unchanged") - return original_d, report, False - - # Ensure path starts with M command - if not d.strip().startswith('M'): - d = 'M' + d[1:] if d.startswith('L') else 'M ' + d - report.append(" Fix: Added M command at path start") - changed = True - - # Parse path commands - commands = [] - current_cmd = None - for token in re.split('([A-Za-z])', d): - if not token: - continue - if token in 'MLAZHVCSQTa-z': - current_cmd = token - else: - if current_cmd: - commands.append((current_cmd, token.strip())) - - prev_x, prev_y = None, None - - for cmd, params in commands: - params = [float(p) for p in re.split('[, ]+', params.strip()) if p] - - if cmd == 'M': - if len(params) >= 2: - x, y = params[0], params[1] - normalized.append(f"M {x} {y}") - prev_x, prev_y = x, y - continue - - if path_type == 'Line segment' and cmd == 'L': - if len(params) >= 2 and prev_x is not None: - x, y = params[0], params[1] - need_swap = x < prev_x or (x == prev_x and y < prev_y) - - if need_swap: - new_segment = [f"M {x} {y}", f"L {prev_x} {prev_y}"] - report.append(f" Need to swap start/end → New path: {' '.join(new_segment)}") - normalized = new_segment - changed = True - else: - normalized.append(f"L {x} {y}") - report.append(" Path direction already correct, no changes made") - - prev_x, prev_y = x, y - continue - - normalized.append(f"{cmd} {' '.join(map(str, params))}") - - normalized_path = ' '.join(normalized) - return normalized_path if changed else original_d, report, changed ''' + def optimize_svg(input_path, output_path): """Process single SVG file with all optimizations""" try: @@ -443,21 +381,32 @@ if __name__ == '__main__': args = parser.parse_args() in_dir = None - if args.bogen: - in_dir = os.environ.get('RD_CONF_BOGEN') - if args.tefbogen: - in_dir = os.environ.get('RD_CONF_TEFBOGEN') - if args.weichen: - in_dir = os.environ.get('RD_CONF_WEICHEN') - if args.tefweichen: - in_dir = os.environ.get('RD_CONF_TEFWEICHEN') + if args.inputdir: + in_dir = args.inputdir + else: + if args.bogen: + in_dir = os.environ.get('RD_CONF_BOGEN') + elif args.tefbogen: + in_dir = os.environ.get('RD_CONF_TEFBOGEN') + elif args.weichen: + in_dir = os.environ.get('RD_CONF_WEICHEN') + elif args.tefweichen: + in_dir = os.environ.get('RD_CONF_TEFWEICHEN') out_dir = os.environ.get('RD_CONF_WORK') - if args.outputdir: - out_dir = args.outputdir - + if not out_dir: + print("Error: RD_CONF_WORK environment variable must be set as output directory") + exit(1) + # Check if input directory exists + if not os.path.exists(in_dir): + print(f"Error: Input directory does not exist - {in_dir}") + exit(1) + # Ensure output directory exists (create if doesn't exist, ignore if already exists) + os.makedirs(out_dir, exist_ok=True) + + # Processing logic if args.file: filename = args.file input_path = os.path.join(in_dir, filename) @@ -469,5 +418,8 @@ if __name__ == '__main__': if in_dir: """Batch process SVG files""" batch_process_svgs(in_dir, out_dir) + else: - parser.print_help() \ No newline at end of file + print("Error: No input directory specified") + parser.print_help() + exit(1) \ No newline at end of file diff --git a/SVGs/Omniflo/lib/OFWeiche/02_svg_step2_find_and_mark_auxiliary_lines.py b/SVGs/Omniflo/lib/OFWeiche/02_svg_step2_find_and_mark_auxiliary_lines.py new file mode 100644 index 0000000..61e56eb --- /dev/null +++ b/SVGs/Omniflo/lib/OFWeiche/02_svg_step2_find_and_mark_auxiliary_lines.py @@ -0,0 +1,247 @@ +import os +from lxml import etree +import re +from math import sqrt, isclose +from collections import defaultdict + +# Constants +WEICHEN_PROFILE_WIDTH = 42.000 +L_R_TARGET_LENGTH = 55.7237 +DELTA_TARGET_LENGTH = 53.5437 +MATCH_TOLERANCE = 0.1 # Matching tolerance 0.1mm + +def process_svg_files(directory): + print(f"🔍 Scanning directory: {directory}") + print("-" * 60) + + result_stats = { + 'total_files': 0, + 'L_R_files': {'with_pairs': [], 'no_pairs': [], 'excess_pairs': []}, + 'Delta_files': {'with_triples': [], 'no_triples': [], 'excess_triples': []} + } + + for filename in os.listdir(directory): + if not filename.endswith('.svg'): + continue + + filepath = os.path.join(directory, filename) + result_stats['total_files'] += 1 + + if '_L_' in filename or '_R_' in filename: + print(f"\n📄 Processing L/R file: {filename}") + process_lr_file(filepath, filename, result_stats) + elif 'DeltaWeiche' in filename: + print(f"\n📄 Processing DeltaWeiche file: {filename}") + process_delta_file(filepath, filename, result_stats) + + # Print final statistics + print("\n" + "="*60) + print("📊 Final processing statistics:") + print(f"Total files processed: {result_stats['total_files']}") + + print("\nL/R type files results:") + print(f"✅ Files with matching path pairs: {len(result_stats['L_R_files']['with_pairs'])}") + print(f" {result_stats['L_R_files']['with_pairs']}") + print(f"⚠️ Files with no matching paths: {len(result_stats['L_R_files']['no_pairs'])}") + print(f" {result_stats['L_R_files']['no_pairs']}") + print(f"❌ Files with >2 matching paths: {len(result_stats['L_R_files']['excess_pairs'])}") + print(f" {result_stats['L_R_files']['excess_pairs']}") + + print("\nDeltaWeiche type files results:") + print(f"✅ Files with matching path triples: {len(result_stats['Delta_files']['with_triples'])}") + print(f" {result_stats['Delta_files']['with_triples']}") + print(f"⚠️ Files with no matching paths: {len(result_stats['Delta_files']['no_triples'])}") + print(f" {result_stats['Delta_files']['no_triples']}") + print(f"❌ Files with ≠3 matching paths: {len(result_stats['Delta_files']['excess_triples'])}") + print(f" {result_stats['Delta_files']['excess_triples']}") + + print("\n✨ Processing complete!") + +def process_lr_file(filepath, filename, stats): + try: + tree = etree.parse(filepath) + root = tree.getroot() + + # Find all straight line paths + straight_lines = find_straight_lines(root) + print(f" 📊 Found {len(straight_lines)} straight paths") + + # 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") + + # Group by length + length_groups = group_lines_by_length(straight_lines) + + # Only print groups with exactly 2 paths + print("\n 🔍 Same-length path groups (2 paths):") + perfect_pairs = [group for group in length_groups.values() if len(group) == 2] + 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(" └" + "─" * 40) + + if len(perfect_pairs) == 1: + pair = perfect_pairs[0] + original_length = pair[0]['length'] + scale_factor = WEICHEN_PROFILE_WIDTH / original_length + print(f"\n 🔄 Scaling calculation (based on length {original_length:.4f}mm):") + print(f" Scale factor: {scale_factor:.4f}") + + # Print scaled lengths + print("\n 🔍 Scaled path lengths:") + for line in straight_lines: + scaled_len = line['length'] * scale_factor + print(f" Path{line['index']}: {line['length']:.4f}mm → {scaled_len:.4f}mm") + + # Find path matching target length (within tolerance) + target_path = find_target_path(straight_lines, scale_factor, L_R_TARGET_LENGTH) + if target_path: + target_path['element'].set('style', 'stroke:none;fill:none;') + tree.write(filepath, encoding='utf-8', xml_declaration=True) + print(f"\n ✅ Hid path{target_path['index']} matching target length {L_R_TARGET_LENGTH:.4f}mm (±{MATCH_TOLERANCE}mm)") + stats['L_R_files']['with_pairs'].append(filename) + else: + print(f"\n ❌ No path found matching {L_R_TARGET_LENGTH:.4f}mm (±{MATCH_TOLERANCE}mm)") + stats['L_R_files']['no_pairs'].append(filename) + elif len(perfect_pairs) > 1: + print(f"\n ❗ Found multiple same-length path groups: {[len(g) for g in length_groups.values()]}") + stats['L_R_files']['excess_pairs'].append(filename) + else: + print("\n ❌ No same-length path pairs found") + stats['L_R_files']['no_pairs'].append(filename) + + except Exception as e: + print(f" ❌ Processing failed: {str(e)}") + +def process_delta_file(filepath, filename, stats): + try: + tree = etree.parse(filepath) + root = tree.getroot() + + # Find all straight line paths + straight_lines = find_straight_lines(root) + print(f" 📊 Found {len(straight_lines)} straight paths") + + # 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") + + # Group by length + length_groups = group_lines_by_length(straight_lines) + + # Only print groups with exactly 3 paths + print("\n 🔍 Same-length path groups (3 paths):") + perfect_triples = [group for group in length_groups.values() if len(group) == 3] + 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(" └" + "─" * 40) + + if len(perfect_triples) == 1: + triple = perfect_triples[0] + original_length = triple[0]['length'] + scale_factor = WEICHEN_PROFILE_WIDTH / original_length + print(f"\n 🔄 Scaling calculation (based on length {original_length:.4f}mm):") + print(f" Scale factor: {scale_factor:.4f}") + + # Print scaled lengths + print("\n 🔍 Scaled path lengths:") + for line in straight_lines: + scaled_len = line['length'] * scale_factor + print(f" Path{line['index']}: {line['length']:.4f}mm → {scaled_len:.4f}mm") + + # Find all paths matching target length (there might be multiple) + target_paths = [line for line in straight_lines + if abs(line['length'] * scale_factor - DELTA_TARGET_LENGTH) < MATCH_TOLERANCE] + + if target_paths: + for target in target_paths: + target['element'].set('style', 'stroke:none;fill:none;') + tree.write(filepath, encoding='utf-8', xml_declaration=True) + print(f"\n ✅ Hid {len(target_paths)} paths matching target length {DELTA_TARGET_LENGTH:.4f}mm (±{MATCH_TOLERANCE}mm):") + for target in target_paths: + print(f" - Path{target['index']}") + stats['Delta_files']['with_triples'].append(filename) + else: + print(f"\n ❌ No path found matching {DELTA_TARGET_LENGTH:.4f}mm (±{MATCH_TOLERANCE}mm)") + stats['Delta_files']['no_triples'].append(filename) + elif len(perfect_triples) > 1: + print(f"\n ❗ Found multiple same-length path groups: {[len(g) for g in length_groups.values()]}") + stats['Delta_files']['excess_triples'].append(filename) + else: + print("\n ❌ No same-length path groups (3 paths) found") + stats['Delta_files']['no_triples'].append(filename) + + except Exception as e: + print(f" ❌ Processing failed: {str(e)}") + +def find_straight_lines(root): + """Find all straight line paths""" + lines = [] + paths = root.xpath('.//svg:path|.//svg:g//svg:path', + namespaces={'svg': 'http://www.w3.org/2000/svg'}) + + for i, path in enumerate(paths, 1): + d = path.get('d', '').strip() + if not d: + continue + + if is_straight_line(d): + length, (p1, p2) = calculate_line_length(d) + if length > 0: + lines.append({ + '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)) + }) + return lines + +def group_lines_by_length(lines): + """Group straight paths by length""" + groups = defaultdict(list) + for line in lines: + groups[line['length']].append(line) + return groups + +def find_target_path(lines, scale_factor, target_length): + """Find path that matches target length after scaling (within tolerance)""" + for line in lines: + scaled_length = line['length'] * scale_factor + if abs(scaled_length - target_length) < MATCH_TOLERANCE: + return line + return None + +def is_straight_line(d): + """Check if path is strictly a straight line""" + commands = [cmd[0].upper() for cmd in re.findall('([A-Za-z])', d)] + return len(commands) == 2 and commands[0] == 'M' and commands[1] == 'L' + +def calculate_line_length(d): + """Calculate line length and return endpoints""" + points = [] + for cmd, params in re.findall('([A-Za-z])([^A-Za-z]*)', d): + if cmd.upper() in ('M', 'L'): + coords = [float(p) for p in re.findall('[-+]?\d*\.\d+|[-+]?\d+', params)] + points.append((coords[0], coords[1])) + + if len(points) != 2: + return 0, ((0,0), (0,0)) + + length = sqrt((points[1][0]-points[0][0])**2 + (points[1][1]-points[0][1])**2) + return round(length, 4), (points[0], points[1]) # Length rounded to 4 decimals +if __name__ == '__main__': + # Set SVG files directory path + # svg_directory = r'C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\SVGs\Omniflo\work' + svg_directory =os.environ.get('RD_CONF_WORK') + process_svg_files(svg_directory) \ No newline at end of file diff --git a/SVGs/Omniflo/lib/3_svg_scaler_Step2.py b/SVGs/Omniflo/lib/OFWeiche/02_svg_step3_scaler.py similarity index 94% rename from SVGs/Omniflo/lib/3_svg_scaler_Step2.py rename to SVGs/Omniflo/lib/OFWeiche/02_svg_step3_scaler.py index 07a9b5f..fb0416e 100644 --- a/SVGs/Omniflo/lib/3_svg_scaler_Step2.py +++ b/SVGs/Omniflo/lib/OFWeiche/02_svg_step3_scaler.py @@ -68,15 +68,15 @@ def normalize_stroke_widths2(root, scale): # Remove existing stroke-width del elem.attrib['stroke-width'] # Apply scaled stroke width (e.g., 1px → 1/scale) - elem.set('stroke-width', f'{1/scale:.6f}mm') + elem.set('stroke-width', f'{1/scale:.6f}px') def apply_non_scaling_stroke(root): - """确保所有有描边的元素的描边宽度不随缩放变化""" + for elem in root.iter(): if 'stroke' in elem.attrib and elem.attrib['stroke'] != 'none': - # 强制设置 stroke-width=1(无单位) + # set stroke-width=1(no unit) elem.set('stroke-width', '1') - # 确保 vector-effect 生效 + # set vector-effect elem.set('vector-effect', 'non-scaling-stroke') def scale_svg_file(input_path: str, output_path: str): @@ -99,7 +99,7 @@ def scale_svg_file(input_path: str, output_path: str): if width > height: scale = 1000.0 / width new_width = 1000.0 - new_height = round(height * scale) + new_height = round(height * scale,3) print(f"Scaling base: Width (larger dimension)") else: scale = 1000.0 / height @@ -110,8 +110,8 @@ def scale_svg_file(input_path: str, output_path: str): print(f"Scale factor: {scale:.6f}") print(f"New dimensions: {new_width:.3f}px × {new_height:.3f}px") print(f"ViewBox: 0 0 {new_width:.3f} {new_height:.3f}") - # normalize_stroke_widths2(root, scale) - apply_non_scaling_stroke(root) + normalize_stroke_widths2(root, scale) + #apply_non_scaling_stroke(root) # # Update SVG attributes root.set('viewBox', f'0 0 {new_width:.3f} {new_height:.3f}') diff --git a/SVGs/Omniflo/lib/3_svg_scaler_Step3.py b/SVGs/Omniflo/lib/OFWeiche/02_svg_step4_format_optimization.py similarity index 98% rename from SVGs/Omniflo/lib/3_svg_scaler_Step3.py rename to SVGs/Omniflo/lib/OFWeiche/02_svg_step4_format_optimization.py index 1bf5eef..22ee417 100644 --- a/SVGs/Omniflo/lib/3_svg_scaler_Step3.py +++ b/SVGs/Omniflo/lib/OFWeiche/02_svg_step4_format_optimization.py @@ -155,6 +155,6 @@ def batch_process_svgs(input_dir: str, output_dir: str): if __name__ == '__main__': input_dir = os.environ.get('RD_CONF_WORK') - output_dir = os.environ.get('RD_CONF_OUTPUT') + output_dir = os.environ.get('RD_CONF_OUTPUT_OFWEICHEN') # Example usage: batch_process_svgs(input_dir, output_dir) \ No newline at end of file diff --git a/SVGs/Omniflo/Weichen/automatisch_P_Weichen_Erzeugung.py b/SVGs/Omniflo/lib/OFWeiche/02_svg_step5_automatic_svg_generation_for_P_switches.py similarity index 92% rename from SVGs/Omniflo/Weichen/automatisch_P_Weichen_Erzeugung.py rename to SVGs/Omniflo/lib/OFWeiche/02_svg_step5_automatic_svg_generation_for_P_switches.py index ad9f819..83554de 100644 --- a/SVGs/Omniflo/Weichen/automatisch_P_Weichen_Erzeugung.py +++ b/SVGs/Omniflo/lib/OFWeiche/02_svg_step5_automatic_svg_generation_for_P_switches.py @@ -107,8 +107,8 @@ def process_svg_files(svg_folder, json_file_path): if __name__ == "__main__": # Configure paths (update these with your actual paths) - svg_folder =r"C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\SVGs\Omniflo\Weichen\outputdir_Kopie" - json_file_path =r"C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\SVGs\Omniflo\python\OFWeiche\JSON\omniflo_weichen_output.json" - - process_svg_files(svg_folder, json_file_path) + svg_folder = os.environ.get('RD_CONF_OUTPUT_OFWEICHEN') + json_path = os.environ.get("JSON_PATH", "JSON") + input_filename = os.path.join(json_path, "omniflo_weichen_output.json") + process_svg_files(svg_folder, input_filename) print("Processing complete") diff --git a/SVGs/Omniflo/lib/OFWeiche/03_convert_svgs_to_xml_and_update_xml_path_in_props.py b/SVGs/Omniflo/lib/OFWeiche/03_convert_svgs_to_xml_and_update_xml_path_in_props.py new file mode 100644 index 0000000..1f655ff --- /dev/null +++ b/SVGs/Omniflo/lib/OFWeiche/03_convert_svgs_to_xml_and_update_xml_path_in_props.py @@ -0,0 +1,194 @@ +import os +import re +import json +from xml.etree import ElementTree as ET +from xml.dom import minidom + +def extract_sivasnr(filename): + """Extract numeric ID from filename""" + match = re.search(r'(\d+)\.svg$', filename) + return match.group(1) if match else None + +def should_skip_stroke_width(element_attrib): + """Check if element should skip stroke-width setting""" + # Check style attribute + if 'style' in element_attrib: + style = element_attrib['style'].lower() + if 'stroke:none' in style and 'fill:none' in style: + return True + + # Check separate stroke and fill attributes + stroke = element_attrib.get('stroke', '').lower() + fill = element_attrib.get('fill', '').lower() + return stroke == 'none' and fill == 'none' + +def create_xml_structure(svg_root): + """Create target XML structure preserving all elements""" + # Create base structure + new_root = ET.Element("svg", xmlns="http://www.w3.org/2000/svg") + g_layer = ET.SubElement(new_root, "g", transform="rotate(0)") + + # Add inner SVG container + inner_svg = ET.SubElement(g_layer, "svg", { + "viewBox": svg_root.attrib.get("viewBox", "0 0 1000 1000"), + "preserveAspectRatio": "none", + "position": "absolute", + "overflow": "visible" + }) + + # Transfer all content + for elem in svg_root: + if elem.tag.endswith("}g"): + # Process group with namespace + new_g = ET.SubElement(inner_svg, "g", attrib={ + k: v for k, v in elem.attrib.items() + if not k.startswith("xmlns") + }) + + # Process all elements within group + for child in elem: + child_tag = child.tag.split("}")[-1] # Remove namespace + child_attrib = {} + + # Preserve all original attributes (except namespace) + for k, v in child.attrib.items(): + if not k.startswith("xmlns"): + child_attrib[k] = v + + # Only add stroke-width if not stroke:none;fill:none + if not should_skip_stroke_width(child.attrib): + child_attrib["stroke-width"] = "1px" + + # Create element with preserved attributes + ET.SubElement(new_g, child_tag, attrib=child_attrib) + + else: + # Process standalone elements (path, circle, etc.) + elem_tag = elem.tag.split("}")[-1] # Remove namespace + elem_attrib = {} + + # Preserve all original attributes (except namespace) + for k, v in elem.attrib.items(): + if not k.startswith("xmlns"): + elem_attrib[k] = v + + # Only add stroke-width if not stroke:none;fill:none + if not should_skip_stroke_width(elem.attrib): + elem_attrib["stroke-width"] = "1px" + + ET.SubElement(inner_svg, elem_tag, attrib=elem_attrib) + + return new_root + +def format_xml(element): + """Generate formatted XML string""" + # Generate XML with declaration + xml_str = ET.tostring(element, encoding="UTF-8", xml_declaration=True) + + # Pretty format with 2-space indent + dom = minidom.parseString(xml_str) + pretty_xml = dom.toprettyxml(indent=" ", encoding="UTF-8").decode("UTF-8") + + # Remove extra empty lines (preserve structure) + lines = [] + for line in pretty_xml.split("\n"): + if line.strip() or line.lstrip().startswith(" 0: - # Save with proper formatting - xml_str = ET.tostring(root, encoding='unicode') - xml_str = xml_str.replace('><', '>\n<') - with open(xml_file_path, 'w', encoding='utf-8') as xml_file: - xml_file.write(xml_str) - print(f"Successfully modified {file_modified_count} path(s) in: {xml_file_name}") - else: - print(f"No target paths found in: {xml_file_name}") - - except Exception as e: - print(f"Error processing {xml_file_name}: {str(e)}") - else: - print(f"XML file not found: {xml_file_name}") - - # Print total modifications summary - print(f"\nTotal paths modified across all files: {total_modified}") - -if __name__ == "__main__": - json_file_path = r"C:\Users\y.wang\Documents\SSG-Ruledesigner-Konfigurator\SVGs\Omniflo\python\OFWeiche\JSON\omniflo_weichen_output.json" - xml_folder_path = r"C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\svg" - process_json_and_modify_xml(json_file_path, xml_folder_path) - - - diff --git a/SVGs/Omniflo/python/OFWeiche/run_OFWeiche.bat b/SVGs/Omniflo/python/OFWeiche/run_OFWeiche.bat deleted file mode 100644 index d4f1a19..0000000 --- a/SVGs/Omniflo/python/OFWeiche/run_OFWeiche.bat +++ /dev/null @@ -1,15 +0,0 @@ -@echo off - -set "OFWeiche_PATH=%~dp0" -set PROPS_PATH=C:\Program Files\RuleDesigner\RDConfigurator Fusion\WebApi\Editor2D\SSG\shapes\props -set "JSON_PATH=%OFWeiche_PATH%JSON" - -echo "[DEBUG] OFWeiche_PATH: %OFWeiche_PATH%" -echo "[DEBUG] PROPS_PATH: %PROPS_PATH%" -echo "[DEBUG] JSON_PATH: %JSON_PATH%" - -python 1_omniflo_weichen.py -python 2_calculations_to_standardize_the_dimensions_and_add_connection_points.py -python 3_update_dimensions_and_connection_points_in_props.py - -pause \ No newline at end of file