Click here to Skip to main content
15,886,046 members
Articles / Desktop Programming / MFC

StL Data File Viewer

Rate me:
Please Sign up or sign in to vote.
4.87/5 (43 votes)
5 Mar 2003CPOL2 min read 511.6K   14.7K   60  
A simple StereoLithography data file viewer.
// StLViewerDoc.h : interface of the CStLViewerDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GLVIEWERDOC_H__D35F50D0_5C37_4ED2_900B_FE6F6FC29ED3__INCLUDED_)
#define AFX_GLVIEWERDOC_H__D35F50D0_5C37_4ED2_900B_FE6F6FC29ED3__INCLUDED_

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

#include "GLDisplayContext.h"

#include "StLReader.h"
#include "StlObject.h"

class CStLViewerDoc : public CDocument
{
protected: // create from serialization only
	CStLViewerDoc();
	DECLARE_DYNCREATE(CStLViewerDoc)

// Attributes
public:
	CGLDisplayContext* GetContext() const { return dContext; }
private:
	CGLDisplayContext* dContext;
	static const TCHAR m_szFilters[];

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CStLViewerDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CStLViewerDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CStLViewerDoc)
	afx_msg void OnReadstl();
	afx_msg void OnStlobjColor();
	afx_msg void OnStlobjMaterial();
	afx_msg void OnStlobjErase();
	afx_msg void OnStlobjDelete();
	afx_msg void OnScreenDisplayall();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GLVIEWERDOC_H__D35F50D0_5C37_4ED2_900B_FE6F6FC29ED3__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
Product Manager Mahindra & Mahindra
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

Comments and Discussions