Commit 46f4171c authored by Martin Owens's avatar Martin Owens
Browse files

Fix broken uses of path thrown up by new check

parent 4c46eee8
Pipeline #99758930 passed with stages
in 4 minutes and 54 seconds
......@@ -20,7 +20,7 @@
import math
import random
import inkex
from inkex.paths import Move, Line
def calculate_subdivision(smoothness, x1, y1, x2, y2):
# Calculate the vector from (x1,y1) to (x2,y2)
......@@ -62,12 +62,12 @@ class PathFractalize(inkex.EffectExtension):
prev = cmd_proxy.previous_end_point
end = cmd_proxy.end_point
if cmd_proxy.letter == 'M':
result.append(['M', cmd_proxy.args])
result.append(Move(*cmd_proxy.args))
else:
for seg in self.fractalize((prev.x, prev.y, end.x, end.y), self.options.subdivs,
self.options.smooth):
result.append(['L', seg])
result.append(['L', end.x, end.y])
result.append(Line(*seg))
result.append(Line(end.x, end.y))
node.path = result
......
......@@ -1020,8 +1020,8 @@ class Path(list):
else:
self.append(Line(*item))
else:
raise TypeError("Bad path type: {}({}, ...)".format(
type(path_d).__name__, type(item).__name__))
raise TypeError("Bad path type: {}({}, ...): {}".format(
type(path_d).__name__, type(item).__name__, item))
@classmethod
def parse_string(cls, path_d):
......
......@@ -328,9 +328,7 @@ class MeshToPath(inkex.EffectExtension):
for csp in csp_list:
elem = group.add(inkex.PathElement())
elem.style = style
elem.path = csp
if not elem.path:
elem.path = inkex.CubicSuperPath(csp)
elem.path = inkex.CubicSuperPath(csp)
if self.options.mode == 'outline':
elem.path.close()
elif self.options.mode == 'faces':
......
......@@ -19,8 +19,8 @@ layout-position-anchor: tl</desc>
<circle style="display:inline;fill:#000080;stroke:none" id="c1" cx="150" cy="450" r="50" inkscape:label="#path3736"/>
<ellipse style="display:inline;fill:none;stroke:#ff0000;stroke-width:16" id="c2" cx="400" cy="450" rx="100" ry="50" inkscape:label="#path3738"/>
<path style="display:inline;fill:#ffff00;stroke:#008000;stroke-width:16" id="c3" sodipodi:type="arc" sodipodi:cx="700" sodipodi:cy="450" sodipodi:rx="100" sodipodi:ry="50" sodipodi:start="0.59013865" sodipodi:end="5.6484511" d="m 783.08635,477.82381 a 100,50 0 0 1 -111.09848,20.17442 100,50 0 0 1 -71.96301,-46.88343 100,50 0 0 1 67.71127,-48.44091 100,50 0 0 1 112.7868,17.67793 L 700,450 Z" inkscape:label="#path3740"/>
<path style="display:inline;fill:none;stroke:#000000;stroke-width:10;marker-start:url(#Arrow2Lstart)" d="M 100 600 L 99.7228 602.506 L 100.562 604.885 L 101.1 607.341 L 100.579 609.801 L 102.247 611.604 L 103.85 613.465 L 105.901 614.879 L 107.376 616.886 L 107.835 619.335 L 108.742 621.655 L 110.779 623.071 L 112.854 624.43 L 113.469 626.687 L 114.437 628.816 L 114.29 631.298 L 115.796 633.277 L 118.295 633.432 L 120.794 633.281 L 123.427 632.898 L 125.685 634.306 L 127.385 636.523 L 127.502 639.315 L 130.141 640.023 L 132.214 641.803 L 134.032 643.54 L 135.296 645.714 L 137.636 646.749 L 140.191 646.626 L 142.179 648.139 L 144.573 648.85 L 145.937 650.917 L 146.74 653.26 L 148.423 655.309 L 149.754 657.601 L 150.354 660.175 L 150.846 662.771 L 153.362 663.934 L 154.791 666.309 L 157.157 667.611 L 159.841 667.912 L 159.605 670.566 L 160.858 672.917 L 160.432 675.435 L 160.008 677.953 L 160.322 680.505 L 161.41 682.835 L 162.11 685.414 L 164.201 687.078 L 166.582 688.276 L 169.217 688.68 L 171.705 689.595 L 174.336 689.913 L 176.747 691.292 L 178.529 693.422 L 178.543 696.301 L 180.272 698.603 L 182.762 697.681 L 185.389 698.061 L 187.488 699.659 L 190.073 700.188 L 192.419 701.444 L 195.056 701.089 L 197.582 700.791 L 199.794 697.519 L 200.037 695.04 L 201.038 692.645 L 200.509 690.103 L 202.721 688.628 L 204.381 686.552 L 205.163 684.013 L 205.169 681.357 L 207.466 680.062 L 210.098 680.202 L 212.283 678.86 L 214.778 678.27 L 216.207 675.923 L 216.532 673.195 L 219.081 672.226 L 221.134 670.431 L 223.426 669.316 L 224.917 667.249 L 224.339 664.656 L 225.685 662.366 L 227.361 660.378 L 229.939 660.047 L 230.938 657.837 L 232.146 655.734 L 232.563 653.305 L 231.861 650.943 L 231.892 648.454 L 233.19 646.331 L 235.189 644.924 L 236.481 642.848 L 237.931 640.88 L 238.505 638.505 L 239.77 636.35 L 242.045 635.317 L 242.806 632.878 L 245.012 631.589 L 247.304 630.958 L 249.649 630.569 L 251.93 629.889 L 254.284 629.538 L 256.292 627.952 L 258.729 627.171 L 261.149 628.257 L 263.738 627.678 L 264.895 625.397 L 267.2 624.289 L 268.077 621.964 L 269.878 620.252 L 270.564 617.883 L 271.271 615.521 L 272.711 613.413 L 275.016 612.313 L 277.546 612.022 L 279.216 610.098 L 281.349 608.969 L 282.944 607.158 L 285.244 606.173 L 286.72 604.153 L 289.06 603.26 L 291.525 603.705 L 293.871 603.414 L 296.097 602.618 L 297.568 600.593 L 302.742 599.362 L 305.386 600.329 L 307.751 599.021 L 309.954 597.456 L 312.364 598.682 L 314.083 600.769 L 316.79 600.703 L 319.284 601.757 L 321.063 603.51 L 323.452 604.236 L 325.989 604.59 L 327.78 606.422 L 330.387 606.091 L 332.574 607.548 L 334.919 608.47 L 336.673 610.278 L 338.96 611.585 L 341.052 613.184 L 343.849 612.799 L 346.161 614.418 L 347.592 616.67 L 348.883 619.005 L 351.34 620.098 L 353.437 621.782 L 354.207 624.316 L 354.043 626.958 L 354.482 629.579 L 353.883 632.168 L 355.528 634.242 L 356.282 636.779 L 357.807 638.93 L 358.536 641.464 L 359.078 644.101 L 360.964 646.022 L 361.288 648.588 L 361.894 651.103 L 363.642 653.282 L 364.159 656.028 L 366.941 656.504 L 369.037 658.393 L 367.922 660.943 L 367.872 663.726 L 366.523 666.108 L 364.829 668.258 L 365.38 670.901 L 366.494 673.36 L 367.98 675.647 L 368.571 678.309 L 369.804 680.662 L 372.182 681.843 L 372.304 684.53 L 374.127 686.507 L 375.47 688.668 L 377.533 690.157 L 379.917 691.058 L 381.75 692.828 L 383.891 694.448 L 385.118 696.836 L 387.623 697.6 L 390.172 698.203 L 392.73 698.183 L 395.061 699.237 L 397.491 699.878" id="p1" inkscape:connector-curvature="0" inkscape:label="#path3746"/>
<path style="display:inline;fill:none;stroke:#000000;stroke-width:10" d="M 500 600 L 502.583 600.464 L 504.944 601.609 L 507.25 603.139 L 510 602.825 L 509.877 605.677 L 511.692 607.88 L 512.942 610.386 L 515.42 611.69 L 517.633 613.044 L 519.929 614.249 L 522.326 615.262 L 524.509 616.679 L 525.033 619.242 L 526.22 621.573 L 526.608 624.18 L 527.901 626.477 L 528.37 628.907 L 528.081 631.364 L 528.57 633.811 L 528.067 636.254 L 528.577 638.727 L 528.762 641.244 L 530.685 642.962 L 531.709 645.33 L 530.868 647.813 L 531.708 650.296 L 530.664 652.719 L 531.395 655.253 L 532.921 657.384 L 533.006 660.003 L 534.192 662.236 L 535.899 664.101 L 538.411 665.043 L 539.693 667.4 L 541.911 668.86 L 542.776 671.371 L 544.787 673.105 L 547.223 674.162 L 549.79 673.046 L 552.465 673.872 L 555.124 674.376 L 556.827 676.479 L 558.427 678.527 L 560.725 679.738 L 562.738 681.574 L 563.917 684.029 L 562.853 686.689 L 563.847 689.376 L 566.414 689.673 L 568.654 688.383 L 571.184 688.008 L 573.515 689.061 L 576.019 689.519 L 578.013 691.1 L 580.476 691.462 L 582.951 691.191 L 585.194 692.071 L 587.312 693.218 L 588.868 695.255 L 591.373 695.794 L 593.889 695.853 L 596.217 696.809 L 598.108 698.404 L 599.447 697.281 L 599.375 694.507 L 599.378 691.58 L 601.199 689.289 L 603.009 687.273 L 605.188 685.664 L 607.768 684.547 L 609.321 682.204 L 607.436 680.234 L 606.732 677.601 L 606.176 675.018 L 605.805 672.402 L 606.569 669.876 L 607.594 667.444 L 608.673 664.841 L 607.762 662.175 L 610.428 662.086 L 612.486 660.39 L 614.328 658.615 L 616.634 657.507 L 618.913 656.375 L 620.99 654.903 L 623.52 654.585 L 625.94 653.779 L 627.88 651.974 L 629.941 650.307 L 630.837 647.788 L 631.017 645.12 L 632.689 642.895 L 632.784 640.113 L 634.68 638.147 L 637.266 637.266 L 639.699 637.336 L 642.133 637.284 L 644.455 636.39 L 646.94 636.527 L 649.251 635.434 L 651.759 635.925 L 654.055 635.053 L 656.506 634.902 L 658.688 633.578 L 660.42 631.702 L 662.696 630.503 L 665.254 630.223 L 667.987 629.781 L 670.086 627.975 L 672.62 628.796 L 675.156 629.614 L 676.62 627.471 L 678.438 625.618 L 678.608 622.956 L 680.024 620.696 L 681.874 618.759 L 684.518 618.327 L 687.15 617.909 L 689.059 616.05 L 690.463 613.661 L 690.027 610.925 L 690.85 608.447 L 691.406 605.896 L 693.85 604.906 L 696.055 603.462 L 698.069 601.778 L 701.071 602.417 L 701.265 605.053 L 702.942 607.226 L 705.583 607.967 L 706.522 610.53 L 708.897 611.874 L 711.327 612.729 L 713.884 613.042 L 716.257 613.821 L 718.747 613.635 L 720.678 615.228 L 723.086 615.91 L 725.443 615.201 L 727.902 615.331 L 730.21 616.545 L 732.724 615.855 L 734.55 617.5 L 736.246 619.279 L 738.024 621.166 L 738.287 623.746 L 739.502 626.001 L 741.352 627.773 L 741.749 630.289 L 741.562 632.829 L 744.152 633.568 L 746.569 634.756 L 749.194 634.205 L 751.818 633.648 L 752.119 636.485 L 753.874 638.733 L 756.236 640.134 L 758.744 641.256 L 759.399 643.686 L 760.631 645.88 L 761.23 648.323 L 762.407 650.547 L 763.724 652.696 L 765.404 654.575 L 767.908 655.531 L 769.169 657.896 L 770.624 660.14 L 772.77 661.736 L 775.394 662.604 L 777.026 664.834 L 779.561 663.766 L 782.272 664.232 L 784.861 664.792 L 787.508 664.914 L 789.338 666.654 L 790.7 668.781 L 792.122 670.855 L 793.194 673.13 L 792.169 675.614 L 790.72 677.877 L 790.925 680.589 L 792.066 683.058 L 794.209 684.448 L 795.023 686.869 L 797.141 688.23 L 798.16 690.533 L 798.797 692.967 L 798.263 695.425 L 799.633 697.522" id="p2" inkscape:connector-curvature="0" inkscape:label="#path3748"/>
<path style="display:inline;fill:none;stroke:#000000;stroke-width:10;marker-start:url(#Arrow2Lstart)" d="M 100 600 L 99.7228 602.506 L 100.562 604.885 L 101.1 607.341 L 100.579 609.801 L 102.247 611.604 L 103.85 613.465 L 105.901 614.879 L 107.376 616.886 L 107.835 619.335 L 108.742 621.655 L 110.779 623.071 L 112.854 624.43 L 113.469 626.687 L 114.437 628.816 L 114.29 631.298 L 115.796 633.277 L 118.295 633.432 L 120.794 633.281 L 123.427 632.898 L 125.685 634.306 L 127.385 636.523 L 127.502 639.315 L 130.141 640.023 L 132.214 641.803 L 134.032 643.54 L 135.296 645.714 L 137.636 646.749 L 140.191 646.626 L 142.179 648.139 L 144.573 648.85 L 145.937 650.917 L 146.74 653.26 L 148.423 655.309 L 149.754 657.601 L 150.354 660.175 L 150.846 662.771 L 153.362 663.934 L 154.791 666.309 L 157.157 667.611 L 159.841 667.912 L 159.605 670.566 L 160.858 672.917 L 160.432 675.435 L 160.008 677.953 L 160.322 680.505 L 161.41 682.835 L 162.11 685.414 L 164.201 687.078 L 166.582 688.276 L 169.217 688.68 L 171.705 689.595 L 174.336 689.913 L 176.747 691.292 L 178.529 693.422 L 178.543 696.301 L 180.272 698.603 L 182.762 697.681 L 185.389 698.061 L 187.488 699.659 L 190.073 700.188 L 192.419 701.444 L 195.056 701.089 L 197.582 700.791 L 200 700 L 199.794 697.519 L 200.037 695.04 L 201.038 692.645 L 200.509 690.103 L 202.721 688.628 L 204.381 686.552 L 205.163 684.013 L 205.169 681.357 L 207.466 680.062 L 210.098 680.202 L 212.283 678.86 L 214.778 678.27 L 216.207 675.923 L 216.532 673.195 L 219.081 672.226 L 221.134 670.431 L 223.426 669.316 L 224.917 667.249 L 224.339 664.656 L 225.685 662.366 L 227.361 660.378 L 229.939 660.047 L 230.938 657.837 L 232.146 655.734 L 232.563 653.305 L 231.861 650.943 L 231.892 648.454 L 233.19 646.331 L 235.189 644.924 L 236.481 642.848 L 237.931 640.88 L 238.505 638.505 L 239.77 636.35 L 242.045 635.317 L 242.806 632.878 L 245.012 631.589 L 247.304 630.958 L 249.649 630.569 L 251.93 629.889 L 254.284 629.538 L 256.292 627.952 L 258.729 627.171 L 261.149 628.257 L 263.738 627.678 L 264.895 625.397 L 267.2 624.289 L 268.077 621.964 L 269.878 620.252 L 270.564 617.883 L 271.271 615.521 L 272.711 613.413 L 275.016 612.313 L 277.546 612.022 L 279.216 610.098 L 281.349 608.969 L 282.944 607.158 L 285.244 606.173 L 286.72 604.153 L 289.06 603.26 L 291.525 603.705 L 293.871 603.414 L 296.097 602.618 L 297.568 600.593 L 300 600 L 302.742 599.362 L 305.386 600.329 L 307.751 599.021 L 309.954 597.456 L 312.364 598.682 L 314.083 600.769 L 316.79 600.703 L 319.284 601.757 L 321.063 603.51 L 323.452 604.236 L 325.989 604.59 L 327.78 606.422 L 330.387 606.091 L 332.574 607.548 L 334.919 608.47 L 336.673 610.278 L 338.96 611.585 L 341.052 613.184 L 343.849 612.799 L 346.161 614.418 L 347.592 616.67 L 348.883 619.005 L 351.34 620.098 L 353.437 621.782 L 354.207 624.316 L 354.043 626.958 L 354.482 629.579 L 353.883 632.168 L 355.528 634.242 L 356.282 636.779 L 357.807 638.93 L 358.536 641.464 L 359.078 644.101 L 360.964 646.022 L 361.288 648.588 L 361.894 651.103 L 363.642 653.282 L 364.159 656.028 L 366.941 656.504 L 369.037 658.393 L 367.922 660.943 L 367.872 663.726 L 366.523 666.108 L 364.829 668.258 L 365.38 670.901 L 366.494 673.36 L 367.98 675.647 L 368.571 678.309 L 369.804 680.662 L 372.182 681.843 L 372.304 684.53 L 374.127 686.507 L 375.47 688.668 L 377.533 690.157 L 379.917 691.058 L 381.75 692.828 L 383.891 694.448 L 385.118 696.836 L 387.623 697.6 L 390.172 698.203 L 392.73 698.183 L 395.061 699.237 L 397.491 699.878 L 400 700" id="p1" inkscape:connector-curvature="0" inkscape:label="#path3746"/>
<path style="display:inline;fill:none;stroke:#000000;stroke-width:10" d="M 500 600 L 502.583 600.464 L 504.944 601.609 L 507.25 603.139 L 510 602.825 L 509.877 605.677 L 511.692 607.88 L 512.942 610.386 L 515.42 611.69 L 517.633 613.044 L 519.929 614.249 L 522.326 615.262 L 524.509 616.679 L 525.033 619.242 L 526.22 621.573 L 526.608 624.18 L 527.901 626.477 L 528.37 628.907 L 528.081 631.364 L 528.57 633.811 L 528.067 636.254 L 528.577 638.727 L 528.762 641.244 L 530.685 642.962 L 531.709 645.33 L 530.868 647.813 L 531.708 650.296 L 530.664 652.719 L 531.395 655.253 L 532.921 657.384 L 533.006 660.003 L 534.192 662.236 L 535.899 664.101 L 538.411 665.043 L 539.693 667.4 L 541.911 668.86 L 542.776 671.371 L 544.787 673.105 L 547.223 674.162 L 549.79 673.046 L 552.465 673.872 L 555.124 674.376 L 556.827 676.479 L 558.427 678.527 L 560.725 679.738 L 562.738 681.574 L 563.917 684.029 L 562.853 686.689 L 563.847 689.376 L 566.414 689.673 L 568.654 688.383 L 571.184 688.008 L 573.515 689.061 L 576.019 689.519 L 578.013 691.1 L 580.476 691.462 L 582.951 691.191 L 585.194 692.071 L 587.312 693.218 L 588.868 695.255 L 591.373 695.794 L 593.889 695.853 L 596.217 696.809 L 598.108 698.404 L 600 700 L 599.447 697.281 L 599.375 694.507 L 599.378 691.58 L 601.199 689.289 L 603.009 687.273 L 605.188 685.664 L 607.768 684.547 L 609.321 682.204 L 607.436 680.234 L 606.732 677.601 L 606.176 675.018 L 605.805 672.402 L 606.569 669.876 L 607.594 667.444 L 608.673 664.841 L 607.762 662.175 L 610.428 662.086 L 612.486 660.39 L 614.328 658.615 L 616.634 657.507 L 618.913 656.375 L 620.99 654.903 L 623.52 654.585 L 625.94 653.779 L 627.88 651.974 L 629.941 650.307 L 630.837 647.788 L 631.017 645.12 L 632.689 642.895 L 632.784 640.113 L 634.68 638.147 L 637.266 637.266 L 639.699 637.336 L 642.133 637.284 L 644.455 636.39 L 646.94 636.527 L 649.251 635.434 L 651.759 635.925 L 654.055 635.053 L 656.506 634.902 L 658.688 633.578 L 660.42 631.702 L 662.696 630.503 L 665.254 630.223 L 667.987 629.781 L 670.086 627.975 L 672.62 628.796 L 675.156 629.614 L 676.62 627.471 L 678.438 625.618 L 678.608 622.956 L 680.024 620.696 L 681.874 618.759 L 684.518 618.327 L 687.15 617.909 L 689.059 616.05 L 690.463 613.661 L 690.027 610.925 L 690.85 608.447 L 691.406 605.896 L 693.85 604.906 L 696.055 603.462 L 698.069 601.778 L 700 600 L 701.071 602.417 L 701.265 605.053 L 702.942 607.226 L 705.583 607.967 L 706.522 610.53 L 708.897 611.874 L 711.327 612.729 L 713.884 613.042 L 716.257 613.821 L 718.747 613.635 L 720.678 615.228 L 723.086 615.91 L 725.443 615.201 L 727.902 615.331 L 730.21 616.545 L 732.724 615.855 L 734.55 617.5 L 736.246 619.279 L 738.024 621.166 L 738.287 623.746 L 739.502 626.001 L 741.352 627.773 L 741.749 630.289 L 741.562 632.829 L 744.152 633.568 L 746.569 634.756 L 749.194 634.205 L 751.818 633.648 L 752.119 636.485 L 753.874 638.733 L 756.236 640.134 L 758.744 641.256 L 759.399 643.686 L 760.631 645.88 L 761.23 648.323 L 762.407 650.547 L 763.724 652.696 L 765.404 654.575 L 767.908 655.531 L 769.169 657.896 L 770.624 660.14 L 772.77 661.736 L 775.394 662.604 L 777.026 664.834 L 779.561 663.766 L 782.272 664.232 L 784.861 664.792 L 787.508 664.914 L 789.338 666.654 L 790.7 668.781 L 792.122 670.855 L 793.194 673.13 L 792.169 675.614 L 790.72 677.877 L 790.925 680.589 L 792.066 683.058 L 794.209 684.448 L 795.023 686.869 L 797.141 688.23 L 798.16 690.533 L 798.797 692.967 L 798.263 695.425 L 799.633 697.522 L 800 700" id="p2" inkscape:connector-curvature="0" inkscape:label="#path3748"/>
<path sodipodi:type="star" style="display:inline;fill:#ffff00;stroke:#008000;stroke-width:10" id="s1" sodipodi:sides="5" sodipodi:cx="189.03001" sodipodi:cy="847.93945" sodipodi:r1="69.364868" sodipodi:r2="34.682434" sodipodi:arg1="0.63598373" sodipodi:arg2="1.2643023" inkscape:flatsided="false" inkscape:rounded="0" inkscape:randomized="0" d="m 244.8332,889.14005 -45.33887,-8.13446 -32.40428,32.73753 -6.27415,-45.63352 -41.14872,-20.70184 41.46124,-20.06861 6.97297,-45.53197 31.89861,33.23044 45.45824,-7.43847 -21.74681,40.60615 z" inkscape:transform-center-x="6.4673011" inkscape:transform-center-y="-0.16430137"/>
<use style="display:inline" x="0" y="0" xlink:href="#s1" inkscape:transform-center-x="6.4673011" inkscape:transform-center-y="-0.16430137" id="u1" transform="translate(200,2.9962152)" width="100%" height="100%" inkscape:label="#use3808"/>
</g>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment