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.
175 lines
4.8 KiB
C++
175 lines
4.8 KiB
C++
#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);
|
|
|
|
//设置Z值范围
|
|
void SetZRange(double zMin, double zMax);
|
|
double GetZMin() const;
|
|
double GetZMax() const;
|
|
|
|
void SetColorList(const std::vector<ColorItem>& colorList);
|
|
|
|
//设置等值线
|
|
void SetContourList(const std::vector<PlineList>& contourList);
|
|
|
|
//设置断层线
|
|
void SetFaultList(const std::vector<PlineList>& faultList, bool isOffset);
|
|
|
|
//设置控制点
|
|
void SetControlPointList(const std::vector<ControlPoint2d>& pointList);
|
|
|
|
//设置边界线
|
|
void SetBound(const PlineList& bound);
|
|
|
|
// 设置其它线
|
|
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;
|
|
|
|
//得到点颜色
|
|
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;
|
|
|
|
//等值线
|
|
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;
|
|
|
|
//断层
|
|
void GetFaultData(std::vector<std::vector<Point2D>>& faults, std::vector<bool>& vClosed) const;
|
|
|
|
//断层下盘线
|
|
const std::vector<Polyline2d>& GetFaultFootwallData() const;
|
|
|
|
//控制点
|
|
void GetControlPointData(std::vector<Point3D>& cps, std::vector<std::string>& names) const;
|
|
const std::vector<ControlPoint2d>& GetControlPointData() const;
|
|
void ClearWellPointsDirty() const;
|
|
|
|
//边界
|
|
const std::vector<Polyline2d>& GetBoundaryData() const;
|
|
|
|
// 其它线数据
|
|
const std::vector<Polyline2d>& GetOtherLineData() const;
|
|
|
|
//undo交换数据
|
|
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);
|
|
|
|
|
|
//获取等值线间隔
|
|
double GetIsoplethStep() const;
|
|
|
|
//获取上数间隔
|
|
int GetMarkIsoplethStep() const;
|
|
//获取等值线计算范围
|
|
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 CompileExpressionZ(const char* expression);
|
|
|
|
bool CalculateZByExpression(const char* expression);
|
|
|
|
//更新等值线
|
|
void UpdateIsopleth();
|
|
|
|
//优化等值线
|
|
void OptimizeIsopleths();
|
|
|
|
//内缩断层区域
|
|
void OffsetFault();
|
|
|
|
//鼠标最近点
|
|
double GetNearPoint(Point2D& pt);
|
|
|
|
//井点周围的适应调整
|
|
void WellAdaptiveAdjustment(double rad, double range, double miu);
|
|
|
|
void FilterIsopleths(int per);
|
|
|
|
//设置修改范围多边形
|
|
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);
|
|
|
|
//平滑断层
|
|
void TransitFault(const Point2D& cen1, const Point2D& cen2, float rad, float per);
|
|
|
|
void setDecimalNumber(int num);
|
|
//获取小数位数设置
|
|
int getDecimalNumber() const;
|
|
|
|
//设置断层控制点状态
|
|
void SetFaultControlState(bool state);
|
|
bool GetFaultControlState();
|
|
|
|
//井点校正
|
|
bool RectificationMeshWellCompute(double deltaz, int type = 0, double factor = 1);
|
|
void MeshWellThreadStop();
|
|
int GetMeshWellRectificationProgress();
|
|
|
|
void UpdataMeshWellRectificationView();
|
|
private:
|
|
PeriodicLattice* m_pl;
|
|
};
|
|
|
|
|
|
|