[dia] dxf: adding AcDbArc to ARC export makes it work



commit 8c0047252a3c439389483d55a0aab8c8a36b3e3f
Author: Hans Breuer <hans breuer org>
Date:   Sun Jun 19 17:43:26 2011 +0200

    dxf: adding AcDbArc to ARC export makes it work
    
    For safety there is also $AUNITS but that was not giving
    the breaktrough for my DXF import tests.

 plug-ins/dxf/dxf-export.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/dxf/dxf-export.c b/plug-ins/dxf/dxf-export.c
index 86cf518..8f94dd8 100644
--- a/plug-ins/dxf/dxf-export.c
+++ b/plug-ins/dxf/dxf-export.c
@@ -479,8 +479,9 @@ draw_arc(DiaRenderer *self,
 	/* From specification: "output in degrees to DXF files". But radians work for all
 	 * importers I tested. Also there seems to be a problem with arcs to be drawn counter-clockwise
 	 */
-        fprintf(renderer->file, " 50\n%s\n", g_ascii_formatd (buf, sizeof(buf), "%g", (angle1/360 ) * 2 * M_PI)); /* start angle */
-        fprintf(renderer->file, " 51\n%s\n", g_ascii_formatd (buf, sizeof(buf), "%g", (angle2/360 ) * 2 * M_PI)); /* end angle */		
+	fprintf(renderer->file, " 100\nAcDbArc\n");
+        fprintf(renderer->file, " 50\n%s\n", g_ascii_formatd (buf, sizeof(buf), "%g", (angle1 ))); /* start angle */
+        fprintf(renderer->file, " 51\n%s\n", g_ascii_formatd (buf, sizeof(buf), "%g", (angle2 ))); /* end angle */		
     }
     fprintf(renderer->file, " 62\n%d\n", dxf_color (colour));
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]