//-------------------------------------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TPickEntSet 类 // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TPickEntSet 声明 // = Maintainers: // //-------------------------------------------------------------------------------------------------------+ #ifndef _TPICKENTSET_H_ #define _TPICKENTSET_H_ #ifndef _TRBLIST_H_ #include "TRBList.h" #endif #ifndef _TENTITYSET_H_ #include "TEntitySet.h" #endif #ifndef _TADSGEPOINT3D_H_ #include "TADSGePoint3d.h" #endif class TADSGePoint3d; class GEOAPI TPickEntSet { friend GEOAPI TPickEntSet operator + (const TPickEntSet &, const TPickEntSet &); friend GEOAPI TPickEntSet operator - (const TPickEntSet &, const TPickEntSet &); friend GEOAPI TPickEntSet operator * (const TPickEntSet &, const TPickEntSet &); public: TPickEntSet(int createMode = 0); TPickEntSet(const ads_name n); TPickEntSet(const TPickEntSet & n); virtual ~TPickEntSet(); virtual int Move(const TADSGePoint3d &src, TADSGePoint3d &res) const; virtual int Rotate(const TADSGePoint3d &src, ads_real *res = NULL) const; virtual int Scale(const TADSGePoint3d &src, ads_real *res = NULL) const; operator TLong_ptr *(); int operator !() const; int operator += (const AcDbObjectId &); int operator -= (const AcDbObjectId &); int operator += (const TEntitySet &); int operator -= (const TEntitySet &); int operator += (const TPickEntSet &); int operator -= (const TPickEntSet &); TPickEntSet & operator = (const ads_name n); TPickEntSet & operator = (const TPickEntSet &n); TEntitySet 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 TRBList & 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(TADSGePoint3d ptUcs,const resbuf* entmask = NULL); void GetPreSel(const resbuf* entmask = NULL); void AsIdArray(AcDbObjectIdArray &idArray); void Free(); long Length() const; // New Tools bool IsInclude(TEntitySet ent)const; void IncludeBegin(); void IncludeEnd(); int MakeAnonymous(const TADSGePoint3d &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 TEntitySet& key); void ExFilter(const TRBList &exList); void ExTagFilter(const int *tagList, int sz); //留下满足baseList的实体 void BaseFilter(const TRBList &baseList); //排除掉满足baseList的实体 void BaseExclude(const TRBList &baseList); int RemoveXData() const; public: ads_name name; TEntitySet mark; unsigned char flag; }; typedef TPickEntSet SelectionSet; class GEOAPI TRemoveDupEntByLayer { public: TRemoveDupEntByLayer(const TCHAR * pszLayer); virtual ~TRemoveDupEntByLayer(); static int CompareForFindByLayer(const TRemoveDupEntByLayer *p1, const void *p2); public: TCString m_sLayer; TPickEntSet m_ss; }; #endif