148 lines
4.7 KiB
C++
148 lines
4.7 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, SH Software Co. Ltd.
|
|
// = FileName : XExplodeStream 类
|
|
// = Version : ver2.0
|
|
// = Author : zjq
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: XExplodeStream 声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _XExplodeStream_H_
|
|
#define _XExplodeStream_H_
|
|
|
|
#ifndef _XEXPLODESTREAMBASE_H_
|
|
#include "XExplodeStreamBase.h"
|
|
#endif
|
|
|
|
#ifndef _XPOINT_H_
|
|
#include "XPoint.h"
|
|
#endif
|
|
|
|
#ifndef _XLINE_H_
|
|
#include "XLine.h"
|
|
#endif
|
|
|
|
#ifndef _XARC_H_
|
|
#include "XArc.h"
|
|
#endif
|
|
|
|
#ifndef _XCIRCLE_H_
|
|
#include "XCircle.h"
|
|
#endif
|
|
|
|
#ifndef _XPOLY2D_H_
|
|
#include "XPoly2D.h"
|
|
#endif
|
|
|
|
#ifndef _X3DFACE_H_
|
|
#include "X3DFace.h"
|
|
#endif
|
|
|
|
class GEOAPI XExplodeStream : public XExplodeDraw
|
|
{
|
|
public:
|
|
XExplodeStream(AcDbVoidPtrArray &entArray);
|
|
virtual ~XExplodeStream();
|
|
|
|
virtual void SetPropertiesFrom(const AcDbEntity *pEnt);
|
|
|
|
virtual BOOL IsFullExplode() const;
|
|
virtual BOOL IsExportTch4() const;
|
|
|
|
// derive from XExplodeDraw
|
|
virtual void Polyline(AcDbPolyline &pline);
|
|
|
|
virtual void DrawLine(const XLine &ln, double nThickness = 0.0);
|
|
virtual void DrawArc(const XArc &ar, double nThickness = 0.0);
|
|
virtual void DrawCircle(const XCircle &cir, double nThickness = 0.0);
|
|
virtual void DrawSolid(const XPoly2D &polyOutline); //对指定的封闭区域填充
|
|
virtual void DrawHatch(const XPoly2D &polyOutline, const TCHAR *pszPattern, double nScale);
|
|
virtual void DrawHatchEx(const XPoly2D &polyOutline, const TCHAR *pszPattern, double nScale,double rotation);
|
|
virtual void DrawBlock(const AcDbBlockTableRecord &blockRec, const XPoint &ptInsert,
|
|
const AcGeScale3d &scales, double nRot, BOOL bMakeBlock);
|
|
virtual void DrawAtomicEntSet(const AcDbVoidPtrArray &entSet, const AcGeMatrix3d &matTrans);
|
|
|
|
virtual void DrawEntity(const AcDbEntity &ent);
|
|
|
|
// Text method
|
|
virtual void DrawText(const TCHAR *pszContent = NULL);
|
|
virtual void DrawTextFit(const TCHAR *pszText, XPoint pt1, XPoint pt2, double nTextHeight);
|
|
|
|
// 3D Draw
|
|
// 根据给定的边界和凸起方向, 绘制三维外壳
|
|
virtual void DrawMesh(const XPoly2D &polyOut, const XVector3D &vtOffset);
|
|
// 显示分别连接两个区域的边缘构成的侧面
|
|
virtual void DrawMesh(const XPoly2D &polyRegion1, const XPoly2D &polyRegion2);
|
|
virtual void DrawMesh( const Adesk::UInt32 rows,
|
|
const Adesk::UInt32 columns,
|
|
const AcGePoint3d* pVertexList,
|
|
const AcGiEdgeData* pEdgeData = NULL);
|
|
|
|
// 根据给定的内外边界, 绘制三维外壳, 已经对区域进行离散
|
|
virtual void DrawShell(const XPoly2D &polyOut, const DList<XPoly2D> &lstPolyIn);
|
|
virtual void DrawShell(Adesk::UInt32 nbVertex,
|
|
const AcGePoint3d* pVertexList,
|
|
Adesk::UInt32 faceListSize,
|
|
const Adesk::Int32* pFaceList,
|
|
const AcGiEdgeData* pEdgeData = NULL);
|
|
|
|
virtual void DrawBody(const XPoly2D &polySrc, const XVector3D &vtOffset);
|
|
virtual void DrawBody(const XPoly2D &polyOut, const XPoly2D &polyIn, const XVector3D &vtOffset);
|
|
virtual void DrawBody(const XPoly2D &polyOut, const DList<XPoly2D> &lstHoles,const XVector3D &vtOffset);
|
|
|
|
virtual void DrawXPoly(const XPoly2D &poly,double nThickness = 0.0);
|
|
|
|
virtual void DrawFace(const X3DFace &face);
|
|
|
|
virtual Adesk::UInt16 GetColor() const;
|
|
virtual void SetColor(Adesk::UInt16 nColor);
|
|
|
|
virtual AcDbObjectId GetLayerId() const;
|
|
virtual AcDbObjectId GetLineTypeId() const;
|
|
virtual AcDbObjectId GetMaterialId()const;
|
|
|
|
virtual Acad::ErrorStatus SetLayer(const AcDbObjectId &id) ;
|
|
virtual Acad::ErrorStatus SetLayer(const TCHAR *pszLay) ;
|
|
|
|
virtual Acad::ErrorStatus SetLineType(const TCHAR *pltype);
|
|
virtual Acad::ErrorStatus SetLineType(AcDbObjectId idLinetype);
|
|
virtual Acad::ErrorStatus SetMaterial(AcDbObjectId idMaterial);
|
|
|
|
virtual const TCHAR* Desc();
|
|
|
|
virtual Adesk::Boolean IsDragging() const;
|
|
|
|
//virtual COLORREF GetTrueColor() const;
|
|
//virtual void SetTrueColor(COLORREF crRef);
|
|
virtual AcCmColor GetTrueColor() const;
|
|
virtual void SetTrueColor(AcCmColor crRef);
|
|
|
|
void SetIsDragging(Adesk::Boolean bDragging);
|
|
|
|
static const TCHAR* Descriptor();
|
|
|
|
void Append(AcDbEntity *pEnt, BOOL bUseAutoProp = TRUE);
|
|
|
|
BOOL MakeBlockInsert(const XPoint &ptBase);
|
|
|
|
AcDbVoidPtrArray * GetEntitySet();
|
|
|
|
|
|
public:
|
|
static BOOL m_bFullExplode;
|
|
static BOOL m_bExportTch4;
|
|
|
|
protected:
|
|
AcDbVoidPtrArray *m_pEntSet;
|
|
AcDbObjectId m_idLinetype, m_idLayer,m_idMaterial;
|
|
Adesk::UInt16 m_nColor;
|
|
Adesk::Boolean m_bIsDragging;
|
|
|
|
//add by zjq on 100629
|
|
//COLORREF m_crColor;
|
|
AcCmColor m_crColor;
|
|
};
|
|
|
|
#endif
|