├── LICENSE ├── tests ├── sample6.stl ├── sample.png ├── sample.scad ├── sample2.png ├── sample3a.png ├── sample3b.png ├── sample3c.png ├── sample4.png ├── sample7.png ├── sshot-1.png ├── sample6.scad ├── Makefile ├── sample8-circle.scad ├── sample2.scad ├── sample.svg ├── sample2.svg ├── sample3.svg ├── sample8-circle.svg ├── sample4.svg ├── sample5.svg ├── sample3.scad ├── sample6.svg ├── sample7-text.svg ├── sample4.scad ├── sample5.scad └── sample.stl ├── Makefile ├── README.md └── svg2scad /LICENSE: -------------------------------------------------------------------------------- 1 | GPLv2 2 | 3 | -------------------------------------------------------------------------------- /tests/sample6.stl: -------------------------------------------------------------------------------- 1 | solid svg2stl 2 | endsolid svg2stl 3 | -------------------------------------------------------------------------------- /tests/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample.png -------------------------------------------------------------------------------- /tests/sample.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[0,61.40896],[35.4544776,0],[0.835711800000002,0]] ); 2 | -------------------------------------------------------------------------------- /tests/sample2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample2.png -------------------------------------------------------------------------------- /tests/sample3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample3a.png -------------------------------------------------------------------------------- /tests/sample3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample3b.png -------------------------------------------------------------------------------- /tests/sample3c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample3c.png -------------------------------------------------------------------------------- /tests/sample4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample4.png -------------------------------------------------------------------------------- /tests/sample7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sample7.png -------------------------------------------------------------------------------- /tests/sshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Spiritdude/SVG2SCAD/HEAD/tests/sshot-1.png -------------------------------------------------------------------------------- /tests/sample6.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[0,0],[119.00404312,0],[119.00404312,26.0170000000001],[0.38090312,26.0170000000001]] ); 2 | -------------------------------------------------------------------------------- /tests/Makefile: -------------------------------------------------------------------------------- 1 | %.stl: %.svg svg2stl 2 | ./svg2stl $< > $@ 3 | 4 | %.scad: %.svg svg2scad 5 | ./svg2scad $< > $@ 6 | 7 | all:: sample*.svg 8 | 9 | 10 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | VERSION=0.006 2 | 3 | dist:: 4 | cd ..; tar cfz svg2scad-${VERSION}.tar.gz SVG2SCAD/{README,Makefile,svg2scad} 5 | 6 | backup:: 7 | cd ..; cp svg2scad-${VERSION}.tar.gz ~/Backup/; cp svg2scad-${VERSION}.tar.gz ~/Dropbox/; scp svg2scad-${VERSION}.tar.gz the-labs.com:Backup/ 8 | 9 | requirements:: 10 | sudo cpan XML::Simple Math::Bezier Data::Dumper 11 | 12 | install:: 13 | cp svg2scad /usr/bin/ 14 | 15 | deinstall:: 16 | rm -f /usr/bin/svg2scad 17 | 18 | -------------------------------------------------------------------------------- /tests/sample8-circle.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[26.4428649999982,35.8608872973357],[0,0],[2.61141913446623,0.175303194449725],[5.19730681555411,0.699498864747738],[7.73238120707734,1.56746202841191],[10.1918572667639,2.77070673971491],[12.5516890658984,4.29746905550246],[14.7888048827627,6.13282204950269],[16.8813327713996,8.25882175064601],[18.80881440035,10.6546825785806],[20.5524050706923,13.2969805611748],[22.0950579578385,16.1598823471815],[23.421690775783,19.2153977750399],[24.519333234351,22.4336535284897],[25.3772538477817,25.7831852035042],[25.9870648548555,29.2312449310529],[26.3428042247782,32.7441215481064],[26.4409939470617,36.287470186624],[26.7574129999982,71.7192372973357]] ); 2 | -------------------------------------------------------------------------------- /tests/sample2.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[0,26.1407999999999],[0,26.1407999999999],[0.300579258331297,25.1995564910887],[0.762901597900392,24.3349925537109],[1.37427336557007,23.5402424468991],[2.12200090820313,22.8084404296874],[2.99339057266235,22.1327207611082],[3.97574870581055,21.5062177001953],[5.0563816545105,20.9220655059812],[6.222595765625,20.3733984374999],[7.46169738601684,19.8533507537841],[8.76099286254883,19.355056713867],[10.1077885420837,18.871650576782],[11.4893907714844,18.3962666015625],[12.8931058976135,17.922039047241],[14.306240267334,17.4421021728513],[15.7161002275085,16.9495902374265],[17.109992125,16.4376374999999],[18.4752223066711,15.8993782196044],[19.7990971193848,15.3279466552733],[21.0689229100037,14.7164770660399],[22.2720060253906,14.0581037109373],[23.3956528124084,13.3459608489989],[24.4271696179199,12.5731827392576],[25.3538627887878,11.7329036407468],[26.163038671875,10.8182578125],[26.8420036140442,9.82237951354978],[27.3780639621582,8.73840300292954],[27.7585260630798,7.55946253967295],[27.9706962636719,6.27869238281255],[28.0018809107971,4.88922679138204],[27.8393863513184,3.38420002441399],[27.4705189320984,1.7567463409423],[26.882585,0],[0.0328569999999999,0]] ); 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SVG2SCAD 2 | 3 | `svg2scad` is a perl script and requires some additional modules, which you can install 4 | like this: 5 | ``` 6 | % sudo cpan XML::Simple Math::Bezier Data::Dumper 7 | ``` 8 | 9 | that's all. 10 | 11 | ## Install Script 12 | 13 | ``` 14 | % sudo cp svg2scad /usr/bin/ 15 | ``` 16 | or 17 | ``` 18 | % sudo make install 19 | ``` 20 | 21 | ## How to use 22 | 23 | 1) Draw a path in Inkscape, save it as file.svg 24 | 25 | 2) Run `svg2scad` 26 | 27 | ``` 28 | % svg2scad file.svg 29 | ``` 30 | 31 | creates a file.scad 32 | 33 | 3) OpenSCAD you can include that file: 34 | 35 | ``` 36 | linear_extrude(height=10) include 37 | ``` 38 | 39 | and hit F5 to display the polygon, or make a nice extrusion: 40 | 41 | ``` 42 | % svg2scad -openrot sample4.svg 43 | ``` 44 | 45 | the `-openrot` switch ensures open polygon prepared for rotational extrusion: 46 | first and last coordinate x-position to be the same, making a closed volume; 47 | OpenSCAD otherwise cannot compile and create a STL file. 48 | 49 | ``` 50 | rotate_extrude ($fn=100) include 51 | ``` 52 | 53 | 4) higher bezier curve subdivision (default = 32) 54 | 55 | ``` 56 | % svg2scad -bzsteps 64 myvase.svg 57 | ``` 58 | 59 | 60 | that's it! 61 | 62 | -------------------------------------------------------------------------------- /tests/sample.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 56 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /tests/sample2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 56 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /tests/sample3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 37 | 39 | 41 | 42 | 44 | image/svg+xml 45 | 47 | 48 | 49 | 50 | 54 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /tests/sample8-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 57 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /tests/sample4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 40 | 42 | 44 | 45 | 47 | image/svg+xml 48 | 50 | 51 | 52 | 53 | 54 | 59 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /tests/sample5.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 57 | 63 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /tests/sample3.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[0,677.14287],[0,677.14287],[0.649937233276367,677.105725751953],[2.55440853027344,676.979644570313],[5.64540328674316,676.742653798828],[9.8549108984375,676.37278078125],[15.1149207611084,675.848052861328],[21.3574222705078,675.146497382813],[28.5144048223877,674.246141689453],[36.5178578125,673.125013125],[45.2997706365967,671.761139033203],[54.7921326904297,670.132546757813],[64.926933369751,668.217263642578],[75.6361620703125,665.99331703125],[86.8518081878662,663.438734267578],[98.5058611181641,660.531542695313],[110.530310256958,657.249769658203],[122.857145,653.5714425],[135.418354743042,649.474588564453],[148.145928881836,644.937235195312],[160.971856812134,639.937409736328],[173.828127929687,634.45313953125],[186.646731630249,628.462451923828],[199.35965730957,621.943374257812],[211.898894363403,614.873933876953],[224.1964321875,607.232158125],[236.184260177612,598.996074345703],[247.794367729492,590.143709882813],[258.958744238892,580.653092080078],[269.609379101563,570.50224828125],[279.678261713257,559.669205830078],[289.097381469727,548.131992070313],[297.798727766724,535.868634345703],[305.71429,522.85716],[305.71429,522.85716],[310.404994891052,514.030698898621],[314.650827019043,505.136562907715],[318.471195378723,496.197565809631],[321.885508964844,487.236521386719],[324.913176772156,478.276243421326],[327.57360779541,469.339545695801],[329.886211029358,460.449241992493],[331.87039546875,451.62814609375],[333.545570108337,442.899071781921],[334.931143942871,434.284832839356],[336.046525967102,425.808243048401],[336.911125175781,417.492116191406],[337.54435056366,409.35926605072],[337.965611125488,401.432506408691],[338.194315856018,393.734651047669],[338.24987375,386.28851375],[338.151693802185,379.116908298035],[337.919185007324,372.242648474121],[337.571756360168,365.688548060608],[337.128816855469,359.477420839844],[336.609775487976,353.632080594177],[336.034041252441,348.175341105957],[335.421023143616,343.130016157532],[334.79013015625,338.51891953125],[334.160771285095,334.364865009461],[333.552355524902,330.690666374512],[332.984291870422,327.519137408753],[332.475989316406,324.873091894531],[332.046856857605,322.775343614197],[331.716303488769,321.248706350098],[331.503738204651,320.315993884583],[331.42857,320.00002],[268.57143,222.85716],[265.71429,314.28573],[214.28572,314.28573],[211.42858,2.85719999999992],[154.28572,0],[154.28572,0],[154.325567225647,1.24006004211424],[154.437087141113,4.86467654785156],[154.608247104187,10.7305040863039],[154.827014472656,18.6941972265624],[155.081356604309,28.6124105377197],[155.359240856934,40.3417985888671],[155.648634588318,53.7390159490967],[155.93750515625,68.6607171875],[156.213819918518,84.963556873169],[156.46554623291,102.504189575195],[156.680651457214,121.139269862671],[156.847102949219,140.725452304687],[156.952868066711,161.119391470337],[156.98591416748,182.177741928711],[156.934208609314,203.757158248901],[156.78571875,225.714295],[156.528411947327,247.905806751099],[156.150255559082,270.188348071289],[155.639216943054,292.418573529663],[154.983263457031,314.453137695313],[154.170362458801,336.148695137329],[153.188481306152,357.361900424805],[152.025587356873,377.949408126831],[150.66964796875,397.7678728125],[149.108630499573,416.673949050903],[147.330502307129,434.524291411133],[145.323230749206,451.17555446228],[143.074783183594,466.484392773438],[140.573126968079,480.307460913696],[137.806229460449,492.501413452148],[134.762058018494,502.922904957886],[131.42858,511.42859],[131.42858,511.42859],[127.783647385864,518.360614266357],[123.831620727539,524.195052021484],[119.600227426147,528.989450699463],[115.117194882812,532.801357734375],[110.410250498657,535.688320560303],[105.507121674805,537.707886611328],[100.435535812378,538.917603321533],[95.2232203125,539.375018125],[89.8979025762939,539.137678455811],[84.4873100048828,538.263131748047],[79.0191699993896,536.808925435791],[73.5212099609375,534.832606953125],[68.0211572906494,532.391723734131],[62.5467393896484,529.543823212891],[57.1256836590576,526.346452823486],[51.7857175,522.85716],[46.5545683135986,519.133492176514],[41.4599635009766,515.232996787109],[36.5296304632568,511.213221265869],[31.7912966015625,507.131713046875],[27.2726893170166,503.046019564209],[23.0015360107422,499.013688251953],[19.0055640838623,495.092266544189],[15.3125009375,491.339301875],[11.9500739727783,487.812341678467],[8.94601059082031,484.568933388672],[6.32803819274902,481.666624439697],[4.1238841796875,479.162962265625],[2.36127595275879,477.115494300537],[1.06794091308594,475.581767978516],[0.271606461791992,474.619330733643],[0,474.28573]] ); 2 | -------------------------------------------------------------------------------- /tests/sample6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 57 | 63 | 67 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /svg2scad: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # --- SVG 2 SCAD, written by Rene K. Mueller 4 | # 5 | # License: GPLv2 6 | # 7 | my $Version = '0.006'; 8 | # 9 | # History: 10 | # 2019/02/22: 0.006: fixing splice/push to enforce @array reference 11 | # 2012/08/12: 0.005: -openrot switch, to make first/last coord x-pos the same (rotate_extrude() requires that), see updated README 12 | # 2012/08/03: 0.003: discovering inconsistancy in path definition, hacking myself to support it 13 | # 2012/08/02: 0.002: extended with some functionality 14 | # 2012/08/01: 0.001: first rudimentary version 15 | 16 | use Math::Trig; 17 | use XML::Simple; 18 | use Math::Bezier; 19 | use Data::Dumper; 20 | 21 | my $done; 22 | my $me = $0; $me =~ s/^.+\///; 23 | my %arg; 24 | 25 | $| = 1; 26 | 27 | $arg{bzsteps} = 32; # default for steps for bezier curves (curveto in paths) 28 | 29 | while($#ARGV>=0) { # -- old fashion way 30 | $_ = shift(@ARGV); 31 | $arg{verbose}++, next if($_ eq '-v'); 32 | $arg{bzsteps} = shift(@ARGV), next if($_ eq '-bzsteps'); 33 | $arg{openrot}++, next if($_ eq '-openrot'); 34 | $done++, print "$me $Version" if($_ eq '--version'); 35 | if(-f $_) { 36 | if(/\.svg$/i) { 37 | convert($_,%arg); 38 | $done++; 39 | } else { 40 | print STDERR "WARNING: $_ not a .svg file, skipped\n"; 41 | } 42 | } 43 | } 44 | 45 | unless($done) { 46 | die "USAGE: $me $Version:\n\t-v\t\tverbose (multiple -v increases verbosity)\n\t--version\tprint version\n\t-bzsteps \tdefine amount steps for bezier curves (default $arg{bzsteps})\n\tfile.svg\tconverts SVG paths to file.scad (existing .scad will be overwritten)\n"; 47 | } 48 | 49 | sub convert { 50 | my($f,%a) = @_; 51 | my $xml = new XML::Simple; 52 | my($fout) = $f; $fout =~ s/\.svg$/.scad/; 53 | 54 | $svg = $xml->XMLin($f); 55 | print Dumper($svg) if($arg{verbose}); 56 | 57 | print "$me: $f -> $fout, "; 58 | open(FH,">$fout"); 59 | my(@p) = findPaths($svg->{g}); 60 | if($#p>=0) { 61 | print "",($#p+1)," path",($#p>0?'s':'')," found: "; 62 | print FH "union() { " if($#p>0); # -- formal paths in SVG (could be more!) 63 | foreach (@p) { 64 | my($n,$op) = decodePath($_,%a); 65 | my @o = @{$op}; 66 | my(@po); 67 | if($n>1) { # -- multiple paths found in the path (crap definition of SVG!!!) 68 | for(my $i=0; $i<$#o; $i++) { 69 | if($o[$i]=~/z/i) { # -- split them apart 70 | dumpPolygon(\@po,fh=>*FH,absolute=>($#p>0?1:0)); 71 | @po = (); 72 | } else { 73 | push(@po,$o[$i]); 74 | } 75 | } 76 | dumpPolygon(\@po,fh=>*FH,absolute=>($#p>0?1:0),%a) if($#po>=0); 77 | 78 | } else { 79 | dumpPolygon(\@o,fh=>*FH,absolute=>($#p>0?1:0),%a); 80 | } 81 | } 82 | print FH "}\n" if($#p>0); 83 | } else { 84 | print STDERR "WARNING: no paths found in $f\n"; 85 | } 86 | close(FH); 87 | print "done\n"; 88 | } 89 | 90 | sub findPaths { # -- we walk recursively to find 91 | my($root) = @_; 92 | my(@r); 93 | if(ref($root) eq 'HASH') { 94 | foreach (keys %{$root}) { 95 | push(@r,findPaths($root->{$_})) unless($_ eq 'd'); 96 | } 97 | } 98 | if($root->{d}) { 99 | push(@r,$root->{d}); 100 | } 101 | return @r; 102 | } 103 | 104 | sub dumpPolygon { 105 | my($o,%a) = @_; 106 | my($fh) = $a{fh}; 107 | 108 | if($#{$o}<0) { 109 | print STDERR "WARNING: couldn't find paths in SVG-file, make sure all objects are converted to path\n"; 110 | return; 111 | } 112 | print "boundary x: $minx - $maxx, y: $miny - $maxy\n" if($arg{verbose}); 113 | unless($a{absolute}) { 114 | print "realign to 0,0\n" if($arg{verbose}); 115 | for(my $i=0; $i<=$#$o; $i+=2) { # --- realign to 0,0 116 | $$o[$i] -= $minx; 117 | $$o[$i+1] -= $miny; 118 | $$o[$i+1] = ($maxy-$miny) - $$o[$i+1]; # -- reverse y (2d graphics 0,0 upper-left corner, 3d graphics lower-left corner) 119 | } 120 | } 121 | if($a{openrot}) { 122 | $$o[$#o-1] = $$o[0]; # last coordinate x-pos = x-pos of first point 123 | } 124 | print $fh "polygon ( points=["; 125 | my $i; 126 | while(@$o) { 127 | print $fh "," if($i++); 128 | print $fh "[",join(',',splice(@$o,0,2)),"]"; 129 | } 130 | print $fh "] );\n"; 131 | } 132 | 133 | sub decodePath { 134 | # -- reference: http://www.w3.org/TR/SVG/paths.html#PathData 135 | # http://commons.oreilly.com/wiki/index.php/SVG_Essentials/Paths 136 | # ---- example: "m -205.71429,23.790754 c 0,0 225.71429,11.428571 305.71429,154.285716 52.47585,93.70687 25.71428,202.85714 25.71428,202.85714 L 62.857143,478.07647 60,386.6479 l -51.4285714,0 -2.8571429,311.42856 -57.1428577,2.85715 c 0,0 14.285715,-431.42857 -22.857142,-511.42857 -37.142856,-80 -131.428576,37.14286 -131.428576,37.14286"; 137 | my($d,%a) = @_; 138 | 139 | my(@s) = split /[,\s]+/, $d; 140 | my($xp,$yp) = (0,0); 141 | my($lc); 142 | my($pn,$pc,@o); 143 | my($lxp,$lyp); 144 | 145 | $minx = 1e38, $miny = 1e38; # --- global vars for now, for sake of simplicity 146 | $maxx = -1e38, $maxy = -1e38; 147 | 148 | $a{csteps} = 64 unless($a{csteps}); 149 | $a{bzsteps} = 32 unless($a{bzsteps}); 150 | $a{bzsteps} = 1 if($a{bzsteps}<1); 151 | 152 | $pn++; 153 | while($#s>=0) { 154 | print "current pos: $xp,$yp\n" if($arg{verbose}>1); 155 | if($s[0]=~/^[a-z]/i) { 156 | $c = shift(@s); 157 | print "command <$c>\n" if($arg{verbose}>1); 158 | } else { 159 | $c = $lc; 160 | print "command <$c> again\n" if($arg{verbose}>1); 161 | } 162 | if($c eq 'm'||$c eq 'M') { 163 | # -- moveto 164 | my($x,$y) = getArgs(\@s,2); 165 | $xp += $x, $yp += $y if($c eq 'm'); 166 | $xp = $x, $yp = $y if($c eq 'M'); 167 | pushPoint(\@o,$xp,$yp); $pc++; 168 | $lxp = $xp, $lyp = $yp if($lc ne $c); # --- set origin coordinate for a sequence of multiple commands 169 | # used when we 'z' (end a path) - yes, SVG path can have multiple paths inside! 170 | 171 | } elsif($c eq 'l'||$c eq 'L') { 172 | # -- lineto 173 | my($x,$y) = getArgs(\@s,2); 174 | $xp += $x, $yp += $y if($c eq 'l'); 175 | $xp = $x, $yp = $y if($c eq 'L'); 176 | pushPoint(\@o,$xp,$yp); $pc++; 177 | 178 | } elsif($c eq 'c'||$c eq 'C') { 179 | # -- curveto 180 | my($steps) = $a{bzsteps}; 181 | my($x1,$y1,$x2,$y2,$x,$y) = getArgs(\@s,6); 182 | if($c eq 'c') { 183 | $x1 += $xp; $y1 += $yp; 184 | $x2 += $xp; $y2 += $yp; 185 | $x += $xp; $y += $yp; 186 | } 187 | # -- see http://search.cpan.org/~abw/Math-Bezier-0.01/Bezier.pm 188 | my $b = Math::Bezier->new($xp,$yp,$x1,$y1,$x2,$y2,$x,$y); 189 | my($_x,$_y); 190 | 191 | for(my $i = 0; $i <= $steps; $i++) { 192 | my $r = $i/$steps; 193 | ($_x,$_y) = $b->point($r); 194 | print "\t$_x,$_y ($r)\n" if($arg{verbose}>1); 195 | pushPoint(\@o,$_x,$_y); $pc++; 196 | } 197 | $xp = $_x; $yp = $_y; 198 | 199 | } elsif($c eq 'h'||$c eq 'H') { 200 | # -- hlineto 201 | my($x) = getArgs(\@s,1); 202 | $xp += $x if($c eq 'h'); 203 | $xp = $x if($c eq 'H'); 204 | pushPoint(\@o,$xp,$yp); $pc++; 205 | 206 | } elsif($c eq 'v'||$c eq 'V') { 207 | # -- vlineto 208 | my($y) = getArgs(\@s,1); 209 | $yp += $y if($c eq 'v'); 210 | $yp = $y if($c eq 'V'); 211 | pushPoint(\@o,$xp,$yp); $pc++; 212 | 213 | } elsif($c eq 'q'||$c eq 'Q') { 214 | my($x1,$y1,$x,$y) = getArgs(\@s,4); 215 | print STDERR "<$c> command is not yet implemented, skipped\n"; 216 | 217 | } elsif($c eq 's'||$c eq 'S') { 218 | my($x2,$y2,$x,$y) = getArgs(\@s,4); 219 | print STDERR "<$c> command is not yet implemented, skipped\n"; 220 | 221 | } elsif($c eq 't'||$c eq 'T') { 222 | my($x,$y) = getArgs(\@s,2); 223 | print STDERR "<$c> command is not yet implemented, skipped\n"; 224 | 225 | } elsif($c eq 'a'||$c eq 'A') { 226 | my($rx,$ry,$xa,$laf,$sf,$x,$y) = getArgs(\@s,7); 227 | print STDERR "<$c> command is not yet implemented, skipped\n"; 228 | 229 | } elsif($c eq 'z'||$c eq 'Z') { 230 | push(@o,$c); # -- we push the command on the coord stack, so we know where to split 231 | 232 | $xp = $lxp; $yp = $lyp; 233 | # -- reset coord from first move 234 | # (e.g. inkscape encodes letter 'i' converted to path, as one path with multiple moves 235 | # and 2x 'z' to draw the two polygon - not sure if this according specs, as [m]oves do 236 | # not draw lines, instead [l]ineto should be used) 237 | 238 | $pn++; 239 | 240 | } else { 241 | print STDERR "<$c> is not a command\n"; 242 | last; 243 | } 244 | $lc = $c; 245 | } 246 | print "$pc points, "; # if($arg{verbose}); 247 | return($pn,\@o); 248 | } 249 | 250 | sub pushPoint { 251 | my($o,$x,$y) = @_; 252 | $minx = $x if($minx>$x); 253 | $miny = $y if($miny>$y); 254 | $maxx = $x if($maxx<$x); 255 | $maxy = $y if($maxy<$y); 256 | push(@$o,$x,$y); 257 | } 258 | 259 | sub getArgs { 260 | my($a,$n) = @_; 261 | $n = 1 unless($n); 262 | @_ = splice(@{$a},0,$n); 263 | print "\targs = ".join(',',@_),"\n" if($arg{verbose}>1); 264 | return @_; 265 | } 266 | 267 | -------------------------------------------------------------------------------- /tests/sample7-text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 39 | 41 | 43 | 44 | 46 | image/svg+xml 47 | 49 | 50 | 51 | 52 | 53 | 57 | 62 | 67 | 72 | 77 | 82 | 87 | 92 | 97 | 102 | 107 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /tests/sample4.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[0,357.87922],[0,357.87922],[0.177709462280234,357.869830795288],[0.697267807617152,357.844741713867],[1.53831997375488,357.80857055481],[2.68051089843755,357.765935117187],[4.10348551940916,357.721453200073],[5.78688877441402,357.679742602539],[7.71036560119632,357.645421123657],[9.85356093749999,357.6231065625],[12.1961197210694,357.61741671814],[14.7176868896485,357.632969389648],[17.3979073809815,357.674382376099],[20.2164261328125,357.746273476562],[23.1528880828857,357.853260490112],[26.1869381689453,357.99996121582],[29.2982213287354,358.190993452759],[32.4663825,358.430975],[35.6710666204834,358.724523656616],[38.8919186279297,359.07625722168],[42.108583460083,359.490793494263],[45.3007060546875,359.972750273438],[48.4479313494873,360.526745358276],[51.5299042822266,361.157396547852],[54.5262697906494,361.869321641235],[57.4166728125001,362.6671384375],[60.1807582855225,363.555464735718],[62.798171147461,364.538918334961],[65.2485563360596,365.622117034302],[67.5115587890625,366.809678632813],[69.5668234442139,368.106220929565],[71.3939952392579,369.516361723633],[72.9727191119384,371.044718814087],[74.28264,372.69591],[74.28264,372.69591],[75.7952125872803,375.264434390869],[77.1330008935547,378.248088916016],[78.3044141729736,381.616134041748],[79.3178616796875,385.337830234375],[80.1817526678467,389.382437960205],[80.9044963916016,393.719217685547],[81.4945021051025,398.317429876709],[81.9601790625,403.146335],[82.3099365179443,408.175193521728],[82.5521837255859,413.373265908203],[82.6953299395752,418.709812625732],[82.7477844140624,424.154094140625],[82.7179564031982,429.67537091919],[82.6142551611328,435.242903427734],[82.4450899420166,440.825952132568],[82.21887,446.3937775],[81.9440045892334,451.915639996338],[81.6289029638672,457.360800087891],[81.2819743780518,462.698518240967],[80.9116280859375,467.898054921875],[80.5262733416747,472.928670596924],[80.1343193994141,477.759625732422],[79.7441755133056,482.360180794678],[79.3642509375,486.69959625],[79.0029549261475,490.747132564697],[78.6686967333985,494.472050205078],[78.3698856134033,497.843609637451],[78.1149308203125,500.831071328125],[77.9122416082764,503.403695743408],[77.7702272314453,505.530743349609],[77.6972969439697,507.181474613037],[77.70186,508.32515],[77.70186,508.32515],[77.7473303314209,509.287157076111],[77.7831880029297,510.236221413574],[77.8108436553955,511.171351113586],[77.8317079296875,512.091554277344],[77.8471914666748,512.995839006043],[77.8587049072265,513.883213400879],[77.8676588922119,514.752685563049],[77.8754640625,515.60326359375],[77.8835310589599,516.433955594177],[77.8932705224609,517.243769665527],[77.9060930938721,518.031713908997],[77.9234094140625,518.796796425781],[77.9466301239013,519.538025317078],[77.9771658642578,520.254408684082],[78.016427276001,520.944954627991],[78.065825,521.60867125],[78.126769677124,522.244566651306],[78.2006719482422,522.851648933105],[78.2889424542236,523.428926196594],[78.3929918359374,523.975406542969],[78.5142307342529,524.490098073425],[78.654069790039,524.97200888916],[78.8139196441649,525.42014709137],[78.9951909375,525.83352078125],[79.199294310913,526.211138059998],[79.4276404052734,526.552007028809],[79.6816398614502,526.855135788879],[79.9627033203125,527.119532441406],[80.2722414227295,527.344205087585],[80.6116648095704,527.528161828613],[80.9823841217041,527.670410765686],[81.38581,527.76996],[81.38581,527.76996],[82.5341859133911,527.951411600647],[83.5516607836914,528.046862922363],[84.4448349935913,528.058917807312],[85.2203089257812,527.990180097656],[85.8846829629516,527.843253635559],[86.444557487793,527.620742263184],[86.9065328829956,527.325249822693],[87.27720953125,526.95938015625],[87.5631878152466,526.525737106018],[87.7710681176757,526.02692451416],[87.907450821228,525.465546222839],[87.9789363085937,524.844206074219],[87.9921249624634,524.165507910461],[87.9536171655273,523.43205557373],[87.870013300476,522.646452906189],[87.74791375,521.81130375],[87.5939188967895,520.929211947327],[87.4146291235352,520.002781340332],[87.2166448129273,519.034615771179],[87.0065663476562,518.027319082031],[86.7909941104126,516.983495115051],[86.5765284838868,515.905747712402],[86.369769850769,514.796680716247],[86.17731859375,513.65889796875],[86.0057750955201,512.495003312073],[85.8617397387695,511.307600588379],[85.7518129061889,510.099293639832],[85.6825949804688,508.872686308594],[85.6606863442993,507.630382436829],[85.6926873803711,506.374985866699],[85.7851984713745,505.109100440369],[85.94482,503.83533],[85.94482,503.83533],[86.0898451712036,502.744838075256],[86.2907569165039,500.996035344238],[86.539139270935,498.632361684265],[86.8265762695312,495.697256972656],[87.1446519473267,492.234161086731],[87.4849503393555,488.286513903809],[87.8390554806518,483.897755301209],[88.19855140625,479.11132515625],[88.5550221511841,473.970663346252],[88.9000517504883,468.519209748535],[89.2252242391968,462.800404240417],[89.5221236523437,456.857686699219],[89.7823340249633,450.734497002258],[89.9974393920899,444.474275026855],[90.1590237887573,438.12046065033],[90.25867125,431.71649375],[90.287965810852,425.305814203186],[90.2384915063477,418.931861887207],[90.101832371521,412.638076679382],[89.8695724414062,406.467898457031],[89.5332957510376,400.464767097473],[89.0845863354493,394.672122478027],[88.5150282296752,389.133404476013],[87.81620546875,383.89205296875],[86.9797020877075,378.991507833557],[85.997102121582,374.475208947754],[84.8599896054077,370.38659618866],[83.5599485742188,366.769109433594],[82.0885630630493,363.666188559876],[80.4374171069337,361.121273444824],[78.5980947409058,359.177803965759],[76.56218,357.87922],[76.56218,357.87922],[74.416047119751,356.947025726929],[72.2553058251954,356.071387104492],[70.0853821356201,355.248756365356],[67.9117020703126,354.475585742187],[65.7396916485596,353.748327467651],[63.5747768896484,353.063433774414],[61.4223838128662,352.417356895142],[59.2879384375,351.8065490625],[57.176866782837,351.227462509155],[55.0945948681641,350.676549467773],[53.0465487127686,350.150262171021],[51.0381543359376,349.645052851562],[49.0748377569581,349.157373742065],[47.1620249951172,348.683677075195],[45.3051420697022,348.220415083618],[43.509615,347.76404],[41.7808698052979,347.311004057007],[40.1243325048829,346.857759487305],[38.545429118042,346.40075852356],[37.0495856640625,345.936453398437],[35.6422281622315,345.461296344604],[34.328782631836,344.971739594727],[33.1146750921631,344.46423538147],[32.0053315625,343.9352359375],[31.0061780621339,343.381193495483],[30.1226406103516,342.798560288086],[29.3601452264405,342.183788547974],[28.7241179296876,341.533330507813],[28.2199847393799,340.843638400269],[27.8531716748047,340.111164458008],[27.629104755249,339.332360913696],[27.55321,338.50368],[27.55321,338.50368],[27.5748835198975,337.692966548462],[27.6378255810547,336.966050043945],[27.7389184356689,336.316334386597],[27.8750443359376,335.737223476562],[28.0430855340576,335.222121213989],[28.2399242822266,334.764431499023],[28.4624428326416,334.357558231812],[28.7075234375,333.9949053125],[28.972048348999,333.669876641235],[29.252899819336,333.375876118164],[29.5469601007081,333.106307643433],[29.8511114453125,332.854575117187],[30.1622361053467,332.614082439575],[30.4772163330078,332.378233510742],[30.7929343804932,332.140432230835],[31.1062725,331.8940825],[31.4141129437256,331.632588218384],[31.7133379638672,331.349353286133],[32.000829812622,331.037781603393],[32.2734707421875,330.691277070312],[32.5281430047608,330.303243587036],[32.7617288525391,329.867085053711],[32.9711105377197,329.376205370483],[33.1531703125,328.8240084375],[33.3047904290772,328.203898154907],[33.4228531396485,327.509278422852],[33.5042406964112,326.73355314148],[33.5458353515625,325.870126210938],[33.5445193572998,324.912401531372],[33.4971749658204,323.85378300293],[33.4006844293214,322.687674525757],[33.25193,321.40748],[33.25193,321.40748],[33.1177357324219,320.468961928101],[32.9719915234375,319.60443706543],[32.8151096386719,318.810263191528],[32.64750234375,318.082798085938],[32.4695819042969,317.418399528198],[32.2817605859375,316.813425297852],[32.0844506542969,316.264233174439],[31.878064375,315.7671809375],[31.663014013672,315.318626366577],[31.4397118359375,314.914927241211],[31.2085701074219,314.552441340942],[30.97000109375,314.227526445313],[30.7244170605469,313.936540333862],[30.4722302734376,313.675840786133],[30.2138529980469,313.441785581665],[29.9496975,313.2307325],[29.6801760449219,313.039039320679],[29.4057008984375,312.863063823242],[29.1266843261719,312.699163787232],[28.84353859375,312.543696992188],[28.5566759667969,312.393021217651],[28.2665087109374,312.243494243164],[27.9734490917969,312.091473848267],[27.677909375,311.9333178125],[27.3803018261719,311.765383915405],[27.0810387109375,311.584029936524],[26.7805322949219,311.385613655396],[26.4791948437501,311.166492851563],[26.1774386230468,310.923025304565],[25.8756758984375,310.651568793945],[25.5743189355468,310.348481099243],[25.27378,310.01012],[25.27378,310.01012],[24.2671776098633,308.782723479919],[23.3080409179688,307.555470065918],[22.3951303295898,306.328681164856],[21.52720625,305.102678183594],[20.7030290844726,303.877782528992],[19.9213592382812,302.65431560791],[19.1809571166992,301.43259882721],[18.480583125,300.21295359375],[17.818997668457,298.995701314392],[17.1949611523438,297.781163395996],[16.6072339819336,296.569661245422],[16.0545765625,295.361516269531],[15.5357492993164,294.157049875183],[15.0495125976562,292.956583469238],[14.594626862793,291.760438458557],[14.1698525,290.56893625],[13.7739499145508,289.382398250427],[13.4056795117187,288.201145866699],[13.0638016967774,287.025500505676],[12.7470768749999,285.855783574219],[12.4542654516601,284.692316479187],[12.1841278320313,283.535420627441],[11.9354244213867,282.385417425842],[11.7069156249999,281.24262828125],[11.4973618481446,280.107374600525],[11.3055234960937,278.979977790527],[11.1301609741211,277.860759258118],[10.9700346874999,276.750040410156],[10.8239050415039,275.648142653504],[10.6905324414062,274.55538739502],[10.5686772924805,273.472096041565],[10.4571,272.39859],[10.4571,272.39859],[10.3568562155151,270.787408448792],[10.269551599121,268.137352746582],[10.1947687564086,264.518126320496],[10.1320902929687,259.999432597656],[10.081098814392,254.650975005188],[10.0413769262695,248.542456970215],[10.0125072341918,241.743581919861],[9.99407234374996,234.32405328125],[9.98565486053462,226.353574481506],[9.98683739013666,217.901848947754],[9.99720253814689,209.038580107117],[10.0163329101562,199.833471386719],[10.0438111117553,190.356226213684],[10.079219748535,180.676548015137],[10.1221414260864,170.864140218201],[10.1721587499999,160.98870625],[10.2288543258666,151.119949537659],[10.2918107592773,141.327573508301],[10.3606106558227,131.68128158905],[10.4348366210937,122.250777207031],[10.5140712606811,113.105763789368],[10.5978971801757,104.315944763184],[10.6858969851684,95.9510235556031],[10.7776532812499,88.0807035937501],[10.8727486740112,80.7746883047487],[10.9707657690429,74.1026811157227],[11.071287171936,68.1343854537964],[11.1738954882812,62.9395047460939],[11.2781733236694,58.5877424197389],[11.3837032836914,55.1488019018556],[11.490067973938,52.692386619568],[11.59685,51.2882000000001],[11.59685,51.2882000000001],[11.6986735958862,50.4565288238526],[11.7915279077148,49.6695759033204],[11.8770316592407,48.9252477752686],[11.9568035742187,48.2214509765626],[12.0324623764038,47.5560920440674],[12.1056267895507,46.9270775146485],[12.1779155374145,46.332313925171],[12.2509473437499,45.7697078125001],[12.326340932312,45.2371657135011],[12.4057150268554,44.7325941650391],[12.4906883511352,44.2538997039795],[12.5828796289061,43.7989888671875],[12.6839075839233,43.3657681915284],[12.7953909399414,42.9521442138673],[12.9189484207153,42.5560234710694],[13.05619875,42.1753125],[13.2087606515502,41.8079178375245],[13.3782528491211,41.4517460205078],[13.5662940664673,41.1047035858155],[13.7745030273437,40.7646970703125],[14.0044984555054,40.4296330108643],[14.257899074707,40.0974179443361],[14.5363236087035,39.765958407593],[14.8413907812499,39.4331609375],[15.174719316101,39.0969320709229],[15.5379279370117,38.7551783447267],[15.9326353677368,38.4058062957765],[16.3604603320312,38.0467224609375],[16.8230215536498,37.6758333770753],[17.3219377563476,37.2910455810547],[17.8588276638793,36.8902656097413],[18.43531,36.4714],[18.43531,36.4714],[20.5302777398681,36.5541919036866],[22.4750273095702,36.5530266357422],[24.2772688592529,36.4725489776612],[25.9447125390625,36.3174037109376],[27.4850684991455,36.0922356170655],[28.9060468896484,35.8016894775391],[30.2153578607177,35.4504100738526],[31.4207115624999,35.0430421875],[32.5298181451416,34.5842305999757],[33.550387758789,34.0786200927733],[34.4901305535888,33.5308554473877],[35.3567566796875,32.9455814453125],[36.1579762872314,32.327442868042],[36.9014995263672,31.6810844970703],[37.5950365472412,31.0111511138915],[38.2462974999999,30.3222875000001],[38.86299253479,29.6191384368897],[39.4528318017577,28.9063487060547],[40.0235254510497,28.1885630889892],[40.5827836328124,27.4704263671875],[41.1383164971924,26.7565833221436],[41.6978341943359,26.0516787353515],[42.2690468743896,25.3603573883057],[42.8596646875,24.6872640625],[43.4773977838134,24.0370435394287],[44.1299563134766,23.414340600586],[44.8250504266356,22.8238000274658],[45.5703902734375,22.2700666015625],[46.3736860040282,21.7577851043702],[47.2426477685547,21.2916003173829],[48.184985717163,20.8761570220947],[49.20841,20.5161000000001],[49.20841,20.5161000000001],[50.1819319104004,19.2563542694093],[51.2018656738281,18.1179572021485],[52.268089276123,17.0946033599854],[53.380480703125,16.1799873046876],[54.5389179406738,15.3678035980225],[55.7432789746093,14.6517468017579],[56.9934417907715,14.0255114776612],[58.289284375,13.4827921875001],[59.6306847131348,13.0172834930421],[61.0175207910156,12.6226799560548],[62.4496705944824,12.2926761383058],[63.927012109375,12.0209666015627],[65.4494233215332,11.8012459075929],[67.0167822167969,11.6272086181642],[68.6289667810058,11.492549295044],[70.285855,11.3909625],[71.9873248596192,11.3161427947998],[73.7332543457031,11.2617847412109],[75.5235214440917,11.2215829010009],[77.3580041406249,11.1892318359374],[79.2365804211425,11.1584261077882],[81.1591282714843,11.1228602783204],[83.1255256774901,11.0762289093019],[85.1356506249999,11.0122265625],[87.1893810998535,10.9245477996827],[89.2865950878905,10.8068871826172],[91.4271705749511,10.6529392730714],[93.6109855468749,10.4563986328125],[95.8379179895019,10.2109598236084],[98.1078458886719,9.91031740722656],[100.420647230225,9.54816594543468],[102.7762,9.1182],[102.7762,9.1182],[103.960602206726,9.12850286865239],[105.061401911621,9.08408935546879],[106.08161592926,8.98852628173836],[107.024261074219,8.84538046875002],[107.892354161072,8.65821873779294],[108.688912004395,8.43060791015625],[109.416951418762,8.16611480712891],[110.07948921875,7.86830625000005],[110.679542218933,7.5407490600586],[111.220127233887,7.18701005859373],[111.704261078186,6.81065606689469],[112.134960566406,6.41525390624997],[112.515242513123,6.00437039794929],[112.84812373291,5.58157236328123],[113.136621040344,5.15042662353517],[113.38375125,4.71449999999993],[113.592531176453,4.27735931396489],[113.765977634277,3.84257138671865],[113.907107438049,3.41370303955091],[114.018937402344,2.99432109375005],[114.104484341736,2.58799237060543],[114.166765070801,2.19828369140635],[114.208796404114,1.82876187744148],[114.23359515625,1.48299374999999],[114.244178141785,1.16454613037115],[114.243562175293,0.876985839843883],[114.23476407135,0.623879699707118],[114.220800644531,0.40879453125001],[114.204688709412,0.235297155761714],[114.189445080566,0.106954394531272],[114.178086572571,0.0273330688477245],[114.17363,0],[0,0]] ); 2 | -------------------------------------------------------------------------------- /tests/sample5.scad: -------------------------------------------------------------------------------- 1 | polygon ( points=[[3.3571422,1051.8622],[3.3571422,1051.8622],[4.31643820889893,1050.15530422577],[5.57393377197266,1048.2517008374],[7.10974891878662,1046.15557511139],[8.90400367890625,1043.87111232422],[10.936818081897,1041.40249775238],[13.1883121573242,1038.75391667236],[15.6386059347534,1035.92955436066],[18.26781944375,1032.93359609375],[21.0560727138794,1029.77022714813],[23.983485774707,1026.44363280029],[27.0301786557983,1022.95799832672],[30.1762713867188,1019.31750900391],[33.4018839970337,1015.52635010834],[36.6871365163086,1011.5887069165],[40.0121489741089,1007.5087647049],[43.3570414,1003.29070875],[46.7019338235474,998.938724328308],[50.0269462743164,994.456996716309],[53.3121987818726,989.849711190491],[56.5378113757813,985.121053027344],[59.6839040856079,980.275207503357],[62.730596940918,975.316359895019],[65.6580099712768,970.248695478821],[68.44626320625,965.07639953125],[71.0754766754028,959.803657328796],[73.5257704083008,954.434654147949],[75.7772644345093,948.973575265198],[77.8100787835938,943.424605957031],[79.6043334851196,937.791931499939],[81.1401485686523,932.07973717041],[82.3976440637573,926.292208244934],[83.35694,920.43353],[83.35694,920.43353],[84.1026137051697,914.646263953247],[84.7352857897949,909.057274985351],[85.2591414888,903.647206229858],[85.6783660371094,898.396700820313],[85.9971446696472,893.286401890259],[86.2196626213379,888.296952573242],[86.3501051271057,883.408996002808],[86.392657421875,878.6031753125],[86.3515047405701,873.860133635864],[86.2308323181152,869.160514106445],[86.0348253894348,864.484959857788],[85.7676691894531,859.814114023437],[85.4335489530945,855.128619736939],[85.0366499152832,850.409120131836],[84.5811573109436,845.636258341675],[84.071256375,840.7906775],[83.5111323423767,835.853020740356],[82.9049704479981,830.803931196289],[82.2569559267883,825.624052001343],[81.5712740136719,820.294026289062],[80.852109943573,814.794497192993],[80.103648951416,809.10610784668],[79.3300762721252,803.209501383667],[78.535577140625,797.0853209375],[77.7243367918396,790.714209641724],[76.9005404606934,784.076810629883],[76.0683733821106,777.153767035522],[75.2320207910156,769.925721992187],[74.3956679223328,762.373318633423],[73.5635000109863,754.477200092773],[72.7397022919006,746.218009503784],[71.92846,737.57639],[71.92846,737.57639],[71.0442372702942,728.974269857483],[70.010915060791,720.824158625488],[68.8468038409119,713.092574159851],[67.5702140800781,705.746034316406],[66.1994562477112,698.751056950989],[64.7528408132324,692.074159919433],[63.2486782460632,685.681861077576],[61.705279015625,679.54067828125],[60.1409535913391,673.617129386291],[58.574012442627,667.877732248535],[57.0227660389099,662.289004723816],[55.5055248496094,656.817464667969],[54.0405993441467,651.429629936829],[52.6462999919434,646.092018386231],[51.3409372624207,640.771147872009],[50.142821625,635.43353625],[49.0702635491028,630.045701376038],[48.1415735041504,624.574161105957],[47.3750619595642,618.985433295593],[46.7890393847656,613.246035800781],[46.401816249176,607.322486477356],[46.2317030222168,601.181303181152],[46.2970101733093,594.789003768006],[46.616048171875,588.11210609375],[47.2071274873352,581.117128014221],[48.0885585891113,573.770587385254],[49.2786519466248,566.039002062683],[50.7957180292969,557.888889902344],[52.6580673065491,549.286768760071],[54.8840102478027,540.199156491699],[57.4918573224792,530.592570953064],[60.499919,520.43353],[60.499919,520.43353],[64.2980258857727,508.0590258255],[67.7969771955566,496.581968283691],[71.0073688768005,485.947517347107],[73.9397968769531,476.100832988281],[76.6048571434631,466.987075179749],[79.0131456237793,458.551403894043],[81.1752582653504,450.738979103699],[83.101791015625,443.49496078125],[84.803339822052,436.764508899231],[86.2905006320801,430.492783430176],[87.573869393158,424.624944346619],[88.6640420527344,419.106151621094],[89.5716145582581,413.881565226135],[90.3071828571777,408.896345134277],[90.8813428969421,404.095651318054],[91.304690625,399.42464375],[91.5878219888001,394.828482402649],[91.741332935791,390.252327248535],[91.7758194134216,385.641338260193],[91.7018773691406,380.940675410156],[91.5301027503967,376.09549867096],[91.2710915046387,371.050968015137],[90.9354395793152,365.752243415222],[90.533742921875,360.14448484375],[90.0765974797669,354.172852273254],[89.5745992004395,347.78250567627],[89.0383440313416,340.91860502533],[88.4784279199219,333.526310292969],[87.9054468136292,325.550781451721],[87.3299966599121,316.937178474121],[86.7626734062195,307.630661332703],[86.214073,297.57639],[86.214073,297.57639],[85.5213405745544,287.355534522095],[84.5521159987793,277.97520762207],[83.3298771985168,269.378702975464],[81.8781020996094,261.509314257812],[80.2202686278992,254.310335144653],[78.3798547092285,247.725059311523],[76.3803382694397,241.69678043396],[74.245197234375,236.1687921875],[71.9979095298767,231.084388247681],[69.6619530817871,226.386862290039],[67.2608058159485,222.019507990112],[64.8179456582031,217.925619023438],[62.3568505343933,214.048489065552],[59.9009983703613,210.331411791992],[57.4738670919495,206.717680878296],[55.098934625,203.15059],[52.7996788953552,199.573432832642],[50.5995778288574,195.929503051758],[48.5221093513489,192.162094332886],[46.5907513886719,188.214500351562],[44.8289818666687,184.030014783325],[43.2602787111816,179.551931303711],[41.908119848053,174.723543588257],[40.795983203125,169.4881453125],[39.94734670224,163.789030151978],[39.3856882712402,157.569491782227],[39.134485835968,150.772823878784],[39.2172173222656,143.342320117187],[39.6573606559753,135.221274172974],[40.4783937629395,126.35297972168],[41.7037945690002,116.680730438843],[43.357041,106.14782],[43.357041,106.14782],[45.1718537456665,95.5020734510193],[46.8672264106445,85.5069543503418],[48.4445465744019,76.1292158298645],[49.9052018164063,67.3356110214844],[51.2505797161255,59.0928930570984],[52.4820678530273,51.3678150686035],[53.6010538065796,44.1271301878967],[54.60892515625,37.337591546875],[55.5070694815063,30.9659522774353],[56.2968743618164,24.9789655114746],[56.979727376648,19.3433843808899],[57.5570161054688,14.0259620175781],[58.0301281277466,8.99345155343628],[58.4004510229492,4.21260612036133],[58.6693723705444,-0.349821149749758],[58.83827975,-4.727077125],[58.9085607407837,-8.95240867349243],[58.8816029223633,-13.0590626633301],[58.7587938742065,-17.080285962616],[58.5415211757812,-21.0493254394531],[58.2311724065552,-24.9994279619446],[57.8291351459961,-28.9638403981934],[57.3367969735718,-32.9758096163025],[56.75554546875,-37.068582484375],[56.0867682109985,-41.2754058705139],[55.3318527797852,-45.6295266428223],[54.4921867545776,-50.1641916694031],[53.5691577148437,-54.9126478183594],[52.5641532400513,-59.9081419577942],[51.478560909668,-65.1839209558105],[50.3137683031616,-70.7732316805115],[49.071163,-76.709321],[49.071163,-76.709321],[46.6694276090021,-87.9939372027893],[44.2880972036182,-98.8166044152832],[41.9308337790131,-109.184123699921],[39.6012993303516,-119.103296119141],[37.3031558527985,-128.580922735382],[35.0400653415186,-137.623804611084],[32.8156897916766,-146.238742808685],[30.6336911984375,-154.432538390625],[28.4977315569659,-162.211992419342],[26.4114728624268,-169.583905957275],[24.3785771099847,-176.555080066864],[22.4027062948047,-183.132315810547],[20.4875224120514,-189.322414250763],[18.6366874568896,-195.132176449951],[16.8538634244843,-200.568403470551],[15.14271231,-205.637896375],[13.5068961086017,-210.347456225739],[11.9500768154541,-214.703884085205],[10.475916425722,-218.713981015839],[9.08807693457031,-222.384548080078],[7.7902203371637,-225.722386340363],[6.58600862866699,-228.734296859131],[5.479103804245,-231.427080698822],[4.4731678590625,-233.807538921875],[3.5718627882843,-235.882472590729],[2.77885058707519,-237.658682767822],[2.09779325059998,-239.142970515594],[1.53235277402344,-240.342136896484],[1.08619115251038,-241.262982972931],[0.762970381225586,-241.912309807373],[0.566352455333862,-242.29691846225],[0.49999937,-242.42361]] ); 2 | polygon ( points=[[657.14286,983.79077],[657.14286,983.79077],[656.537304060974,984.016251268921],[654.776091042481,984.62363815918],[651.942403142395,985.50934529602],[648.119422558594,986.569787304687],[643.390331488953,987.701378810425],[637.838312131348,988.800534438476],[631.546546683655,989.763668814087],[624.59821734375,990.4871965625],[617.076506309509,990.86753230896],[609.064595778809,990.801090678711],[600.645667949524,990.184286296997],[591.902905019531,988.913533789062],[582.919489186707,986.885247780151],[573.778602648926,983.995842895508],[564.563427604065,980.141733760376],[555.35714625,975.219335],[546.242940784607,969.125061239624],[537.303993405762,961.755327104492],[528.62348631134,953.006547219849],[520.284601699219,942.775136210937],[512.370521767273,930.957508703003],[504.964428713379,917.450079321289],[498.149504735413,902.14926269104],[492.00893203125,884.9514734375],[486.625892798767,865.753126185913],[482.08356923584,844.450635561523],[478.465143540344,820.940416189575],[475.853797910156,795.118882695312],[474.332714543152,766.88244970398],[473.985075637207,736.12753184082],[474.894063390198,702.750543731079],[477.14286,666.6479],[477.14286,666.6479],[480.492905206604,630.12141072998],[484.624026027832,595.518575175781],[489.496985578308,562.804341721191],[495.072546972656,531.94365875],[501.311473325501,502.901474645996],[508.174527751465,475.642737792969],[515.622473365173,450.132396574707],[523.61607328125,426.335399375],[532.116090614319,404.216694577637],[541.083288479004,383.741230566406],[550.478429989929,364.873955725098],[560.262278261719,347.5798184375],[570.395596408997,331.823767087402],[580.839147546387,317.570750058594],[591.553694788513,304.785715734863],[602.50000125,293.4336125],[613.638830045471,283.479388737793],[624.930944289551,274.887992832031],[636.337107096863,267.624373166504],[647.818081582031,261.653478125],[659.33463085968,256.940256091309],[670.847518044434,253.449655449219],[682.317506250916,251.146624582519],[693.70535859375,249.996111875],[704.971838187561,249.963065710449],[716.077708146973,251.012434472656],[726.983731586609,253.10916654541],[737.650671621094,256.2182103125],[748.039291365051,260.304514157715],[758.110353933106,265.333026464844],[767.82462243988,271.268695617676],[777.14286,278.07647],[777.14286,278.07647],[786.459555385132,285.360613470764],[796.149955112305,292.759330773926],[806.145958914185,300.288478808289],[816.379466523438,307.963914472656],[826.78237767273,315.801494665832],[837.286592094727,323.817076286621],[847.824009522095,332.026516233826],[858.3265296875,340.44567140625],[868.726052323608,349.090398702698],[878.954477163086,357.976555021973],[888.943703938599,367.119997262878],[898.625632382813,376.536582324219],[907.932162228394,386.242167104797],[916.795193208008,396.252608503418],[925.146625054321,406.583763418884],[932.9183575,417.25148875],[940.04229027771,428.271641395569],[946.450323120117,439.660078254394],[952.074355759888,451.432656225281],[956.846287929688,463.605232207031],[960.698019362183,476.19366309845],[963.561449790039,489.21380579834],[965.368478945923,502.681517205505],[966.0510065625,516.61265421875],[965.540932372437,531.023073736877],[963.770156108399,545.928632658691],[960.670577503052,561.345187882996],[956.174096289063,577.288596308594],[950.212612199097,593.77471483429],[942.71802496582,610.819400358887],[933.622234321899,628.438509781189],[922.85714,646.6479],[922.85714,646.6479],[908.438195076904,668.705306529236],[894.123881826172,688.843767897949],[879.935126588135,707.119785215149],[865.892855703125,723.589859589844],[852.017995511475,738.310492131042],[838.331472353516,751.338183947754],[824.85421256958,762.729436148987],[811.6071425,772.54074984375],[798.611188485108,780.828626141052],[785.887276865235,787.649566149902],[773.456333980713,793.060070979309],[761.339286171875,797.116641738281],[749.557059779053,799.875779535828],[738.130581142578,801.393985480957],[727.080776602783,801.727760682678],[716.4285725,800.93360625],[706.194895174561,799.068023291931],[696.400670966797,796.18751291748],[687.066826217041,792.348576235657],[678.214287265625,787.607714355468],[669.863980452881,782.021428385925],[662.036832119141,775.646219436035],[654.753768604736,768.538588614807],[648.03571625,760.75503703125],[641.903601395264,752.352065794372],[636.37835038086,743.386176013183],[631.480889547119,733.913868796692],[627.232145234375,723.991645253906],[623.653043782959,713.676006493835],[620.764511533203,703.023453625488],[618.58747482544,692.090487757873],[617.14286,680.93361],[617.14286,680.93361],[616.297031644287,669.881903186951],[615.886974638672,659.22531807373],[615.88954576294,648.961657649231],[616.281601796875,639.088724902344],[617.039999520264,629.60432282196],[618.141595712891,620.506254396973],[619.563247154541,611.792322616272],[621.281810625,603.46033046875],[623.274142904053,595.508080943298],[625.517100771485,587.933377028809],[627.98754100708,580.734021714172],[630.662320390625,573.907817988281],[633.518295701904,567.452568840027],[636.532323720703,561.366077258301],[639.681261226807,555.646146231995],[642.941965,550.29057875],[646.291291820069,545.297177801208],[649.706098466797,540.663746374512],[653.163241719971,536.388087458801],[656.639578359375,532.468004042969],[660.111965164795,528.901299115906],[663.557258916016,525.685775666504],[666.952316392822,522.819236683655],[670.273994375,520.29948515625],[673.499149642334,518.124324073181],[676.604638974609,516.29155642334],[679.567319151612,514.798985195618],[682.364046953125,513.644413378906],[684.971679158936,512.825643962097],[687.367072548828,512.340479934082],[689.527083902588,512.186724283752],[691.42857,512.36218],[691.42857,512.36218],[698.184290376892,513.881607117004],[704.525669187012,515.745272443848],[710.456891699524,517.929110694275],[715.982143183594,520.409056582031],[721.105608908386,523.161044820862],[725.831474143067,526.161010124512],[730.163924156799,529.384887206726],[734.10714421875,532.80861078125],[737.665319598084,536.408115561829],[740.842635563965,540.159336262207],[743.643277385559,544.03820759613],[746.071430332031,548.020664277344],[748.131279672547,552.082641019592],[749.82701067627,556.200072536621],[751.162808612366,560.348893542175],[752.14285875,564.50503875],[752.771346358338,568.64444287384],[753.052456706543,572.743040627441],[752.990375063782,576.776766724548],[752.589286699219,580.721555878906],[751.853376882019,584.55334280426],[750.786830881348,588.248062214355],[749.39383396637,591.781648822937],[747.67857140625,595.13003734375],[745.645228470154,598.26916249054],[743.297990427246,601.174958977051],[740.641042546692,603.823361517029],[737.678570097656,606.190304824219],[734.414758349304,608.251723612366],[730.853792570801,609.983552595215],[726.999858031311,611.361726486511],[722.85714,612.36218],[722.85714,612.36218],[718.703959715576,613.026155436707],[714.81026600586,613.421750563965],[711.167688336182,613.565183294983],[707.767856171875,613.472671542969],[704.602398978272,613.16043322113],[701.662946220703,612.644686242676],[698.941127364502,611.941648520813],[696.428571875,611.06753796875],[694.116909217529,610.038572499695],[691.997768857422,608.870970026855],[690.06278026001,607.58094846344],[688.303572890625,606.184725722656],[686.7117762146,604.698519717712],[685.279019697266,603.138548361816],[683.996932803955,601.521029568176],[682.857145,599.86218125],[681.851285750733,598.178221320496],[680.970984521485,596.485367692871],[680.207870777588,594.799838280334],[679.553573984375,593.137850996094],[678.999723607178,591.515623753357],[678.537949111328,589.949374465332],[678.159879962158,588.455321045227],[677.857145625,587.04968140625],[677.621375565186,585.748673461609],[677.444199248047,584.568515124512],[677.317246138916,583.525424308166],[677.232145703125,582.635618925781],[677.180527406006,581.915316890564],[677.154020712891,581.380736115723],[677.144255089112,581.048094514465],[677.14286,580.93361]] ); 3 | -------------------------------------------------------------------------------- /tests/sample.stl: -------------------------------------------------------------------------------- 1 | solid svg2stl 2 | facet normal -0.0709804554871136 -0.72067665875075 -0.689628108817134 3 | outer loop 4 | vertex 0 27.862898 -1052.4285 5 | vertex 5.43578174312254 27.3275202277766 -1052.4285 6 | vertex -0.0258846756175513 -0.130131051972983 -1023.1725 7 | endloop 8 | endfacet 9 | facet normal 0.070980455487186 0.720676658750747 0.68962810881713 10 | outer loop 11 | vertex 0 27.862898 -1052.4285 12 | vertex -0.0258846756175513 -0.130131051972983 -1023.1725 13 | vertex 0 -0.13268047 -1023.1725 14 | endloop 15 | endfacet 16 | facet normal -0.210213627363269 -0.692981458915085 -0.689628108817134 17 | outer loop 18 | vertex 5.43578174312254 27.3275202277766 -1052.4285 19 | vertex 10.6626694422784 25.7419611786497 -1052.4285 20 | vertex -0.0507746176674135 -0.122580770596978 -1023.1725 21 | endloop 22 | endfacet 23 | facet normal 0.210213627363167 0.692981458915092 0.689628108817158 24 | outer loop 25 | vertex 5.43578174312254 27.3275202277766 -1052.4285 26 | vertex -0.0507746176674135 -0.122580770596978 -1023.1725 27 | vertex -0.0258846756175513 -0.130131051972983 -1023.1725 28 | endloop 29 | endfacet 30 | facet normal -0.341368407429015 -0.638655370241793 -0.689628108817134 31 | outer loop 32 | vertex 10.6626694422784 25.7419611786497 -1052.4285 33 | vertex 15.4797967344614 23.1671529976854 -1052.4285 34 | vertex -0.0737133196350506 -0.11031977895102 -1023.1725 35 | endloop 36 | endfacet 37 | facet normal 0.341368407429048 0.638655370241752 0.689628108817155 38 | outer loop 39 | vertex 10.6626694422784 25.7419611786497 -1052.4285 40 | vertex -0.0737133196350506 -0.11031977895102 -1023.1725 41 | vertex -0.0507746176674135 -0.122580770596978 -1023.1725 42 | endloop 43 | endfacet 44 | facet normal -0.459404591038871 -0.559786113852167 -0.689628108817134 45 | outer loop 46 | vertex 15.4797967344614 23.1671529976854 -1052.4285 47 | vertex 19.7020441193091 19.7020441193091 -1052.4285 48 | vertex -0.0938192600680186 -0.0938192600680186 -1023.1725 49 | endloop 50 | endfacet 51 | facet normal 0.459404591038865 0.559786113852206 0.689628108817106 52 | outer loop 53 | vertex 15.4797967344614 23.1671529976854 -1052.4285 54 | vertex -0.0938192600680186 -0.0938192600680186 -1023.1725 55 | vertex -0.0737133196350506 -0.11031977895102 -1023.1725 56 | endloop 57 | endfacet 58 | facet normal -0.559786113852167 -0.459404591038871 -0.689628108817134 59 | outer loop 60 | vertex 19.7020441193091 19.7020441193091 -1052.4285 61 | vertex 23.1671529976854 15.4797967344614 -1052.4285 62 | vertex -0.11031977895102 -0.0737133196350506 -1023.1725 63 | endloop 64 | endfacet 65 | facet normal 0.559786113852099 0.45940459103893 0.68962810881715 66 | outer loop 67 | vertex 19.7020441193091 19.7020441193091 -1052.4285 68 | vertex -0.11031977895102 -0.0737133196350506 -1023.1725 69 | vertex -0.0938192600680186 -0.0938192600680186 -1023.1725 70 | endloop 71 | endfacet 72 | facet normal -0.638655370241793 -0.341368407429014 -0.689628108817134 73 | outer loop 74 | vertex 23.1671529976854 15.4797967344614 -1052.4285 75 | vertex 25.7419611786497 10.6626694422784 -1052.4285 76 | vertex -0.122580770596978 -0.0507746176674135 -1023.1725 77 | endloop 78 | endfacet 79 | facet normal 0.6386553702418 0.341368407428965 0.689628108817152 80 | outer loop 81 | vertex 23.1671529976854 15.4797967344614 -1052.4285 82 | vertex -0.122580770596978 -0.0507746176674135 -1023.1725 83 | vertex -0.11031977895102 -0.0737133196350506 -1023.1725 84 | endloop 85 | endfacet 86 | facet normal -0.692981458915085 -0.210213627363269 -0.689628108817134 87 | outer loop 88 | vertex 25.7419611786497 10.6626694422784 -1052.4285 89 | vertex 27.3275202277766 5.43578174312254 -1052.4285 90 | vertex -0.130131051972983 -0.0258846756175513 -1023.1725 91 | endloop 92 | endfacet 93 | facet normal 0.692981458915092 0.210213627363167 0.689628108817158 94 | outer loop 95 | vertex 25.7419611786497 10.6626694422784 -1052.4285 96 | vertex -0.130131051972983 -0.0258846756175513 -1023.1725 97 | vertex -0.122580770596978 -0.0507746176674135 -1023.1725 98 | endloop 99 | endfacet 100 | facet normal -0.72067665875075 -0.0709804554871136 -0.689628108817134 101 | outer loop 102 | vertex 27.3275202277766 5.43578174312254 -1052.4285 103 | vertex 27.862898 1.70611044253346e-15 -1052.4285 104 | vertex -0.13268047 -8.12433564474334e-18 -1023.1725 105 | endloop 106 | endfacet 107 | facet normal 0.720676658750743 0.0709804554871837 0.689628108817134 108 | outer loop 109 | vertex 27.3275202277766 5.43578174312254 -1052.4285 110 | vertex -0.13268047 -8.12433564474334e-18 -1023.1725 111 | vertex -0.130131051972983 -0.0258846756175513 -1023.1725 112 | endloop 113 | endfacet 114 | facet normal -0.72067665875075 0.0709804554871136 -0.689628108817134 115 | outer loop 116 | vertex 27.862898 1.70611044253346e-15 -1052.4285 117 | vertex 27.3275202277766 -5.43578174312253 -1052.4285 118 | vertex -0.130131051972983 0.0258846756175513 -1023.1725 119 | endloop 120 | endfacet 121 | facet normal 0.720676658750747 -0.070980455487186 0.68962810881713 122 | outer loop 123 | vertex 27.862898 1.70611044253346e-15 -1052.4285 124 | vertex -0.130131051972983 0.0258846756175513 -1023.1725 125 | vertex -0.13268047 -8.12433564474334e-18 -1023.1725 126 | endloop 127 | endfacet 128 | facet normal -0.692981458915085 0.210213627363269 -0.689628108817134 129 | outer loop 130 | vertex 27.3275202277766 -5.43578174312253 -1052.4285 131 | vertex 25.7419611786497 -10.6626694422784 -1052.4285 132 | vertex -0.122580770596978 0.0507746176674135 -1023.1725 133 | endloop 134 | endfacet 135 | facet normal 0.692981458915119 -0.210213627363167 0.689628108817131 136 | outer loop 137 | vertex 27.3275202277766 -5.43578174312253 -1052.4285 138 | vertex -0.122580770596978 0.0507746176674135 -1023.1725 139 | vertex -0.130131051972983 0.0258846756175513 -1023.1725 140 | endloop 141 | endfacet 142 | facet normal -0.638655370241793 0.341368407429014 -0.689628108817134 143 | outer loop 144 | vertex 25.7419611786497 -10.6626694422784 -1052.4285 145 | vertex 23.1671529976854 -15.4797967344614 -1052.4285 146 | vertex -0.11031977895102 0.0737133196350505 -1023.1725 147 | endloop 148 | endfacet 149 | facet normal 0.638655370241752 -0.341368407429048 0.689628108817155 150 | outer loop 151 | vertex 25.7419611786497 -10.6626694422784 -1052.4285 152 | vertex -0.11031977895102 0.0737133196350505 -1023.1725 153 | vertex -0.122580770596978 0.0507746176674135 -1023.1725 154 | endloop 155 | endfacet 156 | facet normal -0.559786113852167 0.459404591038871 -0.689628108817134 157 | outer loop 158 | vertex 23.1671529976854 -15.4797967344614 -1052.4285 159 | vertex 19.7020441193091 -19.7020441193091 -1052.4285 160 | vertex -0.0938192600680186 0.0938192600680186 -1023.1725 161 | endloop 162 | endfacet 163 | facet normal 0.559786113852197 -0.459404591038793 0.689628108817161 164 | outer loop 165 | vertex 23.1671529976854 -15.4797967344614 -1052.4285 166 | vertex -0.0938192600680186 0.0938192600680186 -1023.1725 167 | vertex -0.11031977895102 0.0737133196350505 -1023.1725 168 | endloop 169 | endfacet 170 | facet normal -0.459404591038871 0.559786113852167 -0.689628108817134 171 | outer loop 172 | vertex 19.7020441193091 -19.7020441193091 -1052.4285 173 | vertex 15.4797967344614 -23.1671529976854 -1052.4285 174 | vertex -0.0737133196350505 0.11031977895102 -1023.1725 175 | endloop 176 | endfacet 177 | facet normal 0.45940459103893 -0.559786113852099 0.68962810881715 178 | outer loop 179 | vertex 19.7020441193091 -19.7020441193091 -1052.4285 180 | vertex -0.0737133196350505 0.11031977895102 -1023.1725 181 | vertex -0.0938192600680186 0.0938192600680186 -1023.1725 182 | endloop 183 | endfacet 184 | facet normal -0.341368407429014 0.638655370241793 -0.689628108817134 185 | outer loop 186 | vertex 15.4797967344614 -23.1671529976854 -1052.4285 187 | vertex 10.6626694422784 -25.7419611786497 -1052.4285 188 | vertex -0.0507746176674135 0.122580770596978 -1023.1725 189 | endloop 190 | endfacet 191 | facet normal 0.341368407429048 -0.638655370241752 0.689628108817155 192 | outer loop 193 | vertex 15.4797967344614 -23.1671529976854 -1052.4285 194 | vertex -0.0507746176674135 0.122580770596978 -1023.1725 195 | vertex -0.0737133196350505 0.11031977895102 -1023.1725 196 | endloop 197 | endfacet 198 | facet normal -0.210213627363269 0.692981458915085 -0.689628108817134 199 | outer loop 200 | vertex 10.6626694422784 -25.7419611786497 -1052.4285 201 | vertex 5.43578174312255 -27.3275202277766 -1052.4285 202 | vertex -0.0258846756175514 0.130131051972983 -1023.1725 203 | endloop 204 | endfacet 205 | facet normal 0.210213627363167 -0.692981458915146 0.689628108817104 206 | outer loop 207 | vertex 10.6626694422784 -25.7419611786497 -1052.4285 208 | vertex -0.0258846756175514 0.130131051972983 -1023.1725 209 | vertex -0.0507746176674135 0.122580770596978 -1023.1725 210 | endloop 211 | endfacet 212 | facet normal -0.0709804554871135 0.72067665875075 -0.689628108817134 213 | outer loop 214 | vertex 5.43578174312255 -27.3275202277766 -1052.4285 215 | vertex 3.41222088506692e-15 -27.862898 -1052.4285 216 | vertex -1.62486712894867e-17 0.13268047 -1023.1725 217 | endloop 218 | endfacet 219 | facet normal 0.0709804554871837 -0.720676658750743 0.689628108817134 220 | outer loop 221 | vertex 5.43578174312255 -27.3275202277766 -1052.4285 222 | vertex -1.62486712894867e-17 0.13268047 -1023.1725 223 | vertex -0.0258846756175514 0.130131051972983 -1023.1725 224 | endloop 225 | endfacet 226 | facet normal 0.0709804554871135 0.72067665875075 -0.689628108817134 227 | outer loop 228 | vertex 3.41222088506692e-15 -27.862898 -1052.4285 229 | vertex -5.43578174312254 -27.3275202277766 -1052.4285 230 | vertex 0.0258846756175513 0.130131051972983 -1023.1725 231 | endloop 232 | endfacet 233 | facet normal -0.070980455487186 -0.720676658750747 0.68962810881713 234 | outer loop 235 | vertex 3.41222088506692e-15 -27.862898 -1052.4285 236 | vertex 0.0258846756175513 0.130131051972983 -1023.1725 237 | vertex -1.62486712894867e-17 0.13268047 -1023.1725 238 | endloop 239 | endfacet 240 | facet normal 0.210213627363269 0.692981458915086 -0.689628108817134 241 | outer loop 242 | vertex -5.43578174312254 -27.3275202277766 -1052.4285 243 | vertex -10.6626694422784 -25.7419611786497 -1052.4285 244 | vertex 0.0507746176674135 0.122580770596978 -1023.1725 245 | endloop 246 | endfacet 247 | facet normal -0.210213627363171 -0.692981458915105 0.689628108817144 248 | outer loop 249 | vertex -5.43578174312254 -27.3275202277766 -1052.4285 250 | vertex 0.0507746176674135 0.122580770596978 -1023.1725 251 | vertex 0.0258846756175513 0.130131051972983 -1023.1725 252 | endloop 253 | endfacet 254 | facet normal 0.341368407429014 0.638655370241793 -0.689628108817134 255 | outer loop 256 | vertex -10.6626694422784 -25.7419611786497 -1052.4285 257 | vertex -15.4797967344614 -23.1671529976854 -1052.4285 258 | vertex 0.0737133196350505 0.11031977895102 -1023.1725 259 | endloop 260 | endfacet 261 | facet normal -0.341368407429036 -0.638655370241784 0.689628108817131 262 | outer loop 263 | vertex -10.6626694422784 -25.7419611786497 -1052.4285 264 | vertex 0.0737133196350505 0.11031977895102 -1023.1725 265 | vertex 0.0507746176674135 0.122580770596978 -1023.1725 266 | endloop 267 | endfacet 268 | facet normal 0.459404591038871 0.559786113852167 -0.689628108817134 269 | outer loop 270 | vertex -15.4797967344614 -23.1671529976854 -1052.4285 271 | vertex -19.7020441193091 -19.7020441193091 -1052.4285 272 | vertex 0.0938192600680185 0.0938192600680186 -1023.1725 273 | endloop 274 | endfacet 275 | facet normal -0.459404591038793 -0.559786113852197 0.689628108817161 276 | outer loop 277 | vertex -15.4797967344614 -23.1671529976854 -1052.4285 278 | vertex 0.0938192600680185 0.0938192600680186 -1023.1725 279 | vertex 0.0737133196350505 0.11031977895102 -1023.1725 280 | endloop 281 | endfacet 282 | facet normal 0.559786113852167 0.459404591038871 -0.689628108817134 283 | outer loop 284 | vertex -19.7020441193091 -19.7020441193091 -1052.4285 285 | vertex -23.1671529976854 -15.4797967344614 -1052.4285 286 | vertex 0.11031977895102 0.0737133196350506 -1023.1725 287 | endloop 288 | endfacet 289 | facet normal -0.559786113852201 -0.459404591038817 0.689628108817142 290 | outer loop 291 | vertex -19.7020441193091 -19.7020441193091 -1052.4285 292 | vertex 0.11031977895102 0.0737133196350506 -1023.1725 293 | vertex 0.0938192600680185 0.0938192600680186 -1023.1725 294 | endloop 295 | endfacet 296 | facet normal 0.638655370241793 0.341368407429015 -0.689628108817134 297 | outer loop 298 | vertex -23.1671529976854 -15.4797967344614 -1052.4285 299 | vertex -25.7419611786497 -10.6626694422784 -1052.4285 300 | vertex 0.122580770596978 0.0507746176674135 -1023.1725 301 | endloop 302 | endfacet 303 | facet normal -0.638655370241776 -0.341368407428952 0.689628108817181 304 | outer loop 305 | vertex -23.1671529976854 -15.4797967344614 -1052.4285 306 | vertex 0.122580770596978 0.0507746176674135 -1023.1725 307 | vertex 0.11031977895102 0.0737133196350506 -1023.1725 308 | endloop 309 | endfacet 310 | facet normal 0.692981458915085 0.210213627363269 -0.689628108817134 311 | outer loop 312 | vertex -25.7419611786497 -10.6626694422784 -1052.4285 313 | vertex -27.3275202277766 -5.43578174312255 -1052.4285 314 | vertex 0.130131051972983 0.0258846756175514 -1023.1725 315 | endloop 316 | endfacet 317 | facet normal -0.692981458915092 -0.210213627363167 0.689628108817158 318 | outer loop 319 | vertex -25.7419611786497 -10.6626694422784 -1052.4285 320 | vertex 0.130131051972983 0.0258846756175514 -1023.1725 321 | vertex 0.122580770596978 0.0507746176674135 -1023.1725 322 | endloop 323 | endfacet 324 | facet normal 0.72067665875075 0.070980455487114 -0.689628108817134 325 | outer loop 326 | vertex -27.3275202277766 -5.43578174312255 -1052.4285 327 | vertex -27.862898 -5.11833132760038e-15 -1052.4285 328 | vertex 0.13268047 2.437300693423e-17 -1023.1725 329 | endloop 330 | endfacet 331 | facet normal -0.720676658750743 -0.0709804554871837 0.689628108817134 332 | outer loop 333 | vertex -27.3275202277766 -5.43578174312255 -1052.4285 334 | vertex 0.13268047 2.437300693423e-17 -1023.1725 335 | vertex 0.130131051972983 0.0258846756175514 -1023.1725 336 | endloop 337 | endfacet 338 | facet normal 0.72067665875075 -0.0709804554871135 -0.689628108817134 339 | outer loop 340 | vertex -27.862898 -5.11833132760038e-15 -1052.4285 341 | vertex -27.3275202277766 5.43578174312254 -1052.4285 342 | vertex 0.130131051972983 -0.0258846756175513 -1023.1725 343 | endloop 344 | endfacet 345 | facet normal -0.720676658750747 0.0709804554871859 0.68962810881713 346 | outer loop 347 | vertex -27.862898 -5.11833132760038e-15 -1052.4285 348 | vertex 0.130131051972983 -0.0258846756175513 -1023.1725 349 | vertex 0.13268047 2.437300693423e-17 -1023.1725 350 | endloop 351 | endfacet 352 | facet normal 0.692981458915085 -0.210213627363269 -0.689628108817134 353 | outer loop 354 | vertex -27.3275202277766 5.43578174312254 -1052.4285 355 | vertex -25.7419611786497 10.6626694422784 -1052.4285 356 | vertex 0.122580770596978 -0.0507746176674135 -1023.1725 357 | endloop 358 | endfacet 359 | facet normal -0.692981458915092 0.210213627363167 0.689628108817158 360 | outer loop 361 | vertex -27.3275202277766 5.43578174312254 -1052.4285 362 | vertex 0.122580770596978 -0.0507746176674135 -1023.1725 363 | vertex 0.130131051972983 -0.0258846756175513 -1023.1725 364 | endloop 365 | endfacet 366 | facet normal 0.638655370241793 -0.341368407429014 -0.689628108817134 367 | outer loop 368 | vertex -25.7419611786497 10.6626694422784 -1052.4285 369 | vertex -23.1671529976854 15.4797967344614 -1052.4285 370 | vertex 0.11031977895102 -0.0737133196350505 -1023.1725 371 | endloop 372 | endfacet 373 | facet normal -0.638655370241752 0.341368407429048 0.689628108817155 374 | outer loop 375 | vertex -25.7419611786497 10.6626694422784 -1052.4285 376 | vertex 0.11031977895102 -0.0737133196350505 -1023.1725 377 | vertex 0.122580770596978 -0.0507746176674135 -1023.1725 378 | endloop 379 | endfacet 380 | facet normal 0.559786113852167 -0.459404591038871 -0.689628108817134 381 | outer loop 382 | vertex -23.1671529976854 15.4797967344614 -1052.4285 383 | vertex -19.7020441193091 19.7020441193091 -1052.4285 384 | vertex 0.0938192600680186 -0.0938192600680185 -1023.1725 385 | endloop 386 | endfacet 387 | facet normal -0.559786113852176 0.459404591038776 0.68962810881719 388 | outer loop 389 | vertex -23.1671529976854 15.4797967344614 -1052.4285 390 | vertex 0.0938192600680186 -0.0938192600680185 -1023.1725 391 | vertex 0.11031977895102 -0.0737133196350505 -1023.1725 392 | endloop 393 | endfacet 394 | facet normal 0.459404591038871 -0.559786113852167 -0.689628108817134 395 | outer loop 396 | vertex -19.7020441193091 19.7020441193091 -1052.4285 397 | vertex -15.4797967344614 23.1671529976854 -1052.4285 398 | vertex 0.0737133196350506 -0.11031977895102 -1023.1725 399 | endloop 400 | endfacet 401 | facet normal -0.459404591038817 0.559786113852201 0.689628108817142 402 | outer loop 403 | vertex -19.7020441193091 19.7020441193091 -1052.4285 404 | vertex 0.0737133196350506 -0.11031977895102 -1023.1725 405 | vertex 0.0938192600680186 -0.0938192600680185 -1023.1725 406 | endloop 407 | endfacet 408 | facet normal 0.341368407429015 -0.638655370241793 -0.689628108817134 409 | outer loop 410 | vertex -15.4797967344614 23.1671529976854 -1052.4285 411 | vertex -10.6626694422784 25.7419611786497 -1052.4285 412 | vertex 0.0507746176674135 -0.122580770596978 -1023.1725 413 | endloop 414 | endfacet 415 | facet normal -0.341368407428952 0.638655370241776 0.689628108817181 416 | outer loop 417 | vertex -15.4797967344614 23.1671529976854 -1052.4285 418 | vertex 0.0507746176674135 -0.122580770596978 -1023.1725 419 | vertex 0.0737133196350506 -0.11031977895102 -1023.1725 420 | endloop 421 | endfacet 422 | facet normal 0.210213627363269 -0.692981458915085 -0.689628108817134 423 | outer loop 424 | vertex -10.6626694422784 25.7419611786497 -1052.4285 425 | vertex -5.43578174312255 27.3275202277766 -1052.4285 426 | vertex 0.0258846756175514 -0.130131051972983 -1023.1725 427 | endloop 428 | endfacet 429 | facet normal -0.210213627363167 0.692981458915092 0.689628108817158 430 | outer loop 431 | vertex -10.6626694422784 25.7419611786497 -1052.4285 432 | vertex 0.0258846756175514 -0.130131051972983 -1023.1725 433 | vertex 0.0507746176674135 -0.122580770596978 -1023.1725 434 | endloop 435 | endfacet 436 | facet normal 0.070980455487114 -0.72067665875075 -0.689628108817134 437 | outer loop 438 | vertex -5.43578174312255 27.3275202277766 -1052.4285 439 | vertex -6.82444177013384e-15 27.862898 -1052.4285 440 | vertex 3.24973425789734e-17 -0.13268047 -1023.1725 441 | endloop 442 | endfacet 443 | facet normal -0.0709804554871837 0.720676658750743 0.689628108817134 444 | outer loop 445 | vertex -5.43578174312255 27.3275202277766 -1052.4285 446 | vertex 3.24973425789734e-17 -0.13268047 -1023.1725 447 | vertex 0.0258846756175514 -0.130131051972983 -1023.1725 448 | endloop 449 | endfacet 450 | endsolid svg2stl 451 | --------------------------------------------------------------------------------