-
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.
Merge remote-tracking branch 'origin/dev' into grid-geometry-extraction
- Loading branch information
Showing
186 changed files
with
3,691 additions
and
1,191 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
68 changes: 68 additions & 0 deletions
68
ApplicationLibCode/Commands/CrossSectionCommands/RicNewPolygonIntersectionFeature.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,68 @@ | ||
///////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright (C) 2024 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 "RicNewPolygonIntersectionFeature.h" | ||
|
||
#include "RiaApplication.h" | ||
|
||
#include "RimExtrudedCurveIntersection.h" | ||
#include "RimGridView.h" | ||
#include "RimIntersectionCollection.h" | ||
|
||
#include "Polygons/RimPolygon.h" | ||
#include "Polygons/RimPolygonInView.h" | ||
|
||
#include "cafSelectionManager.h" | ||
|
||
#include <QAction> | ||
|
||
CAF_CMD_SOURCE_INIT( RicNewPolygonIntersectionFeature, "RicNewPolygonIntersectionFeature" ); | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
void RicNewPolygonIntersectionFeature::onActionTriggered( bool isChecked ) | ||
{ | ||
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView(); | ||
if ( !activeView ) return; | ||
|
||
auto collection = activeView->intersectionCollection(); | ||
if ( !collection ) return; | ||
|
||
auto polygon = caf::SelectionManager::instance()->selectedItemOfType<RimPolygon>(); | ||
if ( !polygon ) | ||
{ | ||
if ( auto polygonInView = caf::SelectionManager::instance()->selectedItemOfType<RimPolygonInView>() ) | ||
{ | ||
polygon = polygonInView->polygon(); | ||
} | ||
} | ||
|
||
auto intersection = new RimExtrudedCurveIntersection(); | ||
intersection->configureForProjectPolyLine( polygon ); | ||
collection->appendIntersectionAndUpdate( intersection ); | ||
} | ||
|
||
//-------------------------------------------------------------------------------------------------- | ||
/// | ||
//-------------------------------------------------------------------------------------------------- | ||
void RicNewPolygonIntersectionFeature::setupActionLook( QAction* actionToSetup ) | ||
{ | ||
actionToSetup->setIcon( QIcon( ":/CrossSection16x16.png" ) ); | ||
actionToSetup->setText( "Create Polygon Intersection" ); | ||
} |
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
19 changes: 19 additions & 0 deletions
19
ApplicationLibCode/Commands/PolygonCommands/CMakeLists_files.cmake
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,19 @@ | ||
set(SOURCE_GROUP_HEADER_FILES | ||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFeature.h | ||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFileFeature.h | ||
) | ||
|
||
set(SOURCE_GROUP_SOURCE_FILES | ||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFeature.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolygonFileFeature.cpp | ||
) | ||
|
||
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES}) | ||
|
||
list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES}) | ||
|
||
source_group( | ||
"CommandFeature\\Polygons" | ||
FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} | ||
${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake | ||
) |
Oops, something went wrong.