mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 16:26:48 -06:00
#1368 - pre-proto - Adding tilt angles to fractures
This commit is contained in:
parent
ac78ab4df2
commit
500e0b77be
@ -85,6 +85,7 @@ RimFracture::RimFracture(void)
|
||||
azimuth.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
CAF_PDM_InitField(&perforationLength, "PerforationLength", 0.0, "Perforation Length", "", "", "");
|
||||
CAF_PDM_InitField(&dip, "Dip", 0.0, "Dip", "", "", "");
|
||||
CAF_PDM_InitField(&tilt, "Tilt", 0.0, "Tilt", "", "", "");
|
||||
CAF_PDM_InitField(&showPolygonFractureOutline, "showPolygonFractureOutline", true, "Show Polygon Outline", "", "", "");
|
||||
CAF_PDM_InitField(&fractureUnit, "fractureUnit", caf::AppEnum<RimDefines::UnitSystem>(RimDefines::UNITS_METRIC), "Fracture Unit System", "", "", "");
|
||||
|
||||
@ -195,7 +196,8 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
changedField == this->objectToggleField() ||
|
||||
changedField == &showPolygonFractureOutline ||
|
||||
changedField == &fractureUnit ||
|
||||
changedField == &dip)
|
||||
changedField == &dip ||
|
||||
changedField == &tilt)
|
||||
{
|
||||
|
||||
setRecomputeGeometryFlag();
|
||||
@ -272,13 +274,17 @@ cvf::Mat4f RimFracture::transformMatrix()
|
||||
// Dip (in XY plane)
|
||||
cvf::Mat4f dipRotation = cvf::Mat4f::fromRotation(cvf::Vec3f::Z_AXIS, cvf::Math::toRadians(dip()));
|
||||
|
||||
// Dip (out of XY plane)
|
||||
cvf::Mat4f tiltRotation = cvf::Mat4f::fromRotation(cvf::Vec3f::X_AXIS, cvf::Math::toRadians(tilt()));
|
||||
|
||||
|
||||
// Ellipsis geometry is produced in XY-plane, rotate 90 deg around X to get zero azimuth along Y
|
||||
cvf::Mat4f rotationFromTesselator = cvf::Mat4f::fromRotation(cvf::Vec3f::X_AXIS, cvf::Math::toRadians(90.0f));
|
||||
|
||||
// Azimuth rotation
|
||||
cvf::Mat4f azimuthRotation = cvf::Mat4f::fromRotation(cvf::Vec3f::Z_AXIS, cvf::Math::toRadians(-azimuth()-90));
|
||||
|
||||
cvf::Mat4f m = azimuthRotation * rotationFromTesselator * dipRotation;
|
||||
cvf::Mat4f m = azimuthRotation * rotationFromTesselator * dipRotation * tiltRotation;
|
||||
m.setTranslation(cvf::Vec3f(center));
|
||||
|
||||
return m;
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
caf::PdmField<double> azimuth;
|
||||
caf::PdmField<double> perforationLength;
|
||||
caf::PdmField<double> dip;
|
||||
|
||||
caf::PdmField<double> tilt;
|
||||
|
||||
caf::PdmField<int> stimPlanTimeIndexToPlot;
|
||||
caf::PdmField<bool> showPolygonFractureOutline;
|
||||
|
@ -183,6 +183,7 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
|
||||
locationGroup->add(&m_branchIndex);
|
||||
locationGroup->add(&azimuth);
|
||||
locationGroup->add(&dip);
|
||||
locationGroup->add(&tilt);
|
||||
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&fractureUnit);
|
||||
|
@ -167,6 +167,7 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
locationGroup->add(&m_measuredDepth);
|
||||
locationGroup->add(&azimuth);
|
||||
locationGroup->add(&dip);
|
||||
locationGroup->add(&tilt);
|
||||
|
||||
caf::PdmUiGroup* propertyGroup = uiOrdering.addNewGroup("Properties");
|
||||
propertyGroup->add(&m_fractureTemplate);
|
||||
|
Loading…
Reference in New Issue
Block a user