92 lines
2.1 KiB
C++
92 lines
2.1 KiB
C++
#pragma once
|
|
#include "afxcmn.h"
|
|
#include "resource.h"
|
|
#include "afxwin.h"
|
|
#include "EarThwormDef.h"
|
|
|
|
typedef struct PipeSideLine
|
|
{
|
|
AcGePoint3d ptSta;
|
|
AcGePoint3d ptEnd;
|
|
AcDbObjectId id;
|
|
}PIPESIDELINE;
|
|
|
|
typedef struct PipeSide2Line
|
|
{
|
|
AcGePoint3d ptSta1;
|
|
AcGePoint3d ptEnd1;
|
|
AcDbObjectId id1;
|
|
AcGePoint3d ptSta2;
|
|
AcGePoint3d ptEnd2;
|
|
AcDbObjectId id2;
|
|
int nDN;
|
|
}PIPESIDE2LINE;
|
|
|
|
class CWPipeBatReplaceDlg : public CDialog
|
|
{
|
|
DECLARE_DYNAMIC(CWPipeBatReplaceDlg)
|
|
|
|
public:
|
|
CWPipeBatReplaceDlg(CWnd* pParent = NULL);
|
|
virtual ~CWPipeBatReplaceDlg();
|
|
|
|
void SetSideAndCenterLayer(LPCTSTR pszCen,LPCTSTR pszSide);
|
|
void SetSideAndCenterLines(AcDbObjectIdArray& arSideIds,AcDbObjectIdArray& arCenIds);
|
|
void SetDbServer(CUIISQLiteServer* pDb);
|
|
void SetPipeOutSideDrawType(int nType){m_nType = nType;}
|
|
|
|
enum { IDD = IDD_WPIPEBATREPLACEDLG };
|
|
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
public:
|
|
virtual BOOL OnInitDialog();
|
|
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
|
afx_msg void OnBnClickedOk();
|
|
afx_msg LONG_PTR onAcadKeepFocus( UINT_PTR, LONG_PTR);
|
|
afx_msg void OnClose();
|
|
afx_msg void OnLvnItemchangedListwpipe(NMHDR *pNMHDR, LRESULT *pResult);
|
|
afx_msg void OnNMClickListwpipe(NMHDR *pNMHDR, LRESULT *pResult);
|
|
|
|
protected:
|
|
|
|
void PreFormatWPipeBySide();
|
|
void PreFormatWPipeByCenter();
|
|
void FindPipeWidth(int nItem);
|
|
bool FindPipeWidth(AcGePoint3d* pptGes,AcGeVector3d& vtDir,AcGePoint3d ptMid,double dLen,double& dWidth);
|
|
void DoPipeMakeCommand();
|
|
void InitPipeParam(WPipe::PipeParam* pParam);
|
|
void InitPipeThick();
|
|
void InitMaterial();
|
|
int IsOD(double dOD);
|
|
|
|
protected:
|
|
|
|
CImageList m_Imagelist;
|
|
CListCtrl m_wndListPipes;
|
|
AcDbObjectIdArray m_arCenIds;
|
|
AcDbObjectIdArray m_arSideIds;
|
|
|
|
AcGePoint3dArray m_arPoints;
|
|
AcGeVector3dArray m_arDirs;
|
|
|
|
int m_nType;
|
|
bool m_bStart;
|
|
double m_dDn;
|
|
double m_dEl;
|
|
CString m_sSideLay;
|
|
CString m_sCenLay;
|
|
CUIISQLiteServer* m_pDb;
|
|
CComboBox m_wndComboMaters;
|
|
CComboBox m_wndComboThick;
|
|
CArray<PipeSide2Line,PipeSide2Line&> m_arPipeSide2lns;
|
|
|
|
CString m_sCurrSys;
|
|
CComboBox m_wndComboSys;
|
|
|
|
CMap<int,int,PVOID,PVOID> m_mapDn2OD;
|
|
};
|