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.

173 lines
4.8 KiB
C

1 month ago
#pragma once
#include "dllExport.h"
#include "PeriodicLattice.h"
#include "XJPoint3D.h"
#include <memory>
#include <vector>
class PeriodicLattice;
class XJ_ALGO_EXPORT AlgoPeriodicLattice
{
public:
AlgoPeriodicLattice(void);
AlgoPeriodicLattice(const AlgoPeriodicLattice* pc);
~AlgoPeriodicLattice(void);
bool ReadFile(const char* fname, bool isOffset);
bool WriteFile(const char* fname);
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);
double GetZMin() const;
double GetZMax() const;
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);
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void SetOtherLines(const PlineList& bound);
double* GetValue();
void GetContourList(std::vector<PlineList>& contourList);
/****************************************************************/
void BrushMesh(const Point2D& cen, float rad, float per, int type, float wellrad);
void DuabAway(const Point2D& cen1, const Point2D& cen2, float rad, float per, int type, float wellrad);
void Smooth(const Point2D& cen, float rad, float per, int type, float wellrad);
void CopyData(const AlgoPeriodicLattice* pc);
void GetData(std::vector<float>& pts);
unsigned int GetRawCount() const;
unsigned int GetColCount() const;
Point2D GetMinPoint() const;
Point2D GetMaxPoint() const;
const std::vector<uint64_t>& GetBackupIdxs() const;
const std::vector<double>& GetBackupValues()const;
//<2F>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>ɫ
void GetColorData(std::vector<float>& colors) const;
void GetColorData2(std::vector<float>& colors) const;
void GetDirtyColorData(unsigned& minX, unsigned& maxX, unsigned& minY, unsigned& maxY,
std::vector<float>& colors) const;
//
const BBox& GetBBox() const;
//<2F><>ֵ<EFBFBD><D6B5>
void GetDirtyLays(std::vector<unsigned>& layList) const;
void GetDirtyPlineEdges(unsigned ilay, std::vector<std::vector<Point2D>>& layEdges) const;
double GetLayZValue(unsigned ilay) const;
bool IsLayMarked(unsigned ilay) const;
void GetPlineEdges(std::vector<std::vector<Point2D>>& edges) const;
void GetContourList(std::vector<PlineList>& contourList) const;
//<2F>ϲ<EFBFBD>
void GetFaultData(std::vector<std::vector<Point2D>>& faults, std::vector<bool>& vClosed) const;
//<2F>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
const std::vector<Polyline2d>& GetFaultFootwallData() const;
//<2F><><EFBFBD>Ƶ<EFBFBD>
void GetControlPointData(std::vector<Point3D>& cps, std::vector<std::string>& names) const;
const std::vector<ControlPoint2d>& GetControlPointData() const;
void ClearWellPointsDirty() const;
//<2F>߽<EFBFBD>
const std::vector<Polyline2d>& GetBoundaryData() const;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
const std::vector<Polyline2d>& GetOtherLineData() const;
//undo<64><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void ExchangeData(const BBox& bbox, const std::vector<uint64_t>& idxList, std::vector<double>& valList, double isopStep, int markStep,double zMin,double zMax,
double isoplethMin, double isoplethMax);
//<2F><>ȡ<EFBFBD><C8A1>ֵ<EFBFBD>߼<EFBFBD><DFBC><EFBFBD>
double GetIsoplethStep() const;
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int GetMarkIsoplethStep() const;
//<2F><>ȡ<EFBFBD><C8A1>ֵ<EFBFBD>߼<EFBFBD><DFBC>Χ
double GetMinIsopleth() const;
double GetMaxIsopleth() const;
void SetIsoplethParameter(double isopStep, int markStep, double minIsop, double maxIsop,
double zMin, double zMax);
void SetIsoplethProperty(double isopStep, int markStep, double minIsop, double maxIsop,
double showMinIsop, double showMaxIsop);
void SetInvalidColor(int r, int g, int b);
bool CalculateZByExpression(const char* expression);
//<2F><><EFBFBD>µ<EFBFBD>ֵ<EFBFBD><D6B5>
void UpdateIsopleth();
//<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><EFBFBD><EFBFBD>
double GetNearPoint(Point2D& pt);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>
void WellAdaptiveAdjustment(double rad, double range, double miu);
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 Point2D& cen1, const Point2D& cen2, float rad, float per);
void setDecimalNumber(int num);
//<2F><>ȡС<C8A1><D0A1>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int getDecimalNumber() const;
//<2F><><EFBFBD>öϲ<C3B6><CFB2><EFBFBD><EFBFBD>Ƶ<EFBFBD>״̬
void SetFaultControlState(bool state);
bool GetFaultControlState();
//<2F><><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
bool RectificationMeshWellCompute(double deltaz, int type = 0, double factor = 1);
void MeshWellThreadStop();
int GetMeshWellRectificationProgress();
void UpdataMeshWellRectificationView();
private:
PeriodicLattice* m_pl;
};