ListOfShape anOriginalShapes;
for (int anIndex = 0; anIndex < aSelectionList->size(); ++anIndex) {
AttributeSelectionPtr aSelection = aSelectionList->value(anIndex);
+ if (!aSelection->context().get()) {
+ theError = "Invalid selection.";
+ return false;
+ }
GeomShapePtr aShape = aSelection->value();
if (!aShape.get())
aShape = aSelection->context()->shape();
anOriginalShapes.push_back(aShape);
}
- std::shared_ptr<GeomAlgoAPI_MakeVolume> anAlgorithm(new GeomAlgoAPI_MakeVolume(anOriginalShapes));
+ std::shared_ptr<GeomAlgoAPI_MakeVolume> anAlgorithm(
+ new GeomAlgoAPI_MakeVolume(anOriginalShapes, false));
if (!anAlgorithm->isDone()) {
theError = "MakeVolume algorithm failed.";