mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-01 21:45:37 +05:00
DCQ : Limit Torus use
This commit is contained in:
parent
bc58667418
commit
5ef9687887
@ -102,7 +102,6 @@ void PrimitiveGUI_TorusDlg::Init()
|
|||||||
|
|
||||||
myRadius1 = 300.0;
|
myRadius1 = 300.0;
|
||||||
myRadius2 = 100.0;
|
myRadius2 = 100.0;
|
||||||
myOkRadius1 = myOkRadius2 = true;
|
|
||||||
myOkPoint1 = myOkDir = false;
|
myOkPoint1 = myOkDir = false;
|
||||||
|
|
||||||
myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom);
|
myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom);
|
||||||
@ -167,7 +166,6 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
|
|||||||
mySelection->ClearFilters();
|
mySelection->ClearFilters();
|
||||||
myGeomBase->EraseSimulationShape();
|
myGeomBase->EraseSimulationShape();
|
||||||
disconnect(mySelection, 0, this, 0);
|
disconnect(mySelection, 0, this, 0);
|
||||||
myOkRadius1 = myOkRadius2 = true;
|
|
||||||
myRadius1 = 300.0;
|
myRadius1 = 300.0;
|
||||||
myRadius2 = 100.0;
|
myRadius2 = 100.0;
|
||||||
|
|
||||||
@ -237,7 +235,7 @@ void PrimitiveGUI_TorusDlg::ClickOnApply()
|
|||||||
myGeomBase->EraseSimulationShape();
|
myGeomBase->EraseSimulationShape();
|
||||||
mySimulationTopoDs.Nullify();
|
mySimulationTopoDs.Nullify();
|
||||||
|
|
||||||
if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2 )
|
if(myOkPoint1 && myOkDir)
|
||||||
myPrimitiveGUI->MakeTorusAndDisplay(myPoint1, myDir, myRadius1, myRadius2);
|
myPrimitiveGUI->MakeTorusAndDisplay(myPoint1, myDir, myRadius1, myRadius2);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@ -279,7 +277,7 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
|
|||||||
myOkDir = true;
|
myOkDir = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2)
|
if(myOkPoint1 && myOkDir)
|
||||||
MakeTorusSimulationAndDisplay();
|
MakeTorusSimulationAndDisplay();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -375,15 +373,23 @@ void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox(double newValue)
|
|||||||
QObject* send = (QObject*)sender();
|
QObject* send = (QObject*)sender();
|
||||||
|
|
||||||
if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) {
|
if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) {
|
||||||
myRadius1 = newValue;
|
if(newValue > myRadius2)
|
||||||
myOkRadius1 = true;
|
myRadius1 = newValue;
|
||||||
|
else {
|
||||||
|
GroupPoints->SpinBox_DX->SetValue(myRadius1);
|
||||||
|
GroupDimensions->SpinBox_DX->SetValue(myRadius1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) {
|
else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) {
|
||||||
myRadius2 = newValue;
|
if(newValue < myRadius1)
|
||||||
myOkRadius2 = true;
|
myRadius2 = newValue;
|
||||||
|
else {
|
||||||
|
GroupPoints->SpinBox_DY->SetValue(myRadius2);
|
||||||
|
GroupDimensions->SpinBox_DY->SetValue(myRadius2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2)
|
if(myOkPoint1 && myOkDir)
|
||||||
MakeTorusSimulationAndDisplay();
|
MakeTorusSimulationAndDisplay();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,6 @@ private:
|
|||||||
|
|
||||||
Standard_Real myRadius1;
|
Standard_Real myRadius1;
|
||||||
Standard_Real myRadius2;
|
Standard_Real myRadius2;
|
||||||
bool myOkRadius1;
|
|
||||||
bool myOkRadius2;
|
|
||||||
|
|
||||||
DlgRef_2Sel2Spin* GroupPoints;
|
DlgRef_2Sel2Spin* GroupPoints;
|
||||||
DlgRef_2Spin* GroupDimensions;
|
DlgRef_2Spin* GroupDimensions;
|
||||||
|
Loading…
Reference in New Issue
Block a user