-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
ListOfShape aShapes, aContexts;
getOriginalShapesAndContexts(BASE_OBJECTS_ID(), aShapes, aContexts);
+ // Collect sketch faces.
+ for (int anIndex = 0; anIndex < aSelectionList->size(); ++anIndex) {
+ AttributeSelectionPtr aSelection = aSelectionList->value(anIndex);
+ GeomShapePtr aShape = aSelection->value();
+ ResultConstructionPtr aContext =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aSelection->context());
+ if (!aShape && aContext) {
+ for (int i = 0; i < aContext->facesNum(); ++i)
+ aShapes.push_back(aContext->face(i));
+ }
+ }
+
// Sew faces.
GeomMakeShapePtr aSewingAlgo(new GeomAlgoAPI_Sewing(aShapes));