mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +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
|
// 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() );
|
||||||
@ -417,9 +415,11 @@ GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
|
|||||||
// function : isValid
|
// function : isValid
|
||||||
// purpose :
|
// 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
|
// function : execute
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
|
||||||
{
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
|
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation());
|
||||||
|
|
||||||
|
switch ( getConstructorId() ) {
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
int aLimit = GetLimit();
|
int aLimit = GetLimit();
|
||||||
int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
|
int aKeepNonlimitShapes = GroupPoints->CheckButton1->isChecked();
|
||||||
bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
|
bool aNoSelfIntersection = GroupPoints->CheckButton2->isChecked();
|
||||||
|
|
||||||
GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() );
|
|
||||||
|
|
||||||
switch ( getConstructorId() ) {
|
|
||||||
case 0:
|
|
||||||
anObj = aNoSelfIntersection ?
|
anObj = aNoSelfIntersection ?
|
||||||
anOper->MakePartitionNonSelfIntersectedShape( myListShapes, myListTools,
|
anOper->MakePartitionNonSelfIntersectedShape(myListShapes, myListTools,
|
||||||
myListKeepInside, myListRemoveInside,
|
myListKeepInside, myListRemoveInside,
|
||||||
aLimit, false, myListMaterials, aKeepNonlimitShapes ) :
|
aLimit, false, myListMaterials, aKeepNonlimitShapes) :
|
||||||
anOper->MakePartition( myListShapes, myListTools,
|
anOper->MakePartition(myListShapes, myListTools,
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,7 +464,7 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
|||||||
GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE );
|
GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE );
|
||||||
TopoDS_Iterator It( aShape, Standard_True, Standard_True );
|
TopoDS_Iterator It( aShape, Standard_True, Standard_True );
|
||||||
int nbSubshapes = 0;
|
int nbSubshapes = 0;
|
||||||
for ( ; It.More(); It.Next() )
|
for (; It.More(); It.Next())
|
||||||
nbSubshapes++;
|
nbSubshapes++;
|
||||||
|
|
||||||
if ( nbSubshapes )
|
if ( nbSubshapes )
|
||||||
|
Loading…
Reference in New Issue
Block a user