title: DXF Parser : Ellipses angle direction
body: <p>I wrote my own ASCII DXF file parser and I encounter a problem with ellipses in some particular documents.</p>
  
  <p>It seems that there is no "Group Code" defining the angle direction (Clockwise or Counterclockwise) for Start and End Parameters.
  In most case, it's counterclockwise, but not in ALL cases...</p>
  
  <p>To simplify, here is a visual exemple:</p>
  
  <p><img src="https://i.stack.imgur.com/aGuXc.png" alt="Ellipse1">
  <img src="https://i.stack.imgur.com/2VHSO.png" alt="Ellipse2"></p>
  
  <p>As you can see, the first one has a start angle of 135, and the second one a start angle of 45...
  But, the ellipses seems to be identical (half-circle, on the left)... This is because the first one's angles are clockwise, and the second one's are counter-clockwise...</p>
  
  <p>Obviously, they appear correctly in AutoCAD, but with my parser, they appear like that:</p>
  
  <p><img src="https://i.stack.imgur.com/2x5Rl.png" alt="Ellipse3"></p>
  
  <p>Simply because I don't know if angles are represented CW or CCW...</p>
  
  <p>Did I miss a group code or something ?</p>
  
  <p>Info: In AutoCAD, I can see that the first ellipse "Minor Axis Endpoint" is [200, -200, 0], while the second one's is [-200, 200, 0], I suppose this is how AutoCAD knows if the angles are CW or CCW... But all I have in the DXF file is the "Major Axis Endpoint" and the "Major to Minor Axis Ratio" (a number)</p>
  
  <p>Here is the DXF file corresponding to this example: <a href="http://www.woofiles.com/dl-279966-ZvoMjamr-c.dxf" rel="noreferrer">http://www.woofiles.com/dl-279966-ZvoMjamr-c.dxf</a></p>