> On Nov 14, 2019, at 3:15 PM, Avishay Orpaz <[email protected]> wrote:
> The problem is that the definition of an arc in the legacy file format is 
> ambiguous.

Note of geometric pedantry:
Defining an arc by center, start, end is not ambiguous.  If you always draw the 
arc according to increasing angle, the ambiguity is resolved by the order in 
which the endpoints (or angles) are specified.  E.g., (center), 0°, 90° 
unambiguously defines a 90-degree arc through quadrant 1, while (center), 90°, 
0° defines a 270-degree arc through quadrants 2,3,4.

Whether the legacy file format uses that rule or makes it clear in any way, I 
don’t know.  But if it were truly ambiguous, the format wouldn’t work.

A midpoint makes the arc over-constrained and introduces the potential for a 
case where the arc descriptor is not self-consistent (e.g. one constraint is 
not on the same arc).  An arc specified by three constraints is always possible 
to draw; one with four might be impossible.

That said, it’s an academic argument since the new format is already defined.

-B

> A center point and two additional points (or angles) define two possible arcs 
> - one smaller than 180 degrees and one larger (or two equal, 180 degree 
> arcs). In order to distinguish between the two, additional constraint is 
> required. If I understand correctly, the constraint here is that the arc is 
> strictly smaller than 180 degrees. In the new file format, a midpoint is 
> specified, solving this ambiguity.
> 
> Avishay
> 
> ‫בתאריך יום ג׳, 12 בנוב׳ 2019 ב-23:28 מאת ‪Evan Shultz‬‏ 
> <‪[email protected]‬‏>:‬
>> I've also found  
>> https://www.compuphase.com/electronics/LibraryFileFormats.pdf to be useful.
>> 
>>> On Mon, Nov 11, 2019 at 4:14 AM Wayne Stambaugh <[email protected]> 
>>> wrote:
>>> Take a look at the legacy footprint library file format documentation[1]
>>> for help.  You really should be supporting the new s-expression file
>>> format.  The legacy file format is deprecated and is read only.
>>> 
>>> [1]:http://bazaar.launchpad.net/~stambaughw/kicad/doc-read-only/download/head:/1115%4016bec504-3128-0410-b3e8-8e38c2123bca:trunk%252Fkicad-doc%252Fdoc%252Fhelp%252Ffile_formats%252Ffile_formats.pdf/file_formats.pdf
>>> 
>>> On 11/11/2019 4:42 AM, Avishay Orpaz wrote:
>>> > I'm writing a program the reads schematic library symbols, and I'm
>>> > having hard time understanding how arcs are drawn.
>>> > Taking, for example, the Antenna_Shield symbol from device.lib. This
>>> > symbol contains two arcs:
>>> > 
>>> > A -1 -73 32 -882 1242 0 1 0 N 0 -105 -20 -45
>>> > A 1 -73 32 -918 558 0 1 0 N 0 -105 20 -45
>>> > 
>>> > Both arcs start at approximately the same angle (-90 = 270 degrees) and
>>> > end at two different angles - the first at 124 degrees, the second at 56
>>> > degrees. When the symbol is drawn, the first arc is drone clockwise
>>> > while the latter is drawn anti-clockwise. So, how is it possible to
>>> > determine the direction of the arc?
>>> > 
>>> > Avishay.
>>> > 
>>> > 
>>> > _______________________________________________
>>> > Mailing list: https://launchpad.net/~kicad-developers
>>> > Post to     : [email protected]
>>> > Unsubscribe : https://launchpad.net/~kicad-developers
>>> > More help   : https://help.launchpad.net/ListHelp
>>> > 
>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : [email protected]
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : [email protected]
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to