mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Exported coordinate fix (#11283)
Make sure exported well path coordinates use local coord system when needed.
This commit is contained in:
@@ -834,6 +834,10 @@ bool RifFaultReactivationModelExporter::exportModelSettings( const RimFaultReact
|
||||
auto [topPosition, bottomPosition] = model->faultTopBottom();
|
||||
auto faultNormal = model->modelNormal();
|
||||
|
||||
// make sure we export in local coordinates, if that is used
|
||||
topPosition = model->transformPointIfNeeded( topPosition );
|
||||
bottomPosition = model->transformPointIfNeeded( bottomPosition );
|
||||
|
||||
// make sure we move horizontally, and along the 2D model
|
||||
faultNormal.z() = 0.0;
|
||||
faultNormal.normalize();
|
||||
|
||||
@@ -65,7 +65,7 @@ bool JsonWriter::encodeFile( QString filePath, QMap<QString, QVariant> map )
|
||||
{
|
||||
QFile file;
|
||||
file.setFileName( filePath );
|
||||
if ( file.open( QIODevice::ReadWrite | QIODevice::Text ) )
|
||||
if ( file.open( QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate ) )
|
||||
{
|
||||
QString content = Json::encode( map, true );
|
||||
QTextStream out( &file );
|
||||
|
||||
Reference in New Issue
Block a user