From: dbv Date: Thu, 11 Jun 2015 14:57:06 +0000 (+0300) Subject: Extrusion fuse X-Git-Tag: V_1.3.0~244 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=858ca61a863bb5a6daf16c92952edae6e16592d5;p=modules%2Fshaper.git Extrusion fuse --- diff --git a/src/FeaturesPlugin/CMakeLists.txt b/src/FeaturesPlugin/CMakeLists.txt index 8e30c5499..6d7a69b8a 100644 --- a/src/FeaturesPlugin/CMakeLists.txt +++ b/src/FeaturesPlugin/CMakeLists.txt @@ -16,6 +16,7 @@ SET(PROJECT_HEADERS FeaturesPlugin_CompositeBoolean.h FeaturesPlugin_ExtrusionBoolean.h FeaturesPlugin_ExtrusionCut.h + FeaturesPlugin_ExtrusionFuse.h ) SET(PROJECT_SOURCES @@ -35,6 +36,7 @@ SET(XML_RESOURCES plugin-Features.xml extrusion_widget.xml extrusioncut_widget.xml + extrusionfuse_widget.xml revolution_widget.xml rotation_widget.xml movement_widget.xml diff --git a/src/FeaturesPlugin/FeaturesPlugin_ExtrusionFuse.h b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionFuse.h new file mode 100644 index 000000000..9b8c36c10 --- /dev/null +++ b/src/FeaturesPlugin/FeaturesPlugin_ExtrusionFuse.h @@ -0,0 +1,39 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: FeaturesPlugin_ExtrusionFuse.h +// Created: 11 June 2015 +// Author: Dmitry Bobylev + +#ifndef FeaturesPlugin_ExtrusionFuse_H_ +#define FeaturesPlugin_ExtrusionFuse_H_ + +#include + +/** \class FeaturesPlugin_ExtrusionFuse + * \ingroup Plugins + */ +class FeaturesPlugin_ExtrusionFuse : public FeaturesPlugin_ExtrusionBoolean +{ + public: + /// Feature kind. + inline static const std::string& ID() + { + static const std::string MY_REVOLUTION_ID("ExtrusionFuse"); + return MY_REVOLUTION_ID; + } + + /// \return the kind of a feature + FEATURESPLUGIN_EXPORT virtual const std::string& getKind() + { + static std::string MY_KIND = FeaturesPlugin_ExtrusionFuse::ID(); + return MY_KIND; + } + + /// Use plugin manager for features creation. + FeaturesPlugin_ExtrusionFuse() + { + myBooleanOperationType = GeomAlgoAPI_Boolean::BOOL_FUSE; + } +}; + +#endif diff --git a/src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp b/src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp index 844d77f82..97643a705 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,8 @@ FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID) return FeaturePtr(new FeaturesPlugin_Placement); } else if (theFeatureID == FeaturesPlugin_ExtrusionCut::ID()) { return FeaturePtr(new FeaturesPlugin_ExtrusionCut); + } else if (theFeatureID == FeaturesPlugin_ExtrusionFuse::ID()) { + return FeaturePtr(new FeaturesPlugin_ExtrusionFuse); } // feature of such kind is not found return FeaturePtr(); diff --git a/src/FeaturesPlugin/extrusionfuse_widget.xml b/src/FeaturesPlugin/extrusionfuse_widget.xml new file mode 100644 index 000000000..9f0803a61 --- /dev/null +++ b/src/FeaturesPlugin/extrusionfuse_widget.xml @@ -0,0 +1,48 @@ + + + + + /> + + + + + + + + + + + + + + + + + + + diff --git a/src/FeaturesPlugin/plugin-Features.xml b/src/FeaturesPlugin/plugin-Features.xml index a6af70516..30cd1569b 100644 --- a/src/FeaturesPlugin/plugin-Features.xml +++ b/src/FeaturesPlugin/plugin-Features.xml @@ -24,6 +24,9 @@ + + +