mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
0023180: [CEA 1602] Regression : MakePartition of a solid by an empty compound returns an error
- Allow creating empty compounds
This commit is contained in:
parent
1d1c325da5
commit
0068817237
@ -114,14 +114,15 @@ namespace
|
|||||||
{
|
{
|
||||||
TopoDS_Iterator it( c, Standard_True, Standard_True );
|
TopoDS_Iterator it( c, Standard_True, Standard_True );
|
||||||
|
|
||||||
// check that compound is not empty
|
// empty compound is OK only if we explicitly create a compound of shapes
|
||||||
bool result = it.More();
|
bool result = true;
|
||||||
|
|
||||||
// => if expected type is TopAbs_SHAPE, we allow compound consisting of any shapes, this above check is enough
|
// => if expected type is TopAbs_SHAPE, we allow compound consisting of any shapes, this above check is enough
|
||||||
// => otherwise we have to check compound's content
|
// => otherwise we have to check compound's content
|
||||||
// => compound sometimes can contain enclosed compound(s), we process them recursively and rebuild initial compound
|
// => compound sometimes can contain enclosed compound(s), we process them recursively and rebuild initial compound
|
||||||
|
|
||||||
if ( t != TopAbs_SHAPE ) {
|
if ( t != TopAbs_SHAPE ) {
|
||||||
|
result = it.More();
|
||||||
std::list<TopoDS_Shape> compounds, shapes;
|
std::list<TopoDS_Shape> compounds, shapes;
|
||||||
compounds.push_back( c );
|
compounds.push_back( c );
|
||||||
while ( !compounds.empty() && result ) {
|
while ( !compounds.empty() && result ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user