You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
4.3 KiB
C

1 month ago
#pragma once
#include "xjobject.h"
#include "AlgoPeriodicLattice.h"
#include "OMUndoRedo.h"
class XJ_OM_EXPORT OMPeriodicLattice : public CXJObject
{
public:
friend class CXJObjectManager;
friend class CXJObjectGroup;
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
int LoadData(const char* fname, bool isOffset);
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
int SaveData(const char* fname);
//<2F><><EFBFBD><EFBFBD>
int Create(unsigned int numx, unsigned int numy, double x0, double y0, double dx, double dy, double* values);
//<2F><><EFBFBD><EFBFBD><5A><D6B5>Χ
void SetZRange(double zMin, double zMax);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
void SetColorList(const std::vector<ColorItem>& colorList);
//<2F><><EFBFBD>õ<EFBFBD>ֵ<EFBFBD><D6B5>
void SetContourList(const std::vector<PlineList>& contourList);
//<2F><><EFBFBD>öϲ<C3B6><CFB2><EFBFBD>
void SetFaultList(const std::vector<PlineList>& faultList, bool isOffset);
//<2F><><EFBFBD>ÿ<EFBFBD><C3BF>Ƶ<EFBFBD>
void SetControlPointList(const std::vector<ControlPoint2d>& pointList);
//<2F><><EFBFBD>ñ߽<C3B1><DFBD><EFBFBD>
void SetBound(const PlineList& bound);
void SetOtherLines(const PlineList& lines);
//<2F><><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>
void UpdateIsopleth();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Чֵ<D0A7><D6B5>ɫ
void SetInvalidColor(int r, int g, int b);
//<2F><><EFBFBD>þ<EFBFBD><C3BE><EFBFBD><EFBFBD><EFBFBD>ɫ
void SetWellColor(int r, int g, int b);
const Point3D& GetWellColor() const { return m_wellColor; }
void SetWellTxtSize(float size) { m_wellTxtSize = size; }
float GetWellTxtSize() { return m_wellTxtSize; }
double* GetValue();
double GetZMin() const;
double GetZMax() const;
void GetContourList(std::vector<PlineList>& contourList);
const AlgoPeriodicLattice* GetData() const {return m_periodicLattice;}
void GetVerData(std::vector<float>& data);
void BrushMesh(const Point3D& cen, float rad, float per, int type, float wellrad = 0);
void DuabMesh(const Point3D& cen1, const Point3D& cen2, float rad, float per, int type, float wellrad = 0);
void SmoothMesh(const Point3D& cen, float rad, float per, int type, float wellrad = 0);
void ShowIsopleth(bool bFlag);
bool IsShowIsopleth() const { return m_bShowIsopleth; }
void ShowFault(bool bFlag);
bool IsShowFault() const { return m_bShowFault; }
void ShowControlPoint(bool bFlag);
bool IsShowControlPoint() const {return m_bShowControlPoint;}
void ShowBound(bool bFlag);
bool IsShowBound() const { return m_bShowBound; }
void ShowOtherLines(bool bFlag);
bool IsShowOtherLines() const { return m_bShowOtherLine; }
void ShowMeshVertex(bool bFlag);
bool IsShowVertex() const { return m_bShowVertex; }
void ShowFilledFault(bool bFlag);
bool IsShowFilledFault() const { return m_bFillFault; }
//<2F><>ȡ<EFBFBD><C8A1>ֵ<EFBFBD>߼<EFBFBD><DFBC><EFBFBD>
void GetIsoplethProperty(double& isopStep, int& markStep, double& minIsop, double& maxIsop,
double& zMin, double& zMax) const;
void SetIsoplethProperty(double isopStep, int markStep, double minIsop, double maxIsop,
double zMin, double zMax);
//<2F><><EFBFBD><EFBFBD>
bool CalculateZByExpression(const char* expression);
//<2F>Ż<EFBFBD><C5BB><EFBFBD>ֵ<EFBFBD><D6B5>
void OptimizeIsopleths();
//<2F><><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD>
void OffsetFault();
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
double GetNearPoint(Point2D& pt);
//<2F><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>
void AdjuestWithWellPoint(double rad, double range, double miu);
//<2F><><EFBFBD>˵<EFBFBD>ֵ<EFBFBD><D6B5>
void FilterIsopleths(int per);
//<2F><><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void SetPolygon(const std::vector<Point2D>& poly);
void StretchlUpPolygon(const std::vector<Point2D>& poly, float per, float wellrad, bool state = false);
void SmoothPolygon(const std::vector<Point2D>& poly, float per, float wellrad, bool state = false);
//ƽ<><C6BD><EFBFBD>ϲ<EFBFBD>
void TransitFault(const Point3D& cen1, const Point3D& cen2, float rad, float per = 0.5f);
//**************************<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>************************
virtual void CopyProperty(const CXJObject* pObj);
void ExchangeData(CommandInfo& info, MeshDataInfo& dataInfo);
void Clear();
void GetBoundingBox(Point2D& minPt, Point2D& maxPt);
void SetDecimalNumber(int num);
int GetDecimalNumber();
void SetFaultControlState(bool state);
bool GetFaultControlState();
bool RectificationMeshWellCompute(double deltaz, int type = 0, double factor = 1);
void MeshWellThreadStop();
int GetMeshWellRectificationProgress();
void UpdataMeshWellRectificationView();
protected:
OMPeriodicLattice(void);
OMPeriodicLattice(OMPeriodicLattice*obj);
~OMPeriodicLattice(void);
virtual OMPeriodicLattice* Copy();
private:
AlgoPeriodicLattice* m_periodicLattice;
bool m_bShowIsopleth;
bool m_bShowFault;
bool m_bShowControlPoint;
bool m_bShowBound;
bool m_bShowOtherLine;
bool m_bShowVertex;
Point3D m_wellColor; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
float m_wellTxtSize; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С
bool m_bFillFault; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD>
};