-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-#include <FeaturesPlugin_Plugin.h>
-
-#include <FeaturesPlugin_Boolean.h>
-#include <FeaturesPlugin_Extrusion.h>
-#include <FeaturesPlugin_ExtrusionCut.h>
-#include <FeaturesPlugin_ExtrusionFuse.h>
-#include <FeaturesPlugin_Group.h>
-#include <FeaturesPlugin_Intersection.h>
-#include <FeaturesPlugin_Translation.h>
-#include <FeaturesPlugin_Partition.h>
-#include <FeaturesPlugin_Pipe.h>
-#include <FeaturesPlugin_Placement.h>
-#include <FeaturesPlugin_RemoveSubShapes.h>
-#include <FeaturesPlugin_Revolution.h>
-#include <FeaturesPlugin_RevolutionCut.h>
-#include <FeaturesPlugin_RevolutionFuse.h>
-#include <FeaturesPlugin_Rotation.h>
-#include <FeaturesPlugin_ValidatorTransform.h>
-#include <FeaturesPlugin_Validators.h>
-
-#include <ModelAPI_Session.h>
-
-#include <string>
-
-#include <memory>
-
-using namespace std;
-
-// the only created instance of this plugin
-static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();
-
-FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
-{
- SessionPtr aMgr = ModelAPI_Session::get();
- ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
- aFactory->registerValidator("FeaturesPlugin_ValidatorTransform",
- new FeaturesPlugin_ValidatorTransform);
- aFactory->registerValidator("FeaturesPlugin_ValidatorCompositeLauncher",
- new FeaturesPlugin_ValidatorCompositeLauncher);
- aFactory->registerValidator("FeaturesPlugin_ValidatorBaseForGeneration",
- new FeaturesPlugin_ValidatorBaseForGeneration);
- aFactory->registerValidator("FeaturesPlugin_ValidatorPipeLocations",
- new FeaturesPlugin_ValidatorPipeLocations);
- aFactory->registerValidator("FeaturesPlugin_ValidatorCanBeEmpty",
- new FeaturesPlugin_ValidatorCanBeEmpty);
- aFactory->registerValidator("FeaturesPlugin_ValidatorBooleanSelection",
- new FeaturesPlugin_ValidatorBooleanSelection);
- aFactory->registerValidator("FeaturesPlugin_ValidatorPartitionSelection",
- new FeaturesPlugin_ValidatorPartitionSelection);
- aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesSelection",
- new FeaturesPlugin_ValidatorRemoveSubShapesSelection);
- aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesResult",
- new FeaturesPlugin_ValidatorRemoveSubShapesResult);
- aFactory->registerValidator("FeaturesPlugin_ValidatorPipePath",
- new FeaturesPlugin_ValidatorPipePath);
-
- // register this plugin
- ModelAPI_Session::get()->registerPlugin(this);
-}
-
-FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
-{
- if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
- return FeaturePtr(new FeaturesPlugin_Extrusion);
- } else if (theFeatureID == FeaturesPlugin_Revolution::ID()) {
- return FeaturePtr(new FeaturesPlugin_Revolution);
- } else if (theFeatureID == FeaturesPlugin_Rotation::ID()) {
- return FeaturePtr(new FeaturesPlugin_Rotation);
- } else if (theFeatureID == FeaturesPlugin_Translation::ID()) {
- return FeaturePtr(new FeaturesPlugin_Translation);
- } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
- return FeaturePtr(new FeaturesPlugin_Boolean);
- } else if (theFeatureID == FeaturesPlugin_Group::ID()) {
- return FeaturePtr(new FeaturesPlugin_Group);
- } else if (theFeatureID == FeaturesPlugin_Intersection::ID()) {
- return FeaturePtr(new FeaturesPlugin_Intersection);
- } else if (theFeatureID == FeaturesPlugin_Partition::ID()) {
- return FeaturePtr(new FeaturesPlugin_Partition);
- } else if (theFeatureID == FeaturesPlugin_Pipe::ID()) {
- return FeaturePtr(new FeaturesPlugin_Pipe);
- } else if (theFeatureID == FeaturesPlugin_Placement::ID()) {
- 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);
- } else if (theFeatureID == FeaturesPlugin_RevolutionCut::ID()) {
- return FeaturePtr(new FeaturesPlugin_RevolutionCut);
- } else if (theFeatureID == FeaturesPlugin_RevolutionFuse::ID()) {
- return FeaturePtr(new FeaturesPlugin_RevolutionFuse);
- } else if (theFeatureID == FeaturesPlugin_RemoveSubShapes::ID()) {
- return FeaturePtr(new FeaturesPlugin_RemoveSubShapes);
- }
-
- // feature of such kind is not found
- return FeaturePtr();
-}
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->\r
+\r
+#include <FeaturesPlugin_Plugin.h>\r
+\r
+#include <FeaturesPlugin_Boolean.h>\r
+#include <FeaturesPlugin_Extrusion.h>\r
+#include <FeaturesPlugin_ExtrusionCut.h>\r
+#include <FeaturesPlugin_ExtrusionFuse.h>\r
+#include <FeaturesPlugin_Group.h>\r
+#include <FeaturesPlugin_Intersection.h>\r
+#include <FeaturesPlugin_Translation.h>\r
+#include <FeaturesPlugin_Partition.h>\r
+#include <FeaturesPlugin_Pipe.h>\r
+#include <FeaturesPlugin_Placement.h>\r
+#include <FeaturesPlugin_Recover.h>\r
+#include <FeaturesPlugin_RemoveSubShapes.h>\r
+#include <FeaturesPlugin_Revolution.h>\r
+#include <FeaturesPlugin_RevolutionCut.h>\r
+#include <FeaturesPlugin_RevolutionFuse.h>\r
+#include <FeaturesPlugin_Rotation.h>\r
+#include <FeaturesPlugin_Union.h>\r
+#include <FeaturesPlugin_ValidatorTransform.h>\r
+#include <FeaturesPlugin_Validators.h>\r
+\r
+#include <ModelAPI_Session.h>\r
+\r
+#include <string>\r
+\r
+#include <memory>\r
+\r
+using namespace std;\r
+\r
+// the only created instance of this plugin\r
+static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();\r
+\r
+FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()\r
+{\r
+ SessionPtr aMgr = ModelAPI_Session::get();\r
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorTransform",\r
+ new FeaturesPlugin_ValidatorTransform);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorCompositeLauncher",\r
+ new FeaturesPlugin_ValidatorCompositeLauncher);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorBaseForGeneration",\r
+ new FeaturesPlugin_ValidatorBaseForGeneration);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPipeLocations",\r
+ new FeaturesPlugin_ValidatorPipeLocations);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorExtrusionDir",\r
+ new FeaturesPlugin_ValidatorExtrusionDir);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorBooleanSelection",\r
+ new FeaturesPlugin_ValidatorBooleanSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPartitionSelection",\r
+ new FeaturesPlugin_ValidatorPartitionSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesSelection",\r
+ new FeaturesPlugin_ValidatorRemoveSubShapesSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorRemoveSubShapesResult",\r
+ new FeaturesPlugin_ValidatorRemoveSubShapesResult);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorPipePath",\r
+ new FeaturesPlugin_ValidatorPipePath);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorUnionSelection",\r
+ new FeaturesPlugin_ValidatorUnionSelection);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorUnionArguments",\r
+ new FeaturesPlugin_ValidatorUnionArguments);\r
+ aFactory->registerValidator("FeaturesPlugin_ValidatorConcealedResult",\r
+ new FeaturesPlugin_ValidatorConcealedResult);\r
+\r
+ // register this plugin\r
+ ModelAPI_Session::get()->registerPlugin(this);\r
+}\r
+\r
+FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)\r
+{\r
+ if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Extrusion);\r
+ } else if (theFeatureID == FeaturesPlugin_Revolution::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Revolution);\r
+ } else if (theFeatureID == FeaturesPlugin_Rotation::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Rotation);\r
+ } else if (theFeatureID == FeaturesPlugin_Translation::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Translation);\r
+ } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Boolean);\r
+ } else if (theFeatureID == FeaturesPlugin_Group::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Group);\r
+ } else if (theFeatureID == FeaturesPlugin_Intersection::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Intersection);\r
+ } else if (theFeatureID == FeaturesPlugin_Partition::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Partition);\r
+ } else if (theFeatureID == FeaturesPlugin_Pipe::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Pipe);\r
+ } else if (theFeatureID == FeaturesPlugin_Placement::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Placement);\r
+ } else if (theFeatureID == FeaturesPlugin_Recover::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Recover);\r
+ } else if (theFeatureID == FeaturesPlugin_ExtrusionCut::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_ExtrusionCut);\r
+ } else if (theFeatureID == FeaturesPlugin_ExtrusionFuse::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_ExtrusionFuse);\r
+ } else if (theFeatureID == FeaturesPlugin_RevolutionCut::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RevolutionCut);\r
+ } else if (theFeatureID == FeaturesPlugin_RevolutionFuse::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RevolutionFuse);\r
+ } else if (theFeatureID == FeaturesPlugin_RemoveSubShapes::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_RemoveSubShapes);\r
+ } else if (theFeatureID == FeaturesPlugin_Union::ID()) {\r
+ return FeaturePtr(new FeaturesPlugin_Union);\r
+ }\r
+\r
+ // feature of such kind is not found\r
+ return FeaturePtr();\r
+}\r