mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-16 18:11:26 +05:00
DCQ : new Sketcher + merge
This commit is contained in:
parent
8b14e1e649
commit
ebc2144ffc
@ -103,7 +103,6 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
||||||
Mb->setItemEnabled(406, ViewOCC);//SKETCHER
|
|
||||||
|
|
||||||
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
||||||
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
||||||
@ -111,32 +110,6 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
|||||||
Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings
|
Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings
|
||||||
Mb->setItemEnabled(414, ViewOCC);// Isos Settings
|
Mb->setItemEnabled(414, ViewOCC);// Isos Settings
|
||||||
|
|
||||||
if(theCommandID == 4041 || // SKETCHER - POPUP VIEWER - SEGMENT
|
|
||||||
theCommandID == 4042 || // SKETCHER - POPUP VIEWER - ARC
|
|
||||||
theCommandID == 4043 || // SKETCHER - POPUP VIEWER - SET ANGLE
|
|
||||||
theCommandID == 4044 || // SKETCHER - POPUP VIEWER - SET X
|
|
||||||
theCommandID == 4045 || // SKETCHER - POPUP VIEWER - SET Y
|
|
||||||
theCommandID == 4046 || // SKETCHER - POPUP VIEWER - DELETE
|
|
||||||
theCommandID == 4047 || // SKETCHER - POPUP VIEWER - END
|
|
||||||
theCommandID == 4048 || // SKETCHER - POPUP VIEWER - CLOSE
|
|
||||||
theCommandID == 4051 || // SKETCHER - MENU - SET PLANE
|
|
||||||
theCommandID == 4052 || // SKETCHER - MENU - TANGENT
|
|
||||||
theCommandID == 4053 || // SKETCHER - MENU - PERPENDICULAR
|
|
||||||
theCommandID == 4061 || // SKETCHER - MENU - LENGTH
|
|
||||||
theCommandID == 4062 || // SKETCHER - MENU - ANGLE
|
|
||||||
theCommandID == 4063 || // SKETCHER - MENU - RADIUS
|
|
||||||
theCommandID == 4064 || // SKETCHER - MENU - X
|
|
||||||
theCommandID == 4065) { // SKETCHER - MENU - Y
|
|
||||||
if(!GeomGUI->LoadLibrary("libEntityGUI.so"))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(GeomGUI->myState == 2) {
|
|
||||||
Mb->setItemEnabled(405, false);//SKETCHER
|
|
||||||
GeomGUI->GetSketcher().Clear();
|
|
||||||
GeomGUI->myState = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(theCommandID == 111 || // MENU FILE - IMPORT BREP
|
if(theCommandID == 111 || // MENU FILE - IMPORT BREP
|
||||||
theCommandID == 112 || // MENU FILE - IMPORT IGES
|
theCommandID == 112 || // MENU FILE - IMPORT IGES
|
||||||
theCommandID == 113 || // MENU FILE - IMPORT STEP
|
theCommandID == 113 || // MENU FILE - IMPORT STEP
|
||||||
@ -195,7 +168,7 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
|||||||
if(!GeomGUI->LoadLibrary("libGenerationGUI.so"))
|
if(!GeomGUI->LoadLibrary("libGenerationGUI.so"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(theCommandID == 404 || // SKETCHER
|
else if(theCommandID == 404 || // MENU ENTITY - SKETCHER
|
||||||
theCommandID == 407) { // MENU ENTITY - EXPLODE
|
theCommandID == 407) { // MENU ENTITY - EXPLODE
|
||||||
if(!GeomGUI->LoadLibrary("libEntityGUI.so"))
|
if(!GeomGUI->LoadLibrary("libEntityGUI.so"))
|
||||||
return false;
|
return false;
|
||||||
@ -252,7 +225,6 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
//Load Function OnGUIEvent
|
//Load Function OnGUIEvent
|
||||||
OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("OnGUIEvent");
|
OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("OnGUIEvent");
|
||||||
@ -293,12 +265,7 @@ bool GeometryGUI::OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFra
|
|||||||
|
|
||||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
||||||
return false;
|
return false;
|
||||||
|
else
|
||||||
if(GeomGUI->myState == 2) {
|
|
||||||
OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)studyFrame->getRightFrame()->getViewFrame())->getViewPort();
|
|
||||||
GeomGUI->GetSketcher().MakeCurrentEdge(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView());
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,14 +281,7 @@ bool GeometryGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFr
|
|||||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(GeomGUI->myState == 2) {
|
if(GeomGUI->myState == 0) {
|
||||||
GeomGUI->GetSketcher().ValidateEdge();
|
|
||||||
if(GeomGUI->GetSketcher().GetmyEdgesNumber() == 1) {
|
|
||||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
|
||||||
Mb->setItemEnabled(405, true); // SKETCH CONTRAINTS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(GeomGUI->myState == 0) {
|
|
||||||
if(!GeomGUI->LoadLibrary("libBasicGUI.so"))
|
if(!GeomGUI->LoadLibrary("libBasicGUI.so"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -425,8 +385,6 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
||||||
Mb->setItemEnabled(405, false);//SKETCHER
|
|
||||||
Mb->setItemEnabled(406, ViewOCC);//SKETCHER
|
|
||||||
|
|
||||||
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
||||||
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
||||||
@ -454,11 +412,8 @@ void GeometryGUI::DefinePopup(QString & theContext, QString & theParent, QString
|
|||||||
theObject = "";
|
theObject = "";
|
||||||
theContext = "";
|
theContext = "";
|
||||||
|
|
||||||
|
|
||||||
if((theParent.compare("Viewer") == 0)) {
|
if((theParent.compare("Viewer") == 0)) {
|
||||||
if(GeomGUI->myState == 2)
|
if(Sel->IObjectCount() == 0)
|
||||||
theContext = "Sketch";
|
|
||||||
else if(Sel->IObjectCount() == 0)
|
|
||||||
theContext = "NothingSelected";
|
theContext = "NothingSelected";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,24 +444,6 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr
|
|||||||
{
|
{
|
||||||
GeometryGUI::GetOrCreateGeometryGUI(parent);
|
GeometryGUI::GetOrCreateGeometryGUI(parent);
|
||||||
|
|
||||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
|
|
||||||
if(theParent.compare("Viewer") == 0) {
|
|
||||||
if(theContext.compare("Sketch") == 0) {
|
|
||||||
SketchStatus myCS = GeomGUI->GetSketcher().GetCurrentStatus();
|
|
||||||
popup->setCheckable(TRUE);
|
|
||||||
if(myCS == SEGMENT) {
|
|
||||||
popup->setItemChecked(4041, true); //Sketch Segment Menu
|
|
||||||
popup->setItemChecked(4042, false); //Sketch Arc Menu
|
|
||||||
}
|
|
||||||
else if(myCS == ARC_CHORD) {
|
|
||||||
popup->setItemChecked(4041, false); //Sketch Segment Menu
|
|
||||||
popup->setItemChecked(4042, true); //Sketch Arc Menu
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!GeomGUI->LoadLibrary("libGEOMBase.so"))
|
if(!GeomGUI->LoadLibrary("libGEOMBase.so"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -535,19 +472,11 @@ bool GeometryGUI::ActiveStudyChanged(QAD_Desktop* parent)
|
|||||||
|
|
||||||
if(GeomGUI != 0) {
|
if(GeomGUI != 0) {
|
||||||
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
|
||||||
GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
|
|
||||||
if(GeomGUI->myState == 2) {
|
|
||||||
Mb->setItemEnabled(405, false);//SKETCHER
|
|
||||||
GeomGUI->GetSketcher().Clear();
|
|
||||||
GeomGUI->myState = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ViewOCC = false;
|
bool ViewOCC = false;
|
||||||
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC)
|
if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC)
|
||||||
ViewOCC = true;
|
ViewOCC = true;
|
||||||
|
|
||||||
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
Mb->setItemEnabled(404, ViewOCC);//SKETCHER
|
||||||
Mb->setItemEnabled(406, ViewOCC);//SKETCHER
|
|
||||||
|
|
||||||
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
Mb->setItemEnabled(603, ViewOCC);//SuppressFace
|
||||||
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
Mb->setItemEnabled(604, ViewOCC);//SuppressHole
|
||||||
|
Loading…
x
Reference in New Issue
Block a user