neue Datei für TEFBogen
@@ -1,62 +1,62 @@
|
||||
[
|
||||
{
|
||||
"Sivasnr": 0_B10040,
|
||||
"Sivasnr": "0_B10040",
|
||||
"Beschreibung": "TEF Bogen 90° R725",
|
||||
"Radius": 725,
|
||||
"KurvenWinkel": 90,
|
||||
"innen": false
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10050,
|
||||
"Sivasnr": "0_B10050",
|
||||
"Beschreibung": "TEF Bogen 90° R535",
|
||||
"Radius": 535,
|
||||
"KurvenWinkel": 90,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10060,
|
||||
"Sivasnr": "0_B10060",
|
||||
"Beschreibung": "TEF Bogen 45° R725",
|
||||
"Radius": 725,
|
||||
"KurvenWinkel": 45,
|
||||
"innen": false
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10070,
|
||||
"Sivasnr": "0_B10070",
|
||||
"Beschreibung": "TEF Bogen 45° R535",
|
||||
"Radius": 535,
|
||||
"KurvenWinkel": 45,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10071,
|
||||
"Sivasnr": "0_B10071",
|
||||
"Beschreibung": "TEF Bogen 45° R450 für S C Delta 1600",
|
||||
"Radius": 450,
|
||||
"KurvenWinkel": 45,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10080,
|
||||
"Sivasnr": "0_B10080",
|
||||
"Beschreibung": "TEF Bogen 67.5° R400",
|
||||
"Radius": 400,
|
||||
"KurvenWinkel": 67.5,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10081,
|
||||
"Sivasnr": "0_B10081",
|
||||
"Beschreibung": "TEF Bogen 67.5° R250",
|
||||
"Radius": 250,
|
||||
"KurvenWinkel": 67.5,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10090,
|
||||
"Sivasnr": "0_B10090",
|
||||
"Beschreibung": "TEF Bogen 22.5° R450",
|
||||
"Radius": 450,
|
||||
"KurvenWinkel": 22.5,
|
||||
"innen": true
|
||||
},
|
||||
{
|
||||
"Sivasnr": 0_B10091,
|
||||
"Sivasnr": "0_B10091",
|
||||
"Beschreibung": "TEF Bogen 22.5° R650",
|
||||
"Radius": 650,
|
||||
"KurvenWinkel": 22.5,
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="292.389,316.4 292.389,336.75 " />
|
||||
<polyline points="292.389,326.575 340.751,326.575 " stroke-dasharray="14.231860,1.581318,3.162635,1.581318,3.162635,1.581318" />
|
||||
<polyline points="537.981,490.674 519.474,445.993 " stroke-dasharray="14.231860,1.581318,3.162635,1.581318,3.162635,1.581318" />
|
||||
<polyline points="547.382,486.78 528.581,494.568 " />
|
||||
<path d="M519.474,445.993 A193.448,193.448 0 0,0 340.751,326.575 " stroke-dasharray="14.231860,1.581318,3.162635,1.581318,3.162635,1.581318" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<polyline points="463.505,476.818 491.475,465.232 " />
|
||||
<polyline points="491.475,465.232 482.592,443.785 " />
|
||||
<path d="M482.592,443.785 A136.042,136.042 0 0,0 356.905,359.804 " />
|
||||
<polyline points="356.905,359.804 329.339,359.804 " />
|
||||
<polyline points="329.339,359.804 329.339,390.079 " />
|
||||
<polyline points="329.339,390.079 356.905,390.079 " />
|
||||
<path d="M454.622,455.371 A105.768,105.768 0 0,0 356.905,390.079 " />
|
||||
<polyline points="454.622,455.371 463.505,476.818 " />
|
||||
<polyline points="477.49,471.025 468.607,449.578 " />
|
||||
<path d="M468.607,449.578 A120.905,120.905 0 0,0 356.905,374.942 " />
|
||||
<polyline points="356.905,374.942 329.339,374.942 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<path d="M654.543,382.789 A42.1742,42.1742 0 0,0 638.404,379.579 " />
|
||||
<polyline points="638.404,379.579 625.813,379.579 " />
|
||||
<polyline points="625.813,379.579 625.813,373.273 " />
|
||||
<polyline points="625.813,373.273 638.404,373.273 " />
|
||||
<path d="M656.956,376.964 A48.4797,48.4797 0 0,0 638.404,373.273 " />
|
||||
<polyline points="656.956,376.964 668.589,381.782 " />
|
||||
<polyline points="668.589,381.782 666.176,387.607 " />
|
||||
<polyline points="666.176,387.607 654.543,382.789 " />
|
||||
<path d="M655.75,379.876 A45.3269,45.3269 0 0,0 638.404,376.426 " />
|
||||
<polyline points="638.404,376.426 625.813,376.426 " />
|
||||
<polyline points="655.75,379.876 667.382,384.695 " />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="627.336,368.472 627.336,364.233 " />
|
||||
<polyline points="627.336,366.352 638.416,366.352 " stroke-dasharray="2.964156,0.329351,0.658701,0.329351,0.658701,0.329351" />
|
||||
<polyline points="679.159,378.664 659.616,370.569 " stroke-dasharray="2.964156,0.329351,0.658701,0.329351,0.658701,0.329351" />
|
||||
<polyline points="679.97,376.706 678.348,380.622 " />
|
||||
<path d="M659.616,370.569 A55.3996,55.3996 0 0,0 638.416,366.352 " stroke-dasharray="2.964156,0.329351,0.658701,0.329351,0.658701,0.329351" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<polyline points="655.243,343.311 655.244,335.579 " />
|
||||
<polyline points="681.304,343.313 655.243,343.311 " />
|
||||
<polyline points="733.255,358.541 710.548,349.133 " />
|
||||
<polyline points="681.305,339.447 655.243,339.445 " />
|
||||
<polyline points="712.028,345.561 734.735,354.969 " />
|
||||
<polyline points="681.305,335.581 655.244,335.579 " />
|
||||
<polyline points="736.215,351.397 713.507,341.99 " />
|
||||
<polyline points="733.255,358.541 736.215,351.397 " />
|
||||
<path d="M713.507,341.99 A84.1497,84.1497 0 0,0 681.305,335.581 " />
|
||||
<path d="M712.028,345.561 A80.2837,80.2837 0 0,0 681.305,339.447 " />
|
||||
<path d="M710.548,349.133 A76.4178,76.4178 0 0,0 681.304,343.313 " />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="667.702,354.397 667.702,349.199 " />
|
||||
<polyline points="667.702,351.798 681.288,351.798 " stroke-dasharray="3.634723,0.403858,0.807716,0.403858,0.807716,0.403858" />
|
||||
<polyline points="731.248,366.895 707.285,356.969 " stroke-dasharray="3.634723,0.403858,0.807716,0.403858,0.807716,0.403858" />
|
||||
<polyline points="732.243,364.494 730.254,369.296 " />
|
||||
<path d="M707.285,356.969 A67.9324,67.9324 0 0,0 681.288,351.798 " stroke-dasharray="3.634723,0.403858,0.807716,0.403858,0.807716,0.403858" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="367.117,339.29 367.117,333.518 " />
|
||||
<polyline points="367.117,336.404 381.034,336.404 " stroke-dasharray="4.036954,0.448550,0.897101,0.448550,0.897101,0.448550" />
|
||||
<polyline points="448.777,372.894 434.385,358.503 " stroke-dasharray="4.036954,0.448550,0.897101,0.448550,0.897101,0.448550" />
|
||||
<polyline points="450.817,370.853 446.736,374.935 " />
|
||||
<path d="M434.385,358.503 A75.45,75.45 0 0,0 381.034,336.404 " stroke-dasharray="4.036954,0.448550,0.897101,0.448550,0.897101,0.448550" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(255,0,0)" stroke-width="0.1" >
|
||||
<polyline points="421.648,371.241 426.207,375.8 " />
|
||||
<polyline points="426.207,375.8 432.28,369.727 " />
|
||||
<polyline points="432.28,369.727 427.721,365.168 " />
|
||||
<path d="M427.721,365.168 A66.0256,66.0256 0 0,0 381.034,345.83 " />
|
||||
<polyline points="381.034,345.83 374.586,345.83 " />
|
||||
<polyline points="374.586,345.83 374.586,354.417 " />
|
||||
<polyline points="374.586,354.417 381.034,354.417 " />
|
||||
<path d="M421.648,371.241 A57.438,57.438 0 0,0 381.034,354.417 " />
|
||||
<path d="M424.689,368.2 A61.7384,61.7384 0 0,0 381.034,350.117 " />
|
||||
<polyline points="381.034,350.117 374.586,350.124 " />
|
||||
<polyline points="424.689,368.2 429.244,372.764 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="547.214,478.976 540.917,481.584 " />
|
||||
<polyline points="544.065,480.28 531.265,449.377 " stroke-dasharray="4.766665,0.529629,1.059259,0.529629,1.059259,0.529629" />
|
||||
<polyline points="422.799,394.382 448.958,394.382 " stroke-dasharray="4.766665,0.529629,1.059259,0.529629,1.059259,0.529629" />
|
||||
<polyline points="422.799,390.974 422.799,397.79 " />
|
||||
<path d="M531.265,449.377 A89.0882,89.0882 0 0,0 448.958,394.382 " stroke-dasharray="4.766665,0.529629,1.059259,0.529629,1.059259,0.529629" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<polyline points="445.298,415.651 454.369,415.651 " />
|
||||
<path d="M509.544,452.518 A59.7215,59.7215 0 0,0 454.369,415.651 " />
|
||||
<polyline points="509.544,452.518 516.704,469.803 " />
|
||||
<polyline points="516.704,469.803 526.072,465.922 " />
|
||||
<polyline points="526.072,465.922 518.912,448.638 " />
|
||||
<path d="M518.912,448.638 A69.8614,69.8614 0 0,0 454.369,405.511 " />
|
||||
<polyline points="454.369,405.511 445.298,405.511 " />
|
||||
<polyline points="445.298,405.511 445.298,415.651 " />
|
||||
<polyline points="445.298,410.581 454.369,410.581 " />
|
||||
<path d="M514.228,450.578 A64.7914,64.7914 0 0,0 454.369,410.581 " />
|
||||
<polyline points="514.228,450.578 521.388,467.862 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="678.557,497.369 689.645,486.281 " />
|
||||
<polyline points="684.101,491.825 640.859,448.584 " stroke-dasharray="10.966450,1.218494,2.436989,1.218494,2.436989,1.218494" />
|
||||
<path d="M640.859,448.584 A234.774,234.774 0 0,0 474.849,379.82 " stroke-dasharray="10.966450,1.218494,2.436989,1.218494,2.436989,1.218494" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<polyline points="658.418,429.931 702.256,473.769 " />
|
||||
<polyline points="702.256,473.769 718.752,457.274 " />
|
||||
<polyline points="718.752,457.274 674.914,413.435 " />
|
||||
<path d="M674.914,413.435 A281.84,281.84 0 0,0 475.622,330.886 " />
|
||||
<polyline points="475.622,330.886 361.421,330.886 " />
|
||||
<polyline points="361.421,330.886 361.421,354.215 " />
|
||||
<polyline points="361.421,354.215 475.622,354.215 " />
|
||||
<path d="M658.418,429.931 A258.512,258.512 0 0,0 475.622,354.215 " />
|
||||
<polyline points="666.666,421.683 710.504,465.522 " />
|
||||
<path d="M666.666,421.683 A270.176,270.176 0 0,0 475.622,342.551 " />
|
||||
<polyline points="475.622,342.551 361.421,342.551 " />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="361.524,379.82 474.849,379.82 " stroke-dasharray="10.966450,1.218494,2.436989,1.218494,2.436989,1.218494" />
|
||||
<polyline points="361.524,387.66 361.524,371.98 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<polyline points="484.412,416.967 504.632,437.185 " />
|
||||
<polyline points="504.632,437.185 512.439,429.378 " />
|
||||
<polyline points="512.439,429.378 492.219,409.159 " />
|
||||
<path d="M492.219,409.159 A99.8821,99.8821 0 0,0 421.591,379.906 " />
|
||||
<polyline points="421.591,379.906 368.247,379.908 " />
|
||||
<polyline points="368.246,379.908 368.247,390.949 " />
|
||||
<polyline points="368.247,390.949 421.591,390.947 " />
|
||||
<path d="M484.412,416.967 A88.8409,88.8409 0 0,0 421.591,390.947 " />
|
||||
<path d="M488.316,413.063 A94.3615,94.3615 0 0,0 421.591,385.427 " />
|
||||
<polyline points="421.591,385.427 368.247,385.428 " />
|
||||
<polyline points="488.316,413.063 508.536,433.282 " />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="518.265,423.424 523.513,418.176 " />
|
||||
<polyline points="368.215,367.789 421.851,367.789 " stroke-dasharray="5.190369,0.576708,1.153415,0.576708,1.153415,0.576708" />
|
||||
<polyline points="520.889,420.8 500.423,400.334 " stroke-dasharray="5.190369,0.576708,1.153415,0.576708,1.153415,0.576708" />
|
||||
<polyline points="368.215,371.5 368.215,364.078 " />
|
||||
<path d="M500.423,400.334 A111.117,111.117 0 0,0 421.851,367.789 " stroke-dasharray="5.190369,0.576708,1.153415,0.576708,1.153415,0.576708" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="432.54,356.159 432.54,350.391 " />
|
||||
<polyline points="539.32,462.939 545.088,462.939 " />
|
||||
<polyline points="542.204,462.939 542.204,439.636 " stroke-dasharray="4.033974,0.448219,0.896439,0.448219,0.896439,0.448219" />
|
||||
<polyline points="432.54,353.275 455.843,353.275 " stroke-dasharray="4.033974,0.448219,0.896439,0.448219,0.896439,0.448219" />
|
||||
<path d="M542.204,439.636 A86.3608,86.3608 0 0,0 455.843,353.275 " stroke-dasharray="4.033974,0.448219,0.896439,0.448219,0.896439,0.448219" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<path d="M551.621,438.95 A95.0928,95.0928 0 0,0 456.529,343.857 " />
|
||||
<polyline points="551.621,438.95 551.621,462.939 " />
|
||||
<polyline points="551.621,462.939 560.203,462.939 " />
|
||||
<polyline points="560.203,462.939 560.203,438.95 " />
|
||||
<path d="M560.203,438.95 A103.674,103.674 0 0,0 456.529,335.276 " />
|
||||
<polyline points="456.529,335.276 432.54,335.276 " />
|
||||
<polyline points="432.54,335.276 432.54,343.857 " />
|
||||
<polyline points="432.54,343.857 456.529,343.857 " />
|
||||
<polyline points="456.529,339.567 432.54,339.567 " />
|
||||
<path d="M555.912,438.95 A99.3834,99.3834 0 0,0 456.529,339.567 " />
|
||||
<polyline points="555.912,438.95 555.912,462.939 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<svg viewBox="0 0 1024 768" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" fill-rule="evenodd" xml:space="preserve" >
|
||||
<defs >
|
||||
<clipPath id="clipId0" >
|
||||
<path d="M0,768 1024,768 1024,0 0,0 z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" />
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,255,255)" stroke-width="0.1" >
|
||||
<polyline points="421.617,322.83 421.617,313.294 " />
|
||||
<polyline points="598.131,499.344 607.667,499.344 " />
|
||||
<polyline points="602.899,499.344 602.899,460.822 " stroke-dasharray="6.668406,0.740934,1.481868,0.740934,1.481868,0.740934" />
|
||||
<polyline points="421.617,318.062 460.139,318.062 " stroke-dasharray="6.668406,0.740934,1.481868,0.740934,1.481868,0.740934" />
|
||||
<path d="M602.899,460.822 A142.76,142.76 0 0,0 460.139,318.062 " stroke-dasharray="6.668406,0.740934,1.481868,0.740934,1.481868,0.740934" />
|
||||
</g>
|
||||
<g clip-path="url(#clipId0)" fill="none" stroke="rgb(0,0,0)" stroke-width="0.1" >
|
||||
<path d="M573.146,461.955 A114.14,114.14 0 0,0 459.006,347.815 " />
|
||||
<polyline points="573.146,461.955 573.146,499.344 " />
|
||||
<polyline points="573.146,499.344 587.331,499.344 " />
|
||||
<polyline points="587.331,499.344 587.331,461.955 " />
|
||||
<path d="M587.331,461.955 A128.325,128.325 0 0,0 459.006,333.63 " />
|
||||
<polyline points="459.006,333.63 421.617,333.63 " />
|
||||
<polyline points="421.617,333.63 421.617,347.815 " />
|
||||
<polyline points="421.617,347.815 459.006,347.815 " />
|
||||
<polyline points="459.006,340.722 421.617,340.722 " />
|
||||
<path d="M580.239,461.955 A121.232,121.232 0 0,0 459.006,340.722 " />
|
||||
<polyline points="580.239,461.955 580.239,499.344 " />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1,182 +0,0 @@
|
||||
[
|
||||
{
|
||||
"SVGname": "APB_110_R400_45_400_821104021.svg",
|
||||
"Sivasnr": "821104021",
|
||||
"Winkel":45,
|
||||
"center_line_width_mm": 669.491,
|
||||
"center_line_height_mm": 399.505,
|
||||
"Objekt_width_mm":684.367,
|
||||
"Objekt_height_mm":435.421
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_67_5_339_821104024.svg",
|
||||
"Sivasnr": "821104024",
|
||||
"Winkel":67.5,
|
||||
"center_line_width_mm": 507.820,
|
||||
"center_line_height_mm": 339.315,
|
||||
"Objekt_width_mm":527.258,
|
||||
"Objekt_height_mm":368.405
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_90_500_821104022.svg",
|
||||
"Sivasnr": "821104022",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 500,
|
||||
"center_line_height_mm": 500,
|
||||
"Objekt_width_mm":521.040,
|
||||
"Objekt_height_mm":521.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R500_90_550_550_821104030.svg",
|
||||
"Sivasnr": "821104030",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 550,
|
||||
"center_line_height_mm": 550,
|
||||
"Objekt_width_mm":571.040,
|
||||
"Objekt_height_mm":571.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_22_5_84_821104025.svg",
|
||||
"Sivasnr": "821104025",
|
||||
"Winkel":22.5,
|
||||
"center_line_width_mm": 514.491,
|
||||
"center_line_height_mm": 122.230,
|
||||
"Objekt_width_mm":522.542,
|
||||
"Objekt_height_mm":162.707
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_191_821104029.svg",
|
||||
"Sivasnr": "821104029",
|
||||
"Winkel":45,
|
||||
"center_line_width_mm": 551.606,
|
||||
"center_line_height_mm": 190.792 ,
|
||||
"Objekt_width_mm":566.483,
|
||||
"Objekt_height_mm":226.709
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_205_821104037.svg",
|
||||
"Sivasnr": "821104037",
|
||||
"Winkel":45,
|
||||
"center_line_width_mm": 537.249,
|
||||
"center_line_height_mm": 204.932,
|
||||
"Objekt_width_mm":552.126,
|
||||
"Objekt_height_mm":240.849
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_232_821104026.svg",
|
||||
"Sivasnr": "821104026",
|
||||
"Winkel":45,
|
||||
"center_line_width_mm": 595.265,
|
||||
"center_line_height_mm": 265.998,
|
||||
"Objekt_width_mm":610.142,
|
||||
"Objekt_height_mm":301.914
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_420_821104028.svg",
|
||||
"Sivasnr": "821104028",
|
||||
"Winkel":67.5,
|
||||
"center_line_width_mm": 582.427,
|
||||
"center_line_height_mm": 419.902,
|
||||
"Objekt_width_mm":601.865,
|
||||
"Objekt_height_mm":448.992
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_432_821104027.svg",
|
||||
"Sivasnr": "821104027",
|
||||
"Winkel":67.5,
|
||||
"center_line_width_mm": 748.658,
|
||||
"center_line_height_mm": 530.305,
|
||||
"Objekt_width_mm":768.095,
|
||||
"Objekt_height_mm":559.396
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_L_185_170_821104065.svg",
|
||||
"Sivasnr": "821104065",
|
||||
"Winkel":67.5,
|
||||
"center_line_width_mm": 758.190,
|
||||
"center_line_height_mm": 496.584,
|
||||
"Objekt_width_mm":777.628,
|
||||
"Objekt_height_mm":525.674
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_90_900_605_821104066.svg",
|
||||
"Sivasnr": "821104066",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 900,
|
||||
"center_line_height_mm": 605,
|
||||
"Objekt_width_mm":921.040,
|
||||
"Objekt_height_mm":626.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_45_400_821104031.svg",
|
||||
"Sivasnr": "821104031",
|
||||
"Winkel":45,
|
||||
"center_line_width_mm": 865.613,
|
||||
"center_line_height_mm": 300.559,
|
||||
"Objekt_width_mm":880.491,
|
||||
"Objekt_height_mm":336.475
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_800_800_821104033.svg",
|
||||
"Sivasnr": "821104033",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 800,
|
||||
"center_line_height_mm": 800,
|
||||
"Objekt_width_mm":821.040,
|
||||
"Objekt_height_mm":821.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_690_821104041.svg",
|
||||
"Sivasnr": "821104041",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 690,
|
||||
"center_line_height_mm": 850,
|
||||
"Objekt_width_mm":711.040,
|
||||
"Objekt_height_mm":871.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_870_821104035.svg",
|
||||
"Sivasnr": "821104035",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 850,
|
||||
"center_line_height_mm": 870,
|
||||
"Objekt_width_mm":871.04,
|
||||
"Objekt_height_mm":891.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_890_821104034.svg",
|
||||
"Sivasnr": "821104034",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 890,
|
||||
"center_line_height_mm": 850,
|
||||
"Objekt_width_mm":911.040,
|
||||
"Objekt_height_mm":871.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R650_180_L_150_821104043.svg",
|
||||
"Sivasnr": "821104043",
|
||||
"Winkel":180,
|
||||
"center_line_width_mm": 800,
|
||||
"center_line_height_mm": 1300,
|
||||
"Objekt_width_mm":800,
|
||||
"Objekt_height_mm":1342.080
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_650_821094040.svg",
|
||||
"Sivasnr": "821094040",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 650.0,
|
||||
"center_line_height_mm": 650.0,
|
||||
"Objekt_width_mm": 671.040,
|
||||
"Objekt_height_mm": 671.040
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_810_821094101.svg",
|
||||
"Sivasnr": "821094101",
|
||||
"Winkel":90,
|
||||
"center_line_width_mm": 810.0,
|
||||
"center_line_height_mm": 810.0,
|
||||
"Objekt_width_mm": 831.04,
|
||||
"Objekt_height_mm": 831.04
|
||||
}
|
||||
]
|
||||
@@ -1,222 +0,0 @@
|
||||
[
|
||||
{
|
||||
"SVGname": "APB_110_R400_45_400_821104021.svg",
|
||||
"Sivasnr": "821104021",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 669.491,
|
||||
"center_line_height_mm": 399.505,
|
||||
"Objekt_width_mm": 684.367,
|
||||
"Objekt_height_mm": 435.421,
|
||||
"calculated_objekt_width_mm": 684.369,
|
||||
"calculated_objekt_height_mm": 435.423
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_67_5_339_821104024.svg",
|
||||
"Sivasnr": "821104024",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 507.82,
|
||||
"center_line_height_mm": 339.315,
|
||||
"Objekt_width_mm": 527.258,
|
||||
"Objekt_height_mm": 368.405,
|
||||
"calculated_objekt_width_mm": 527.258,
|
||||
"calculated_objekt_height_mm": 368.407
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_90_500_821104022.svg",
|
||||
"Sivasnr": "821104022",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 500.0,
|
||||
"center_line_height_mm": 500.0,
|
||||
"Objekt_width_mm": 521.04,
|
||||
"Objekt_height_mm": 521.04,
|
||||
"calculated_objekt_width_mm": 521.04,
|
||||
"calculated_objekt_height_mm": 521.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R500_90_550_550_821104030.svg",
|
||||
"Sivasnr": "821104030",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 550.0,
|
||||
"center_line_height_mm": 550.0,
|
||||
"Objekt_width_mm": 571.04,
|
||||
"Objekt_height_mm": 571.04,
|
||||
"calculated_objekt_width_mm": 571.04,
|
||||
"calculated_objekt_height_mm": 571.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_22_5_84_821104025.svg",
|
||||
"Sivasnr": "821104025",
|
||||
"Winkel": 22.5,
|
||||
"center_line_width_mm": 514.491,
|
||||
"center_line_height_mm": 122.23,
|
||||
"Objekt_width_mm": 522.542,
|
||||
"Objekt_height_mm": 162.707,
|
||||
"calculated_objekt_width_mm": 522.543,
|
||||
"calculated_objekt_height_mm": 162.708
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_191_821104029.svg",
|
||||
"Sivasnr": "821104029",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 551.606,
|
||||
"center_line_height_mm": 190.792,
|
||||
"Objekt_width_mm": 566.483,
|
||||
"Objekt_height_mm": 226.709,
|
||||
"calculated_objekt_width_mm": 566.484,
|
||||
"calculated_objekt_height_mm": 226.71
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_205_821104037.svg",
|
||||
"Sivasnr": "821104037",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 537.249,
|
||||
"center_line_height_mm": 204.932,
|
||||
"Objekt_width_mm": 552.126,
|
||||
"Objekt_height_mm": 240.849,
|
||||
"calculated_objekt_width_mm": 552.127,
|
||||
"calculated_objekt_height_mm": 240.85
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_232_821104026.svg",
|
||||
"Sivasnr": "821104026",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 595.265,
|
||||
"center_line_height_mm": 265.998,
|
||||
"Objekt_width_mm": 610.142,
|
||||
"Objekt_height_mm": 301.914,
|
||||
"calculated_objekt_width_mm": 610.143,
|
||||
"calculated_objekt_height_mm": 301.916
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_420_821104028.svg",
|
||||
"Sivasnr": "821104028",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 582.427,
|
||||
"center_line_height_mm": 419.902,
|
||||
"Objekt_width_mm": 601.865,
|
||||
"Objekt_height_mm": 448.992,
|
||||
"calculated_objekt_width_mm": 601.865,
|
||||
"calculated_objekt_height_mm": 448.994
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_432_821104027.svg",
|
||||
"Sivasnr": "821104027",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 748.658,
|
||||
"center_line_height_mm": 530.305,
|
||||
"Objekt_width_mm": 768.095,
|
||||
"Objekt_height_mm": 559.396,
|
||||
"calculated_objekt_width_mm": 768.096,
|
||||
"calculated_objekt_height_mm": 559.397
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_L_185_170_821104065.svg",
|
||||
"Sivasnr": "821104065",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 758.19,
|
||||
"center_line_height_mm": 496.584,
|
||||
"Objekt_width_mm": 777.628,
|
||||
"Objekt_height_mm": 525.674,
|
||||
"calculated_objekt_width_mm": 777.628,
|
||||
"calculated_objekt_height_mm": 525.676
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_90_900_605_821104066.svg",
|
||||
"Sivasnr": "821104066",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 900.0,
|
||||
"center_line_height_mm": 605.0,
|
||||
"Objekt_width_mm": 921.04,
|
||||
"Objekt_height_mm": 626.04,
|
||||
"calculated_objekt_width_mm": 921.04,
|
||||
"calculated_objekt_height_mm": 626.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_45_400_821104031.svg",
|
||||
"Sivasnr": "821104031",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 865.613,
|
||||
"center_line_height_mm": 300.559,
|
||||
"Objekt_width_mm": 880.491,
|
||||
"Objekt_height_mm": 336.475,
|
||||
"calculated_objekt_width_mm": 880.491,
|
||||
"calculated_objekt_height_mm": 336.477
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_800_800_821104033.svg",
|
||||
"Sivasnr": "821104033",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 800.0,
|
||||
"center_line_height_mm": 800.0,
|
||||
"Objekt_width_mm": 821.04,
|
||||
"Objekt_height_mm": 821.04,
|
||||
"calculated_objekt_width_mm": 821.04,
|
||||
"calculated_objekt_height_mm": 821.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_690_821104041.svg",
|
||||
"Sivasnr": "821104041",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 690.0,
|
||||
"center_line_height_mm": 850.0,
|
||||
"Objekt_width_mm": 711.04,
|
||||
"Objekt_height_mm": 871.04,
|
||||
"calculated_objekt_width_mm": 711.04,
|
||||
"calculated_objekt_height_mm": 871.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_870_821104035.svg",
|
||||
"Sivasnr": "821104035",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 850.0,
|
||||
"center_line_height_mm": 870.0,
|
||||
"Objekt_width_mm": 871.04,
|
||||
"Objekt_height_mm": 891.04,
|
||||
"calculated_objekt_width_mm": 871.04,
|
||||
"calculated_objekt_height_mm": 891.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_890_821104034.svg",
|
||||
"Sivasnr": "821104034",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 890.0,
|
||||
"center_line_height_mm": 850.0,
|
||||
"Objekt_width_mm": 911.04,
|
||||
"Objekt_height_mm": 871.04,
|
||||
"calculated_objekt_width_mm": 911.04,
|
||||
"calculated_objekt_height_mm": 871.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R650_180_L_150_821104043.svg",
|
||||
"Sivasnr": "821104043",
|
||||
"Winkel": 180.0,
|
||||
"center_line_width_mm": 800.0,
|
||||
"center_line_height_mm": 1300.0,
|
||||
"Objekt_width_mm": 800.0,
|
||||
"Objekt_height_mm": 1342.08,
|
||||
"calculated_objekt_width_mm": 800.0,
|
||||
"calculated_objekt_height_mm": 1342.08
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_650_821094040.svg",
|
||||
"Sivasnr": "821094040",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 650.0,
|
||||
"center_line_height_mm": 650.0,
|
||||
"Objekt_width_mm": 671.04,
|
||||
"Objekt_height_mm": 671.04,
|
||||
"calculated_objekt_width_mm": 671.04,
|
||||
"calculated_objekt_height_mm": 671.04
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_810_821094101.svg",
|
||||
"Sivasnr": "821094101",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 810.0,
|
||||
"center_line_height_mm": 810.0,
|
||||
"Objekt_width_mm": 831.04,
|
||||
"Objekt_height_mm": 831.04,
|
||||
"calculated_objekt_width_mm": 831.04,
|
||||
"calculated_objekt_height_mm": 831.04
|
||||
}
|
||||
]
|
||||
@@ -1,151 +0,0 @@
|
||||
''' Key Analysis Points:
|
||||
|
||||
Data Safety:
|
||||
Uses safe_float() to handle potential data conversion issues
|
||||
Creates copies of items to avoid modifying original data
|
||||
Geometric Calculations:
|
||||
Converts angles to radians for trigonometric functions
|
||||
Performs width/height calculations based on center line measurements and angles
|
||||
Rounds results to 3 decimal places for consistency
|
||||
Validation:
|
||||
Compares calculated values with original values
|
||||
Flags discrepancies with "Please verify" status
|
||||
Provides detailed difference metrics
|
||||
Error Handling:
|
||||
Preserves original data when processing fails
|
||||
Tracks and reports all errors
|
||||
Provides comprehensive statistics
|
||||
Output:
|
||||
Generates a new JSON file with calculated fields
|
||||
Provides detailed console output for verification
|
||||
Maintains original structure while adding new calculated fields
|
||||
|
||||
The script is designed to process SVG measurement data, perform geometric validations, and produce an enhanced dataset while providing thorough feedback about the processing results. '''
|
||||
import json
|
||||
import math
|
||||
|
||||
def safe_float(value, default=0.0):
|
||||
"""Safely convert value to float, return default if conversion fails"""
|
||||
try:
|
||||
return float(value) if value != '' else default
|
||||
except (ValueError, TypeError):
|
||||
return default
|
||||
|
||||
def calculate_attributes(item):
|
||||
"""Calculate and add new attributes to the item based on geometric calculations"""
|
||||
# Create a copy of the item to avoid modifying the original
|
||||
processed_item = item.copy()
|
||||
|
||||
# Ensure all numeric fields have valid values using safe_float
|
||||
processed_item["center_line_width_mm"] = safe_float(item.get("center_line_width_mm", 0))
|
||||
processed_item["center_line_height_mm"] = safe_float(item.get("center_line_height_mm", 0))
|
||||
processed_item["Objekt_width_mm"] = safe_float(item.get("Objekt_width_mm", 0))
|
||||
processed_item["Objekt_height_mm"] = safe_float(item.get("Objekt_height_mm", 0))
|
||||
processed_item["Winkel"] = safe_float(item.get("Winkel", 0))
|
||||
|
||||
# Convert angle to radians for trigonometric calculations
|
||||
winkel_rad = math.radians(processed_item["Winkel"])
|
||||
sin_value = math.sin(winkel_rad)
|
||||
cos_value = math.cos(winkel_rad)
|
||||
|
||||
# Calculate new dimensions with 3 decimal places precision
|
||||
if processed_item["Winkel"]!=180:
|
||||
calculated_width = processed_item["center_line_width_mm"] + sin_value * 21.040
|
||||
calculated_height = processed_item["center_line_height_mm"] + 21.040 + cos_value * 21.040
|
||||
else:
|
||||
calculated_width = processed_item["center_line_width_mm"]
|
||||
calculated_height = processed_item["center_line_height_mm"]+ 21.040 + 21.040
|
||||
|
||||
|
||||
processed_item["calculated_objekt_width_mm"] = round(calculated_width, 3)
|
||||
processed_item["calculated_objekt_height_mm"] = round(calculated_height, 3)
|
||||
|
||||
# Calculate differences between original and calculated values
|
||||
width_diff = round(processed_item["Objekt_width_mm"] - processed_item["calculated_objekt_width_mm"], 3)
|
||||
height_diff = round(processed_item["Objekt_height_mm"] - processed_item["calculated_objekt_height_mm"], 3)
|
||||
|
||||
# Prepare comparison results for console output (not saved to JSON)
|
||||
comparison_results = {
|
||||
"width": {
|
||||
"calculated": processed_item["calculated_objekt_width_mm"],
|
||||
"original": processed_item["Objekt_width_mm"],
|
||||
"difference": width_diff,
|
||||
"status": "OK" if abs(width_diff) < 0.001 else "Please verify"
|
||||
},
|
||||
"height": {
|
||||
"calculated": processed_item["calculated_objekt_height_mm"],
|
||||
"original": processed_item["Objekt_height_mm"],
|
||||
"difference": height_diff,
|
||||
"status": "OK" if abs(height_diff) < 0.001 else "Please verify"
|
||||
}
|
||||
}
|
||||
|
||||
return processed_item, comparison_results
|
||||
|
||||
def process_json_file(input_file, output_file):
|
||||
"""Main function to process JSON file and generate output"""
|
||||
# Read input file
|
||||
try:
|
||||
with open(input_file, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Input file '{input_file}' not found")
|
||||
return
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"JSON parsing error: {e}")
|
||||
return
|
||||
|
||||
# Verify data is a list
|
||||
if not isinstance(data, list):
|
||||
print("Error: JSON data should be an array")
|
||||
return
|
||||
|
||||
# Process data
|
||||
processed_data = []
|
||||
error_items = []
|
||||
|
||||
print("\nStarting JSON data processing...\n")
|
||||
|
||||
for idx, item in enumerate(data, start=1):
|
||||
try:
|
||||
processed_item, comparison = calculate_attributes(item)
|
||||
processed_data.append(processed_item)
|
||||
|
||||
# Print comparison results to console
|
||||
print(f"Item {idx} [{item.get('SVGname', 'Unnamed')}] comparison results:")
|
||||
print(f" Width: Calculated={comparison['width']['calculated']} | Original={comparison['width']['original']} | Difference={comparison['width']['difference']} | {comparison['width']['status']}")
|
||||
print(f" Height: Calculated={comparison['height']['calculated']} | Original={comparison['height']['original']} | Difference={comparison['height']['difference']} | {comparison['height']['status']}")
|
||||
print("-" * 60)
|
||||
|
||||
except Exception as e:
|
||||
error_items.append((idx, str(e)))
|
||||
# Preserve original data (without any processed fields)
|
||||
processed_data.append(item)
|
||||
# Print error message to console
|
||||
print(f"Error processing item {idx} [{item.get('SVGname', 'Unnamed')}]: {str(e)}")
|
||||
print("-" * 60)
|
||||
|
||||
# Write output file
|
||||
try:
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
json.dump(processed_data, f, indent=4, ensure_ascii=False)
|
||||
print(f"\nProcessing complete. Results saved to {output_file}")
|
||||
except IOError as e:
|
||||
print(f"Error writing output file: {e}")
|
||||
return
|
||||
|
||||
# Print statistics
|
||||
total_items = len(data)
|
||||
success_items = total_items - len(error_items)
|
||||
|
||||
print("\nProcessing statistics:")
|
||||
print(f"Total items: {total_items}")
|
||||
print(f"Successfully processed: {success_items}")
|
||||
print(f"Failed items: {len(error_items)}")
|
||||
|
||||
# Example usage
|
||||
if __name__ == "__main__":
|
||||
input_filename = "1_SVGErfassung_updated_new_input.json" # Replace with your input filename
|
||||
output_filename = "1_SVGErfassung_updated_new_output.json" # Replace with desired output filename
|
||||
|
||||
process_json_file(input_filename, output_filename)
|
||||
@@ -1,602 +0,0 @@
|
||||
[
|
||||
{
|
||||
"SVGname": "APB_110_R400_45_400_821104021.svg",
|
||||
"Sivasnr": "821104021",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 669.491,
|
||||
"center_line_height_mm": 399.505,
|
||||
"Objekt_width_mm": 684.367,
|
||||
"Objekt_height_mm": 435.421,
|
||||
"calculated_objekt_width_mm": 684.369,
|
||||
"calculated_objekt_height_mm": 435.423,
|
||||
"Objekt_width_px": 2586.565,
|
||||
"Objekt_height_px": 1645.674,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 636.239,
|
||||
"scale_factor": 1.461204,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 48.321,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 978.263,
|
||||
"y": 965.835,
|
||||
"direction": 135.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_67_5_339_821104024.svg",
|
||||
"Sivasnr": "821104024",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 507.82,
|
||||
"center_line_height_mm": 339.315,
|
||||
"Objekt_width_mm": 527.258,
|
||||
"Objekt_height_mm": 368.405,
|
||||
"calculated_objekt_width_mm": 527.258,
|
||||
"calculated_objekt_height_mm": 368.407,
|
||||
"Objekt_width_px": 1992.772,
|
||||
"Objekt_height_px": 1392.387,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 698.719,
|
||||
"scale_factor": 1.896605,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 57.111,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 963.134,
|
||||
"y": 978.149,
|
||||
"direction": 157.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R400_90_500_821104022.svg",
|
||||
"Sivasnr": "821104022",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 500.0,
|
||||
"center_line_height_mm": 500.0,
|
||||
"Objekt_width_mm": 521.04,
|
||||
"Objekt_height_mm": 521.04,
|
||||
"calculated_objekt_width_mm": 521.04,
|
||||
"calculated_objekt_height_mm": 521.04,
|
||||
"Objekt_width_px": 1969.271,
|
||||
"Objekt_height_px": 1969.271,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 1000.0,
|
||||
"scale_factor": 1.919238,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 40.381,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 959.619,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R500_90_550_550_821104030.svg",
|
||||
"Sivasnr": "821104030",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 550.0,
|
||||
"center_line_height_mm": 550.0,
|
||||
"Objekt_width_mm": 571.04,
|
||||
"Objekt_height_mm": 571.04,
|
||||
"calculated_objekt_width_mm": 571.04,
|
||||
"calculated_objekt_height_mm": 571.04,
|
||||
"Objekt_width_px": 2158.246,
|
||||
"Objekt_height_px": 2158.246,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 1000.0,
|
||||
"scale_factor": 1.751191,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 36.845,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 963.155,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_22_5_84_821104025.svg",
|
||||
"Sivasnr": "821104025",
|
||||
"Winkel": 22.5,
|
||||
"center_line_width_mm": 514.491,
|
||||
"center_line_height_mm": 122.23,
|
||||
"Objekt_width_mm": 522.542,
|
||||
"Objekt_height_mm": 162.707,
|
||||
"calculated_objekt_width_mm": 522.543,
|
||||
"calculated_objekt_height_mm": 162.708,
|
||||
"Objekt_width_px": 1974.947,
|
||||
"Objekt_height_px": 614.951,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 311.376,
|
||||
"scale_factor": 1.913722,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 129.312,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 984.593,
|
||||
"y": 880.54,
|
||||
"direction": 112.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_191_821104029.svg",
|
||||
"Sivasnr": "821104029",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 551.606,
|
||||
"center_line_height_mm": 190.792,
|
||||
"Objekt_width_mm": 566.483,
|
||||
"Objekt_height_mm": 226.709,
|
||||
"calculated_objekt_width_mm": 566.484,
|
||||
"calculated_objekt_height_mm": 226.71,
|
||||
"Objekt_width_px": 2141.022,
|
||||
"Objekt_height_px": 856.847,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 400.204,
|
||||
"scale_factor": 1.765278,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 92.806,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 973.738,
|
||||
"y": 934.379,
|
||||
"direction": 135.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_205_821104037.svg",
|
||||
"Sivasnr": "821104037",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 537.249,
|
||||
"center_line_height_mm": 204.932,
|
||||
"Objekt_width_mm": 552.126,
|
||||
"Objekt_height_mm": 240.849,
|
||||
"calculated_objekt_width_mm": 552.127,
|
||||
"calculated_objekt_height_mm": 240.85,
|
||||
"Objekt_width_px": 2086.76,
|
||||
"Objekt_height_px": 910.289,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 436.221,
|
||||
"scale_factor": 1.811181,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 87.358,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 973.055,
|
||||
"y": 938.231,
|
||||
"direction": 135.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_45_232_821104026.svg",
|
||||
"Sivasnr": "821104026",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 595.265,
|
||||
"center_line_height_mm": 265.998,
|
||||
"Objekt_width_mm": 610.142,
|
||||
"Objekt_height_mm": 301.914,
|
||||
"calculated_objekt_width_mm": 610.143,
|
||||
"calculated_objekt_height_mm": 301.916,
|
||||
"Objekt_width_px": 2306.032,
|
||||
"Objekt_height_px": 1141.084,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 494.826,
|
||||
"scale_factor": 1.638963,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 69.689,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 975.617,
|
||||
"y": 950.727,
|
||||
"direction": 135.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_420_821104028.svg",
|
||||
"Sivasnr": "821104028",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 582.427,
|
||||
"center_line_height_mm": 419.902,
|
||||
"Objekt_width_mm": 601.865,
|
||||
"Objekt_height_mm": 448.992,
|
||||
"calculated_objekt_width_mm": 601.865,
|
||||
"calculated_objekt_height_mm": 448.994,
|
||||
"Objekt_width_px": 2274.749,
|
||||
"Objekt_height_px": 1696.965,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 746.001,
|
||||
"scale_factor": 1.661502,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 46.861,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 967.704,
|
||||
"y": 982.071,
|
||||
"direction": 157.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_432_821104027.svg",
|
||||
"Sivasnr": "821104027",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 748.658,
|
||||
"center_line_height_mm": 530.305,
|
||||
"Objekt_width_mm": 768.095,
|
||||
"Objekt_height_mm": 559.396,
|
||||
"calculated_objekt_width_mm": 768.096,
|
||||
"calculated_objekt_height_mm": 559.397,
|
||||
"Objekt_width_px": 2903.015,
|
||||
"Objekt_height_px": 2114.237,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 728.29,
|
||||
"scale_factor": 1.301922,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 37.612,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 974.694,
|
||||
"y": 985.608,
|
||||
"direction": 157.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_67_5_L_185_170_821104065.svg",
|
||||
"Sivasnr": "821104065",
|
||||
"Winkel": 67.5,
|
||||
"center_line_width_mm": 758.19,
|
||||
"center_line_height_mm": 496.584,
|
||||
"Objekt_width_mm": 777.628,
|
||||
"Objekt_height_mm": 525.674,
|
||||
"calculated_objekt_width_mm": 777.628,
|
||||
"calculated_objekt_height_mm": 525.676,
|
||||
"Objekt_width_px": 2939.045,
|
||||
"Objekt_height_px": 1986.785,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 675.997,
|
||||
"scale_factor": 1.285962,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 40.025,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 975.004,
|
||||
"y": 984.686,
|
||||
"direction": 157.5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R550_90_900_605_821104066.svg",
|
||||
"Sivasnr": "821104066",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 900.0,
|
||||
"center_line_height_mm": 605.0,
|
||||
"Objekt_width_mm": 921.04,
|
||||
"Objekt_height_mm": 626.04,
|
||||
"calculated_objekt_width_mm": 921.04,
|
||||
"calculated_objekt_height_mm": 626.04,
|
||||
"Objekt_width_px": 3481.071,
|
||||
"Objekt_height_px": 2366.118,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 679.71,
|
||||
"scale_factor": 1.085729,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 33.608,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 977.156,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_45_400_821104031.svg",
|
||||
"Sivasnr": "821104031",
|
||||
"Winkel": 45.0,
|
||||
"center_line_width_mm": 865.613,
|
||||
"center_line_height_mm": 300.559,
|
||||
"Objekt_width_mm": 880.491,
|
||||
"Objekt_height_mm": 336.475,
|
||||
"calculated_objekt_width_mm": 880.491,
|
||||
"calculated_objekt_height_mm": 336.477,
|
||||
"Objekt_width_px": 3327.816,
|
||||
"Objekt_height_px": 1271.707,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 382.145,
|
||||
"scale_factor": 1.13573,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 62.531,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 983.103,
|
||||
"y": 955.788,
|
||||
"direction": 135.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_800_800_821104033.svg",
|
||||
"Sivasnr": "821104033",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 800.0,
|
||||
"center_line_height_mm": 800.0,
|
||||
"Objekt_width_mm": 821.04,
|
||||
"Objekt_height_mm": 821.04,
|
||||
"calculated_objekt_width_mm": 821.04,
|
||||
"calculated_objekt_height_mm": 821.04,
|
||||
"Objekt_width_px": 3103.121,
|
||||
"Objekt_height_px": 3103.121,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 1000.0,
|
||||
"scale_factor": 1.217967,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 25.626,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 974.374,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_690_821104041.svg",
|
||||
"Sivasnr": "821104041",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 690.0,
|
||||
"center_line_height_mm": 850.0,
|
||||
"Objekt_width_mm": 711.04,
|
||||
"Objekt_height_mm": 871.04,
|
||||
"calculated_objekt_width_mm": 711.04,
|
||||
"calculated_objekt_height_mm": 871.04,
|
||||
"Objekt_width_px": 2687.376,
|
||||
"Objekt_height_px": 3292.096,
|
||||
"calculated_SVG_height_px": 1000,
|
||||
"calculated_SVG_width_px": 820.091,
|
||||
"scale_factor": 1.148053,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 24.155,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 970.546,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_870_821104035.svg",
|
||||
"Sivasnr": "821104035",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 850.0,
|
||||
"center_line_height_mm": 870.0,
|
||||
"Objekt_width_mm": 871.04,
|
||||
"Objekt_height_mm": 891.04,
|
||||
"calculated_objekt_width_mm": 871.04,
|
||||
"calculated_objekt_height_mm": 891.04,
|
||||
"Objekt_width_px": 3292.096,
|
||||
"Objekt_height_px": 3367.686,
|
||||
"calculated_SVG_height_px": 1000,
|
||||
"calculated_SVG_width_px": 981.334,
|
||||
"scale_factor": 1.122284,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 23.613,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 975.938,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R630_90_850_890_821104034.svg",
|
||||
"Sivasnr": "821104034",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 890.0,
|
||||
"center_line_height_mm": 850.0,
|
||||
"Objekt_width_mm": 911.04,
|
||||
"Objekt_height_mm": 871.04,
|
||||
"calculated_objekt_width_mm": 911.04,
|
||||
"calculated_objekt_height_mm": 871.04,
|
||||
"Objekt_width_px": 3443.276,
|
||||
"Objekt_height_px": 3292.096,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 956.094,
|
||||
"scale_factor": 1.097647,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 24.155,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 976.906,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_110_R650_180_L_150_821104043.svg",
|
||||
"Sivasnr": "821104043",
|
||||
"Winkel": 180.0,
|
||||
"center_line_width_mm": 800.0,
|
||||
"center_line_height_mm": 1300.0,
|
||||
"Objekt_width_mm": 800.0,
|
||||
"Objekt_height_mm": 1342.08,
|
||||
"calculated_objekt_width_mm": 800.0,
|
||||
"calculated_objekt_height_mm": 1342.08,
|
||||
"Objekt_width_px": 3023.6,
|
||||
"Objekt_height_px": 5072.391,
|
||||
"calculated_SVG_height_px": 1000,
|
||||
"calculated_SVG_width_px": 599.869,
|
||||
"scale_factor": 0.745112,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 15.677,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 0,
|
||||
"y": 984.323,
|
||||
"direction": 270.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_650_821094040.svg",
|
||||
"Sivasnr": "821094040",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 650.0,
|
||||
"center_line_height_mm": 650.0,
|
||||
"Objekt_width_mm": 671.04,
|
||||
"Objekt_height_mm": 671.04,
|
||||
"calculated_objekt_width_mm": 671.04,
|
||||
"calculated_objekt_height_mm": 671.04,
|
||||
"Objekt_width_px": 2536.196,
|
||||
"Objekt_height_px": 2536.196,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 1000.0,
|
||||
"scale_factor": 1.490224,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 31.354,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 968.646,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"SVGname": "APB_60_R515_90_810_821094101.svg",
|
||||
"Sivasnr": "821094101",
|
||||
"Winkel": 90.0,
|
||||
"center_line_width_mm": 810.0,
|
||||
"center_line_height_mm": 810.0,
|
||||
"Objekt_width_mm": 831.04,
|
||||
"Objekt_height_mm": 831.04,
|
||||
"calculated_objekt_width_mm": 831.04,
|
||||
"calculated_objekt_height_mm": 831.04,
|
||||
"Objekt_width_px": 3140.916,
|
||||
"Objekt_height_px": 3140.916,
|
||||
"calculated_SVG_width_px": 1000,
|
||||
"calculated_SVG_height_px": 1000.0,
|
||||
"scale_factor": 1.203312,
|
||||
"connectionPoints": [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": 25.318,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": 974.683,
|
||||
"y": 1000.0,
|
||||
"direction": 180.0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,158 +0,0 @@
|
||||
''' This Python script processes JSON data containing SVG object measurements and performs several calculations to standardize the dimensions and add connection points. Here's the main logic:
|
||||
|
||||
Data Processing:
|
||||
Converts all numeric fields to floats
|
||||
Determines the dominant dimension (width or height) and scales it to 1000px
|
||||
Calculates the other dimension proportionally
|
||||
Computes two connection points (cp1 and cp2) with their coordinates and directions
|
||||
Error Checking:
|
||||
Validates that connection points stay within the 1000px boundary
|
||||
Provides detailed error reporting
|
||||
Scaling Logic:
|
||||
Uses different scaling approaches based on whether width or height is larger
|
||||
Maintains aspect ratio while standardizing dimensions '''
|
||||
import json
|
||||
import math
|
||||
|
||||
def process_json_item(item):
|
||||
# Ensure all numeric fields are floats
|
||||
item["Winkel"] = float(item["Winkel"])
|
||||
item["center_line_width_mm"] = float(item["center_line_width_mm"])
|
||||
item["center_line_height_mm"] = float(item["center_line_height_mm"])
|
||||
item["Objekt_width_mm"] = float(item["Objekt_width_mm"])
|
||||
item["Objekt_height_mm"] = float(item["Objekt_height_mm"])
|
||||
item["calculated_objekt_width_mm"] = float(item["calculated_objekt_width_mm"])
|
||||
item["calculated_objekt_height_mm"] = float(item["calculated_objekt_height_mm"])
|
||||
|
||||
# Calculate the direct mm to px conversions (requested additions)
|
||||
item["Objekt_width_px"] = round(item["Objekt_width_mm"] * 3.7795, 3)
|
||||
item["Objekt_height_px"] = round(item["Objekt_height_mm"] * 3.7795, 3)
|
||||
|
||||
# Determine which dimension is larger
|
||||
if item["Objekt_width_mm"] >= item["Objekt_height_mm"]:
|
||||
# Width is larger, set calculated_SVG width to 1000px
|
||||
scale = round(1000 / item["Objekt_width_mm"], 6)
|
||||
item["calculated_SVG_width_px"] = 1000
|
||||
item["calculated_SVG_height_px"] = round(item["Objekt_height_mm"] * scale, 3)
|
||||
scale_RD_H = 1000 / item["calculated_SVG_height_px"]
|
||||
scale_RD_W = 1
|
||||
|
||||
else:
|
||||
# Height is larger, set calculated_SVG height to 1000px
|
||||
scale = round(1000 / item["Objekt_height_mm"], 6)
|
||||
item["calculated_SVG_height_px"] = 1000
|
||||
item["calculated_SVG_width_px"] = round(item["Objekt_width_mm"] * scale + 3.7795, 3)
|
||||
scale_RD_W = 1000 / item["calculated_SVG_width_px"]
|
||||
scale_RD_H = 1
|
||||
|
||||
item["scale_factor"] = scale # Add scale factor
|
||||
|
||||
# Calculate connection points
|
||||
cp1_y = round(21.040 * scale*scale_RD_H, 3)
|
||||
if item["calculated_SVG_height_px"] == item["calculated_SVG_width_px"]:
|
||||
cp2_x = round(item["center_line_width_mm"] * scale * scale_RD_W, 3)
|
||||
cp2_y = round((21.040 + item["center_line_height_mm"]) * scale * scale_RD_H, 3)
|
||||
elif item["calculated_SVG_height_px"] == 1000 and item["calculated_SVG_width_px"] != 1000:
|
||||
if item["Winkel"]==180:
|
||||
cp2_x = 0
|
||||
else:
|
||||
cp2_x = round((item["center_line_width_mm"] * scale + 3.7795) * scale_RD_W, 3)
|
||||
cp2_y = round(((21.040 + item["center_line_height_mm"]) * scale) * scale_RD_H, 3)
|
||||
else:
|
||||
cp2_x = round((item["center_line_width_mm"] * scale) * scale_RD_W, 3)
|
||||
cp2_y = round(((21.040 + item["center_line_height_mm"]) * scale) * scale_RD_H, 3)
|
||||
|
||||
cp2_direction = round(90 + item["Winkel"], 1) # Keep 1 decimal place
|
||||
|
||||
# Add connection points attributes
|
||||
item["connectionPoints"] = [
|
||||
{
|
||||
"id": "cp1",
|
||||
"x": 0,
|
||||
"y": cp1_y,
|
||||
"direction": 270.0
|
||||
},
|
||||
{
|
||||
"id": "cp2",
|
||||
"x": cp2_x,
|
||||
"y": cp2_y,
|
||||
"direction": cp2_direction
|
||||
}
|
||||
]
|
||||
|
||||
return item
|
||||
|
||||
def check_connection_points(item):
|
||||
"""Check if connection point coordinates exceed 1000"""
|
||||
errors = []
|
||||
for cp in item.get("connectionPoints", []):
|
||||
if cp["x"] > 1000 or cp["y"] > 1000:
|
||||
errors.append(f"Connection point {cp['id']} exceeds range: x={cp['x']}, y={cp['y']}")
|
||||
return errors
|
||||
|
||||
def process_json_file(input_file, output_file):
|
||||
try:
|
||||
# Read input file
|
||||
with open(input_file, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
|
||||
# Verify data is a list
|
||||
if not isinstance(data, list):
|
||||
print("Error: JSON data should be an array")
|
||||
return
|
||||
|
||||
# Process each item
|
||||
processed_data = []
|
||||
error_reports = []
|
||||
|
||||
for idx, item in enumerate(data, start=1):
|
||||
try:
|
||||
processed_item = process_json_item(item)
|
||||
|
||||
# Check connection point coordinates
|
||||
errors = check_connection_points(processed_item)
|
||||
if errors:
|
||||
error_msg = f"Item {idx} [{item.get('SVGname')}] coordinate errors:"
|
||||
for err in errors:
|
||||
error_msg += f"\n - {err}"
|
||||
error_reports.append(error_msg)
|
||||
|
||||
processed_data.append(processed_item)
|
||||
except Exception as e:
|
||||
error_msg = f"Error processing item {idx} [{item.get('SVGname')}]: {str(e)}"
|
||||
error_reports.append(error_msg)
|
||||
processed_data.append(item) # Keep original data
|
||||
|
||||
# Write output file
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
json.dump(processed_data, f, indent=4, ensure_ascii=False)
|
||||
|
||||
print(f"Processing complete. Results saved to {output_file}")
|
||||
|
||||
# Print error reports
|
||||
if error_reports:
|
||||
print("\n" + "="*50)
|
||||
print("Coordinate Validation Error Report:")
|
||||
print("="*50)
|
||||
for report in error_reports:
|
||||
print("\n" + report)
|
||||
print("\n" + "="*50)
|
||||
print(f"Found {len(error_reports)} coordinate issues")
|
||||
print("="*50)
|
||||
else:
|
||||
print("\nAll connection point coordinates validated successfully - no out-of-range issues found")
|
||||
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Input file '{input_file}' not found")
|
||||
except json.JSONDecodeError as e:
|
||||
print(f"JSON parsing error: {e}")
|
||||
except Exception as e:
|
||||
print(f"Error during processing: {e}")
|
||||
|
||||
# Example usage
|
||||
if __name__ == "__main__":
|
||||
input_filename = "1_SVGErfassung_updated_new_output.json"
|
||||
output_filename = "2_calculated_px_cps_output.json"
|
||||
|
||||
process_json_file(input_filename, output_filename)
|
||||
process_json_file(input_filename, output_filename)
|
||||
@@ -1,134 +0,0 @@
|
||||
''' Script Analysis
|
||||
|
||||
This Python script processes JSON and TXT files to update dimensions and connection points in SVG-related data. Here's the main logic:
|
||||
Input Handling:
|
||||
Reads a JSON file containing reference data
|
||||
Processes all TXT files in a specified directory
|
||||
Data Processing:
|
||||
Creates a mapping between Sivasnr (from filenames) and JSON data
|
||||
For each matching TXT file:
|
||||
Updates width and height based on JSON data (converting mm to px)
|
||||
Updates connection points (x, y, direction) from JSON data
|
||||
Preserves the original file structure while updating specific values
|
||||
Reporting:
|
||||
Prints detailed change reports to console
|
||||
Skips files without matching JSON data '''
|
||||
import json
|
||||
import os
|
||||
import glob
|
||||
from datetime import datetime
|
||||
|
||||
def process_files(json_file_path, txt_files_dir):
|
||||
# Create a log file with timestamp
|
||||
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
log_file_path = os.path.join(txt_files_dir, f"modification_report_{timestamp}.txt")
|
||||
|
||||
# Read JSON file
|
||||
with open(json_file_path, 'r', encoding='utf-8') as f:
|
||||
json_data = json.load(f)
|
||||
|
||||
# Create Sivasnr to JSON data mapping
|
||||
sivasnr_mapping = {item["Sivasnr"]: item for item in json_data}
|
||||
|
||||
# Prepare report content
|
||||
report_content = []
|
||||
report_content.append(f"Modification Report - {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
report_content.append("="*50 + "\n")
|
||||
|
||||
# Process all TXT files
|
||||
for txt_file_path in glob.glob(os.path.join(txt_files_dir, '*.txt')):
|
||||
# Extract Sivasnr from filename
|
||||
sivasnr = os.path.splitext(os.path.basename(txt_file_path))[0]
|
||||
|
||||
# Check if corresponding JSON data exists
|
||||
if sivasnr in sivasnr_mapping:
|
||||
json_item = sivasnr_mapping[sivasnr]
|
||||
|
||||
# Read TXT file content (using utf-8-sig to handle BOM)
|
||||
with open(txt_file_path, 'r', encoding='utf-8-sig') as f:
|
||||
txt_content = json.load(f)
|
||||
|
||||
# Prepare entry for this file
|
||||
file_entry = []
|
||||
file_entry.append(f"\nProcessing file: {txt_file_path}")
|
||||
file_entry.append("="*50)
|
||||
|
||||
# Record old values
|
||||
old_width = txt_content["width"]
|
||||
old_height = txt_content["height"]
|
||||
old_cps = {cp["id"]: {"x": cp["x"], "y": cp["y"], "direction": cp["direction"]}
|
||||
for cp in txt_content["connectionPoints"]}
|
||||
|
||||
# Update width and height
|
||||
new_width = round(json_item["Objekt_width_mm"] * 3.7795, 3)
|
||||
new_height = round(json_item["Objekt_height_mm"] * 3.7795, 3)
|
||||
txt_content["width"] = new_width
|
||||
txt_content["height"] = new_height
|
||||
|
||||
# Update connectionPoints
|
||||
cp_changes = []
|
||||
for cp in txt_content["connectionPoints"]:
|
||||
cp_id = cp["id"]
|
||||
# Find corresponding connection point in JSON data
|
||||
json_cp = next((item for item in json_item["connectionPoints"] if item["id"] == cp_id), None)
|
||||
if json_cp:
|
||||
# Record old values
|
||||
old_x = cp["x"]
|
||||
old_y = cp["y"]
|
||||
old_dir = cp["direction"]
|
||||
|
||||
# Update values
|
||||
cp["x"] = json_cp["x"]
|
||||
cp["y"] = json_cp["y"]
|
||||
cp["direction"] = json_cp["direction"]
|
||||
|
||||
# Record changes
|
||||
cp_changes.append({
|
||||
"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)
|
||||
|
||||
# Add to report
|
||||
file_entry.append("[Dimension Changes]")
|
||||
file_entry.append(f"width: {old_width} → {new_width}")
|
||||
file_entry.append(f"height: {old_height} → {new_height}")
|
||||
|
||||
if cp_changes:
|
||||
file_entry.append("\n[Connection Point Changes]")
|
||||
for change in cp_changes:
|
||||
file_entry.append(f"Connection point {change['id']}:")
|
||||
file_entry.append(f" x: {change['x'][0]} → {change['x'][1]}")
|
||||
file_entry.append(f" y: {change['y'][0]} → {change['y'][1]}")
|
||||
file_entry.append(f" direction: {change['direction'][0]} → {change['direction'][1]}")
|
||||
|
||||
file_entry.append(f"\nFile {txt_file_path} processed successfully")
|
||||
file_entry.append("="*50)
|
||||
|
||||
# Add this file's entry to main report
|
||||
report_content.extend(file_entry)
|
||||
|
||||
# Also print to console
|
||||
print("\n" + "\n".join(file_entry))
|
||||
else:
|
||||
print(f"\nSkipping file {txt_file_path} (no matching JSON data found)")
|
||||
|
||||
# Write the report file if any changes were made
|
||||
if len(report_content) > 2: # More than just the header
|
||||
with open(log_file_path, 'w', encoding='utf-8') as f:
|
||||
f.write("\n".join(report_content))
|
||||
print(f"\nModification report saved to: {log_file_path}")
|
||||
else:
|
||||
print("\nNo files were modified - no report generated")
|
||||
|
||||
# Example usage
|
||||
if __name__ == "__main__":
|
||||
json_file_path = "2_calculated_px_cps_output.json"
|
||||
txt_files_dir = "C:/Program Files/RuleDesigner/RDConfigurator Fusion/WebApi/Editor2D/SSG/shapes/props"
|
||||
process_files(json_file_path, txt_files_dir)
|
||||
print("\nAll files processed!")
|
||||