#ifndef _TTHUNDERSECTIONJIG_H__ #define _TTHUNDERSECTIONJIG_H__ #if _MSC_VER > 1000 #pragma once #endif #include "TSymbEdJigEx.h" class TVirtualSection; class TThunderSectionJig : public TSymbEdJigEx { public: TThunderSectionJig(AecDbSymbSection* pSec); virtual ~TThunderSectionJig(); public: enum TSectionOper { kNone = 0, kSectPoint = 1, kViewDirection = 2, }; virtual int DoIt(int *pKeyIndex = NULL); virtual AcEdJig::DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TSectionOper opCode); AcGePoint3d GetDirPosition(); private: TVirtualSection* m_pVirDrawEnt; AecDbSymbSection * m_pDrawEnt; TSectionOper m_nOperCode; }; class TVirtualSection : public AecCurveEntity { public: TVirtualSection(AecDbSymbSection* pSec); virtual ~TVirtualSection(); void SetCurrentPos(const AcGePoint3d& vt); virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw& dc) const; private: Acad::ErrorStatus ExplodeOrDraw2dLineBox(XExplodeDraw& dc) const; private: AecDbSymbSection* m_pDrawEnt; AcGePoint3d m_ptPos; BOOL m_bDrawLine; }; class TCreateThunderSection { public: TCreateThunderSection(const AcGePoint3d& ptS, const AcGePoint3d& ptE, const AcGeVector3d& vtDir, PickSet& ss3d); virtual ~TCreateThunderSection(); static AcGePoint3d Mid2Point(const AcGePoint3d& pt1, const AcGePoint3d& pt2); private: void SplitSuit3DSolid(PickSet& ssIn, const AcGePoint3d& ptS, const AcGePoint3d& ptE, AcDbVoidPtrArray& arPtr); AcGePoint3d GetDragPoint(PickSet& ssEnt); void ReleasePtrArray(AcDbVoidPtrArray& arPtr); AcDbObjectId CopyEnt(AcDbEntity* pEnt); AcDbEntity* CopyEntPtr(AcDbEntity* pEnt); }; #endif // !defined(_TTHUNDERSECTIONJIG_H__)