# Problem with path closing

• Hi everyone:

I'm making shapes using the arc tools and I'm having a problem in the intersection of two points: This is the code I'm using, and the reason I didn't use the oval tool is that I want to make random movements on every arc.

``````def shapePage(o=0, wd=1000, hg=1000, sWd=10, positive=True, cur = True, double=False):
hWd = wd / 2
hHg = hg / 2
hsWd = sWd / 2
def canvas():
newPage(wd, hg)
if positive is True:
fill(1)
if positive is False:
fill(0)
rect(o, o, wd, hg)
def blackShape():
path = BezierPath()
fill(None)
if positive is True:
stroke(0)
if positive is False:
stroke(1)
strokeWidth(sWd)
points = [
[hWd, o + hsWd],
[wd - hsWd, o + hsWd],
[wd - hsWd, hHg],
[wd - hsWd, hg - hsWd],
[hWd, hg - hsWd],
[o + hsWd, hg - hsWd],
[o + hsWd, hHg],
[o + hsWd, o + hsWd],
[hWd, hHg]
]
while radius >= sWd * 2:
newsWd=sWd * 2
if cur is True:
path.moveTo(points)
if cur is False:
path.moveTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
path.lineTo(points)
lineCap("butt")
#lineJoin("miter")
closePath()
drawPath(path=path)
for point in points:
if point < hWd:
point += newsWd
if point > hWd:
point -= newsWd
if point == hWd:
point = point
if point < hHg:
point += newsWd
if point > hHg:
point -= newsWd
if point == hHg:
point = point
shape(cur)
if double is True:
shape(not cur)
canvas()
blackShape()
``````

• every arc is separate contours in a path, what you see is the `lineCap` (see)

• Thank you @frederik ! I was wondering if there's a way to access to the curves of an oval(x, y, w, h)

• hello @eduairet,

you can draw an oval using a `BezierPath`, and then access its contours and points:

``````B = BezierPath()
B.oval(100, 100, 800, 800)
print(B.contours)
print(B.points)
print(B.onCurvePoints)
print(B.offCurvePoints)
``````

cheers!

• @gferreira great!!!! thank you very much.