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.
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
|
|
class QDoubleSpinBox;
|
|
class QComboBox;
|
|
class QSpinBox;
|
|
class QPushButton;
|
|
class nmGuiPlot;
|
|
class nmDataOutline;
|
|
|
|
class nmWxDFNGenerateDlg : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
nmWxDFNGenerateDlg(QWidget* parent, nmGuiPlot* plot, nmDataOutline* outline);
|
|
int count() const;
|
|
// 采样函数
|
|
double sampleLength() const;
|
|
double sampleAngle() const;
|
|
|
|
public slots:
|
|
void onBtnGenerateClicked();
|
|
void onBtnCancelClicked();
|
|
|
|
private:
|
|
void generateFractures();
|
|
// 判断相交和安全距离相关
|
|
double calculateSafetyMargin(double fractureLength) const;
|
|
bool isLinesTooClose(const QLineF& line1, const QLineF& line2, double tolerance) const;
|
|
double pointToLineDistance(const QPointF& point, const QLineF& line) const;
|
|
|
|
QSpinBox* m_pCountSpin; // 裂缝数量
|
|
QDoubleSpinBox* m_pMinLengthSpin; // 最小长度
|
|
QDoubleSpinBox* m_pMaxLengthSpin; // 最大长度
|
|
QDoubleSpinBox* m_pMinAngleSpin; // 最小角度
|
|
QDoubleSpinBox* m_pMaxAngleSpin; // 最大角度
|
|
QComboBox* m_pDistCombo; // 分布方式
|
|
QPushButton* m_pBtnGenerate; // 生成按钮
|
|
QPushButton* m_pBtnCancel; // 取消按钮
|
|
|
|
nmGuiPlot* m_pPlot;
|
|
nmDataOutline* m_pOutline;
|
|
};
|