How to determine whether the file is 2D or 3D?

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

Post Reply
Cambridge Ray
Junior Member
Posts: 15
Joined: Wed Oct 03, 2012 5:26 pm

How to determine whether the file is 2D or 3D?

Post by Cambridge Ray » Sat Nov 24, 2012 12:17 am

What I would like to code is this:

I enter the DXF file, and as soon as I find the first line segment that contains a non-zero Z value, I return: "This is a 3D file". I am even willing to return a "2D" answer after inspecting the first dozen points or so.

Given the callback architecture of the library (or my newbieness) what I have is a counter of non-zero Z points. This approach can be excruciatingly slow, specially when dealing with a large number of files.

TIA,

-RFH

Post Reply

Return to “dxflib 'How Do I' Questions”