mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1144 - pre-proto - Updating azimuth angles for fractures for connected fractures with this angle when angle is update in template.
This commit is contained in:
parent
701687b171
commit
3e65bcfa88
@ -107,6 +107,34 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
if (changedField == &azimuthAngle)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
std::vector<RimFracture*> fractures;
|
||||
proj->descendantsIncludingThisOfType(fractures);
|
||||
|
||||
for (RimFracture* fracture : fractures)
|
||||
{
|
||||
if (fracture->attachedFractureDefinition() == this)
|
||||
{
|
||||
if (abs(oldValue.toDouble() - fracture->azimuth()) < 1e-5 )
|
||||
{
|
||||
fracture->azimuth = azimuthAngle;
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -245,8 +245,10 @@ cvf::Mat4f RimFracture::transformMatrix()
|
||||
// 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()));
|
||||
//TODO: Adjust angle with 90 deg
|
||||
|
||||
cvf::Mat4f m = azimuthRotation * rotationFromTesselator;
|
||||
m.setTranslation(cvf::Vec3f(center));
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
void recomputeWellCenterlineCoordinates();
|
||||
void updateFracturePositionFromLocation();
|
||||
|
||||
|
||||
protected:
|
||||
@ -48,7 +49,6 @@ protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
|
||||
private:
|
||||
void updateFracturePositionFromLocation();
|
||||
void updateBranchGeometry();
|
||||
void setBranchGeometry();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user