From the forums:
https://forum.openframeworks.cc/t/arc-without-drawing-radius-lines/24343
Note this issue appears with current master.
The following code produces an unexpected straight line:
ofPath path;
//draw an arc with a center starting at 300, 300, radius of 150 over 180 degrees
//should appear like a semi-circle
path.arc(300, 300, 150, 150, -180, 0);
path.setFilled(false);
path.setStrokeWidth(1);
path.draw();

But ofPolyline::arc looks correct.
ofPolyline poly;
//draw an arc with a center starting at 300, 300, radius of 150 over 180 degrees
//should appear like a semi-circle
poly.arc(300, 300, 150, 150, -180, 0);
poly.draw();

So the issue seems to be that ofPath::addCommand adds a moveTo command if a command list hasn't started with one.
Normally this is fine, but with ofPath::arc(const glm::vec3 & centre, float radiusX, float radiusY, float angleBegin, float angleEnd) the Command.To is not the drawing position but the center of the arc. So a moveTo set the path position at the center and then a line is drawn to the start of the arc.
A working solution is to preempt the automatic adding of the moveTo in ofPath::addCommand by doing one within ofPath::arc that sets the moveTo to the correct position.
//----------------------------------------------------------
void ofPath::arc(const glm::vec3 & centre, float radiusX, float radiusY, float angleBegin, float angleEnd){
if(mode==COMMANDS){
//NEW----
//addCommand adds a moveTo if one hasn't been set, but in this case it is adding a moveTo to the center of the arc and not the beginning of the arc
if(commands.empty() || commands.back().type==Command::close){
glm::vec3 start = centre + glm::vec3( glm::cos( glm::radians(angleBegin) ) * radiusX, glm::sin( glm::radians(angleBegin) ) * radiusY, 0.0f );
commands.push_back(Command(Command::moveTo,start));
}
//END NEW----
addCommand(Command(Command::arc,centre,radiusX,radiusY,angleBegin,angleEnd));

Can't see any downsides to this approach, but would appreciate others double checking :)
related?
ofPath p;
p.circle(300, 300, 100);
ofPolyline outline = p.getOutline()[0];
outline.draw();
produces:

https://github.com/openframeworks/openFrameworks/issues/2928
this seems to be related too. trying to think of how to solve this. working with circles and ofPath at the moment.
I also had to add tthe fix from @ofTheo to arcNegative. But then it works.
Any news on this issue?
can you send a PR with the fixes?
This ellipse will give the same issue - The PR does not fix that.
I'm not sure that should be considered a bug, since you could just moveTo 450, 150 and then center the ellipse att 400, 150.
ofPath path;
path.moveTo(450, 150);
path.ellipse(450, 150, 100, 100);
Most helpful comment
So the issue seems to be that ofPath::addCommand adds a moveTo command if a command list hasn't started with one.
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/graphics/ofPath.cpp#L864
Normally this is fine, but with
ofPath::arc(const glm::vec3 & centre, float radiusX, float radiusY, float angleBegin, float angleEnd)the Command.To is not the drawing position but the center of the arc. So a moveTo set the path position at the center and then a line is drawn to the start of the arc.A working solution is to preempt the automatic adding of the moveTo in ofPath::addCommand by doing one within ofPath::arc that sets the moveTo to the correct position.
Can't see any downsides to this approach, but would appreciate others double checking :)