If there's a single shape in fuseShapesOrCompound input, just return it.

This commit is contained in:
Alex Shvartzkop 2024-06-25 14:56:33 +03:00
parent a2f7edde2e
commit fa5b6d7929
1 changed files with 4 additions and 1 deletions

View File

@ -673,10 +673,13 @@ static TopoDS_Compound makeCompound( auto& aInputShapes )
// Try to fuse shapes. If that fails, just add them to a compound
static TopoDS_Shape fuseShapesOrCompound( auto& aInputShapes )
static TopoDS_Shape fuseShapesOrCompound( TopTools_ListOfShape& aInputShapes )
{
TopoDS_Shape outShape;
if( aInputShapes.Size() == 1 )
return aInputShapes.First();
if( fuseShapes( aInputShapes, outShape ) )
return outShape;