I have been fighting with an issue that I have when using arcs on
schematics and I would like some feedback as to possible solutions.
Creating a schematic capture tool involves selecting a programming language
and a graphics tool kit. The tool kit provides an on screen canvas and graphics
primitives such as DrawLine.
The DrawLine primitive takes coordinates for a startpoint and endpoint along with
line width and color to draw a line. These points must lie on the snap grid since
they are selected using a pointer.
The schematic capture tool then creates a DrawPolygon macro that lets you easily create
a closed shape of lines where each endpoint is the same a the next lines startpoint.
You can then specify a color to fill the interior.
If you want to create a logic gate such as an OR gate then you need to create a 5 sided
closed shape where 2 of the sides are lines and 3 of the sides are ARCs.
The problem is that all tool kits that I can find use polar coordinates to specify ARCs.
You supply a midpoint,radius,startangle,endangle,direction,width and color. I can take the desired start and
end points and calulate the midpoint, radius and angles but the odds are that the midpoint is not
going to line up with the snap grid. If you force the midpoint onto the snap grid then
one of the endpoints will not align and will not connect cleanly to the next segment.
You can hide this by choosing a fat width but you can still wind up with a visual glitch or
The best solution I could come up with would be for tool kits to offer a primitive for a
SPIRAL. You give startpoint,endpoint,midpoint,direction,width and color. If the distances to
the midpoint matched then this would create an ARC. If not then it would look like an ARC but
would actually taper in to reach the exact endpoint.