You need to start the path at the center point, then add the arc segment (implicitly adding a line from the center point to the start of the arc segment) and finally close the path (creating an implicit line from the end of the arc segment to the center point).
- (void) drawTheArcWithColor:(NSBezierPath*) thePath :(CGFloat) angle :(NSColor*) theColor :(CGFloat) line {
[thePath setLineWidth:line];
[thePath moveToPoint:centerPoint];
[thePath appendBezierPathWithArcWithCenter:centerPoint radius:2+circleHeight/2 startAngle:angle endAngle:angle+90.0f];
[thePath closePath];
[theColor setStroke];
[[NSColor grayColor] setFill];
[thePath fill];
[thePath stroke];
}