#include <ModelAPI_BodyBuilder.h>
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <GeomAlgoAPI_CompoundBuilder.h>
#include <GeomAlgoAPI_Prism.h>
aSelection->setSelectionType("SOLID");
initMakeSolidsAttributes();
+
+ data()->addAttribute(SKETCH_SELECTION_ID(), ModelAPI_AttributeSelection::typeId());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), SKETCH_SELECTION_ID());
}
//=================================================================================================
if(!aConstruction.get()) {
return;
}
+ selection(SKETCH_SELECTION_ID())->setValue(aSketchRes, std::shared_ptr<GeomAPI_Shape>());
int aSketchFacesNum = aConstruction->facesNum();
if(aSketchFacesNum == 0) {
return;
return MY_SKETCH_OBJECT_ID;
}
+ /// Attribute name of sketch feature.
+ inline static const std::string& SKETCH_SELECTION_ID()
+ {
+ static const std::string MY_SKETCH_SELECTION_ID("sketch_selection");
+ return MY_SKETCH_SELECTION_ID;
+ }
+
/// Attribute name of objects for boolean operation.
inline static const std::string& BOOLEAN_OBJECTS_ID()
{