mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-14 10:40:35 +05:00
0023055: EDF 10725 GEOM: In the shape recognition functionality, it is not possible to select an area for the filtering sample
This commit is contained in:
parent
8620d4d735
commit
939beceaf8
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
// SALOME includes
|
// SALOME includes
|
||||||
#include "EntityGUI_FeatureDetectorDlg.h"
|
#include "EntityGUI_FeatureDetectorDlg.h"
|
||||||
#include <ShapeRec_FeatureDetector.hxx>
|
#include "ShapeRec_FeatureDetector.hxx"
|
||||||
|
#include "GEOM_Constants.h"
|
||||||
|
|
||||||
#include <OCCViewer_ViewWindow.h>
|
#include <OCCViewer_ViewWindow.h>
|
||||||
#include <OCCViewer_ViewManager.h>
|
#include <OCCViewer_ViewManager.h>
|
||||||
@ -444,13 +445,20 @@ void EntityGUI_FeatureDetectorDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
std::string theImgFileName = myAISShape->TextureFile();
|
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
|
||||||
if ( theImgFileName == "" )
|
if ( !study ) return;
|
||||||
|
LightApp_Application* app = ::qobject_cast<LightApp_Application*>( study->application() );
|
||||||
|
if ( !app ) return;
|
||||||
|
SUIT_ViewManager* vm = app->activeViewManager();
|
||||||
|
if ( !vm ) return;
|
||||||
|
PropMap propMap = study->getObjectProperties( vm->getGlobalId(), myFaceEntry );
|
||||||
|
QString theImgFileName = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString();
|
||||||
|
if ( theImgFileName.isEmpty() )
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
// Setting the image caracteristics
|
// Setting the image caracteristics
|
||||||
myDetector->SetPath( theImgFileName );
|
myDetector->SetPath( theImgFileName.toStdString() );
|
||||||
height = myDetector->GetImgHeight();
|
height = myDetector->GetImgHeight();
|
||||||
width = myDetector->GetImgWidth();
|
width = myDetector->GetImgWidth();
|
||||||
pictureLeft = -0.5 * width; // X coordinate of the top left corner of the background image in the view
|
pictureLeft = -0.5 * width; // X coordinate of the top left corner of the background image in the view
|
||||||
|
Loading…
Reference in New Issue
Block a user