mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-12 19:04:32 +05:00
rnc : added Texture in the available display modes of the pop up menu
This commit is contained in:
parent
bd4d3a51c9
commit
c0790b80d5
@ -128,6 +128,9 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
|
||||
case GEOMOp::OpShading: // POPUP MENU - DISPLAY MODE - SHADING
|
||||
ChangeDisplayMode( 1 );
|
||||
break;
|
||||
case GEOMOp::OpTexture: // POPUP MENU - DISPLAY MODE - TEXTURE
|
||||
ChangeDisplayMode( 3 );
|
||||
break;
|
||||
case GEOMOp::OpVectors: // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
|
||||
ChangeDisplayMode( 2 );
|
||||
break;
|
||||
@ -543,20 +546,22 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
|
||||
ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
|
||||
else if ( mode == 1 )
|
||||
ic->SetDisplayMode( interIter.Value(), AIS_Shaded, false );
|
||||
if (mode == 2 ) {
|
||||
else if ( mode == 3 )
|
||||
ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
|
||||
else if (mode == 2 ) {
|
||||
Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
|
||||
if ( !aSh.IsNull() ) {
|
||||
vectorMode = !aSh->isShowVectors();
|
||||
vectorMode = !aSh->isShowVectors();
|
||||
aSh->SetDisplayVectors(vectorMode);
|
||||
ic->RecomputePrsOnly(interIter.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(mode == 0 || mode == 1) {
|
||||
aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
|
||||
} else if (mode == 2) {
|
||||
aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
|
||||
}
|
||||
if(mode == 0 || mode == 1) {
|
||||
aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
|
||||
} else if (mode == 2) {
|
||||
aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
ic->UpdateCurrentViewer();
|
||||
|
@ -740,7 +740,7 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects )
|
||||
GEOM::GEOM_IBlocksOperations_var aBlocksOperations = myGeomGUI->GetGeomGen()->GetIBlocksOperations( getStudyId() );
|
||||
GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4);
|
||||
getDisplayer()->SetTexture(theImgFileName.toStdString());
|
||||
getDisplayer()->SetDisplayMode((Standard_Integer) StdSelect_DM_HLR);
|
||||
getDisplayer()->SetDisplayMode( 3 );
|
||||
// OCCViewer_Viewer* anOCCViewer =((OCCViewer_ViewWindow*)theViewWindow)->getViewManager())->getOCCViewer();
|
||||
// Handle(AIS_InteractiveContext) aContext = anOCCViewer->getAISContext();
|
||||
|
||||
|
@ -652,6 +652,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
||||
} else
|
||||
useObjColor = true;
|
||||
}else {
|
||||
MESSAGE("myDisplayMode = "<< myDisplayMode)
|
||||
AISShape->SetDisplayMode( myDisplayMode );
|
||||
AISShape->SetShadingColor( myShadingColor );
|
||||
}
|
||||
@ -731,6 +732,7 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
||||
AISShape->SetTextureFileName(TCollection_AsciiString(myTexture.c_str()));
|
||||
AISShape->SetTextureMapOn();
|
||||
AISShape->DisableTextureModulate();
|
||||
AISShape->SetDisplayMode(3);
|
||||
// AISShape->SetDisplayMode( (Standard_Integer) StdSelect_DM_HLR );
|
||||
}
|
||||
else
|
||||
|
@ -428,6 +428,7 @@ void GeometryGUI::OnGUIEvent( int id )
|
||||
case GEOMOp::OpSwitchVectors: // MENU VIEW - VECTOR MODE
|
||||
case GEOMOp::OpWireframe: // POPUP MENU - WIREFRAME
|
||||
case GEOMOp::OpShading: // POPUP MENU - SHADING
|
||||
case GEOMOp::OpTexture: // POPUP MENU - TEXTURE
|
||||
case GEOMOp::OpVectors: // POPUP MENU - VECTORS
|
||||
libName = "DisplayGUI";
|
||||
break;
|
||||
@ -797,6 +798,7 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
|
||||
createGeomAction( GEOMOp::OpWireframe, "POP_WIREFRAME", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpShading, "POP_SHADING", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpTexture, "POP_TEXTURE", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpVectors, "POP_VECTORS", "", 0, true );
|
||||
createGeomAction( GEOMOp::OpDeflection, "POP_DEFLECTION" );
|
||||
createGeomAction( GEOMOp::OpColor, "POP_COLOR" );
|
||||
@ -1146,6 +1148,9 @@ void GeometryGUI::initialize( CAM_Application* app )
|
||||
mgr->insert( action( GEOMOp::OpShading ), dispmodeId, -1 ); // shading
|
||||
mgr->setRule( action( GEOMOp::OpShading ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
|
||||
mgr->setRule( action( GEOMOp::OpShading ), clientOCCorVTK + " and displaymode='Shading'", QtxPopupMgr::ToggleRule );
|
||||
mgr->insert( action( GEOMOp::OpTexture ), dispmodeId, -1 ); // wireframe
|
||||
mgr->setRule( action( GEOMOp::OpTexture ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
|
||||
mgr->setRule( action( GEOMOp::OpTexture), clientOCCorVTK + " and displaymode='Texture'", QtxPopupMgr::ToggleRule );
|
||||
mgr->insert( separator(), dispmodeId, -1 );
|
||||
mgr->insert( action( GEOMOp::OpVectors ), dispmodeId, -1 ); // vectors
|
||||
mgr->setRule( action( GEOMOp::OpVectors ), clientOCCorVTK_AndSomeVisible, QtxPopupMgr::VisibleRule );
|
||||
|
@ -64,6 +64,7 @@ namespace GEOMOp {
|
||||
OpWireframe = 2200, // POPUP MENU - DISPLAY MODE - WIREFRAME
|
||||
OpShading = 2201, // POPUP MENU - DISPLAY MODE - SHADING
|
||||
OpVectors = 2202, // POPUP MENU - DISPLAY MODE - SHOW EDGE DIRECTION
|
||||
OpTexture = 2203, // POPUP MENU - DISPLAY MODE - TEXTURE
|
||||
// BasicGUI ------------------//--------------------------------
|
||||
OpPoint = 3000, // MENU NEW ENTITY - BASIC - POINT
|
||||
OpLine = 3001, // MENU NEW ENTITY - BASIC - LINE
|
||||
|
@ -168,15 +168,15 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
|
||||
{
|
||||
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
|
||||
|
||||
StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
|
||||
|
||||
switch (d) {
|
||||
case StdSelect_DM_Wireframe:
|
||||
// StdSelect_DisplayMode d = (StdSelect_DisplayMode) aMode;
|
||||
std::cout<<"aMode = "<<aMode<<" ======================= GEOM_AISShape::Compute ========================="<<std::endl;
|
||||
switch (aMode) {
|
||||
case 0://StdSelect_DM_Wireframe:
|
||||
{
|
||||
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
|
||||
break;
|
||||
}
|
||||
case StdSelect_DM_Shading:
|
||||
case 1://StdSelect_DM_Shading:
|
||||
{
|
||||
myDrawer->ShadingAspect()->Aspect()->SetDistinguishOn();
|
||||
|
||||
@ -207,9 +207,9 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
|
||||
AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
|
||||
break;
|
||||
}
|
||||
case StdSelect_DM_HLR:
|
||||
case 3: //StdSelect_DM_HLR:
|
||||
{
|
||||
AIS_TexturedShape::Compute(aPresentationManager, aPrs, 3);
|
||||
AIS_TexturedShape::Compute(aPresentationManager, aPrs, aMode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user