Mail Archives: geda-user/2011/11/28/11:52:40
On 27-11-11 23:15, Andrew Poelstra wrote:
> On Sun, Nov 27, 2011 at 10:36:03PM +0100, myken AT iae DOT nl wrote:
>> Hello all,
>>
>> I'm working on some functionality in pcb and I have a question.
>>
>> The question is about the start angle and the delta of an Arc element in pcb.
>> If I draw an Arc in pcb then I will get the following entry in my pcb file:
>> Arc [X Y Width Height Thickness Clearance StartAngle DeltaAngle SFlags]
>> (no not literally but I hope you know what I mean ;-).
>>
>> If the Width and the Height are the same the start angle (45 degrees) and
>> the delta (90 degrees) work as expected,
>> Arc[200000 150000 20000 20000 100 200 45 90 "clearline"]
>>
>> But if the Width and the Height are not the same, it looks like the start
>> angle and the delta are totally ignored.
>> Arc[200000 150000 30000 20000 100 200 45 90 "clearline"]
>>
>> Can anyone explain to me the mathematics behind the Arc element or point
>> me to the source code that does the mathematics?
>>
> As DJ said, width and height are applied as stretching, after a circular
> arc has been drawn with the given angles. StartAngle 0 means the arc
> starts at the left (opposite of traditional maths in which angles usually
> start at the right), and increase counter-clockwise.
>
> The HID's all draw stretched arcs in this way, except Peter Clifton's
> GL code, which still does not support them. It draws circular arcs using
> Width as the radius.
>
> Further, any "real" code which looks for intersections, connectivity, etc,
> only uses the width/height to calculate the endpoints. For the body of the
> arc, almost all of it just assumes a circular arc (using Width as the
> radius). So when using stretched arcs, you'll have all sorts of DRC and
> connectivity troubles.
>
> Also rotations don't work properly.
>
> Officially, pcb does not support stretched arcs for these reasons.
>
>
>
> If you're willing to donate some time and numerical analysis to get this
> stuff working well, that'd be wonderful. Peter C. has suggested just
> getting rid of arcs and using bezier curves for everything, but you can't
> do elliptical arcs with bezier curves :(
>
Ok, thanks.
For now I will assume WIDTH != HEIGHT is not supported. Which basically
means pcb only supports circles or parts of a circle.
Is there a need or wish for proper working arc's? If so, why?
- Raw text -