Click here to Skip to main content
15,893,588 members
Articles / Desktop Programming / MFC

Simple DXF Reader/Viewer with Spline Support

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
13 Sep 2013CPOL2 min read 80K   9K   27  
Simple DXF reader and viewer supporting the most common AutoCAD entities
// Dxf.h: interface for the CDxf class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DXF_H__148A5C6F_8B80_49A1_A007_2259EB5655F5__INCLUDED_)
#define AFX_DXF_H__148A5C6F_8B80_49A1_A007_2259EB5655F5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "line.h"
#include "arc.h"
#include "Circle.h"	// Added by ClassView
#include "PolyLine.h"	// Added by ClassView
#include "Spline.h"	// Added by ClassView

class CDxf  
{
public:
	void Init();
	BYTE m_InitialDraw;
	BYTE m_LoadStatus;
	UINT m_LineCount;
	UINT m_ArcCount;
	UINT m_CircleCount;
	UINT m_PolyLineCount;
	UINT m_SplineCount;
	BYTE m_Nesting;

	CLine *m_Line;
	CArc *m_Arc;
	CCircle *m_Circle;
	CPolyLine *m_PolyLine;
	CSpline *m_Spline;

	CDxf();
	virtual ~CDxf();
	LoadFile(CString);
	UINT GetLineCount();
	UINT GetCircleCount();
	UINT GetArcCount();
	UINT GetLwPolyLineCount();
	UINT GetSplineCount();
	void AllocMemory();
};

#endif // !defined(AFX_DXF_H__148A5C6F_8B80_49A1_A007_2259EB5655F5__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Turkey Turkey
I am an electronics engineer who loves to code on embedded, desktop and web application development.

Comments and Discussions