+ execIfBaseNotEmpty();
+}
+
+//==================================================================================================
+void FeaturesAPI_RevolutionBoolean::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ AttributeReferencePtr anAttrSketch = aBase->reference(FeaturesPlugin_Revolution::SKETCH_ID());
+ AttributeSelectionListPtr anAttrObjects = aBase->selectionList(FeaturesPlugin_Revolution::BASE_OBJECTS_ID());
+ AttributeSelectionPtr anAttrAxis = aBase->selection(FeaturesPlugin_Revolution::AXIS_OBJECT_ID());
+
+ theDumper << aBase << " = model.addRevolution";
+ if(aBase->getKind() == FeaturesPlugin_RevolutionCut::ID()) {
+ theDumper << "Cut";
+ } else if(aBase->getKind() == FeaturesPlugin_RevolutionFuse::ID()) {
+ theDumper << "Fuse";
+ }
+ theDumper << "(" << aDocName << ", ";
+ anAttrSketch->isInitialized() ? theDumper << "[]" : theDumper << anAttrObjects;
+ theDumper << ", " << anAttrAxis;
+
+ std::string aCreationMethod = aBase->string(FeaturesPlugin_Revolution::CREATION_METHOD())->value();
+
+ if(aCreationMethod == FeaturesPlugin_Revolution::CREATION_METHOD_BY_ANGLES()) {
+ AttributeDoublePtr anAttrToAngle = aBase->real(FeaturesPlugin_Revolution::TO_ANGLE_ID());
+ AttributeDoublePtr anAttrFromAngle = aBase->real(FeaturesPlugin_Revolution::FROM_ANGLE_ID());
+
+ theDumper << ", " << anAttrToAngle << ", " << anAttrFromAngle;
+ } else if(aCreationMethod == FeaturesPlugin_Revolution::CREATION_METHOD_BY_PLANES()) {
+ AttributeSelectionPtr anAttrToObject = aBase->selection(FeaturesPlugin_Revolution::TO_OBJECT_ID());
+ AttributeDoublePtr anAttrToOffset = aBase->real(FeaturesPlugin_Revolution::TO_OFFSET_ID());
+ AttributeSelectionPtr anAttrFromObject = aBase->selection(FeaturesPlugin_Revolution::FROM_OBJECT_ID());
+ AttributeDoublePtr anAttrFromOffset = aBase->real(FeaturesPlugin_Revolution::FROM_OFFSET_ID());
+
+ theDumper << ", " << anAttrToObject << ", " << anAttrToOffset << ", " << anAttrFromObject << ", " << anAttrFromOffset;
+ }
+
+ AttributeSelectionListPtr anAttrBoolObjects = aBase->selectionList(FeaturesPlugin_CompositeBoolean::OBJECTS_ID());
+ theDumper << ", " << anAttrBoolObjects << ")" << std::endl;
+
+ if(anAttrSketch->isInitialized()) {
+ theDumper << aBase << ".setNestedSketch(" << anAttrSketch << ")" << std::endl;
+ }
+}
+
+//==================================================================================================
+void FeaturesAPI_RevolutionBoolean::execIfBaseNotEmpty()
+{
+ if(mybaseObjects->size() > 0) {
+ execute();
+ }