142 lines
3.8 KiB
C++
142 lines
3.8 KiB
C++
#ifndef _TDBEXTENTSEDGE_H__
|
|
#define _TDBEXTENTSEDGE_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#ifdef _TCHPIPEBASE_
|
|
#define DLLIMPEXP __declspec(dllexport)
|
|
#else
|
|
#ifdef _TCHPIPEBASE_COM_
|
|
#define DLLIMPEXP
|
|
#else
|
|
#define DLLIMPEXP __declspec(dllimport)
|
|
#endif
|
|
#endif
|
|
|
|
class DLLIMPEXP TComplexCurve
|
|
{
|
|
public:
|
|
|
|
TComplexCurve();
|
|
TComplexCurve(const TComplexCurve& src);
|
|
~TComplexCurve();
|
|
|
|
TComplexCurve& operator = (const TComplexCurve& src);
|
|
|
|
TDb::TCurveElement operator [] (int nIndex);
|
|
const TDb::TCurveElement operator [] (int nIndex) const;
|
|
|
|
TDb::TCurveElement at(int nIndex) const;
|
|
TDb::TCurveElement& atByRef(int nIndex);
|
|
TComplexCurve& setAt(int nIndex, TDb::TCurveElement& value);
|
|
TDb::TCurveElement first();
|
|
const TDb::TCurveElement first() const;
|
|
TDb::TCurveElement last();
|
|
const TDb::TCurveElement last() const;
|
|
|
|
int append(TDb::TCurveElement& value);
|
|
TComplexCurve& append(const TComplexCurve& src);
|
|
|
|
TDb::TCurveElement removeAt(int nIndex);
|
|
BOOL remove(TDb::TCurveElement& value, int start = 0);
|
|
TDb::TCurveElement removeFirst();
|
|
TDb::TCurveElement removeLast();
|
|
BOOL find(const TDb::TCurveElement& value, int& foundAt,int start = 0) const;
|
|
|
|
int length() const;
|
|
BOOL isEmpty() const;
|
|
|
|
int logicalLength() const;
|
|
void setLogicalLength(int nIndex);
|
|
|
|
BOOL isEqual(const TDb::TCurveElement& value1,const TDb::TCurveElement& value2) const;
|
|
|
|
void setSubElementGsMark(int nGsMark);
|
|
|
|
private:
|
|
|
|
CArray<TDb::TCurveElement,TDb::TCurveElement&> m_arCurElements;
|
|
};
|
|
|
|
class DLLIMPEXP TDbExtentsEdge
|
|
{
|
|
public:
|
|
TDbExtentsEdge();
|
|
TDbExtentsEdge(const TDbExtentsEdge& src);
|
|
~TDbExtentsEdge();
|
|
|
|
void SetOwnerId(AcDbObjectId& id);
|
|
AcDbObjectId GetOwnerId();
|
|
|
|
void SetEdage(const TComplexCurve& curEdage);
|
|
BOOL GetEdage(TComplexCurve& curEdage);
|
|
BOOL GetEdage(TComplexCurve& curEdage) const;
|
|
|
|
// 延伸(收缩)首末点,mcl,add 10.01.13,为了支持遮挡扩展区域,dExtLen:单边延伸值
|
|
void ExtendStartAndEnd(double dExtLen);
|
|
|
|
TDbExtentsEdge& operator = (const TDbExtentsEdge& src);
|
|
|
|
Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
|
|
Acad::ErrorStatus dxfInFields(AcDbDxfFiler* pFiler);
|
|
Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
|
|
|
|
Adesk::Boolean ExplodeOrDraw2d( XExplodeDraw &dc,const AcDbObjectId& idReal,
|
|
const AcDbObjectId& idDash,const AcDbObjectId& idCen,
|
|
TDb::TCurveElement* pElTmpl = NULL,BOOL bWeight = FALSE,
|
|
BOOL bCenWeight = FALSE,double dPScale = 1.0);
|
|
|
|
Adesk::Boolean explode( AcDbVoidPtrArray& entitySet,const AcDbObjectId& idReal,
|
|
const AcDbObjectId& idDash,const AcDbObjectId& idCen,
|
|
TDb::TCurveElement* pElTmpl = NULL,BOOL bWeight = FALSE,
|
|
BOOL bCenWeight = FALSE);
|
|
|
|
protected:
|
|
|
|
BOOL MakePolgon(TDb::TCurveElement& el,AcDbPolyline*& pPl,BOOL bIsArc = FALSE);
|
|
|
|
void SetProperty(TDb::TCurveElement& el,AcDbEntity* pEnt,const AcDbObjectId& idReal,
|
|
const AcDbObjectId& idDash,const AcDbObjectId& idCen);
|
|
|
|
BOOL MakeArc(TDb::TCurveElement& el,AcDbArc*& pArc);
|
|
|
|
BOOL MakeLine(TDb::TCurveElement& el,AcDbLine*& pPl);
|
|
|
|
void OrthProjectEl2XYPlan(TDb::TCurveElement& el);
|
|
|
|
public:
|
|
|
|
AcDbSoftPointerId m_idOwner;
|
|
TComplexCurve m_curEdage;
|
|
};
|
|
|
|
class DLLIMPEXP TDbExtentsEdges
|
|
{
|
|
public:
|
|
|
|
TDbExtentsEdges();
|
|
TDbExtentsEdges(const TDbExtentsEdges& src);
|
|
~TDbExtentsEdges();
|
|
|
|
void Add(const TDbExtentsEdge& edge);
|
|
void Add(const TDbExtentsEdges& edges);
|
|
|
|
TDbExtentsEdge& GetAt(int nIndex) const;
|
|
TDbExtentsEdge& at(int nIndex) const;
|
|
|
|
int GetCount() const;
|
|
void RemoveAll();
|
|
BOOL RemoveAt(int nIndex);
|
|
|
|
TDbExtentsEdges& operator = (const TDbExtentsEdges& src);
|
|
|
|
private:
|
|
|
|
CPtrArray m_arPtrExtEdgePtrs;
|
|
};
|
|
|
|
#endif //_TDBEXTENTSEDGE_H__
|