i am using PShape to draw an svg image with shape(); but it’s not closing all the way. it basically looks like how the shape would look if i was doing beginShape() vertices and endShape() without using endShape(CLOSE); the problem is that obviously you can’t use CLOSE in the shape() function, so how do i make sure the shape closes all the way?
here’s the svg file if it helps
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 57.6 55.56"><path d="M39.9,14c-.57,0-1.14,0-1.7.06l3.17-3.19a1.55,1.55,0,0,0-1.1-2.64H37.12a1.37,1.37,0,0,0-1.37,1.37v4.67A24.51,24.51,0,0,0,32.1,14a24.9,24.9,0,1,0,0,49.79A24.08,24.08,0,0,0,36,63.47a23.75,23.75,0,0,0,3.89.31A24.9,24.9,0,1,0,39.9,14ZM56.55,29a1,1,0,0,1-1.39-.29,17.2,17.2,0,0,0-6.58-5.85,1,1,0,0,1-.5-1.23L49,19.11a1,1,0,0,1,1.35-.55A23.15,23.15,0,0,1,59,26.07a1,1,0,0,1-.26,1.36Z" transform="translate(-7.2 -8.22)"/></svg>
bonus: how can i modify this shape to draw it with a custom fill or stroke? would i have to modify the root file directly or is there a way to do like shape.fill()
::update::
okay i think the problem is actually a lot deeper here, i tried it with some of my other svg images and some of them omit like half of the vertices. they look fine everywhere else, they just break in processing. one of the svg files won’t even load, and i get an unhandled shape command error? wouldn’t something like that make the shape unreadable from any software? it works everywhere else and i made it in illustrator- what can i do to make sure my svgs all work properly in processing?
here’s the svg that’s not even loading properly:
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55.86 55.12"><path d="M58,24.07s-8-6.5-16-3.14c-2.35,1-4.14,1.72-5.52,2.23l6,3.46a1.63,1.63,0,0,1,.41,2.5l-31,35.31A1.64,1.64,0,0,1,9,62.83l4.81-14.22a15.67,15.67,0,0,0,4.29-.74,20.12,20.12,0,0,1-3.64-1.15l3-9a14.86,14.86,0,0,0,5-.75,19,19,0,0,1-4.27-1.45l3-8.76c1.6.56,3.85.59,7-.36A19.54,19.54,0,0,1,22.15,24l1.94-5.76a1.65,1.65,0,0,1,2.38-.89l5.82,3.36A11.79,11.79,0,0,1,32.82,19,13.07,13.07,0,0,1,37,13.43,20.47,20.47,0,0,1,50.28,9.94c12.31.69,14.4,7.76,14.5,8.22-.4-.23-8.82-4.75-17.05-2.3l.35.07C57.59,18.14,58,24.07,58,24.07Z" transform="translate(-8.92 -9.88)"/></svg>
and here’s the error i’m getting
parsed: M,58,24.07,s,-8,-6.5,-16,-3.14,c,-2.35,1,-4.14,1.72,-5.52,2.23,l,6,3.46,a,1.63,1.63,0,0,1,.41,2.5,l,-31,35.31,A,1.64,1.64,0,0,1,9,62.83,l,4.81,-14.22,a,15.67,15.67,0,0,0,4.29,-.74,20.12,20.12,0,0,1,-3.64,-1.15,l,3,-9,a,14.86,14.86,0,0,0,5,-.75,19,19,0,0,1,-4.27,-1.45,l,3,-8.76,c,1.6.56,3.85.59,7,-.36,A,19.54,19.54,0,0,1,22.15,24,l,1.94,-5.76,a,1.65,1.65,0,0,1,2.38,-.89,l,5.82,3.36,A,11.79,11.79,0,0,1,32.82,19,13.07,13.07,0,0,1,37,13.43,20.47,20.47,0,0,1,50.28,9.94,c,12.31.69,14.4,7.76,14.5,8.22,-.4,-.23,-8.82,-4.75,-17.05,-2.3,l
unparsed: .35.07,C,57.59,18.14,58,24.07,58,24.07,Z
RuntimeException: shape command not handled: .35.07