mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-08 02:57:27 +05:00
Dump Puthon extension
This commit is contained in:
parent
33ec1e958c
commit
c1a4bf7ccc
@ -617,11 +617,13 @@ static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Obje
|
|||||||
bool BasicGUI_CircleDlg::isValid( QString& msg )
|
bool BasicGUI_CircleDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
const int id = getConstructorId();
|
const int id = getConstructorId();
|
||||||
if ( id == 0 )
|
if ( id == 0 ) {
|
||||||
//return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
|
//return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0;
|
||||||
//nil point means origin of global CS
|
//nil point means origin of global CS
|
||||||
//nil vector means Z axis
|
//nil vector means Z axis
|
||||||
return getRadius() > 0 && GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview());
|
bool ok = GroupPntVecR->SpinBox_DX->isValid(msg, !IsPreview());
|
||||||
|
return getRadius() > 0 && ok;
|
||||||
|
}
|
||||||
else if ( id == 1 )
|
else if ( id == 1 )
|
||||||
return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
|
return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() &&
|
||||||
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
|
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 );
|
||||||
|
@ -613,16 +613,19 @@ bool BasicGUI_PlaneDlg::isValid( QString& msg )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( id == 0 )
|
if ( id == 0 ) {
|
||||||
return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ) &&
|
bool ok = GroupPntDir->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
GroupPntDir->SpinBox_DX->isValid( msg, !IsPreview() );
|
return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ) && ok;
|
||||||
else if ( id == 1 ) {
|
}
|
||||||
return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) &&
|
else if ( id == 1 ) {
|
||||||
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ) &&
|
bool ok = Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
Group3Pnts->SpinBox_DX->isValid( msg, !IsPreview() );;
|
return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) &&
|
||||||
|
!isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ) && ok;
|
||||||
|
}
|
||||||
|
else if ( id == 2 ) {
|
||||||
|
bool ok = GroupFace->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
|
return !CORBA::is_nil( myFace ) && ok;
|
||||||
}
|
}
|
||||||
else if ( id == 2 )
|
|
||||||
return !CORBA::is_nil( myFace ) && GroupFace->SpinBox_DX->isValid( msg, !IsPreview() );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -706,7 +706,8 @@ bool BasicGUI_PointDlg::isValid( QString& msg )
|
|||||||
return !myRefPoint->_is_nil() && ok;
|
return !myRefPoint->_is_nil() && ok;
|
||||||
}
|
}
|
||||||
else if ( id == 2 ) {
|
else if ( id == 2 ) {
|
||||||
return !myEdge->_is_nil() && GroupOnCurve->SpinBox_DX->isValid( msg, !IsPreview() );
|
bool ok = GroupOnCurve->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
|
return !myEdge->_is_nil() && ok;
|
||||||
}
|
}
|
||||||
else if ( id == 3 )
|
else if ( id == 3 )
|
||||||
return ( !myLine1->_is_nil() && !myLine2->_is_nil() );
|
return ( !myLine1->_is_nil() && !myLine2->_is_nil() );
|
||||||
|
@ -340,7 +340,8 @@ GEOM::GEOM_IOperations_ptr RepairGUI_DivideEdgeDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool RepairGUI_DivideEdgeDlg::isValid( QString& msg )
|
bool RepairGUI_DivideEdgeDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
return !myObject->_is_nil() && myValEdt->isValid( msg, !IsPreview() );
|
bool ok = myValEdt->isValid( msg, !IsPreview() );
|
||||||
|
return !myObject->_is_nil() && ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -266,7 +266,8 @@ GEOM::GEOM_IOperations_ptr RepairGUI_SewingDlg::createOperation()
|
|||||||
bool RepairGUI_SewingDlg::isValid( QString& msg )
|
bool RepairGUI_SewingDlg::isValid( QString& msg )
|
||||||
{
|
{
|
||||||
myClosed = -1;
|
myClosed = -1;
|
||||||
return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ) && myTolEdt->isValid( msg, !IsPreview() );
|
bool ok = myTolEdt->isValid( msg, !IsPreview() );
|
||||||
|
return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ) && ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -501,14 +501,14 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool TransformationGUI_RotationDlg::isValid (QString& msg)
|
bool TransformationGUI_RotationDlg::isValid (QString& msg)
|
||||||
{
|
{
|
||||||
if (myObjects.length() < 1) return false;
|
|
||||||
|
|
||||||
switch (getConstructorId()) {
|
switch (getConstructorId()) {
|
||||||
case 0:
|
case 0: {
|
||||||
return !(myAxis->_is_nil()) && GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() );
|
bool ok = GroupPoints->SpinBox_DX->isValid( msg, !IsPreview() );
|
||||||
|
return myObjects.length() > 0 && !(myAxis->_is_nil()) && ok;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 1:
|
case 1:
|
||||||
return !(myCentPoint->_is_nil() || myPoint1->_is_nil() || myPoint2->_is_nil());
|
return myObjects.length() > 0 && !(myCentPoint->_is_nil() || myPoint1->_is_nil() || myPoint2->_is_nil());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -460,20 +460,20 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_ScaleDlg::createOperation()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool TransformationGUI_ScaleDlg::isValid (QString& msg)
|
bool TransformationGUI_ScaleDlg::isValid (QString& msg)
|
||||||
{
|
{
|
||||||
if (myObjects.length() > 0 && fabs(SpinBox_FX->value()) > 0.00001)
|
// && !myPoint->_is_nil()
|
||||||
{
|
if (getConstructorId() == 0) {
|
||||||
// && !myPoint->_is_nil()
|
bool ok = SpinBox_FX->isValid( msg, !IsPreview() );
|
||||||
if (getConstructorId() == 0) {
|
return myObjects.length() > 0 && fabs(SpinBox_FX->value()) > 0.00001 && ok;
|
||||||
return SpinBox_FX->isValid( msg, !IsPreview() );
|
|
||||||
}
|
|
||||||
if (fabs(SpinBox_FY->value()) > 0.00001 &&
|
|
||||||
fabs(SpinBox_FZ->value()) > 0.00001 &&
|
|
||||||
SpinBox_FX->isValid( msg, !IsPreview()) &&
|
|
||||||
SpinBox_FY->isValid( msg, !IsPreview()) &&
|
|
||||||
SpinBox_FZ->isValid( msg, !IsPreview()))
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
bool ok = true;
|
||||||
|
ok = SpinBox_FX->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
ok = SpinBox_FY->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
ok = SpinBox_FZ->isValid( msg, !IsPreview() ) && ok;
|
||||||
|
return myObjects.length() > 0 &&
|
||||||
|
fabs(SpinBox_FX->value()) > 0.00001 &&
|
||||||
|
fabs(SpinBox_FY->value()) > 0.00001 &&
|
||||||
|
fabs(SpinBox_FZ->value()) > 0.00001 && ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
@ -520,8 +520,6 @@ bool TransformationGUI_TranslationDlg::isValid (QString& msg)
|
|||||||
{
|
{
|
||||||
int aConstructorId = getConstructorId();
|
int aConstructorId = getConstructorId();
|
||||||
|
|
||||||
if (myObjects.length() < 1) return false;
|
|
||||||
|
|
||||||
switch (aConstructorId) {
|
switch (aConstructorId) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
@ -529,12 +527,15 @@ bool TransformationGUI_TranslationDlg::isValid (QString& msg)
|
|||||||
ok = GroupPoints->SpinBox1->isValid( msg, !IsPreview() ) && ok;
|
ok = GroupPoints->SpinBox1->isValid( msg, !IsPreview() ) && ok;
|
||||||
ok = GroupPoints->SpinBox2->isValid( msg, !IsPreview() ) && ok;
|
ok = GroupPoints->SpinBox2->isValid( msg, !IsPreview() ) && ok;
|
||||||
ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() ) && ok;
|
ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() ) && ok;
|
||||||
return ok;
|
return myObjects.length() > 0 && ok;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
return !(myPoint1->_is_nil() || myPoint2->_is_nil());
|
return myObjects.length() > 0 && !(myPoint1->_is_nil() || myPoint2->_is_nil());
|
||||||
case 2:
|
case 2:
|
||||||
return !(myVector->_is_nil()) && GroupPoints->SpinBox3->isValid( msg, !IsPreview() );
|
{
|
||||||
|
bool ok = GroupPoints->SpinBox3->isValid( msg, !IsPreview() );
|
||||||
|
return myObjects.length() > 0 && !(myVector->_is_nil()) && ok;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user