137 lines
2.8 KiB
C++
137 lines
2.8 KiB
C++
#pragma once
|
|
#include "globalDefine.h"
|
|
#include "RBList.h"
|
|
#include "EntitySet.h"
|
|
#include "ADSGePoint3d.h"
|
|
|
|
class ADSGePoint3d;
|
|
|
|
class PickEntSet
|
|
{
|
|
friend PickEntSet operator + (const PickEntSet &, const PickEntSet &);
|
|
|
|
friend PickEntSet operator - (const PickEntSet &, const PickEntSet &);
|
|
|
|
friend PickEntSet operator * (const PickEntSet &, const PickEntSet &);
|
|
|
|
public:
|
|
|
|
PickEntSet(int createMode = 0);
|
|
|
|
PickEntSet(const ads_name n);
|
|
|
|
PickEntSet(const PickEntSet & n);
|
|
|
|
virtual ~PickEntSet();
|
|
|
|
virtual int Move(const ADSGePoint3d &src, ADSGePoint3d &res) const;
|
|
|
|
virtual int Rotate(const ADSGePoint3d &src, ads_real *res = NULL) const;
|
|
|
|
virtual int Scale(const ADSGePoint3d &src, ads_real *res = NULL) const;
|
|
|
|
operator TLong_ptr *();
|
|
|
|
int operator !() const;
|
|
|
|
int operator += (const AcDbObjectId &);
|
|
|
|
int operator -= (const AcDbObjectId &);
|
|
|
|
int operator += (const EntitySet &);
|
|
|
|
int operator -= (const EntitySet &);
|
|
|
|
int operator += (const PickEntSet &);
|
|
|
|
int operator -= (const PickEntSet &);
|
|
|
|
PickEntSet & operator = (const ads_name n);
|
|
|
|
PickEntSet & operator = (const PickEntSet &n);
|
|
|
|
EntitySet operator [](long index) const;
|
|
|
|
int MakeUnnamedGroup();
|
|
|
|
int Get(LPCTSTR commandString = NULL, void *pt1 = NULL, const ads_point pt2 = NULL);
|
|
|
|
int Get(LPCTSTR commandString, void *pt1, const ads_point pt2, const RBList & entmask);
|
|
|
|
int Get(LPCTSTR commandString, void *pt1, const ads_point pt2, const resbuf * entmask);
|
|
|
|
int Transform(ads_matrix genmat) const;
|
|
|
|
int XTransform(ads_matrix mat) const;
|
|
|
|
int GetExtend(ads_point lowPt, ads_point upPt) const;
|
|
|
|
int GetExtend(ads_point cen, ads_real *x, ads_real *y, ads_real *z = NULL) const;
|
|
|
|
void Get(ADSGePoint3d ptUcs,const resbuf* entmask = NULL);
|
|
|
|
void GetPreSel(const resbuf* entmask = NULL);
|
|
|
|
void AsIdArray(AcDbObjectIdArray &idArray);
|
|
|
|
void Free();
|
|
|
|
long Length() const;
|
|
|
|
// New Tools
|
|
bool IsInclude(EntitySet ent)const;
|
|
|
|
void IncludeBegin();
|
|
|
|
void IncludeEnd();
|
|
|
|
int MakeAnonymous(const ADSGePoint3d &base, TCHAR *blk = NULL, int mkInstance = 1) const;
|
|
|
|
void Redraw(int mode = 1) const;
|
|
|
|
void RedrawAll(int mode = 1) const;
|
|
|
|
void Delete() const;
|
|
|
|
int Erase() const;
|
|
|
|
void Bind(const EntitySet& key);
|
|
|
|
void ExFilter(const RBList &exList);
|
|
|
|
void ExTagFilter(const int *tagList, int sz);
|
|
|
|
//留下满足baseList的实体
|
|
void BaseFilter(RBList &baseList);
|
|
|
|
//排除掉满足baseList的实体
|
|
void BaseExclude(RBList &baseList);
|
|
|
|
int RemoveXData() const;
|
|
|
|
public:
|
|
|
|
ads_name name;
|
|
|
|
EntitySet mark;
|
|
|
|
unsigned char flag;
|
|
};
|
|
|
|
typedef PickEntSet SelectionSet;
|
|
|
|
class RemoveDupEntByLayer
|
|
{
|
|
public:
|
|
|
|
RemoveDupEntByLayer(const TCHAR * pszLayer);
|
|
virtual ~RemoveDupEntByLayer();
|
|
|
|
static int CompareForFindByLayer(const RemoveDupEntByLayer *p1, const void *p2);
|
|
|
|
public:
|
|
|
|
CString m_sLayer;
|
|
PickEntSet m_ss;
|
|
};
|