Files
envi-code/SourceCode/Code2026/ThunderProof/ThunderCmdGroup.h
T
2026-09-28 15:28:50 +08:00

183 lines
3.5 KiB
C++

#ifndef _CThunderCmdGroup_H
#define _CThunderCmdGroup_H
#if _MSC_VER > 1000
#pragma once
#endif
#include "ArxCmdGroup.h"
#include "LayPinDlg.h"
#include "ThunderDocReactor.h"
#include <list>
#include <algorithm>
class CThunderDbReactor;
class TelThunderEditReactor;
class TelThunderEditReactor;
class CThunderCmdGroup : public ArxCmdGroup
{
DECLARE_DYNCREATE(CThunderCmdGroup);
public:
CThunderCmdGroup();
virtual ~CThunderCmdGroup();
public:
typedef struct
{
TCHAR szThunderNumb[50];
int nGroupNO;
double dThunderRadius;
double dThunderProHeight;
double dThunderDblDis;
double dThunderBx;
}DblSheetData;
typedef struct
{
int nGroupNo;
TCHAR szNo[16];
TCHAR szPinH[16];
double dProHeight;
TCHAR szDist[16];
double dBx;
}FoldDblSheetData;
public:
//{{AFX_AEC_ARX_CMD(CThunderCmdGroup)
afx_arxcmd int ThunderTest();
afx_arxcmd int ThunderSetPinCmd();
afx_arxcmd int ThunderLayPinCmd();
afx_arxcmd int ThunderEditPinCmd();
afx_arxcmd int ThunderErasePinCmd();
afx_arxcmd int ThunderMovePinCmd();
afx_arxcmd int DrawThunderLine();
afx_arxcmd int ThunderEditLineCmd();
afx_arxcmd int ThunderEraseLineCmd();
afx_arxcmd int ThunderMoveLineCmd();
afx_arxcmd int newspheretest();
afx_arxcmd int ThunderDimentRadiusCmd();
afx_arxcmd int ThunderDimentBxCmd();
afx_arxcmd int ThunderSinSheetCmd();
afx_arxcmd int ThunderDblSheetCmd();
afx_arxcmd int ThunderSection();
afx_arxcmd int ThunderCaculateBook();
afx_arxcmd int ThunderArchHeight();
afx_arxcmd int ThunderPart3DCmd();
afx_arxcmd int ThunderPart3DBackCmd();
afx_arxcmd int Sphere();
afx_arxcmd int DblEditThunder();
afx_arxcmd int DbDEditThunder();
afx_arxcmd int FoldSetPinCmd();
afx_arxcmd int FoldLayPinCmd();
afx_arxcmd int FoldErasePinCmd();
afx_arxcmd int FoldEditPinCmd();
afx_arxcmd int FoldMovePinCmd();
afx_arxcmd int maptest();
afx_arxcmd int FoldDimentRadiusCmd();
afx_arxcmd int FoldDimentBxCmd();
afx_arxcmd int FoldSinSheetCmd();
afx_arxcmd int FoldDblSheetCmd();
afx_arxcmd int FoldCalcBookCmd();
//}}AFX_AEC_ARX_CMD
DECLARE_AEC_ARXCMD_MAP(CThunderCmdGroup);
public:
// 是否执行ThunderDbReactor反应器里的绘画
static BOOL bIsAllowDraw;
static BOOL bExecute;
static BOOL bReDraw;
static BOOL bReDrawFold;
void ThunderDraw();
protected:
virtual void OnAddCommands();
virtual void OnRemoveCommands();
private:
// 加载ARX 操作
void OnLoadApp();
// 卸载ARX 操作
void OnUnloadApp();
// 获取指定避雷针的保护高度
bool GetCurPinProHeight(AcDbCircle* pCircle, CString& strHeight);
// 删除标注半径
void DeleteOldDim(AcDbCircle* pCircle);
// 判断点是否在此圆弧上
bool PointIsAtAcDbArc(const AcGePoint3d& ptTest, AcDbArc* pArc);
// 排序所有过滤的实体Entity
void SortAscendEntities(lstCltResult& lstSrc);
void SortAscendEntities2(lstCltResult& lstSrc);
//
void RecursiveExplodeGetArcAndCir(AcDbEntity* pEnt, AcDbVoidPtrArray& arPtr);
void SorProHeight(AcGeDoubleArray& arPro);
void AdjustWndToViewport(CWnd* pWnd,int nXOff = 0,int nYOff = 0);
bool DocGetMeterUnitDraw();
private:
CThunderDbReactor *m_pThunderReactor;
TelThunderDocReactor *m_pThunderDocReactor;
CDrawThunderTools *m_pThunderDraw2d;
TelThunderEditReactor *m_pThunderEditReactor;
};
class TTempDrawState
{
public:
TTempDrawState(BOOL bState)
{
m_bState = CThunderCmdGroup::bIsAllowDraw;
CThunderCmdGroup::bIsAllowDraw = bState;
}
virtual ~TTempDrawState()
{
CThunderCmdGroup::bIsAllowDraw = m_bState;
}
private:
BOOL m_bState;
};
#endif // !defined(AFX_CThunderCmdGroup_H__325C1939_08AD_48B4_A4C5_BD0CB7054E31__INCLUDED_)