This project has moved and is read-only. For the latest updates, please go here.

Line and Entity Errors

Apr 26 at 4:23 PM
Hello,

I have been playing around with this code and have gotten to the point where I have a rudimentary .dxf viewer, but I am having some issues and I am wondering if it is possible that there is any help you can provide me.

I am having two main issues:

First, I am having issues drawing lines. My .dxf files are all the 2013 version. Every time I draw out all imported lines, one is misplaced, as shown in this image:

http://i.imgur.com/TF20KWh.jpg

My second issue is with drawing ellipses. The .dxf files I am using use ellipses instead of some arcs to represent round corners, or circles in isometric views. Often, these ellipses should only be a portion of what is depicted. Here is an example:

http://i.imgur.com/vFFEpiH.jpg

Is there any way to get an ellipsis to draw only a portion of itself? Is there any data stored inherently in the Ellipse class that would store a start or end point?

Thank you for any and all help; these have been driving me crazy.

Thanks!
Apr 28 at 7:12 PM
Without more information I have no idea what might be wrong. At the moment, what I can think of is, if part of those lines and/or arcs belongs to a block. When an entity belongs to a block their coordinates are local to the Insert, so they must be transformed by its orientation and position. You can open an issue and post your dxf so I can take a look at it, or send it directly to my email.

About your second issue you will need to play with the rotation, start angle, and end angle properties of the ellipse. While there are two distinct entities in the dxf for circles and arcs, there is only one for ellipses that join both functionalities.

Daniel