Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crash fix: mirror (line, axis of sketch), select with rectangle, delete
[modules/shaper.git]
/
src
/
ConstructionPlugin
/
ConstructionPlugin_Plugin.cpp
diff --git
a/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
b/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
index fd5db868fc7443bf50cd3b982f2a15c7b5fa291f..c60c022b4311028afd31a9c801159ed0d1158822 100644
(file)
--- a/
src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
+++ b/
src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
@@
-1,5
+1,11
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
#include "ConstructionPlugin_Plugin.h"
#include "ConstructionPlugin_Point.h"
#include "ConstructionPlugin_Plugin.h"
#include "ConstructionPlugin_Point.h"
+#include "ConstructionPlugin_Axis.h"
+#include "ConstructionPlugin_Plane.h"
+
+#include <Config_PropManager.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Document.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Document.h>
@@
-7,19
+13,29
@@
using namespace std;
// the only created instance of this plugin
using namespace std;
// the only created instance of this plugin
-static ConstructionPlugin_Plugin* MY_INSTANCE = new ConstructionPlugin_Plugin();
+static ConstructionPlugin_Plugin* MY_
CONSTRUCTION_
INSTANCE = new ConstructionPlugin_Plugin();
ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
{
// register this plugin
ModelAPI_Session::get()->registerPlugin(this);
ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
{
// register this plugin
ModelAPI_Session::get()->registerPlugin(this);
+
+ // register construction properties
+ Config_PropManager::registerProp("Visualization", "construction_plane_color", "Construction plane color",
+ Config_Prop::Color, ConstructionPlugin_Plane::DEFAULT_COLOR());
}
FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
{
}
FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
{
- if (theFeatureID == C
ONSTRUCTION_POINT_KIND
) {
+ if (theFeatureID == C
onstructionPlugin_Point::ID()
) {
return FeaturePtr(new ConstructionPlugin_Point);
}
return FeaturePtr(new ConstructionPlugin_Point);
}
+ else if (theFeatureID == ConstructionPlugin_Axis::ID()) {
+ return FeaturePtr(new ConstructionPlugin_Axis);
+ }
+ else if (theFeatureID == ConstructionPlugin_Plane::ID()) {
+ return FeaturePtr(new ConstructionPlugin_Plane);
+ }
// feature of such kind is not found
return FeaturePtr();
}
// feature of such kind is not found
return FeaturePtr();
}