-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc59eba
commit 4042a88
Showing
14 changed files
with
313 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationTools.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
///////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright (C) 2023 Equinor ASA | ||
// | ||
// ResInsight is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY | ||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
// FITNESS FOR A PARTICULAR PURPOSE. | ||
// | ||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> | ||
// for more details. | ||
// | ||
///////////////////////////////////////////////////////////////////////////////// | ||
|
||
#include "RimFaultReactivationTools.h" | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
cvf::Vec3d RimFaultReactivationTools::normalVector( QMap<QString, QVariant> settings ) | ||
{ | ||
double x = settings.value( "faultNormal_X", 0.0 ).toDouble(); | ||
double y = settings.value( "faultNormal_Y", 0.0 ).toDouble(); | ||
double z = settings.value( "faultNormal_Z", 0.0 ).toDouble(); | ||
|
||
return cvf::Vec3d( x, y, z ); | ||
} | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
cvf::Vec3d RimFaultReactivationTools::topFaultPosition( QMap<QString, QVariant> settings ) | ||
{ | ||
double x = settings.value( "faultTop_X", 0.0 ).toDouble(); | ||
double y = settings.value( "faultTop_Y", 0.0 ).toDouble(); | ||
double z = settings.value( "faultTop_Z", 0.0 ).toDouble(); | ||
|
||
return cvf::Vec3d( x, y, z ); | ||
} | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
cvf::Vec3d RimFaultReactivationTools::bottomFaultPosition( QMap<QString, QVariant> settings ) | ||
{ | ||
double x = settings.value( "faultBottom_X", 0.0 ).toDouble(); | ||
double y = settings.value( "faultBottom_Y", 0.0 ).toDouble(); | ||
double z = settings.value( "faultBottom_Z", 0.0 ).toDouble(); | ||
|
||
return cvf::Vec3d( x, y, z ); | ||
} | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
void RimFaultReactivationTools::addSettingsToMap( QMap<QString, QVariant>& map, | ||
cvf::Vec3d normalVector, | ||
cvf::Vec3d topFaultPosition, | ||
cvf::Vec3d bottomFaultPosition ) | ||
{ | ||
map["faultTop_X"] = topFaultPosition.x(); | ||
map["faultTop_Y"] = topFaultPosition.y(); | ||
map["faultTop_Z"] = topFaultPosition.z(); | ||
|
||
map["faultBottom_X"] = bottomFaultPosition.x(); | ||
map["faultBottom_Y"] = bottomFaultPosition.y(); | ||
map["faultBottom_Z"] = bottomFaultPosition.z(); | ||
|
||
map["faultNormal_X"] = normalVector.x(); | ||
map["faultNormal_Y"] = normalVector.y(); | ||
map["faultNormal_Z"] = normalVector.z(); | ||
} |
39 changes: 39 additions & 0 deletions
39
ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationTools.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
///////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright (C) 2023 Equinor ASA | ||
// | ||
// ResInsight is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY | ||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
// FITNESS FOR A PARTICULAR PURPOSE. | ||
// | ||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> | ||
// for more details. | ||
// | ||
///////////////////////////////////////////////////////////////////////////////// | ||
|
||
#pragma once | ||
|
||
#include <QMap> | ||
#include <QString> | ||
#include <QVariant> | ||
|
||
#include "cvfVector3.h" | ||
|
||
class RimFaultReactivationTools | ||
{ | ||
public: | ||
static cvf::Vec3d normalVector( QMap<QString, QVariant> settings ); | ||
static cvf::Vec3d topFaultPosition( QMap<QString, QVariant> settings ); | ||
static cvf::Vec3d bottomFaultPosition( QMap<QString, QVariant> settings ); | ||
|
||
static void | ||
addSettingsToMap( QMap<QString, QVariant>& map, cvf::Vec3d normalVector, cvf::Vec3d topFaultPosition, cvf::Vec3d bottomFaultPosition ); | ||
|
||
private: | ||
RimFaultReactivationTools(){}; | ||
}; |
Oops, something went wrong.