#ifndef _TINTERFACERELEATIONMANAGER_H__ #define _TINTERFACERELEATIONMANAGER_H__ #if _MSC_VER > 1000 #pragma once #endif #include "TInterfaceManager.h" class TToolKitBase; class TInterfaceReleationManager : public TInterfaceManager { public: TInterfaceReleationManager(); virtual ~TInterfaceReleationManager(); virtual void TranslateMoveGripPointMsg(const TInterfaceModifyMsg& msg,AcDbObjectIdArray& idOperOns); protected: BOOL Find(const TInterface& pipeInterface); BOOL Find(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir,AcDbObjectId& idFind,const AcDbObjectId& idOwnerNotMe); BOOL Find2(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir,AcDbObjectId& idFind,AcDbObjectId& idOwnerThis); BOOL Update(const TInterface& pipeInterface); BOOL SetInterfaceRelation(const AcDbDatabase* pDb,const TInterface& pipeInterface); //进入连锁移动的循环并处理移动后是否有新的连接 BOOL TransactCycleMoveGripMsg(TDbInterfacesObj* pIObjOrigFr,const TInterfaceModifyMsg& msg,AcDbObjectIdArray& idOperOns); //与用户交互,得到信息 int GetUserChoose(); //是否按住CRTLMOVE BOOL TransactMoveOperation(const TInterfaceModifyMsg& msg,AcDbObjectIdArray& idOperOns,TDbInterfacesObj* pIObj,BOOL bCtrl); //按住CRTL并选择衍生拉出 BOOL TransactPullOperation(const TInterfaceModifyMsg& msg,AcDbObjectIdArray& idOperOns,TDbInterfacesObj* pIObj); //处理非中间夹点的操作 BOOL TransactOtherGripOperation(const TInterfaceModifyMsg& msg,AcDbObjectIdArray& idOperOns,TDbInterfacesObj* pIObj); //改变接口方向 BOOL ChangeInterface(const TInterfaceModifyMsg& msg,TDbInterfacesObj* pIObj); //建立新的连接 BOOL NewInterfaceReleation(TDbInterfacesObj* pIObj, TInterface& pipeInterface); //创建三联通 BOOL CreateNewCabTee(const AcGePoint3d& ptCen); public: enum UserChoose { ePullObj = 0, eMoveObj = 1, }; TToolKitBase* m_pToolKit; }; #endif //_TINTERFACERELEATIONMANAGER_H__