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