IPAL22806: TC6.4.0: fatal error at partition by plane.

This commit is contained in:
jfa 2011-11-16 12:07:36 +00:00
parent e5bcf75bd2
commit 3d4bc37e0f

View File

@ -18,12 +18,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// GEOM GEOMGUI : GUI for Geometry component // GEOM GEOMGUI : GUI for Geometry component
// File : OperationGUI_PartitionDlg.cxx // File : OperationGUI_PartitionDlg.cxx
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
//
#include "OperationGUI_PartitionDlg.h" #include "OperationGUI_PartitionDlg.h"
#include <DlgRef.h> #include <DlgRef.h>
@ -241,7 +240,6 @@ bool OperationGUI_PartitionDlg::ClickOnApply()
if ( !onAccept() ) if ( !onAccept() )
return false; return false;
initName(); initName();
// 0020854: EDF 1398 GEOM: Ergonomy of Partition GUI window // 0020854: EDF 1398 GEOM: Ergonomy of Partition GUI window
// ConstructorsClicked( getConstructorId() ); // ConstructorsClicked( getConstructorId() );
@ -419,7 +417,9 @@ GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
//================================================================================= //=================================================================================
bool OperationGUI_PartitionDlg::isValid (QString& ) bool OperationGUI_PartitionDlg::isValid (QString& )
{ {
return ( myListShapes.length() || myListTools.length() ); // || myListKeepInside.length() || myListRemoveInside.length() // obsolete return (getConstructorId() == 0 ?
myListShapes.length() :
myListShapes.length() && myListTools.length());
} }
@ -432,14 +432,15 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
bool res = false; bool res = false;
GEOM::GEOM_Object_var anObj; GEOM::GEOM_Object_var anObj;
int aLimit = GetLimit();
int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation()); GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
switch ( getConstructorId() ) { switch ( getConstructorId() ) {
case 0: case 0:
{
int aLimit = GetLimit();
int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
anObj = aNoSelfIntersection ? anObj = aNoSelfIntersection ?
anOper->MakePartitionNonSelfIntersectedShape(myListShapes, myListTools, anOper->MakePartitionNonSelfIntersectedShape(myListShapes, myListTools,
myListKeepInside, myListRemoveInside, myListKeepInside, myListRemoveInside,
@ -448,10 +449,13 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
myListKeepInside, myListRemoveInside, myListKeepInside, myListRemoveInside,
aLimit, false, myListMaterials, aKeepNonlimitShapes); aLimit, false, myListMaterials, aKeepNonlimitShapes);
res = true; res = true;
}
break; break;
case 1: case 1:
{
anObj = anOper->MakeHalfPartition( myListShapes[0].in(), myListTools[0].in() ); anObj = anOper->MakeHalfPartition( myListShapes[0].in(), myListTools[0].in() );
res = true; res = true;
}
break; break;
} }