mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-05 22:34:16 +05:00
DCQ: Debug Selection in Sketcher
This commit is contained in:
parent
ebc2144ffc
commit
edcd9dae04
@ -185,17 +185,21 @@ void EntityGUI::DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shap
|
|||||||
// function : EraseSimulationShape()
|
// function : EraseSimulationShape()
|
||||||
// purpose : Clears the display of 'mySimulationShape' a pure graphical shape
|
// purpose : Clears the display of 'mySimulationShape' a pure graphical shape
|
||||||
//==================================================================================
|
//==================================================================================
|
||||||
void EntityGUI::EraseSimulationShape()
|
void EntityGUI::EraseSimulationShape(int Sh)
|
||||||
{
|
{
|
||||||
int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
|
int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
|
if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
|
||||||
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
|
OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
|
||||||
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
|
||||||
ic->Erase(mySimulationShape1, Standard_True, Standard_False);
|
if(Sh < 1) {
|
||||||
ic->ClearPrs(mySimulationShape1);
|
ic->Erase(mySimulationShape1, Standard_True, Standard_False);
|
||||||
ic->Erase(mySimulationShape2, Standard_True, Standard_False);
|
ic->ClearPrs(mySimulationShape1);
|
||||||
ic->ClearPrs(mySimulationShape2);
|
}
|
||||||
|
if(Sh <= 1) {
|
||||||
|
ic->Erase(mySimulationShape2, Standard_True, Standard_False);
|
||||||
|
ic->ClearPrs(mySimulationShape2);
|
||||||
|
}
|
||||||
ic->UpdateCurrentViewer();
|
ic->UpdateCurrentViewer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public :
|
|||||||
void OnSketchEnd(const char *Cmd);
|
void OnSketchEnd(const char *Cmd);
|
||||||
|
|
||||||
void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
|
||||||
void EraseSimulationShape();
|
void EraseSimulationShape(int Sh = 0);
|
||||||
|
|
||||||
/* Methods for sub shapes explode */
|
/* Methods for sub shapes explode */
|
||||||
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
|
bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
|
||||||
|
@ -694,7 +694,7 @@ void EntityGUI_SketcherDlg::ClickOnUndo()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
||||||
{
|
{
|
||||||
myEntityGUI->EraseSimulationShape();
|
myEntityGUI->EraseSimulationShape(1); //Juste Shape2!!
|
||||||
|
|
||||||
Group1Sel->buttonApply->setEnabled(false);
|
Group1Sel->buttonApply->setEnabled(false);
|
||||||
Group1Sel->buttonApply->setFocus();
|
Group1Sel->buttonApply->setFocus();
|
||||||
@ -706,19 +706,16 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
myY = 0.0;
|
myY = 0.0;
|
||||||
|
|
||||||
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
|
int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
|
||||||
if(nbSel != 1) {
|
if(nbSel != 1)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* nbSel == 1 */
|
/* nbSel == 1 */
|
||||||
TopoDS_Shape S;
|
TopoDS_Shape S;
|
||||||
gp_Pnt myPoint1;
|
gp_Pnt myPoint1;
|
||||||
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
|
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
|
||||||
|
|
||||||
if(!myGeomBase->GetTopoFromSelection(mySelection, S)) {
|
if(!myGeomBase->GetTopoFromSelection(mySelection, S))
|
||||||
// this->MakeSimulationAndDisplay();
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if(myEditCurrentArgument == Group1Sel->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) {
|
if(myEditCurrentArgument == Group1Sel->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) {
|
||||||
myX = myPoint1.X();
|
myX = myPoint1.X();
|
||||||
@ -730,7 +727,6 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument()
|
|||||||
this->MakeSimulationAndDisplay();
|
this->MakeSimulationAndDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user