mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
IPAL22806: TC6.4.0: fatal error at partition by plane.
This commit is contained in:
parent
e5bcf75bd2
commit
3d4bc37e0f
@ -18,12 +18,11 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// GEOM GEOMGUI : GUI for Geometry component
|
||||
// File : OperationGUI_PartitionDlg.cxx
|
||||
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||
//
|
||||
|
||||
#include "OperationGUI_PartitionDlg.h"
|
||||
|
||||
#include <DlgRef.h>
|
||||
@ -241,7 +240,6 @@ bool OperationGUI_PartitionDlg::ClickOnApply()
|
||||
if ( !onAccept() )
|
||||
return false;
|
||||
|
||||
|
||||
initName();
|
||||
// 0020854: EDF 1398 GEOM: Ergonomy of Partition GUI window
|
||||
// ConstructorsClicked( getConstructorId() );
|
||||
@ -417,9 +415,11 @@ GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
|
||||
// function : isValid
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
@ -427,31 +427,35 @@ bool OperationGUI_PartitionDlg::isValid( QString& )
|
||||
// function : execute
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
||||
bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
|
||||
{
|
||||
bool res = false;
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
|
||||
|
||||
switch ( getConstructorId() ) {
|
||||
case 0:
|
||||
{
|
||||
int aLimit = GetLimit();
|
||||
int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
|
||||
bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
|
||||
|
||||
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() );
|
||||
|
||||
switch ( getConstructorId() ) {
|
||||
case 0:
|
||||
anObj = aNoSelfIntersection ?
|
||||
anOper->MakePartitionNonSelfIntersectedShape( myListShapes, myListTools,
|
||||
anOper->MakePartitionNonSelfIntersectedShape(myListShapes, myListTools,
|
||||
myListKeepInside, myListRemoveInside,
|
||||
aLimit, false, myListMaterials, aKeepNonlimitShapes ) :
|
||||
anOper->MakePartition( myListShapes, myListTools,
|
||||
aLimit, false, myListMaterials, aKeepNonlimitShapes) :
|
||||
anOper->MakePartition(myListShapes, myListTools,
|
||||
myListKeepInside, myListRemoveInside,
|
||||
aLimit, false, myListMaterials, aKeepNonlimitShapes );
|
||||
aLimit, false, myListMaterials, aKeepNonlimitShapes);
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
anObj = anOper->MakeHalfPartition( myListShapes[0].in(), myListTools[0].in() );
|
||||
res = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -460,7 +464,7 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
||||
GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE );
|
||||
TopoDS_Iterator It( aShape, Standard_True, Standard_True );
|
||||
int nbSubshapes = 0;
|
||||
for ( ; It.More(); It.Next() )
|
||||
for (; It.More(); It.Next())
|
||||
nbSubshapes++;
|
||||
|
||||
if ( nbSubshapes )
|
||||
|
Loading…
Reference in New Issue
Block a user