1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: FeaturesPlugin_Rotation.cpp
4 // Created: 12 May 2015
5 // Author: Dmitry Bobylev
7 #include <FeaturesPlugin_Rotation.h>
9 #include <ModelAPI_AttributeDouble.h>
10 #include <ModelAPI_AttributeSelectionList.h>
11 #include <ModelAPI_Session.h>
13 //=================================================================================================
14 FeaturesPlugin_Rotation::FeaturesPlugin_Rotation()
18 //=================================================================================================
19 void FeaturesPlugin_Rotation::initAttributes()
21 AttributeSelectionListPtr aSelection =
22 std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
23 FeaturesPlugin_Rotation::LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
24 // revolution works with faces always
25 aSelection->setSelectionType("SOLID");
27 data()->addAttribute(FeaturesPlugin_Rotation::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
29 data()->addAttribute(FeaturesPlugin_Rotation::ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
32 //=================================================================================================
33 void FeaturesPlugin_Rotation::execute()