X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Extrusion.h;h=98c9af7c9ddf90f655fba32f66b2e9b8daf61df1;hb=e488a2b2fe993a0007668de88ef8f8a79486dcc8;hp=1519682995b3e343058d0a1c86dc64a1d72461ee;hpb=4783f146b71a48c651523fcf0e12367bcf3d1fa8;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h index 151968299..98c9af7c9 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + // File: FeaturesPlugin_Extrusion.h // Created: 30 May 2014 // Author: Vitaly SMETANNIKOV @@ -5,11 +7,22 @@ #ifndef FeaturesPlugin_Extrusion_H_ #define FeaturesPlugin_Extrusion_H_ -#include "FeaturesPlugin.h" +#include #include -#include -#include -#include +#include + +class GeomAPI_Shape; +class ModelAPI_ResultBody; + +/**\class FeaturesPlugin_Extrusion + * \ingroup Plugins + * \brief Feature for creation of extrusion from the planar face. + * + * Extrusion creates the lateral faces based on edges of the base face and + * the top and bottom faces equal to the base face or this faces can be projection on the + * bounding planes if they were set. Direction of extrusion is taken from the face + * plane or if the bounding faces were set then it will be from the bottom to the top plane. + */ class FeaturesPlugin_Extrusion : public ModelAPI_Feature { public: @@ -19,23 +32,68 @@ class FeaturesPlugin_Extrusion : public ModelAPI_Feature static const std::string MY_EXTRUSION_ID("Extrusion"); return MY_EXTRUSION_ID; } - /// attribute name of referenced face - inline static const std::string& FACE_ID() + /// attribute name of references sketch entities list, it should contain a sketch result or + /// a pair a sketch result to sketch face + inline static const std::string& LIST_ID() + { + static const std::string MY_GROUP_LIST_ID("base"); + return MY_GROUP_LIST_ID; + } + + /// attribute name of an object to which the extrusion grows + inline static const std::string& AXIS_OBJECT_ID() + { + static const std::string MY_TO_OBJECT_ID("axis_object"); + return MY_TO_OBJECT_ID; + } + + /// attribute name for creation method + inline static const std::string& CREATION_METHOD() + { + static const std::string METHOD_ATTR("CreationMethod"); + return METHOD_ATTR; + } + + /// attribute name of extrusion size + inline static const std::string& TO_SIZE_ID() { - static const std::string MY_FACE_ID("extrusion_face"); - return MY_FACE_ID; + static const std::string MY_TO_SIZE_ID("to_size"); + return MY_TO_SIZE_ID; } + /// attribute name of extrusion size - inline static const std::string& SIZE_ID() + inline static const std::string& FROM_SIZE_ID() + { + static const std::string MY_FROM_SIZE_ID("from_size"); + return MY_FROM_SIZE_ID; + } + + /// attribute name of an object to which the extrusion grows + inline static const std::string& TO_OBJECT_ID() + { + static const std::string MY_TO_OBJECT_ID("to_object"); + return MY_TO_OBJECT_ID; + } + + /// attribute name of extrusion offset + inline static const std::string& TO_OFFSET_ID() + { + static const std::string MY_TO_OFFSET_ID("to_offset"); + return MY_TO_OFFSET_ID; + } + + /// attribute name of tool object + inline static const std::string& FROM_OBJECT_ID() { - static const std::string MY_SIZE_ID("extrusion_size"); - return MY_SIZE_ID; + static const std::string MY_FROM_OBJECT_ID("from_object"); + return MY_FROM_OBJECT_ID; } - /// attribute name of reverse direction - inline static const std::string& REVERSE_ID() + + /// attribute name of extrusion offset + inline static const std::string& FROM_OFFSET_ID() { - static const std::string MY_REVERSE_ID("extrusion_reverse"); - return MY_REVERSE_ID; + static const std::string MY_FROM_OFFSET_ID("from_offset"); + return MY_FROM_OFFSET_ID; } /// Returns the kind of a feature @@ -55,9 +113,9 @@ class FeaturesPlugin_Extrusion : public ModelAPI_Feature FeaturesPlugin_Extrusion(); private: /// Load Naming data structure of the feature to the document - void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, std::shared_ptr theResultBody, - std::shared_ptr theBasis, - std::shared_ptr theContext); + void loadNamingDS(GeomAlgoAPI_Prism& thePrismAlgo, + std::shared_ptr theResultBody, + std::shared_ptr theBasis); }; #endif