# kicad-developers team mailing list archive

## Re: HPGL

```Hello Dick,
I found a document online :
http://www.hpmuseum.net/document.php?catfile=213

As I read it, angles should be allowed to -360.. +360 at least.
But I could be wrong...

Hope this helps a bit..
Happy weekend,
Edwin van den Oetelaar

quote :

Purpose
To outline any wedge. Use EW to draw sections of pie charts.
Syntax
Parameter Functional Range Parameter Default
radius current units device-dependent no default
(at least –223 to 223 – 1)
start_angle clamped real –32 768 to 32 767 no default
(modulo 360)
sweep_angle clamped real –360° to +360° no defaultchord_angle*
*
Format clamped real 0.0° to 360° device-dependent
(usually 5°)
If you have used the “CT1” instruction, the chord_angle is interpreted
as a deviation dis-
tance in current units; see the CT instruction on page 133.

On Sun, Feb 3, 2013 at 4:20 PM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
> Is this the allowed range?
>
> -180 =< degrees < 180
>
> On Feb 3, 2013 9:09 AM, "Dick Hollenbeck" <dick@xxxxxxxxxxx> wrote:
>>
>> This is not done yet.
>>
>> The problem with this approach is we've yet to achieve a full
>> understanding.
>>
>> Not all angles in a circle can be normalized into +179 to -180.  eg 179.1
>>
>> So the code "looks like a guess" rather than a reasoned solution.
>>
>> Can you make it handle 179.9 degrees?
>>
>> On Feb 3, 2013 5:48 AM, "Andreas Beutling" <andreas@xxxxxxxxxxxx> wrote:
>>>
>>> Hello,
>>>
>>> without NormalizeDegrees it works ok in all tested directions. Changes:
>>>
>>>
>>>     // degrees = NormalizeDegrees( -180.0, degrees, +179.0 );
>>>
>>>         while( degrees > 179 )
>>>                 degrees -= 360;
>>>         while( degrees < -180 )
>>>                 degrees += 360;
>>>
>>>     // Calculate start point,
>>>
>>>
>>> See the attached image.
>>>
>>> Regards, Andreas

```

• Re: HPGL
From: Dick Hollenbeck, 2013-02-03

### References

• HPGL
From: Andreas Beutling, 2013-02-01
• Re: HPGL
From: Dick Hollenbeck, 2013-02-01
• Re: HPGL
From: Andreas Beutling, 2013-02-02
• Re: HPGL
From: Dick Hollenbeck, 2013-02-02
• Re: HPGL
From: Andreas Beutling, 2013-02-02
• Re: HPGL
From: Andreas Beutling, 2013-02-03
• Re: HPGL
From: Dick Hollenbeck, 2013-02-03
• Re: HPGL
From: Dick Hollenbeck, 2013-02-03