|
|
#pragma once
|
|
|
#include "itemselectcurve.h"
|
|
|
#include "itemfocusrect.h"
|
|
|
|
|
|
|
|
|
namespace NItem
|
|
|
{
|
|
|
|
|
|
#define MESH_GEOLOGICAL_SECTION 1 //地质剖面
|
|
|
#define MESH_VOLUME 2 //体积
|
|
|
#define MESH_SET_VALUE 3 //设置曲线范围内的Z值
|
|
|
#define MESH_CUT 4 //曲面切割
|
|
|
#define MESH_LINE_VALUE 5 //根据曲面插值曲线Z值
|
|
|
#define MESH_SCALE_Z 6 //Z值*系数
|
|
|
#define MESH_VOLUME_MODE_SELECT 7 //体积计算方式选择
|
|
|
#define MESH_CUT_SLICE 8 //切等时切片
|
|
|
|
|
|
class CItemMeshProcess : public CItemSelectCurve
|
|
|
{
|
|
|
public:
|
|
|
CItemMeshProcess(CSigmaDoc * ppDoc);
|
|
|
virtual ~CItemMeshProcess(void);
|
|
|
|
|
|
virtual void DoLButtonUp(CRect8& rect);
|
|
|
virtual BOOL DoSelectEnd(void);
|
|
|
void SetProcessIdea(int nIdea);
|
|
|
|
|
|
void OnOK(void) override;
|
|
|
void OnCancel(void) override;;
|
|
|
|
|
|
void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override;;
|
|
|
void OnLButtonUp(CDC *pDC, UINT nFlags, CPoint point, int vk) override;;
|
|
|
int OnMouseMove(CDC *pDC, UINT nFlags, CPoint point) override;;
|
|
|
BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) override;;
|
|
|
BOOL OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) override;
|
|
|
|
|
|
void ScaleZ(void);
|
|
|
void SetValueZ(void);
|
|
|
void LineValue(void);
|
|
|
|
|
|
bool CalculateVolume(CCurveEx* pCurveRange, int mode, double & zOut, double & volumeOut);
|
|
|
bool SetZOfSurface(CCurveEx* pCurveRange, int zMode, double zIn);
|
|
|
protected:
|
|
|
//INT_PTR DoModal(UINT nID);
|
|
|
|
|
|
int m_nIdea;
|
|
|
CItemFocusRect* m_pItemFocus;
|
|
|
|
|
|
double m_dValueZ;
|
|
|
int m_nModeSetZ; //设置Z值时的方式
|
|
|
|
|
|
bool SetZOfSurfaceInMode12(CCurveEx * pCurveRange, double z0, BOOL bInCurve);
|
|
|
void GeologicalSection(CCurveEx* pSplit);
|
|
|
void SetValue(CCurveEx* pCurveRange, double z0, BOOL bInCurve);
|
|
|
void Cut(CPositionList& select);
|
|
|
int Cut(CMesh* pMesh, CPositionList& select);
|
|
|
|
|
|
int LineValue(CMesh* pMesh, CPositionList& select);
|
|
|
int m_nLineValueMode;
|
|
|
double m_dLineValueStep;
|
|
|
|
|
|
void SetValueZ(int nModeSel, double z);
|
|
|
|
|
|
//体积计算
|
|
|
void Volume(CCurveEx* pCurveRange, int mode); //计算体积
|
|
|
int m_nVolumeMode;
|
|
|
public:
|
|
|
int GetVolumeMode(void); //获得计算在什么曲面上计算体积(0=构造图、1=等厚图)
|
|
|
void CutSlice(void);
|
|
|
};
|
|
|
|
|
|
};
|