#1368 - pre-proto - Adding tilt angles to fractures

This commit is contained in:
astridkbjorke 2017-03-29 10:12:01 +02:00
parent ac78ab4df2
commit 500e0b77be
4 changed files with 11 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);