mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
@@ -105,8 +105,8 @@ bool RicPointTangentManipulator::eventFilter( QObject* obj, QEvent* inputEvent )
|
||||
|
||||
if ( m_partManager->isManipulatorActive() )
|
||||
{
|
||||
m_isDraggingInComparisonView = m_viewer->isMousePosWithinComparisonView( mouseEvent->x(),
|
||||
mouseEvent->y() );
|
||||
m_isDraggingInComparisonView =
|
||||
m_viewer->isMousePosWithinComparisonView( mouseEvent->x(), mouseEvent->y() );
|
||||
|
||||
emit notifySelected();
|
||||
|
||||
|
||||
@@ -415,8 +415,7 @@ cvf::ref<cvf::DrawableGeo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo>
|
||||
RicPointTangentManipulatorPartMgr::createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray )
|
||||
cvf::ref<cvf::DrawableGeo> RicPointTangentManipulatorPartMgr::createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray )
|
||||
{
|
||||
using namespace cvf;
|
||||
ref<DrawableGeo> geo = new DrawableGeo;
|
||||
|
||||
@@ -83,10 +83,7 @@ private:
|
||||
|
||||
void addHandlePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
|
||||
|
||||
void addActiveModePart( cvf::DrawableGeo* geo,
|
||||
const cvf::Color4f& color,
|
||||
HandleType handleId,
|
||||
const cvf::String& partName );
|
||||
void addActiveModePart( cvf::DrawableGeo* geo, const cvf::Color4f& color, HandleType handleId, const cvf::String& partName );
|
||||
|
||||
static cvf::ref<cvf::DrawableGeo> createTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray );
|
||||
static cvf::ref<cvf::DrawableGeo> createIndexedTriangelDrawableGeo( cvf::Vec3fArray* triangleVertexArray,
|
||||
|
||||
@@ -98,16 +98,16 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
|
||||
auto firstPickItem = eventObject.m_pickItemInfos.front();
|
||||
auto wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>( firstPickItem.sourceInfo() );
|
||||
|
||||
auto intersectionPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(
|
||||
firstPickItem.globalPickedPoint() );
|
||||
auto intersectionPointInDomain =
|
||||
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalPickedPoint() );
|
||||
bool doSetAzimuthAndInclination = false;
|
||||
double azimuth = 0.0;
|
||||
double inclination = 0.0;
|
||||
|
||||
if ( wellPathSourceInfo )
|
||||
{
|
||||
targetPointInDomain = wellPathSourceInfo->closestPointOnCenterLine( firstPickItem.faceIdx(),
|
||||
intersectionPointInDomain );
|
||||
targetPointInDomain =
|
||||
wellPathSourceInfo->closestPointOnCenterLine( firstPickItem.faceIdx(), intersectionPointInDomain );
|
||||
double md = wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(), intersectionPointInDomain );
|
||||
doSetAzimuthAndInclination =
|
||||
calculateAzimuthAndInclinationAtMd( md,
|
||||
@@ -125,14 +125,12 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
|
||||
targetPointInDomain = intersectionPointInDomain;
|
||||
doSetAzimuthAndInclination = false;
|
||||
|
||||
cvf::Vec3d domainRayOrigin = rimView->displayCoordTransform()->transformToDomainCoord(
|
||||
firstPickItem.globalRayOrigin() );
|
||||
cvf::Vec3d domainRayOrigin =
|
||||
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalRayOrigin() );
|
||||
cvf::Vec3d domainRayEnd = targetPointInDomain + ( targetPointInDomain - domainRayOrigin );
|
||||
|
||||
cvf::Vec3d hexElementIntersection = findHexElementIntersection( rimView,
|
||||
firstPickItem,
|
||||
domainRayOrigin,
|
||||
domainRayEnd );
|
||||
cvf::Vec3d hexElementIntersection =
|
||||
findHexElementIntersection( rimView, firstPickItem, domainRayOrigin, domainRayEnd );
|
||||
CVF_TIGHT_ASSERT( !hexElementIntersection.isUndefined() );
|
||||
if ( !hexElementIntersection.isUndefined() )
|
||||
{
|
||||
@@ -151,8 +149,8 @@ bool RicCreateWellTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEve
|
||||
|
||||
if ( wellPathSourceInfo )
|
||||
{
|
||||
double mdrkbAtFirstTarget = wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(),
|
||||
intersectionPointInDomain );
|
||||
double mdrkbAtFirstTarget =
|
||||
wellPathSourceInfo->measuredDepth( firstPickItem.faceIdx(), intersectionPointInDomain );
|
||||
|
||||
RimModeledWellPath* modeledWellPath = dynamic_cast<RimModeledWellPath*>( wellPathSourceInfo->wellPath() );
|
||||
if ( modeledWellPath )
|
||||
|
||||
@@ -199,10 +199,8 @@ void RicImportWellPaths::onActionTriggered( bool isChecked )
|
||||
|
||||
QString nameList = QString( "Well Paths (%1);;All Files (*.*)" ).arg( wellPathNameFilters().join( " " ) );
|
||||
|
||||
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||
"Import Well Paths",
|
||||
defaultDir,
|
||||
nameList );
|
||||
QStringList wellPathFilePaths =
|
||||
QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, nameList );
|
||||
|
||||
if ( wellPathFilePaths.size() >= 1 )
|
||||
{
|
||||
|
||||
@@ -59,8 +59,8 @@ bool RicIntersectionPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& e
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = gridView->displayCoordTransform();
|
||||
|
||||
cvf::Vec3d domainCoord = transForm->transformToDomainCoord(
|
||||
eventObject.m_pickItemInfos.front().globalPickedPoint() );
|
||||
cvf::Vec3d domainCoord =
|
||||
transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
|
||||
|
||||
if ( intersection->inputPolyLineFromViewerEnabled() )
|
||||
{
|
||||
|
||||
@@ -79,9 +79,9 @@ bool RicPolylineTargetsPickEventHandler::handle3dPickEvent( const Ric3dPickEvent
|
||||
{
|
||||
Rim3dView* rimView = eventObject.m_view;
|
||||
|
||||
auto firstPickItem = eventObject.m_pickItemInfos.front();
|
||||
auto targetPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(
|
||||
firstPickItem.globalPickedPoint() );
|
||||
auto firstPickItem = eventObject.m_pickItemInfos.front();
|
||||
auto targetPointInDomain =
|
||||
rimView->displayCoordTransform()->transformToDomainCoord( firstPickItem.globalPickedPoint() );
|
||||
|
||||
auto* newTarget = new RimPolylineTarget();
|
||||
newTarget->setAsPointTargetXYD(
|
||||
|
||||
@@ -72,8 +72,8 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
|
||||
|
||||
if ( firstPickedPart )
|
||||
{
|
||||
const RivObjectSourceInfo* sourceInfo = dynamic_cast<const RivObjectSourceInfo*>(
|
||||
firstPickedPart->sourceInfo() );
|
||||
const RivObjectSourceInfo* sourceInfo =
|
||||
dynamic_cast<const RivObjectSourceInfo*>( firstPickedPart->sourceInfo() );
|
||||
if ( sourceInfo )
|
||||
{
|
||||
if ( dynamic_cast<RimPerforationInterval*>( sourceInfo->object() ) )
|
||||
@@ -86,16 +86,16 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
|
||||
const cvf::Part* secondPickedPart = secondPickedItem.pickedPart();
|
||||
if ( secondPickedPart )
|
||||
{
|
||||
auto wellPathSourceCandidate = dynamic_cast<const RivWellPathSourceInfo*>(
|
||||
secondPickedPart->sourceInfo() );
|
||||
auto wellPathSourceCandidate =
|
||||
dynamic_cast<const RivWellPathSourceInfo*>( secondPickedPart->sourceInfo() );
|
||||
if ( wellPathSourceCandidate )
|
||||
{
|
||||
RimWellPath* perforationWellPath = nullptr;
|
||||
objectToSelect->firstAncestorOrThisOfType( perforationWellPath );
|
||||
if ( perforationWellPath == wellPathSourceCandidate->wellPath() )
|
||||
{
|
||||
wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(
|
||||
secondPickedPart->sourceInfo() );
|
||||
wellPathSourceInfo =
|
||||
dynamic_cast<const RivWellPathSourceInfo*>( secondPickedPart->sourceInfo() );
|
||||
wellPathTriangleIndex = secondPickedItem.faceIdx();
|
||||
}
|
||||
}
|
||||
@@ -194,9 +194,9 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
|
||||
Rim3dView* rimView = RiaApplication::instance()->activeReservoirView();
|
||||
if ( !rimView ) return false;
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
|
||||
cvf::Vec3d pickedPositionInUTM = transForm->transformToDomainCoord(
|
||||
eventObject.m_pickItemInfos.front().globalPickedPoint() );
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
|
||||
cvf::Vec3d pickedPositionInUTM =
|
||||
transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() );
|
||||
|
||||
if ( auto intersectionView = dynamic_cast<Rim2dIntersectionView*>( rimView ) )
|
||||
{
|
||||
@@ -208,8 +208,8 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
|
||||
// NOTE: This computation was used to find the location for a fracture when clicking on a well path
|
||||
// It turned out that the computation was a bit inaccurate
|
||||
// Consider to use code in RigSimulationWellCoordsAndMD instead
|
||||
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->closestPointOnCenterLine( wellPathTriangleIndex,
|
||||
pickedPositionInUTM );
|
||||
cvf::Vec3d trueVerticalDepth =
|
||||
wellPathSourceInfo->closestPointOnCenterLine( wellPathTriangleIndex, pickedPositionInUTM );
|
||||
|
||||
QString wellPathText;
|
||||
wellPathText += QString( "Well path name : %1\n" ).arg( wellPathSourceInfo->wellPath()->name() );
|
||||
|
||||
Reference in New Issue
Block a user