]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' into cgt/devCEA
authorClarisse Genrault <clarisse.genrault@cea.fr>
Thu, 26 Jan 2017 07:12:47 +0000 (08:12 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Thu, 26 Jan 2017 07:12:47 +0000 (08:12 +0100)
40 files changed:
src/FeaturesAPI/CMakeLists.txt
src/FeaturesAPI/FeaturesAPI.i
src/FeaturesAPI/FeaturesAPI_Scale.cpp [new file with mode: 0644]
src/FeaturesAPI/FeaturesAPI_Scale.h [new file with mode: 0644]
src/FeaturesAPI/FeaturesAPI_Symmetry.cpp
src/FeaturesAPI/FeaturesAPI_swig.h
src/FeaturesAPI/Test/APIParam_Scale.py [new file with mode: 0644]
src/FeaturesAPI/Test/APIParam_Symmetry.py
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/FeaturesPlugin_Plugin.cpp
src/FeaturesPlugin/FeaturesPlugin_Scale.cpp [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_Scale.h [new file with mode: 0644]
src/FeaturesPlugin/FeaturesPlugin_Symmetry.cpp
src/FeaturesPlugin/FeaturesPlugin_Symmetry.h
src/FeaturesPlugin/icons/SVG/scale.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/scale_dimensions_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/scale_factor_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/symmetry.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/symmetry_axis_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/symmetry_plane_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/symmetry_point_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/translation.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/translation_2pt_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/translation_dxyz_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/SVG/translation_vector_32x32.svg [new file with mode: 0644]
src/FeaturesPlugin/icons/scale.png [new file with mode: 0644]
src/FeaturesPlugin/icons/scale_dimensions_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/icons/scale_factor_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/plugin-Features.xml
src/FeaturesPlugin/scale_widget.xml [new file with mode: 0644]
src/GeomAlgoAPI/CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_Scale.cpp [new file with mode: 0644]
src/GeomAlgoAPI/GeomAlgoAPI_Scale.h [new file with mode: 0644]
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h
src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.h
src/GeomAlgoAPI/GeomAlgoAPI_Translation.cpp
src/GeomAlgoAPI/Test/TestAPI_Scale.py [new file with mode: 0644]
src/PythonAPI/model/features/__init__.py

index e109499003f091b13e5d938c0baec7ba82d6e6c5..af088777a46c35ddc485c40ebfa18b4d3bc4de81 100644 (file)
@@ -17,6 +17,7 @@ SET(PROJECT_HEADERS
   FeaturesAPI_Revolution.h
   FeaturesAPI_RevolutionBoolean.h
   FeaturesAPI_Rotation.h
+  FeaturesAPI_Scale.h
   FeaturesAPI_Symmetry.h
   FeaturesAPI_Translation.h
   FeaturesAPI_Union.h
@@ -35,6 +36,7 @@ SET(PROJECT_SOURCES
   FeaturesAPI_Revolution.cpp
   FeaturesAPI_RevolutionBoolean.cpp
   FeaturesAPI_Rotation.cpp
+  FeaturesAPI_Scale.cpp
   FeaturesAPI_Symmetry.cpp
   FeaturesAPI_Translation.cpp
   FeaturesAPI_Union.cpp
@@ -94,5 +96,6 @@ INSTALL(TARGETS _FeaturesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
 INSTALL(TARGETS FeaturesAPI DESTINATION ${SHAPER_INSTALL_BIN})
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/FeaturesAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
 
-ADD_UNIT_TESTS(APIParam_Symmetry.py
+ADD_UNIT_TESTS(APIParam_Scale.py
+               APIParam_Symmetry.py
                APIParam_Translation.py)
\ No newline at end of file
index 68817ec5f468a322202c715ef12d252de07dc840..9a0ff26becc71e059869150cd07de6cc42d9fa4e 100644 (file)
@@ -35,6 +35,7 @@
 %shared_ptr(FeaturesAPI_RevolutionCut)
 %shared_ptr(FeaturesAPI_RevolutionFuse)
 %shared_ptr(FeaturesAPI_Rotation)
+%shared_ptr(FeaturesAPI_Scale)
 %shared_ptr(FeaturesAPI_Symmetry)
 %shared_ptr(FeaturesAPI_Translation)
 %shared_ptr(FeaturesAPI_Union)
@@ -52,6 +53,7 @@
 %include "FeaturesAPI_Revolution.h"
 %include "FeaturesAPI_RevolutionBoolean.h"
 %include "FeaturesAPI_Rotation.h"
+%include "FeaturesAPI_Scale.h"
 %include "FeaturesAPI_Symmetry.h"
 %include "FeaturesAPI_Translation.h"
 %include "FeaturesAPI_Union.h"
diff --git a/src/FeaturesAPI/FeaturesAPI_Scale.cpp b/src/FeaturesAPI/FeaturesAPI_Scale.cpp
new file mode 100644 (file)
index 0000000..e80f3b4
--- /dev/null
@@ -0,0 +1,144 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+// File:        FeaturesAPI_Scale.cpp
+// Created:     24 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#include "FeaturesAPI_Scale.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Tools.h>
+
+//==================================================================================================
+FeaturesAPI_Scale::FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+  initialize();
+}
+
+//==================================================================================================
+FeaturesAPI_Scale::FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                     const std::list<ModelHighAPI_Selection>& theMainObjects,
+                                     const ModelHighAPI_Selection& theCenterPoint,
+                                     const ModelHighAPI_Double& theScaleFactor)
+: ModelHighAPI_Interface(theFeature)
+{
+  if (initialize()) {
+    fillAttribute(theMainObjects, mainObjects());
+    fillAttribute(theCenterPoint, centerPoint());
+    setScaleFactor(theScaleFactor);
+  }
+}
+
+//==================================================================================================
+FeaturesAPI_Scale::FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                                     const std::list<ModelHighAPI_Selection>& theMainObjects,
+                                     const ModelHighAPI_Selection& theCenterPoint,
+                                     const ModelHighAPI_Double& theScaleFactorX,
+                                     const ModelHighAPI_Double& theScaleFactorY,
+                                     const ModelHighAPI_Double& theScaleFactorZ)
+: ModelHighAPI_Interface(theFeature)
+{
+  if (initialize()) {
+    fillAttribute(theMainObjects, mainObjects());
+    fillAttribute(theCenterPoint, centerPoint());
+    setDimensions(theScaleFactorX, theScaleFactorY, theScaleFactorZ);
+  }
+}
+
+//==================================================================================================
+FeaturesAPI_Scale::~FeaturesAPI_Scale()
+{
+}
+
+//==================================================================================================
+void FeaturesAPI_Scale::setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects)
+{
+  fillAttribute(theMainObjects, mainObjects());
+  execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_Scale::setCenterPoint(const ModelHighAPI_Selection& theCenterPoint)
+{
+  fillAttribute(theCenterPoint, centerPoint());
+  execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_Scale::setScaleFactor(const ModelHighAPI_Double& theScaleFactor)
+{
+  fillAttribute(FeaturesPlugin_Scale::CREATION_METHOD_BY_FACTOR(), creationMethod());
+  fillAttribute(theScaleFactor, scaleFactor());
+  execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_Scale::setDimensions(const ModelHighAPI_Double& theScaleFactorX,
+                                      const ModelHighAPI_Double& theScaleFactorY,
+                                      const ModelHighAPI_Double& theScaleFactorZ)
+{
+  fillAttribute(FeaturesPlugin_Scale::CREATION_METHOD_BY_DIMENSIONS(), creationMethod());
+  fillAttribute(theScaleFactorX, scaleFactorX());
+  fillAttribute(theScaleFactorY, scaleFactorY());
+  fillAttribute(theScaleFactorZ, scaleFactorZ());
+  execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_Scale::dump(ModelHighAPI_Dumper& theDumper) const
+{
+  FeaturePtr aBase = feature();
+  const std::string& aDocName = theDumper.name(aBase->document());
+
+  AttributeSelectionListPtr anAttrObjects =
+    aBase->selectionList(FeaturesPlugin_Scale::OBJECTS_LIST_ID());
+  theDumper << aBase << " = model.addScale(" << aDocName << ", " << anAttrObjects;
+
+  AttributeSelectionPtr anAttrPoint =
+    aBase->selection(FeaturesPlugin_Scale::CENTER_POINT_ID());
+  theDumper << " , " << anAttrPoint;
+
+  std::string aCreationMethod =
+    aBase->string(FeaturesPlugin_Scale::CREATION_METHOD())->value();
+
+  if (aCreationMethod == FeaturesPlugin_Scale::CREATION_METHOD_BY_FACTOR()) {
+    AttributeDoublePtr anAttrScaleFactor =
+      aBase->real(FeaturesPlugin_Scale::SCALE_FACTOR_ID());
+    theDumper << ", " << anAttrScaleFactor;
+  } else if (aCreationMethod == FeaturesPlugin_Scale::CREATION_METHOD_BY_DIMENSIONS()) {
+    AttributeDoublePtr anAttrScaleFactorX =
+      aBase->real(FeaturesPlugin_Scale::SCALE_FACTOR_X_ID());
+    AttributeDoublePtr anAttrScaleFactorY =
+      aBase->real(FeaturesPlugin_Scale::SCALE_FACTOR_Y_ID());
+    AttributeDoublePtr anAttrScaleFactorZ =
+      aBase->real(FeaturesPlugin_Scale::SCALE_FACTOR_Z_ID());
+    theDumper << ", " << anAttrScaleFactorX << " , " << anAttrScaleFactorY;
+    theDumper << ", " << anAttrScaleFactorZ;
+  }
+
+  theDumper << ")" << std::endl;
+}
+
+//==================================================================================================
+ScalePtr addScale(const std::shared_ptr<ModelAPI_Document>& thePart,
+                  const std::list<ModelHighAPI_Selection>& theMainObjects,
+                  const ModelHighAPI_Selection& theCenterPoint,
+                  const ModelHighAPI_Double& theScaleFactor)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Scale::ID());
+  return ScalePtr(new FeaturesAPI_Scale(aFeature, theMainObjects, theCenterPoint, theScaleFactor));
+}
+
+//==================================================================================================
+ScalePtr addScale(const std::shared_ptr<ModelAPI_Document>& thePart,
+                  const std::list<ModelHighAPI_Selection>& theMainObjects,
+                  const ModelHighAPI_Selection& theCenterPoint,
+                  const ModelHighAPI_Double& theScaleFactorX,
+                  const ModelHighAPI_Double& theScaleFactorY,
+                  const ModelHighAPI_Double& theScaleFactorZ)
+{
+  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Scale::ID());
+  return ScalePtr(new FeaturesAPI_Scale(aFeature, theMainObjects, theCenterPoint,
+                  theScaleFactorX, theScaleFactorY, theScaleFactorZ));
+}
\ No newline at end of file
diff --git a/src/FeaturesAPI/FeaturesAPI_Scale.h b/src/FeaturesAPI/FeaturesAPI_Scale.h
new file mode 100644 (file)
index 0000000..d53ff17
--- /dev/null
@@ -0,0 +1,112 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+// File:        FeaturesAPI_Scale.h
+// Created:     24 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#ifndef FEATURESAPI_SCALE_H_
+#define FEATURESAPI_SCALE_H_
+
+#include "FeaturesAPI.h"
+
+#include <FeaturesPlugin_Scale.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+class ModelHighAPI_Dumper;
+class ModelHighAPI_Selection;
+
+/// \class FeaturesAPI_Scale
+/// \ingroup CPPHighAPI
+/// \brief Interface for Scale feature.
+class FeaturesAPI_Scale: public ModelHighAPI_Interface
+{
+public:
+  /// Constructor without values.
+  FEATURESAPI_EXPORT
+  explicit FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+  /// Constructor with values.
+  FEATURESAPI_EXPORT
+  explicit FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                             const std::list<ModelHighAPI_Selection>& theMainObjects,
+                             const ModelHighAPI_Selection& theCenterPoint,
+                             const ModelHighAPI_Double& theScaleFactor);
+
+  /// Constructor with values.
+  FEATURESAPI_EXPORT
+  explicit FeaturesAPI_Scale(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                             const std::list<ModelHighAPI_Selection>& theMainObjects,
+                             const ModelHighAPI_Selection& theCenterPoint,
+                             const ModelHighAPI_Double& theScaleFactorX,
+                             const ModelHighAPI_Double& theScaleFactorY,
+                             const ModelHighAPI_Double& theScaleFactorZ);
+
+  /// Destructor.
+  FEATURESAPI_EXPORT
+  virtual ~FeaturesAPI_Scale();
+
+  INTERFACE_7(FeaturesPlugin_Scale::ID(),
+              creationMethod, FeaturesPlugin_Scale::CREATION_METHOD(),
+              ModelAPI_AttributeString, /** Creation method */,
+              mainObjects, FeaturesPlugin_Scale::OBJECTS_LIST_ID(),
+              ModelAPI_AttributeSelectionList, /** Main objects */,
+              centerPoint, FeaturesPlugin_Scale::CENTER_POINT_ID(),
+              ModelAPI_AttributeSelection, /** Center point */,
+              scaleFactor, FeaturesPlugin_Scale::SCALE_FACTOR_ID(),
+              ModelAPI_AttributeDouble, /** Scale factor */,
+              scaleFactorX, FeaturesPlugin_Scale::SCALE_FACTOR_X_ID(),
+              ModelAPI_AttributeDouble, /** Scale factor in X */,
+              scaleFactorY, FeaturesPlugin_Scale::SCALE_FACTOR_Y_ID(),
+              ModelAPI_AttributeDouble, /** Scale factor in Y */,
+              scaleFactorZ, FeaturesPlugin_Scale::SCALE_FACTOR_Z_ID(),
+              ModelAPI_AttributeDouble, /** Scale factor in Z */)
+
+  /// Set main objects.
+  FEATURESAPI_EXPORT
+  void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
+
+  /// Modify center_point attribute of the feature.
+  FEATURESAPI_EXPORT
+  void setCenterPoint(const ModelHighAPI_Selection& theCenterPoint);
+
+  /// Modify Creation Method and scale_factor attribute of the feature.
+  FEATURESAPI_EXPORT
+  void setScaleFactor(const ModelHighAPI_Double& theScaleFactor);
+
+  /// Modify Creation Method and scale_factor_x, scale_factor_y and scale_factor_z
+  /// attributes of the feature.
+  FEATURESAPI_EXPORT
+  void setDimensions(const ModelHighAPI_Double& theScaleFactorX,
+                     const ModelHighAPI_Double& theScaleFactorY,
+                     const ModelHighAPI_Double& theScaleFactorZ);
+
+  /// Dump wrapped feature
+  FEATURESAPI_EXPORT
+  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer on Scale object.
+typedef std::shared_ptr<FeaturesAPI_Scale> ScalePtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create Scale feature.
+FEATURESAPI_EXPORT
+ScalePtr addScale(const std::shared_ptr<ModelAPI_Document>& thePart,
+                  const std::list<ModelHighAPI_Selection>& theMainObjects,
+                  const ModelHighAPI_Selection& theCenterPoint,
+                  const ModelHighAPI_Double& theScaleFactor);
+
+/// \ingroup CPPHighAPI
+/// \brief Create Scale feature.
+FEATURESAPI_EXPORT
+ScalePtr addScale(const std::shared_ptr<ModelAPI_Document>& thePart,
+                  const std::list<ModelHighAPI_Selection>& theMainObjects,
+                  const ModelHighAPI_Selection& theCenterPoint,
+                  const ModelHighAPI_Double& theScaleFactorX,
+                  const ModelHighAPI_Double& theScaleFactorY,
+                  const ModelHighAPI_Double& theScaleFactorZ);
+
+#endif // FEATURESAPI_SCALE_H_
\ No newline at end of file
index 24a41f3f13316df8a42577b811f1aaafdac25485..36888ef3e37ce03be2bc23df5dbb3124f65c3f43 100644 (file)
@@ -10,8 +10,7 @@
 #include <ModelHighAPI_Tools.h>
 
 //==================================================================================================
-FeaturesAPI_Symmetry::FeaturesAPI_Symmetry(
-  const std::shared_ptr<ModelAPI_Feature>& theFeature)
+FeaturesAPI_Symmetry::FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature)
 : ModelHighAPI_Interface(theFeature)
 {
   initialize();
@@ -24,7 +23,7 @@ FeaturesAPI_Symmetry::FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Featur
 : ModelHighAPI_Interface(theFeature)
 {
   if(initialize()) {
-    fillAttribute(theMainObjects, mymainObjects);
+    fillAttribute(theMainObjects, mainObjects());
     GeomAPI_Shape::ShapeType aType = getShapeType(theObject);
     if(aType == GeomAPI_Shape::VERTEX) {
       setPoint(theObject);
@@ -39,7 +38,6 @@ FeaturesAPI_Symmetry::FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Featur
 //==================================================================================================
 FeaturesAPI_Symmetry::~FeaturesAPI_Symmetry()
 {
-
 }
 
 //==================================================================================================
@@ -81,7 +79,6 @@ void FeaturesAPI_Symmetry::setPlane(const ModelHighAPI_Selection& thePlaneObject
 //==================================================================================================
 void FeaturesAPI_Symmetry::dump(ModelHighAPI_Dumper& theDumper) const
 {
-  std::cout << "DUMP SYMMETRY" << std::endl;
   FeaturePtr aBase = feature();
   const std::string& aDocName = theDumper.name(aBase->document());
 
@@ -106,7 +103,7 @@ void FeaturesAPI_Symmetry::dump(ModelHighAPI_Dumper& theDumper) const
     theDumper << ", " << anAttrPlane;
   }
 
-   theDumper << ")" << std::endl;
+  theDumper << ")" << std::endl;
 }
 
 //==================================================================================================
index cb100d4c4f273554ccf09c53b4afa68b3b2c588a..35a794d38406e00c935bce28f2ca134f65707a20 100644 (file)
@@ -22,6 +22,7 @@
   #include "FeaturesAPI_Revolution.h"
   #include "FeaturesAPI_RevolutionBoolean.h"
   #include "FeaturesAPI_Rotation.h"
+  #include "FeaturesAPI_Scale.h"
   #include "FeaturesAPI_Symmetry.h"
   #include "FeaturesAPI_Translation.h"
   #include "FeaturesAPI_Union.h"
diff --git a/src/FeaturesAPI/Test/APIParam_Scale.py b/src/FeaturesAPI/Test/APIParam_Scale.py
new file mode 100644 (file)
index 0000000..f0a33e0
--- /dev/null
@@ -0,0 +1,37 @@
+"""
+Test case for Scale feature. 
+Written on High API.
+"""
+from ModelAPI import *
+from GeomAPI import *
+
+from salome.shaper import model
+
+# Get session
+aSession = ModelAPI_Session.get()
+
+# Create a part
+aDocument = aSession.activeDocument()
+aSession.startOperation()
+model.addPart(aDocument)
+aDocument = aSession.activeDocument()
+aSession.finishOperation()
+
+# Create a box
+aSession.startOperation()
+aCenterPoint = model.addPoint(aDocument, 20, 20, 0).result()
+aBox1 =  model.addBox(aDocument, 10, 10, 10)
+aBox2 =  model.addBox(aDocument, 10, 10, 10)
+aSession.finishOperation()
+
+# Perform a symmetry by a point
+aSession.startOperation()
+aScale1 = model.addScale(aDocument, [model.selection("SOLID", "Box_1_1")], aCenterPoint, 2.0).result()
+aSession.finishOperation()
+assert (aScale1 is not None)
+
+# Perform a symmetry by an axis
+aSession.startOperation()
+aScale2 = model.addScale(aDocument, [model.selection("SOLID", "Box_2_1")], aCenterPoint, -0.5, 2, 3.7).result()
+aSession.finishOperation()
+assert (aScale2 is not None)
\ No newline at end of file
index dcf822b1947167ddd55d5c4f3d52145c4b1fd843..97aca11e83670fcdfd30cbef1e924edde213ba6a 100644 (file)
@@ -1,5 +1,5 @@
 """
-Test case for Translation feature. 
+Test case for Symmetry feature. 
 Written on High API.
 """
 from ModelAPI import *
@@ -18,11 +18,11 @@ aDocument = aSession.activeDocument()
 aSession.finishOperation()
 
 # Create a box
-
 aSession.startOperation()
 aBox1 =  model.addBox(aDocument, 10, 10, 10)
 aBox2 =  model.addBox(aDocument, 10, 10, 10)
 aBox3 =  model.addBox(aDocument, 10, 10, 10)
+aSession.finishOperation()
 
 # Perform a symmetry by a point
 aSession.startOperation()
index 42e4c363b892337214a612e463621209fbe8c003..f04d203ab579a3da0f0daa8db6087b0819c3b751 100644 (file)
@@ -30,6 +30,7 @@ SET(PROJECT_HEADERS
     FeaturesPlugin_RemoveSubShapes.h
     FeaturesPlugin_Tools.h
     FeaturesPlugin_Symmetry.h
+    FeaturesPlugin_Scale.h
 )
 
 SET(PROJECT_SOURCES
@@ -58,6 +59,7 @@ SET(PROJECT_SOURCES
     FeaturesPlugin_RemoveSubShapes.cpp
     FeaturesPlugin_Tools.cpp
     FeaturesPlugin_Symmetry.cpp
+    FeaturesPlugin_Scale.cpp
 )
 
 SET(XML_RESOURCES
@@ -79,6 +81,7 @@ SET(XML_RESOURCES
   remove_subshapes_widget.xml
   union_widget.xml
   symmetry_widget.xml
+  scale_widget.xml
 )
 
 SET(TEXT_RESOURCES
index 89f735cf17c02791d371c91b126a835b81de56d7..4f1344b1d948c312cb220d3a4e670cb2a6e0f0a2 100644 (file)
 #include <FeaturesPlugin_RevolutionCut.h>
 #include <FeaturesPlugin_RevolutionFuse.h>
 #include <FeaturesPlugin_Rotation.h>
+#include <FeaturesPlugin_Scale.h>
+#include <FeaturesPlugin_Symmetry.h>
 #include <FeaturesPlugin_Union.h>
 #include <FeaturesPlugin_ValidatorTransform.h>
 #include <FeaturesPlugin_Validators.h>
-#include <FeaturesPlugin_Symmetry.h>
 
 #include <ModelAPI_Session.h>
 
@@ -102,6 +103,8 @@ FeaturePtr FeaturesPlugin_Plugin::createFeature(std::string theFeatureID)
     return FeaturePtr(new FeaturesPlugin_Union);
   } else if (theFeatureID == FeaturesPlugin_Symmetry::ID()) {
     return FeaturePtr(new FeaturesPlugin_Symmetry);
+  } else if (theFeatureID == FeaturesPlugin_Scale::ID()) {
+    return FeaturePtr(new FeaturesPlugin_Scale);
   }
 
   // feature of such kind is not found
diff --git a/src/FeaturesPlugin/FeaturesPlugin_Scale.cpp b/src/FeaturesPlugin/FeaturesPlugin_Scale.cpp
new file mode 100644 (file)
index 0000000..ee82f61
--- /dev/null
@@ -0,0 +1,267 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File:        FeaturesPlugin_Scale.cpp
+// Created:     13 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#include <FeaturesPlugin_Scale.h>
+
+#include <GeomAlgoAPI_PointBuilder.h>
+
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_ResultPart.h>
+
+//=================================================================================================
+FeaturesPlugin_Scale::FeaturesPlugin_Scale()
+{
+}
+
+//=================================================================================================
+void FeaturesPlugin_Scale::initAttributes()
+{
+  data()->addAttribute(FeaturesPlugin_Scale::CREATION_METHOD(),
+                       ModelAPI_AttributeString::typeId());
+
+  AttributeSelectionListPtr aSelection =
+    std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
+    FeaturesPlugin_Scale::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
+
+  data()->addAttribute(FeaturesPlugin_Scale::CENTER_POINT_ID(),
+                       ModelAPI_AttributeSelection::typeId());
+
+  data()->addAttribute(FeaturesPlugin_Scale::SCALE_FACTOR_ID(),
+                       ModelAPI_AttributeDouble::typeId());
+
+  data()->addAttribute(FeaturesPlugin_Scale::SCALE_FACTOR_X_ID(),
+                       ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(FeaturesPlugin_Scale::SCALE_FACTOR_Y_ID(),
+                       ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(FeaturesPlugin_Scale::SCALE_FACTOR_Z_ID(),
+                       ModelAPI_AttributeDouble::typeId());
+}
+
+//=================================================================================================
+void FeaturesPlugin_Scale::execute()
+{
+  AttributeStringPtr aMethodTypeAttr = string(FeaturesPlugin_Scale::CREATION_METHOD());
+  std::string aMethodType = aMethodTypeAttr->value();
+
+  if (aMethodType == FeaturesPlugin_Scale::CREATION_METHOD_BY_FACTOR()) {
+    performScaleByFactor();
+  }
+
+  if (aMethodType == FeaturesPlugin_Scale::CREATION_METHOD_BY_DIMENSIONS()) {
+    performScaleByDimensions();
+  }
+}
+
+//=================================================================================================
+void FeaturesPlugin_Scale::performScaleByFactor()
+{
+  // Getting objects.
+  ListOfShape anObjects;
+  std::list<ResultPtr> aContextes;
+  AttributeSelectionListPtr anObjectsSelList =
+    selectionList(FeaturesPlugin_Scale::OBJECTS_LIST_ID());
+  if (anObjectsSelList->size() == 0) {
+    return;
+  }
+  for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
+      anObjectsSelList->value(anObjectsIndex);
+    std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
+    if(!anObject.get()) { // may be for not-activated parts
+      eraseResults();
+      return;
+    }
+    anObjects.push_back(anObject);
+    aContextes.push_back(anObjectAttr->context());
+  }
+
+  // Getting the center point
+  std::shared_ptr<GeomAPI_Pnt> aCenterPoint;
+  std::shared_ptr<ModelAPI_AttributeSelection> anObjRef =
+    selection(FeaturesPlugin_Scale::CENTER_POINT_ID());
+  if (anObjRef.get() != NULL) {
+    GeomShapePtr aShape = anObjRef->value();
+    if (!aShape.get()) {
+      aShape = anObjRef->context()->shape();
+    }
+    if (aShape) {
+      aCenterPoint = GeomAlgoAPI_PointBuilder::point(aShape);
+    }
+  }
+
+  // Getting scale factor
+  double aScaleFactor = real(FeaturesPlugin_Scale::SCALE_FACTOR_ID())->value();
+
+  // Moving each object.
+  int aResultIndex = 0;
+  std::list<ResultPtr>::iterator aContext = aContextes.begin();
+  for(ListOfShape::iterator anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end();
+        anObjectsIt++, aContext++) {
+    std::shared_ptr<GeomAPI_Shape> aBaseShape = *anObjectsIt;
+    bool isPart = (*aContext)->groupName() == ModelAPI_ResultPart::group();
+
+    // Setting result.
+    if (isPart) {
+      std::shared_ptr<GeomAPI_Trsf> aTrsf(new GeomAPI_Trsf());
+      //aTrsf->setSymmetry(anAxis);
+      ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
+      ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
+      aResultPart->setTrsf(*aContext, aTrsf);
+      setResult(aResultPart, aResultIndex);
+    } else {
+      GeomAlgoAPI_Scale aScaleAlgo(aBaseShape, aCenterPoint, aScaleFactor);
+
+      if (!aScaleAlgo.check()) {
+        setError(aScaleAlgo.getError());
+        return;
+      }
+
+      aScaleAlgo.build();
+
+      // Checking that the algorithm worked properly.
+      if(!aScaleAlgo.isDone()) {
+        static const std::string aFeatureError = "Error: Symmetry algorithm failed.";
+        setError(aFeatureError);
+        break;
+      }
+      if(aScaleAlgo.shape()->isNull()) {
+        static const std::string aShapeError = "Error: Resulting shape is Null.";
+        setError(aShapeError);
+        break;
+      }
+      if(!aScaleAlgo.isValid()) {
+        std::string aFeatureError = "Error: Resulting shape is not valid.";
+        setError(aFeatureError);
+        break;
+      }
+
+      ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
+      loadNamingDS(aScaleAlgo, aResultBody, aBaseShape);
+      setResult(aResultBody, aResultIndex);
+    }
+    aResultIndex++;
+  }
+
+  // Remove the rest results if there were produced in the previous pass.
+  removeResults(aResultIndex);
+}
+
+//=================================================================================================
+void FeaturesPlugin_Scale::performScaleByDimensions()
+{
+  // Getting objects.
+  ListOfShape anObjects;
+  std::list<ResultPtr> aContextes;
+  AttributeSelectionListPtr anObjectsSelList =
+    selectionList(FeaturesPlugin_Scale::OBJECTS_LIST_ID());
+  if (anObjectsSelList->size() == 0) {
+    return;
+  }
+  for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
+    std::shared_ptr<ModelAPI_AttributeSelection> anObjectAttr =
+      anObjectsSelList->value(anObjectsIndex);
+    std::shared_ptr<GeomAPI_Shape> anObject = anObjectAttr->value();
+    if(!anObject.get()) { // may be for not-activated parts
+      eraseResults();
+      return;
+    }
+    anObjects.push_back(anObject);
+    aContextes.push_back(anObjectAttr->context());
+  }
+
+  // Getting the center point
+  std::shared_ptr<GeomAPI_Pnt> aCenterPoint;
+  std::shared_ptr<ModelAPI_AttributeSelection> anObjRef =
+    selection(FeaturesPlugin_Scale::CENTER_POINT_ID());
+  if (anObjRef.get() != NULL) {
+    GeomShapePtr aShape = anObjRef->value();
+    if (!aShape.get()) {
+      aShape = anObjRef->context()->shape();
+    }
+    if (aShape) {
+      aCenterPoint = GeomAlgoAPI_PointBuilder::point(aShape);
+    }
+  }
+
+  // Getting dimensions
+  double aScaleFactorX = real(FeaturesPlugin_Scale::SCALE_FACTOR_X_ID())->value();
+  double aScaleFactorY = real(FeaturesPlugin_Scale::SCALE_FACTOR_Y_ID())->value();
+  double aScaleFactorZ = real(FeaturesPlugin_Scale::SCALE_FACTOR_Z_ID())->value();
+
+  // Moving each object.
+  int aResultIndex = 0;
+  std::list<ResultPtr>::iterator aContext = aContextes.begin();
+  for(ListOfShape::iterator anObjectsIt = anObjects.begin(); anObjectsIt != anObjects.end();
+        anObjectsIt++, aContext++) {
+    std::shared_ptr<GeomAPI_Shape> aBaseShape = *anObjectsIt;
+    bool isPart = (*aContext)->groupName() == ModelAPI_ResultPart::group();
+
+    // Setting result.
+    if (isPart) {
+      std::shared_ptr<GeomAPI_Trsf> aTrsf(new GeomAPI_Trsf());
+      //aTrsf->setSymmetry(anAxis);
+      ResultPartPtr anOrigin = std::dynamic_pointer_cast<ModelAPI_ResultPart>(*aContext);
+      ResultPartPtr aResultPart = document()->copyPart(anOrigin, data(), aResultIndex);
+      aResultPart->setTrsf(*aContext, aTrsf);
+      setResult(aResultPart, aResultIndex);
+    } else {
+      GeomAlgoAPI_Scale aScaleAlgo(aBaseShape, aCenterPoint,
+                                   aScaleFactorX, aScaleFactorY, aScaleFactorZ);
+
+      if (!aScaleAlgo.check()) {
+        setError(aScaleAlgo.getError());
+        return;
+      }
+
+      aScaleAlgo.build();
+
+      // Checking that the algorithm worked properly.
+      if(!aScaleAlgo.isDone()) {
+        static const std::string aFeatureError = "Error: Symmetry algorithm failed.";
+        setError(aFeatureError);
+        break;
+      }
+      if(aScaleAlgo.shape()->isNull()) {
+        static const std::string aShapeError = "Error: Resulting shape is Null.";
+        setError(aShapeError);
+        break;
+      }
+      if(!aScaleAlgo.isValid()) {
+        std::string aFeatureError = "Error: Resulting shape is not valid.";
+        setError(aFeatureError);
+        break;
+      }
+
+      ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex);
+      loadNamingDS(aScaleAlgo, aResultBody, aBaseShape);
+      setResult(aResultBody, aResultIndex);
+    }
+    aResultIndex++;
+  }
+
+  // Remove the rest results if there were produced in the previous pass.
+  removeResults(aResultIndex);
+}
+
+//=================================================================================================
+void FeaturesPlugin_Scale::loadNamingDS(GeomAlgoAPI_Scale& theScaleAlgo,
+                                        std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                                        std::shared_ptr<GeomAPI_Shape> theBaseShape)
+{
+  // Store and name the result.
+  theResultBody->storeModified(theBaseShape, theScaleAlgo.shape());
+
+  // Name the faces
+  std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theScaleAlgo.mapOfSubShapes();
+  int aReflectedTag = 1;
+  std::string aReflectedName = "Scaled";
+  theResultBody->loadAndOrientModifiedShapes(&theScaleAlgo,
+                                              theBaseShape, GeomAPI_Shape::FACE,
+                                              aReflectedTag, aReflectedName, *aSubShapes.get());
+}
\ No newline at end of file
diff --git a/src/FeaturesPlugin/FeaturesPlugin_Scale.h b/src/FeaturesPlugin/FeaturesPlugin_Scale.h
new file mode 100644 (file)
index 0000000..71bf032
--- /dev/null
@@ -0,0 +1,122 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File:        FeaturesPlugin_Scale.h
+// Created:     13 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#ifndef FEATURESPLUGIN_SCALE_H_
+#define FEATURESPLUGIN_SCALE_H_
+
+#include <FeaturesPlugin.h>
+
+#include <ModelAPI_Feature.h>
+
+#include <GeomAlgoAPI_Scale.h>
+
+/** \class FeaturesPlugin_Scale
+ *  \ingroup Plugins
+ *  \brief Feature for changing the scale of an object.
+ */
+class FeaturesPlugin_Scale : public ModelAPI_Feature
+{
+ public:
+  /// Scale kind.
+  inline static const std::string& ID()
+  {
+    static const std::string MY_SCALE_ID("Scale");
+    return MY_SCALE_ID;
+  }
+
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD()
+  {
+    static const std::string MY_CREATION_METHOD_ID("CreationMethod");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for creation method "ByFactor".
+  inline static const std::string& CREATION_METHOD_BY_FACTOR()
+  {
+    static const std::string MY_CREATION_METHOD_ID("ByFactor");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for creation method "ByFactor".
+  inline static const std::string& CREATION_METHOD_BY_DIMENSIONS()
+  {
+    static const std::string MY_CREATION_METHOD_ID("ByDimensions");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name of referenced objects.
+  inline static const std::string& OBJECTS_LIST_ID()
+  {
+    static const std::string MY_OBJECTS_LIST_ID("main_objects");
+    return MY_OBJECTS_LIST_ID;
+  }
+
+  /// Attribute name of center point.
+  inline static const std::string& CENTER_POINT_ID()
+  {
+    static const std::string MY_CENTER_POINT_ID("center_point");
+    return MY_CENTER_POINT_ID;
+  }
+
+  /// Attribute name of scale factor.
+  inline static const std::string& SCALE_FACTOR_ID()
+  {
+    static const std::string MY_SCALE_FACTOR_ID("scale_factor");
+    return MY_SCALE_FACTOR_ID;
+  }
+
+  /// Attribute name of scale factor in X.
+  inline static const std::string& SCALE_FACTOR_X_ID()
+  {
+    static const std::string MY_SCALE_FACTOR_X_ID("scale_factor_x");
+    return MY_SCALE_FACTOR_X_ID;
+  }
+
+  /// Attribute name of scale factor in Y.
+  inline static const std::string& SCALE_FACTOR_Y_ID()
+  {
+    static const std::string MY_SCALE_FACTOR_Y_ID("scale_factor_y");
+    return MY_SCALE_FACTOR_Y_ID;
+  }
+
+  /// Attribute name of scale factor in Z.
+  inline static const std::string& SCALE_FACTOR_Z_ID()
+  {
+    static const std::string MY_SCALE_FACTOR_Z_ID("scale_factor_z");
+    return MY_SCALE_FACTOR_Z_ID;
+  }
+
+  /// \return the kind of a feature.
+  FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
+  {
+    static std::string MY_KIND = FeaturesPlugin_Scale::ID();
+    return MY_KIND;
+  }
+
+  /// Creates a new part document if needed.
+  FEATURESPLUGIN_EXPORT virtual void execute();
+
+  /// Request for initialization of data model of the feature: adding all attributes.
+  FEATURESPLUGIN_EXPORT virtual void initAttributes();
+
+  /// Use plugin manager for features creation.
+  FeaturesPlugin_Scale();
+
+private:
+  /// Perform scale using a central point and a value of the scale.
+  void performScaleByFactor();
+
+  /// Perform symmetry using a central point and three dimensions
+  void performScaleByDimensions();
+
+  /// Perform the naming
+  void loadNamingDS(GeomAlgoAPI_Scale& theScaleAlgo,
+                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
+                    std::shared_ptr<GeomAPI_Shape> theBaseShape);
+};
+
+#endif // FEATURESPLUGIN_SCALE_H_
\ No newline at end of file
index e38bff2e8ed32fdcf20fe24b434d9e8d9e5fcf3f..b1b34237b6821cb90bea397a4422b7c215fb7c8a 100644 (file)
@@ -6,17 +6,16 @@
 
 #include <FeaturesPlugin_Symmetry.h>
 
-#include <ModelAPI_AttributeSelectionList.h>
-#include <ModelAPI_AttributeString.h>
-#include <ModelAPI_ResultBody.h>
+#include <GeomAlgoAPI_PointBuilder.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Face.h>
 #include <GeomAPI_Lin.h>
 #include <GeomAPI_Pln.h>
 
-#include <GeomAlgoAPI_PointBuilder.h>
-
+#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
+#include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultPart.h>
 
 //=================================================================================================
index 988f58339d3eb23920e76954c00ace4f8756bac6..efa462156c464a8e4ecf09e90590a676e56b7c1c 100644 (file)
@@ -23,8 +23,8 @@ class FeaturesPlugin_Symmetry : public ModelAPI_Feature
   /// Symmetry kind.
   inline static const std::string& ID()
   {
-    static const std::string MY_SYMMETRY("Symmetry");
-    return MY_SYMMETRY;
+    static const std::string MY_SYMMETRY_ID("Symmetry");
+    return MY_SYMMETRY_ID;
   }
 
   /// Attribute name for creation method.
@@ -34,21 +34,21 @@ class FeaturesPlugin_Symmetry : public ModelAPI_Feature
     return MY_CREATION_METHOD_ID;
   }
 
-  /// Attribute name for creation method "ByAxisAndDistance".
+  /// Attribute name for creation method "ByPoint".
   inline static const std::string& CREATION_METHOD_BY_POINT()
   {
     static const std::string MY_CREATION_METHOD_ID("ByPoint");
     return MY_CREATION_METHOD_ID;
   }
 
-  /// Attribute name for creation method "ByDimensions".
+  /// Attribute name for creation method "ByAxis".
   inline static const std::string& CREATION_METHOD_BY_AXIS()
   {
     static const std::string MY_CREATION_METHOD_ID("ByAxis");
     return MY_CREATION_METHOD_ID;
   }
 
-  /// Attribute name for creation method "ByTwoPoints".
+  /// Attribute name for creation method "ByPlane".
   inline static const std::string& CREATION_METHOD_BY_PLANE()
   {
     static const std::string MY_CREATION_METHOD_ID("ByPlane");
@@ -100,15 +100,16 @@ class FeaturesPlugin_Symmetry : public ModelAPI_Feature
   FeaturesPlugin_Symmetry();
 
 private:
-  ///Perform symmetry with respect to a point.
+  /// Perform symmetry with respect to a point.
   void performSymmetryByPoint();
 
-  ///Perform symmetry with respect to an axis.
+  /// Perform symmetry with respect to an axis.
   void performSymmetryByAxis();
 
-  ///Perform symmetry with respect to a plane.
+  /// Perform symmetry with respect to a plane.
   void performSymmetryByPlane();
 
+  /// Perform the naming
   void loadNamingDS(GeomAlgoAPI_Symmetry& theSymmetryAlgo,
                     std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                     std::shared_ptr<GeomAPI_Shape> theBaseShape);
diff --git a/src/FeaturesPlugin/icons/SVG/scale.svg b/src/FeaturesPlugin/icons/SVG/scale.svg
new file mode 100644 (file)
index 0000000..6e8d4c0
--- /dev/null
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   id="svg5187"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   viewBox="0 0 16 16"
+   sodipodi:docname="scale_cla.svg"
+   inkscape:export-filename="/export/home/cgenraul/SHAPER-CEA-FD20_64/INSTALL/SHAPER/share/salome/resources/shaper/icons/Features/scale.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs5189">
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-5">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-1">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-5-5">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7-9" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-1-2">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6-5" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-51">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-76" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-5-1">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7-2" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-1-6">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6-2" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-9">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-9" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-51-0">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-76-7" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-1-2-4">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6-5-0" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-5-5-3">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7-9-6" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-9-1">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-9-0" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-1-6-4">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6-2-8" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       id="filter5039-5-1-3">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7-2-0" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="32"
+     inkscape:cx="4.091365"
+     inkscape:cy="1.7382622"
+     inkscape:current-layer="g4157"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1110"
+     inkscape:window-x="-2"
+     inkscape:window-y="32"
+     inkscape:window-maximized="1"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-grids="true"
+     inkscape:snap-global="false"
+     showborder="true"
+     inkscape:showpageshadow="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5735"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata5192">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)">
+    <g
+       transform="matrix(0.63448229,0,0,0.66946808,-4.3899484,25.170817)"
+       id="g4929">
+      <g
+         transform="matrix(1.9791667,0,0,1.7986112,14.390346,-26.351415)"
+         id="g4929-2">
+        <path
+           sodipodi:nodetypes="ccccccc"
+           style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+           id="path4836-9"
+           inkscape:connector-curvature="0" />
+        <path
+           sodipodi:nodetypes="ccccccccccc"
+           style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+           id="path4838-1"
+           inkscape:connector-curvature="0" />
+      </g>
+      <g
+         id="g4157"
+         transform="matrix(1.0416667,0,0,1.138889,7.0643776,-8.1659798)">
+        <path
+           inkscape:connector-curvature="0"
+           id="path4836"
+           d="m -0.09233215,16.086036 0,-7.7540824 4.02364135,0 0,3.8770414 4.0236413,0 0,3.877041 z"
+           style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           sodipodi:nodetypes="ccccccc" />
+        <path
+           inkscape:connector-curvature="0"
+           id="path4838"
+           d="m 0.95495049,7.3729399 -1.04728264,1.1502831 4.00000005,0 0,3.781407 4,0 0,3.781406 1.5673917,-0.74042 0,-4.396201 -4.0472826,0 0.047283,-3.5764751 z"
+           style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           sodipodi:nodetypes="ccccccccccc" />
+        <path
+           style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.49498981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="M 0.43176439,5.5504343 3.0658515,2.4423037 1.9622047,1.7879886 6.0758265,0.23284672 5.6790852,3.9916072 4.5817809,3.3410498 1.9526269,6.4629967 z"
+           id="path7489"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.7043528;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+           d="m -36.429984,4.7088008 4.529681,-3.91662105 -1.330539,-1.1533572 6.117421,-1.40524255 -1.63641,5.2895453 -1.322892,-1.1467325 -4.526892,3.9373319 z"
+           id="path7489-1"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <g
+       id="g4174"
+       transform="matrix(0.98480776,0.17364818,-0.17364818,0.98480776,-36.722922,-4.2807752)">
+      <g
+         id="g4203"
+         transform="matrix(0.66631551,0.12829473,-0.1174894,0.72759554,20.163784,10.26169)">
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,4.642175,29.656091)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9-3"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.39999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-51-0)" />
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,5.594284,35.167226)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9-8-2"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.38157293;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-1-2-4)" />
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,3.64053,24.270381)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9-2-5"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.39999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-5-5-3)" />
+      </g>
+      <g
+         id="g4230"
+         transform="matrix(0.20877417,0.62707939,-0.70901103,0.27752298,52.430494,19.461286)"
+         style="stroke-width:0.28212538;stroke-miterlimit:4;stroke-dasharray:none">
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,12.700519,36.485529)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.3805601;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-9-1)" />
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,13.652628,41.996664)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9-8"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.3805601;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-1-6-4)" />
+        <rect
+           transform="matrix(1.2338926,-0.21756856,0.17138179,0.97195444,11.698874,31.099819)"
+           y="0.19999999"
+           x="0.19999999"
+           height="3.7633102"
+           width="1.4661478"
+           id="rect4199-9-2"
+           style="fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.3805601;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:16.58592415;filter:url(#filter5039-5-1-3)" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/scale_dimensions_32x32.svg b/src/FeaturesPlugin/icons/SVG/scale_dimensions_32x32.svg
new file mode 100644 (file)
index 0000000..f017244
--- /dev/null
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg5924"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="scale_along_axes_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/scale_along_axes_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs5926" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="3.866323"
+     inkscape:cy="13.387727"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:snap-object-midpoints="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid6472" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata5929">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <circle
+       style="opacity:1;fill:#b7d9ea;fill-opacity:1;stroke:#1b4955;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path6474"
+       cx="8.7674179"
+       cy="18.544161"
+       r="3.0553663" />
+    <g
+       transform="translate(0,17)"
+       id="g4195-7">
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-4"
+         d="m 0.5,14.5 3,-3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-3-4"
+         d="m 0.5,11.5 3,3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <ellipse
+       style="opacity:1;fill:#b7d9ea;fill-opacity:1;stroke:#1b4955;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path6474-4"
+       cx="19.151121"
+       cy="4.3449473"
+       rx="11.427674"
+       ry="2.8569186" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0"
+       d="M 7,4 2,30"
+       id="path6584"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2,1;stroke-dashoffset:0"
+       d="M 31,5 2,30"
+       id="path6586"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/scale_factor_32x32.svg b/src/FeaturesPlugin/icons/SVG/scale_factor_32x32.svg
new file mode 100644 (file)
index 0000000..39c7bc7
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg5924"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="scale_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/scale_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs5926" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="5.622915"
+     inkscape:cy="16.959857"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:snap-object-midpoints="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid6472" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata5929">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <circle
+       style="opacity:1;fill:#b7d9ea;fill-opacity:1;stroke:#1b4955;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path6474"
+       cx="11.491167"
+       cy="20.776743"
+       r="2.8569186" />
+    <circle
+       style="opacity:1;fill:#b7d9ea;fill-opacity:1;stroke:#1b4955;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path6474-6"
+       cx="22"
+       cy="10"
+       r="8.3168182" />
+    <g
+       transform="translate(0,17)"
+       id="g4195-7">
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-4"
+         d="m 0.5,14.5 3,-3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-3-4"
+         d="m 0.5,11.5 3,3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2,1;stroke-dashoffset:0"
+       d="M 2,30 15,4"
+       id="path6512"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:2, 1;stroke-dashoffset:0"
+       d="M 2,30 29,17"
+       id="path6514"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/symmetry.svg b/src/FeaturesPlugin/icons/SVG/symmetry.svg
new file mode 100644 (file)
index 0000000..5289921
--- /dev/null
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   id="svg4461"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 16 16"
+   sodipodi:docname="mirror.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/mirror.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4463">
+    <linearGradient
+       id="linearGradient5655"
+       osb:paint="solid">
+      <stop
+         style="stop-color:#b7d9ea;stop-opacity:1;"
+         offset="0"
+         id="stop5657" />
+    </linearGradient>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB;"
+       id="filter5035">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5037" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB;"
+       id="filter5039">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-9">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-2" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-1">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-6" />
+    </filter>
+    <filter
+       inkscape:label="Pixellize"
+       inkscape:menu="Pixel tools"
+       inkscape:menu-tooltip="Reduce or remove antialiasing around shapes"
+       style="color-interpolation-filters:sRGB"
+       id="filter5039-5">
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1000 -500 "
+         id="feColorMatrix5041-7" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="31.392433"
+     inkscape:cx="-4.1092128"
+     inkscape:cy="11.517804"
+     inkscape:current-layer="g4158-8"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     showguides="true"
+     inkscape:snap-others="false"
+     inkscape:snap-intersection-paths="true"
+     inkscape:snap-grids="true"
+     inkscape:snap-center="true"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-text-baseline="true"
+     inkscape:snap-bbox="true"
+     inkscape:showpageshadow="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5009" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4466">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       transform="matrix(-0.49742029,0,0,0.49742029,8.2527842,-1.6030794)"
+       id="g4158-8"
+       style="filter:url(#filter5039)">
+      <g
+         id="g4301"
+         transform="matrix(-1.3256586,0,0,2.5641927,-3.7882822,-11.671348)">
+        <path
+           inkscape:connector-curvature="0"
+           id="path4836-8"
+           d="m -0.04504951,16.04505 0,-8.0000005 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 z"
+           style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           sodipodi:nodetypes="ccccccc" />
+        <path
+           inkscape:connector-curvature="0"
+           id="path4838-5"
+           d="m 1.428552,7.3826719 -1.47360151,0.6623776 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 1.5,-0.642857 0,-3.857143 -3.7500001,0 0,-4.1785713 z"
+           style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           sodipodi:nodetypes="ccccccccccc" />
+      </g>
+      <g
+         id="g4309"
+         transform="matrix(-1.3187315,0,0,2.5494345,-0.86790808,-11.58368)">
+        <g
+           id="g4170">
+          <path
+             sodipodi:nodetypes="ccccccc"
+             style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+             d="m -5.6832489,16.071004 0,-8.0357147 -3.7500001,-4e-7 0,4.1785721 -3.75,0 0,3.857143 z"
+             id="path4836-3"
+             inkscape:connector-curvature="0" />
+          <path
+             style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+             d="m -13.183249,12.213861 3.7500001,0 0,-0.642857 -2.2500001,0 z"
+             id="path4305"
+             inkscape:connector-curvature="0" />
+          <path
+             style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+             d="m -9.4332489,8.0352893 1.5000001,-0.6428572 3.7500001,0 0,8.0357149 -1.5000001,0.642857 -10e-8,-8.0357147 z"
+             id="path4307"
+             inkscape:connector-curvature="0"
+             sodipodi:nodetypes="ccccccc" />
+        </g>
+      </g>
+      <path
+         style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fecc02;stroke-width:1.4545145;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4.3635436, 1.45451452999999997;stroke-dashoffset:12.06223392;stroke-opacity:1;filter:url(#filter5039)"
+         d="M 0.72725723,15.044356 0.72725723,0"
+         id="path4173-9"
+         inkscape:connector-curvature="0"
+         inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/path4173.png"
+         inkscape:export-xdpi="90"
+         inkscape:export-ydpi="90"
+         transform="matrix(-2.0103724,0,0,2.0103724,45.650125,-6.9287843)" />
+      <rect
+         style="opacity:1;fill:none;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.58592415;stroke-opacity:1"
+         id="rect4195"
+         width="4.0207438"
+         height="8.0414896"
+         x="-44.736382"
+         y="-4.8187032"
+         transform="scale(-1,1)" />
+      <rect
+         style="opacity:1;fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.39999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.58592415;stroke-opacity:1;filter:url(#filter5039)"
+         id="rect4199-9"
+         width="1.4661478"
+         height="3.7633102"
+         x="0.19999999"
+         y="0.19999999"
+         transform="matrix(-2.5188506,0,0,1.9841338,2.8134076,14.974281)" />
+      <rect
+         style="opacity:1;fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.39999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.58592415;stroke-opacity:1;filter:url(#filter5039-1)"
+         id="rect4199-9-8"
+         width="1.4661478"
+         height="3.7633102"
+         x="0.19999999"
+         y="0.19999999"
+         transform="matrix(-2.5188506,0,0,1.9841338,2.8523162,26.217772)" />
+      <rect
+         style="opacity:1;fill:#fecc02;fill-opacity:1;stroke:#000000;stroke-width:0.39999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:16.58592415;stroke-opacity:1;filter:url(#filter5039-5)"
+         id="rect4199-9-2"
+         width="1.4661478"
+         height="3.7633102"
+         x="0.19999999"
+         y="0.19999999"
+         transform="matrix(-2.5188506,0,0,1.9841338,2.9163562,3.9618184)" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/symmetry_axis_32x32.svg b/src/FeaturesPlugin/icons/SVG/symmetry_axis_32x32.svg
new file mode 100644 (file)
index 0000000..b3ec794
--- /dev/null
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4203"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="mirror_axis_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/mirror_axis_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4205" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="14.679089"
+     inkscape:cy="17.623826"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:snap-grids="true"
+     inkscape:snap-to-guides="true"
+     inkscape:snap-page="false"
+     inkscape:snap-center="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-others="true"
+     inkscape:snap-nodes="false"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-intersection-paths="true"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true"
+     inkscape:snap-midpoints="true"
+     inkscape:object-paths="true"
+     inkscape:snap-bbox="true"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4751" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4208">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:3, 1.50000000000000000;stroke-dashoffset:0"
+       d="m 16,1 0,30"
+       id="path4147"
+       inkscape:connector-curvature="0" />
+    <g
+       transform="matrix(1.3333333,0,0,3.1111109,19.767106,-20.901228)"
+       id="g4301">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 1.428552,7.3826719 -1.47360151,0.6623776 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 1.5,-0.642857 0,-3.857143 -3.7500001,0 0,-4.1785713 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.3333333,0,0,3.1111109,18.193465,-20.981012)"
+       id="g4309">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -5.6832489,16.071004 0,-8.0357147 -3.7500001,-4e-7 0,4.1785721 -3.75,0 0,3.857143 z"
+         id="path4836-3"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -13.183249,12.213861 3.7500001,0 0,-0.642857 -2.2500001,0 z"
+         id="path4305"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -9.4332489,8.0352893 1.5000001,-0.6428572 3.7500001,0 0,8.0357149 -1.5000001,0.642857 -10e-8,-8.0357147 z"
+         id="path4307"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccc" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/symmetry_plane_32x32.svg b/src/FeaturesPlugin/icons/SVG/symmetry_plane_32x32.svg
new file mode 100644 (file)
index 0000000..b335405
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4203"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="mirror_plane_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/mirror_plane_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4205" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.395604"
+     inkscape:cx="13.542949"
+     inkscape:cy="16.44338"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:snap-grids="true"
+     inkscape:snap-to-guides="true"
+     inkscape:snap-page="false"
+     inkscape:snap-center="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4751" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4208">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 22,1 14.089303,7.9916585 14,31 22.089303,23.026006 Z"
+       id="path4147"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <g
+       transform="matrix(1.3333333,0,0,3.1111109,20.077665,-20.468311)"
+       id="g4301">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 1.428552,7.3826719 -1.47360151,0.6623776 3.72360161,-0.01952 0,4.1785715 3.7500001,0 0,3.857143 1.5,-0.642857 0,-3.857143 -3.7500001,0 0,-4.1785713 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.3333333,0,0,3.1111109,17.577665,-20.498676)"
+       id="g4309">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -5.6832489,16.071004 0,-8.0357147 -3.7500001,-4e-7 0,4.1785721 -3.75,0 0,3.857143 z"
+         id="path4836-3"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -13.183249,12.213861 3.7500001,0 0,-0.642857 -2.2500001,0 z"
+         id="path4305"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.49099028px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -9.4332489,8.0352893 1.5000001,-0.6428572 3.7500001,0 0,8.0357149 -1.5000001,0.642857 -10e-8,-8.0357147 z"
+         id="path4307"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccc" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/symmetry_point_32x32.svg b/src/FeaturesPlugin/icons/SVG/symmetry_point_32x32.svg
new file mode 100644 (file)
index 0000000..e9873c7
--- /dev/null
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4203"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="mirror_point_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/mirror_point_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4205" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.627417"
+     inkscape:cx="6.2427384"
+     inkscape:cy="16.378567"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:snap-grids="true"
+     inkscape:snap-to-guides="true"
+     inkscape:snap-page="false"
+     inkscape:snap-center="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-global="true"
+     inkscape:snap-intersection-paths="false"
+     inkscape:object-nodes="true">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4751" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4208">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       transform="translate(14,3)"
+       id="g4195-7-7">
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-4-6"
+         d="m 0.5,14.5 3,-3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path7134-3-4-4"
+         d="m 0.5,11.5 3,3"
+         style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       id="g4178"
+       transform="translate(1.017599,2.499999)">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 19.017599,28.449619 0,-24.8888888 4.964802,-0.060729 0,12.9999998 5,0 0,11.999999 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 20.982401,1.5 -1.964802,2.0607302 4.964802,-0.060729 0,12.9999998 5,0 0,11.999999 2,-1.999999 0,-12 -5,0 0,-12.9999986 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="g4184"
+       transform="translate(-2,0)">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="M 12,3 12,28 7,28 7,15 2,15 2,3 Z"
+         id="path4836-3"
+         inkscape:connector-curvature="0" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4182"
+         d="M 2,3 4,1 14,1 14,26 12,28 12,3 Z"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/translation.svg b/src/FeaturesPlugin/icons/SVG/translation.svg
new file mode 100644 (file)
index 0000000..d813198
--- /dev/null
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   id="svg4923"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 16 16"
+   sodipodi:docname="translation.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/translation.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4925">
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path7361"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+         transform="scale(0.2)" />
+    </marker>
+    <linearGradient
+       id="linearGradient6717"
+       osb:paint="solid">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop6719" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6699"
+       osb:paint="solid">
+      <stop
+         style="stop-color:#fecc02;stop-opacity:1;"
+         offset="0"
+         id="stop6701" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6645"
+       osb:paint="solid">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop6647" />
+    </linearGradient>
+    <marker
+       inkscape:isstock="true"
+       style="overflow:visible"
+       id="marker4207"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutS">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.2,0.2)"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path4209" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutM"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="TriangleOutM"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5712"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.4,0.4)"
+         inkscape:connector-curvature="0" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="32"
+     inkscape:cx="-0.984375"
+     inkscape:cy="11.344192"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     showguides="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-center="true"
+     inkscape:snap-others="false"
+     inkscape:snap-nodes="false"
+     inkscape:snap-intersection-paths="true"
+     inkscape:snap-midpoints="true"
+     inkscape:showpageshadow="false"
+     inkscape:snap-grids="true"
+     inkscape:snap-bbox="false"
+     inkscape:bbox-nodes="true"
+     inkscape:snap-bbox-midpoints="true"
+     inkscape:snap-bbox-edge-midpoints="true"
+     inkscape:bbox-paths="true"
+     inkscape:object-paths="true"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true"
+     inkscape:snap-text-baseline="true"
+     inkscape:snap-page="true"
+     inkscape:snap-global="true">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5471" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4928">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     transform="translate(0,-16)">
+    <path
+       style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 0.49957001,21.372341 3.4933227,18.386114 2.6139444,17.506737 6.6570646,16.43531 5.5755299,20.468323 4.7012052,19.593997 1.7092958,22.596015 Z"
+       id="path7489"
+       inkscape:connector-curvature="0" />
+    <g
+       transform="translate(0.0450495,15.923701)"
+       id="g4929">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="translate(7.0137995,8.986201)"
+       id="g4929-5">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836-6"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838-0"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/translation_2pt_32x32.svg b/src/FeaturesPlugin/icons/SVG/translation_2pt_32x32.svg
new file mode 100644 (file)
index 0000000..b247016
--- /dev/null
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4923"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="translation_2pt_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/translation_2pt_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4925">
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;"
+       inkscape:isstock="true">
+      <path
+         id="path5576"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Sstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Sstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5579"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.2) translate(6,0)" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="DistanceEnd"
+       refX="0.0"
+       refY="0.0"
+       orient="auto"
+       inkscape:stockid="DistanceEnd"
+       inkscape:isstock="true">
+      <g
+         id="g2301"
+         style="stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1">
+        <path
+           style="fill:#ff0000;stroke:#ff0000;stroke-width:1.15;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
+           d="M 0,0 L -2,0"
+           id="path2316" />
+        <path
+           style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-opacity:1;fill-opacity:1"
+           d="M 0,0 L -13,4 L -9,0 -13,-4 L 0,0 z "
+           id="path2312" />
+        <path
+           style="fill:#ff0000;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
+           d="M 0,-4 L 0,40"
+           id="path2314" />
+      </g>
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5715"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutM"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutM"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5712"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.4)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="21.328125"
+     inkscape:cx="9.6072151"
+     inkscape:cy="13.728665"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     showguides="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-nodes="true"
+     inkscape:snap-others="false"
+     inkscape:snap-midpoints="false"
+     inkscape:snap-center="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5471" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4928">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g4195"
+       transform="matrix(1.2193837,0,0,1.2193837,-0.2277783,-3.2036359)">
+      <g
+         id="g4292"
+         transform="translate(0.15380375,0.49986219)">
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.2301296;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="m 0.5,14.5 3,-3"
+           id="path7134"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.2301296;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="m 0.5,11.5 3,3"
+           id="path7134-3"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <g
+       id="g4195-8"
+       transform="matrix(1.2193837,0,0,1.2193837,14.64768,-14.048325)">
+      <g
+         id="g4292-4"
+         transform="translate(0.15380375,0.49986219)">
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.2301296;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="m 0.5,14.5 3,-3"
+           id="path7134-6"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.2301296;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+           d="m 0.5,11.5 3,3"
+           id="path7134-3-7"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <path
+       style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.78714192;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 4.1761955,10.708867 9.3726084,6.548242 8.1470152,5.0214826 14.65774,4.0371027 12.274587,10.163336 11.056037,8.6453472 5.8598059,12.831001 Z"
+       id="path7489"
+       inkscape:connector-curvature="0" />
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,0.06250558,3.5377394)"
+       id="g4929">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,16.064703,-7.3699532)"
+       id="g4929-5">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836-9"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838-4"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/translation_dxyz_32x32.svg b/src/FeaturesPlugin/icons/SVG/translation_dxyz_32x32.svg
new file mode 100644 (file)
index 0000000..3a6636e
--- /dev/null
@@ -0,0 +1,306 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4923"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="translation_dxyz_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/translation_dxyz_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4925">
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect5013"
+       is_visible="true" />
+    <marker
+       inkscape:stockid="StopS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="marker9679"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path9681"
+         d="M 0.0,5.65 L 0.0,-5.65"
+         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="StopS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="StopS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5742"
+         d="M 0.0,5.65 L 0.0,-5.65"
+         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="StopL"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="StopL"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5736"
+         d="M 0.0,5.65 L 0.0,-5.65"
+         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.8)" />
+    </marker>
+    <marker
+       inkscape:stockid="StopM"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="StopM"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5739"
+         d="M 0.0,5.65 L 0.0,-5.65"
+         style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.4)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleInS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="marker9303"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path9305"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(-0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleInS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleInS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5706"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(-0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Mend"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Mend"
+       style="overflow:visible;"
+       inkscape:isstock="true">
+      <path
+         id="path5576"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.4) rotate(180) translate(10,0)" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Sstart"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="Arrow1Sstart"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5579"
+         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.2) translate(6,0)" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="DistanceEnd"
+       refX="0.0"
+       refY="0.0"
+       orient="auto"
+       inkscape:stockid="DistanceEnd"
+       inkscape:isstock="true">
+      <g
+         id="g2301"
+         style="stroke:#ff0000;stroke-opacity:1;fill:#ff0000;fill-opacity:1">
+        <path
+           style="fill:#ff0000;stroke:#ff0000;stroke-width:1.15;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
+           d="M 0,0 L -2,0"
+           id="path2316" />
+        <path
+           style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-opacity:1;fill-opacity:1"
+           d="M 0,0 L -13,4 L -9,0 -13,-4 L 0,0 z "
+           id="path2312" />
+        <path
+           style="fill:#ff0000;stroke:#ff0000;stroke-width:1;stroke-linecap:square;stroke-opacity:1;fill-opacity:1"
+           d="M 0,-4 L 0,40"
+           id="path2314" />
+      </g>
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5715"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#fecc02;fill-opacity:1"
+         transform="scale(0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutM"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutM"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5712"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.4)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="TriangleOutS-3"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         inkscape:connector-curvature="0"
+         id="path5715-1"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
+         transform="scale(0.2,0.2)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.081262"
+     inkscape:cx="-6.2934898"
+     inkscape:cy="21.81925"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     showguides="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-object-midpoints="false"
+     inkscape:snap-nodes="false"
+     inkscape:snap-others="true"
+     inkscape:snap-midpoints="false"
+     inkscape:snap-center="false"
+     inkscape:snap-intersection-paths="false"
+     inkscape:snap-smooth-nodes="false"
+     inkscape:object-nodes="true"
+     inkscape:object-paths="true">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5471" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4928">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#marker9679);marker-end:url(#StopS)"
+       d="M 14.380288,14.227831 1.7694782,14.283578 1.8357856,1.4937121"
+       id="path8354"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccc" />
+    <g
+       id="g5027"
+       transform="matrix(0.70096677,-0.71319394,0.71319394,0.70096677,3.1157902,18.72491)">
+      <path
+         style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         d="m 3.7668326,-5.8164371 8.5003484,0.08419 0.02161,-2.500041 7.233719,4.287072 -7.306519,4.1326173 0.02149,-2.4856783 -8.5203914,-0.0593 z"
+         id="path7489"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,0.15575443,3.3997359)"
+       id="g4929">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,16.112649,-12.512404)"
+       id="g4929-3">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836-9"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838-1"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/SVG/translation_vector_32x32.svg b/src/FeaturesPlugin/icons/SVG/translation_vector_32x32.svg
new file mode 100644 (file)
index 0000000..3cb1e4f
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg4923"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   viewBox="0 0 32 32"
+   sodipodi:docname="translation_vector_32x32.svg"
+   inkscape:export-filename="/export/home/ldigallo/DOC_ALYOTECH/icones/Transformations/translation_vector_32x32.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4925">
+    <marker
+       inkscape:stockid="TriangleOutS"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutS"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5715"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1;fill:#ff0000;fill-opacity:1"
+         transform="scale(0.2)" />
+    </marker>
+    <marker
+       inkscape:stockid="TriangleOutM"
+       orient="auto"
+       refY="0.0"
+       refX="0.0"
+       id="TriangleOutM"
+       style="overflow:visible"
+       inkscape:isstock="true">
+      <path
+         id="path5712"
+         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
+         transform="scale(0.4)" />
+    </marker>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.627417"
+     inkscape:cx="28.214666"
+     inkscape:cy="24.672974"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     showguides="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1006"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1"
+     inkscape:snap-object-midpoints="true"
+     inkscape:snap-center="true"
+     inkscape:snap-others="true"
+     inkscape:snap-nodes="false"
+     inkscape:snap-intersection-paths="true"
+     inkscape:snap-midpoints="true"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5471" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4928">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:#fecc02;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="M 1.2548774,11.975819 7.2733869,5.9724388 5.505524,4.204578 13.633635,2.0506281 11.459365,10.158421 9.7016598,8.4007143 3.6868575,14.43584 Z"
+       id="path7489"
+       inkscape:connector-curvature="0" />
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,0.07923381,3.4763226)"
+       id="g4929">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="matrix(1.7777777,0,0,1.7777777,16.077524,-12.477775)"
+       id="g4929-0">
+      <path
+         sodipodi:nodetypes="ccccccc"
+         style="fill:#b7d9ea;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m -0.04504951,16.04505 0,-8.0000005 4.00000001,0 0,4.0000005 4,0 0,4 z"
+         id="path4836-6"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccccc"
+         style="fill:#1b4955;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 0.95495049,7.0450495 -1,1 4.00000001,0 0,4.0000005 4,0 0,4 1,-1 0,-4 -4,0 0,-4.0000005 z"
+         id="path4838-6"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/FeaturesPlugin/icons/scale.png b/src/FeaturesPlugin/icons/scale.png
new file mode 100644 (file)
index 0000000..156659c
Binary files /dev/null and b/src/FeaturesPlugin/icons/scale.png differ
diff --git a/src/FeaturesPlugin/icons/scale_dimensions_32x32.png b/src/FeaturesPlugin/icons/scale_dimensions_32x32.png
new file mode 100644 (file)
index 0000000..b5204f9
Binary files /dev/null and b/src/FeaturesPlugin/icons/scale_dimensions_32x32.png differ
diff --git a/src/FeaturesPlugin/icons/scale_factor_32x32.png b/src/FeaturesPlugin/icons/scale_factor_32x32.png
new file mode 100644 (file)
index 0000000..b82b643
Binary files /dev/null and b/src/FeaturesPlugin/icons/scale_factor_32x32.png differ
index cade0deccbb757d10ff61aa956b0d61490895531..65488474bfc7e008b83aae9808fcc3057efcd8d0 100644 (file)
@@ -71,6 +71,9 @@
       <feature id="Symmetry" title="Symmetry" tooltip="Perform symmetry with respect to a point, an axis or a plane" icon="icons/Features/symmetry.png">
         <source path="symmetry_widget.xml"/>
       </feature>
+      <feature id="Scale" title="Scale" tooltip="Perform scale an objects" icon="icons/Features/scale.png">
+        <source path="scale_widget.xml"/>
+      </feature>
     </group>
   </workbench>
 </plugin>
diff --git a/src/FeaturesPlugin/scale_widget.xml b/src/FeaturesPlugin/scale_widget.xml
new file mode 100644 (file)
index 0000000..3f6f812
--- /dev/null
@@ -0,0 +1,76 @@
+<!-- Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+<source>
+  <toolbox id="CreationMethod">
+    <box id="ByFactor"
+         title="By one common factor for the three directions"
+         icon="icons/Features/scale_factor_32x32.png">
+      <multi_selector id="main_objects"
+                      label="Main objects"
+                      icon=""
+                      tooltip="Select objects"
+                      type_choice="objects"
+                      concealment="true">
+        <validator id="FeaturesPlugin_ValidatorTransform"/>
+      </multi_selector>
+      <shape_selector id="center_point"
+                      icon=""
+                      label="Center point"
+                      tooltip="Select the center point"
+                      shape_types="vertex"
+                      default="">
+        <validator id="GeomValidators_ShapeType" parameters="vertex"/>
+        <validator id="GeomValidators_ConstructionComposite"/>
+      </shape_selector>
+      <doublevalue
+          id="scale_factor"
+          label="Scale factor"
+          step="1."
+          default="2."
+          tooltip="Scale factor">
+      </doublevalue>
+    </box>
+    <box id="ByDimensions"
+         title="Different factors for the three directions"
+         icon="icons/Features/scale_dimensions_32x32.png">
+      <multi_selector id="main_objects"
+                      label="Main objects"
+                      icon=""
+                      tooltip="Select objects"
+                      type_choice="objects"
+                      concealment="true">
+        <validator id="FeaturesPlugin_ValidatorTransform"/>
+      </multi_selector>
+      <shape_selector id="center_point"
+                      icon=""
+                      label="Center point"
+                      tooltip="Select the center point"
+                      shape_types="vertex"
+                      default="">
+        <validator id="GeomValidators_ShapeType" parameters="vertex"/>
+        <validator id="GeomValidators_ConstructionComposite"/>
+      </shape_selector>
+      <doublevalue
+          id="scale_factor_x"
+          label="Scale factor in X"
+          step="1."
+          default="2."
+          tooltip="Scale factor in X">
+      </doublevalue>
+      <doublevalue
+          id="scale_factor_y"
+          label="Scale factor in Y"
+          step="1."
+          default="2."
+          tooltip="Scale factor in Y">
+      </doublevalue>
+      <doublevalue
+          id="scale_factor_z"
+          label="Scale factor in Z"
+          step="1."
+          default="2."
+          tooltip="Scale factor in Z">
+      </doublevalue>
+    </box>
+  </toolbox>
+</source>
\ No newline at end of file
index 522f443589da353f1ada713360855b95fb921b3c..47a4266decdfab4eb7531f0514355c54f5309026 100644 (file)
@@ -49,6 +49,7 @@ SET(PROJECT_HEADERS
     GeomAlgoAPI_Copy.h
     GeomAlgoAPI_ConeSegment.h
     GeomAlgoAPI_Symmetry.h
+    GeomAlgoAPI_Scale.h
 )
 
 SET(PROJECT_SOURCES
@@ -93,6 +94,7 @@ SET(PROJECT_SOURCES
     GeomAlgoAPI_Copy.cpp
     GeomAlgoAPI_ConeSegment.cpp
     GeomAlgoAPI_Symmetry.cpp
+    GeomAlgoAPI_Scale.cpp
 )
 
 SET(PROJECT_LIBRARIES
@@ -161,6 +163,7 @@ INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
 ADD_UNIT_TESTS(TestAPI_Box.py
                TestAPI_Cylinder.py
                TestAPI_GDMLConeSegment.py
+               TestAPI_Scale.py
                TestAPI_Symmetry.py
                TestAPI_Translation.py)
 
diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Scale.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Scale.cpp
new file mode 100644 (file)
index 0000000..bfdd1d0
--- /dev/null
@@ -0,0 +1,184 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File:        GeomAlgoAPI_Scale.cpp
+// Created:     23 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#include "GeomAlgoAPI_Scale.h"
+
+#include <BRepBuilderAPI_Transform.hxx>
+#include <BRepBuilderAPI_GTransform.hxx>
+
+//=================================================================================================
+GeomAlgoAPI_Scale::GeomAlgoAPI_Scale(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                                     std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                                     double theScaleFactor)
+{
+  myMethodType = BY_FACTOR;
+  mySourceShape = theSourceShape;
+  myCenterPoint = theCenterPoint;
+  myScaleFactor = theScaleFactor;
+}
+
+//=================================================================================================
+GeomAlgoAPI_Scale::GeomAlgoAPI_Scale(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                                     std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                                     double theScaleFactorX,
+                                     double theScaleFactorY,
+                                     double theScaleFactorZ)
+{
+  myMethodType = BY_DIMENSIONS;
+  mySourceShape = theSourceShape;
+  myCenterPoint = theCenterPoint;
+  myScaleFactorX = theScaleFactorX;
+  myScaleFactorY = theScaleFactorY;
+  myScaleFactorZ = theScaleFactorZ;
+}
+
+//=================================================================================================
+bool GeomAlgoAPI_Scale::check()
+{
+  if (!mySourceShape) {
+    myError = "Scale builder :: source shape is invalid.";
+    return false;
+  }
+  if (!myCenterPoint) {
+    myError = "Scale builder :: center point is invalid.";
+    return false;
+  }
+  switch (myMethodType) {
+    case BY_FACTOR: {
+      if (fabs(myScaleFactor) < Precision::Confusion()) {
+        myError = "Scale builder :: the scale factor is null.";
+        return false;
+      }
+      return true;
+    }
+    case BY_DIMENSIONS: {
+      if (fabs(myScaleFactorX) < Precision::Confusion()) {
+        myError = "Scale builder :: the scale factor in X is null.";
+        return false;
+      }
+      if (fabs(myScaleFactorY) < Precision::Confusion()) {
+        myError = "Scale builder :: the scale factor in Y is null.";
+        return false;
+      }
+      if (fabs(myScaleFactorZ) < Precision::Confusion()) {
+        myError = "Scale builder :: the scale factor in Z is null.";
+        return false;
+      }
+      return true;
+    }
+    default: {
+      myError = "Scale builder :: method not implemented.";
+      return false;
+    }
+  }
+}
+
+//=================================================================================================
+void GeomAlgoAPI_Scale::build()
+{
+  switch (myMethodType) {
+   case BY_FACTOR : {
+     buildByFactor();
+     break;
+   }
+   case BY_DIMENSIONS : {
+     buildByDimensions();
+     break;
+   }
+   default : {
+     myError = "Scale builder :: method not yet implemented";
+     return;
+   }
+  }
+}
+
+//=================================================================================================
+void GeomAlgoAPI_Scale::buildByFactor()
+{
+  const gp_Pnt& aCenterPoint = myCenterPoint->impl<gp_Pnt>();
+  gp_Trsf* aTrsf = new gp_Trsf();
+  aTrsf->SetScale(aCenterPoint, myScaleFactor);
+
+  const TopoDS_Shape& aSourceShape = mySourceShape->impl<TopoDS_Shape>();
+
+  if(aSourceShape.IsNull()) {
+    myError = "Scale builder :: source shape does not contain any actual shape.";
+    return;
+  }
+
+  // Transform the shape while copying it.
+  BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, *aTrsf, true);
+  if(!aBuilder) {
+    myError = "Scale builder :: transform initialization failed.";
+    return;
+  }
+
+  setImpl(aBuilder);
+  setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
+
+  if(!aBuilder->IsDone()) {
+    myError = "Scale builder :: algorithm failed.";
+    return;
+  }
+
+  TopoDS_Shape aResult = aBuilder->Shape();
+
+  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+  aShape->setImpl(new TopoDS_Shape(aResult));
+  setShape(aShape);
+  setDone(true);
+}
+
+//=================================================================================================
+void GeomAlgoAPI_Scale::buildByDimensions()
+{
+  const gp_Pnt& aCenterPoint = myCenterPoint->impl<gp_Pnt>();
+
+  // Perform the rotation matrix
+  gp_Mat aMatRot(myScaleFactorX, 0., 0.,
+                 0., myScaleFactorY, 0.,
+                 0., 0., myScaleFactorZ);
+
+  // Perform the tranformation
+  gp_Pnt anOriginPnt(0., 0., 0.);
+  gp_GTrsf aGTrsf;
+  gp_GTrsf aGTrsfP0;
+  gp_GTrsf aGTrsf0P;
+  aGTrsfP0.SetTranslationPart(anOriginPnt.XYZ() - aCenterPoint.XYZ());
+  aGTrsf0P.SetTranslationPart(aCenterPoint.XYZ());
+  aGTrsf.SetVectorialPart(aMatRot);
+  aGTrsf = aGTrsf0P.Multiplied(aGTrsf);
+  aGTrsf = aGTrsf.Multiplied(aGTrsfP0);
+
+  const TopoDS_Shape& aSourceShape = mySourceShape->impl<TopoDS_Shape>();
+
+  if(aSourceShape.IsNull()) {
+    myError = "Scale builder :: source shape does not contain any actual shape.";
+    return;
+  }
+
+  // Transform the shape while copying it.
+  BRepBuilderAPI_GTransform* aBuilder = new BRepBuilderAPI_GTransform(aSourceShape, aGTrsf, true);
+  if(!aBuilder) {
+    myError = "Scale builder :: transform initialization failed.";
+    return;
+  }
+
+  setImpl(aBuilder);
+  setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
+
+  if(!aBuilder->IsDone()) {
+    myError = "Scale builder :: algorithm failed.";
+    return;
+  }
+
+  TopoDS_Shape aResult = aBuilder->Shape();
+
+  std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+  aShape->setImpl(new TopoDS_Shape(aResult));
+  setShape(aShape);
+  setDone(true);
+}
diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h b/src/GeomAlgoAPI/GeomAlgoAPI_Scale.h
new file mode 100644 (file)
index 0000000..3fcb1c4
--- /dev/null
@@ -0,0 +1,68 @@
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File:        GeomAlgoAPI_Scale.h
+// Created:     23 Jan 2017
+// Author:      Clarisse Genrault (CEA)
+
+#ifndef GEOMALGOAPI_SCALE_H_
+#define GEOMALGOAPI_SCALE_H_
+
+#include <GeomAlgoAPI_MakeShape.h>
+
+#include <GeomAPI_Pnt.h>
+
+/// \class GeomAlgoAPI_Scale
+/// \ingroup DataAlgo
+/// \brief Creates a copy of the object by performing a scale operation by a factor or
+///        by dimensions.
+class GeomAlgoAPI_Scale : public GeomAlgoAPI_MakeShape
+{
+public:
+  /// Type of scale operation
+  enum MethodType {
+    BY_FACTOR,     ///< Scale by factor.
+    BY_DIMENSIONS, ///< Scale by dimensions.
+  };
+
+  /// \brief Creates an object which is obtained from current object by performing
+  ///        a scale operation by a factor.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] theCenterPoint  the center point.
+  /// \param[in] theFactor       the scale factor.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Scale(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                                       std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                                       double                         theScaleFactor);
+
+  /// \brief Creates an object which is obtained from current object by performing
+  ///        a scale operation by dimensions.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] theCenterPoint  the center point.
+  /// \param[in] theFactorX      the scale factor in X.
+  /// \param[in] theFactorY      the scale factor in Y.
+  /// \param[in] theFactorZ      the scale factor in Z.
+  GEOMALGOAPI_EXPORT GeomAlgoAPI_Scale(std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                                       std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                                       double                         theScaleFactorX,
+                                       double                         theScaleFactorY,
+                                       double                         theScaleFactorZ);
+
+  /// Checks if data for the scale transform is OK.
+  GEOMALGOAPI_EXPORT bool check();
+
+  /// Execute the scale transform.
+  GEOMALGOAPI_EXPORT void build();
+
+private:
+  MethodType myMethodType; /// Type of method used.
+  std::shared_ptr<GeomAPI_Shape> mySourceShape; /// Shape to be moved.
+  std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Center point.
+  double myScaleFactor; /// Scale factor.
+  double myScaleFactorX; /// Scale factor in X.
+  double myScaleFactorY; /// Scale factor in Y.
+  double myScaleFactorZ; /// Scale factor in Z.
+
+  void buildByFactor();
+  void buildByDimensions();
+};
+
+#endif // GEOMALGOAPI_SCALE_H_
\ No newline at end of file
index 223517a4a2c3fb79f46c6dc68ace5de8770c29a1..faba77138781436e08d0054a31eb6ba9a824cde7 100644 (file)
@@ -10,6 +10,7 @@
 #include <GeomAlgoAPI_Cylinder.h>
 #include <GeomAlgoAPI_ConeSegment.h>
 #include <GeomAlgoAPI_EdgeBuilder.h>
+#include <GeomAlgoAPI_Scale.h>
 #include <GeomAlgoAPI_Symmetry.h>
 #include <GeomAlgoAPI_Translation.h>
 
@@ -305,6 +306,55 @@ namespace GeomAlgoAPI_ShapeAPI
     return aSymmetryAlgo.shape();
   }
 
+  //===============================================================================================
+  std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeScale(
+    std::shared_ptr<GeomAPI_Shape> theSourceShape,
+    std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+    const double                   theScaleFactor) throw (GeomAlgoAPI_Exception)
+  {
+    GeomAlgoAPI_Scale aScaleAlgo(theSourceShape, theCenterPoint, theScaleFactor);
+
+    if (!aScaleAlgo.check()) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+
+    aScaleAlgo.build();
+
+    if(!aScaleAlgo.isDone()) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+    if (!aScaleAlgo.checkValid("Scale builder by a scale factor")) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+    return aScaleAlgo.shape();
+  }
+
+  //===============================================================================================
+  std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeScale(
+   std::shared_ptr<GeomAPI_Shape> theSourceShape,
+   std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+   const double                   theScaleFactorX,
+   const double                   theScaleFactorY,
+   const double                   theScaleFactorZ) throw (GeomAlgoAPI_Exception)
+  {
+    GeomAlgoAPI_Scale aScaleAlgo(theSourceShape, theCenterPoint,
+                                 theScaleFactorX, theScaleFactorY, theScaleFactorZ);
+
+    if (!aScaleAlgo.check()) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+
+    aScaleAlgo.build();
+
+    if(!aScaleAlgo.isDone()) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+    if (!aScaleAlgo.checkValid("Scale builder by dimensions")) {
+      throw GeomAlgoAPI_Exception(aScaleAlgo.getError());
+    }
+    return aScaleAlgo.shape();
+  }
+
   //===============================================================================================
   std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeConeSegment(
     const double theRMin1, const double theRMax1,
index 454f88495088cce9d0affde6df6d510bbea909e9..2f478373b92b23f98db05a5ef7eb8eb4410dbac4 100644 (file)
@@ -124,6 +124,28 @@ public:
                      std::shared_ptr<GeomAPI_Shape> theSourceShape,
                      std::shared_ptr<GeomAPI_Ax2>   thePlane) throw (GeomAlgoAPI_Exception);
 
+  /// Performs a scale by a scale factor.
+  /// \param theSourceShape Shape be scaled
+  /// \param theCenterPoint Point of scale
+  /// \param theScaleFactor Factor of scale
+  static std::shared_ptr<GeomAPI_Shape> makeScale(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                     const double                   theScaleFactor) throw (GeomAlgoAPI_Exception);
+
+  /// Performs a scale by dimensions.
+  /// \param theSourceShape Shape be scaled
+  /// \param theCenterPoint Point of scale
+  /// \param theScaleFactorX Factor of scale in X
+  /// \param theScaleFactorY Factor of scale in Y
+  /// \param theScaleFactorZ Factor of scale in Z
+  static std::shared_ptr<GeomAPI_Shape> makeScale(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Pnt>   theCenterPoint,
+                     const double                   theScaleFactorX,
+                     const double                   theScaleFactorY,
+                     const double                   theScaleFactorZ) throw (GeomAlgoAPI_Exception);
+
   /// Creates a cone segment using standard GDML parameters.
   /// \param theRMin1 Inner radius at base of cone
   /// \param theRMax1 Outer radius at base of cone
index 143f41c4bfc26356b19d1ca76d497b43a38695b6..f5baf287d1ecfa6022197313eba7c13d6db7d924 100644 (file)
@@ -101,7 +101,7 @@ void GeomAlgoAPI_Symmetry::build()
       break;
     }
     default: {
-      myError = "Mirror builder :: method not supported";
+      myError = "Symmetry builder :: method not supported";
       return;
     }
   }
@@ -109,14 +109,14 @@ void GeomAlgoAPI_Symmetry::build()
   const TopoDS_Shape& aSourceShape = mySourceShape->impl<TopoDS_Shape>();
 
   if(aSourceShape.IsNull()) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: source shape does not contain any actual shape.";
     return;
   }
 
   // Transform the shape while copying it.
   BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, *aTrsf, true);
   if(!aBuilder) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: transform initialization failed.";
     return;
   }
 
@@ -124,7 +124,7 @@ void GeomAlgoAPI_Symmetry::build()
   setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
 
   if(!aBuilder->IsDone()) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: algorithm failed.";
     return;
   }
 
index 153f451adb91f592d99f7ad0acafb10adeba7b92..8eac85251b9e29ac18702eb9ddbd4da360fcb44e 100644 (file)
@@ -21,7 +21,7 @@
 class GeomAlgoAPI_Symmetry : public GeomAlgoAPI_MakeShape
 {
 public:
-  /// Type of mirror operation
+  /// Type of symmetry operation
   enum MethodType {
     BY_POINT, ///< Symmetry by point.
     BY_AXIS,  ///< Symmetry by axis.
@@ -30,29 +30,29 @@ public:
 
   /// \brief Creates an object which is obtained from current object by performing
   ///        a symmetry operation by a point.
-  /// \param[in] theSourceShape  a shape to be moved.
-  /// \param[in] thePoint        symmetry point.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] thePoint        the symmetry point.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Symmetry(std::shared_ptr<GeomAPI_Shape> theSourceShape,
                                           std::shared_ptr<GeomAPI_Pnt>   thePoint);
 
   /// \brief Creates an object which is obtained from current object by performing
   ///        a symmetry operation by a point.
-  /// \param[in] theSourceShape  a shape to be moved.
-  /// \param[in] theAxis         symmetry axis.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] theAxis         the symmetry axis.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Symmetry(std::shared_ptr<GeomAPI_Shape> theSourceShape,
                                           std::shared_ptr<GeomAPI_Ax1>   theAxis);
 
   /// \brief Creates an object which is obtained from current object by performing
   ///        a symmetry operation by a point.
-  /// \param[in] theSourceShape  a shape to be moved.
-  /// \param[in] thePlane        symmetry plane.
+  /// \param[in] theSourceShape  the shape to be moved.
+  /// \param[in] thePlane        the symmetry plane.
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Symmetry(std::shared_ptr<GeomAPI_Shape> theSourceShape,
                                           std::shared_ptr<GeomAPI_Ax2>   thePlane);
 
-  /// Checks if data for the translation execution is OK.
+  /// Checks if data for the symmetry execution is OK.
   GEOMALGOAPI_EXPORT bool check();
 
-  /// Execute the translation.
+  /// Execute the symmetry.
   GEOMALGOAPI_EXPORT void build();
 
 private:
index 574b63d23b74c208f94451a019ee337f19eb3648..55ed0e89caebdb654ace2add8987a55b9a022021 100644 (file)
@@ -128,7 +128,7 @@ void GeomAlgoAPI_Translation::build()
   // Transform the shape while copying it.
   BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, *aTrsf, true);
   if(!aBuilder) {
-    myError = "Translation builder :: source shape does not contain any actual shape.";
+    myError = "Translation builder :: transform initialization failed.";
     return;
   }
 
@@ -136,7 +136,7 @@ void GeomAlgoAPI_Translation::build()
   setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
 
   if(!aBuilder->IsDone()) {
-    myError = "Translation builder :: source shape does not contain any actual shape.";
+    myError = "Translation builder :: algorithm failed.";
     return;
   }
 
diff --git a/src/GeomAlgoAPI/Test/TestAPI_Scale.py b/src/GeomAlgoAPI/Test/TestAPI_Scale.py
new file mode 100644 (file)
index 0000000..a601348
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+# File:        TestAPI_Scale.py
+# Created:     25 Jan 2017
+# Author:      Clarisse Genrault (CEA)
+
+from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
+from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
+from GeomAPI import GeomAPI_Pnt as pnt
+
+# Create a box
+try :
+  box1 = shaperpy.makeBox(10.,10.,10.)
+  box2 = shaperpy.makeBox(10.,10.,10.)
+  centerPoint = pnt(20.,20.,0.)
+except myExcept, ec:
+  print ec.what()
+
+# Perfom a scale by a factor.
+try :
+  scale1 = shaperpy.makeScale(box1,centerPoint, -1.6)
+except myExcept, ec:
+  print ec.what()
+
+# Perfom a scale by dimensions.
+try :
+  scale2 = shaperpy.makeScale(box2,centerPoint, 2, -0.5, 1.3)
+except myExcept, ec:
+  print ec.what()
index 07471e912a7080f7ba79e0a0ac4da4c766393943..4632e171ac9e3e16db947ac6599cd7cdfbec7b8e 100644 (file)
@@ -1,7 +1,7 @@
 """Package for Features plugin for the Parametric Geometry API of the Modeler.
 """
 
-from FeaturesAPI import addPlacement, addRotation, addSymmetry, addTranslation
+from FeaturesAPI import addPlacement, addRotation, addScale, addSymmetry, addTranslation
 from FeaturesAPI import addExtrusion, addExtrusionCut, addExtrusionFuse
 from FeaturesAPI import addRevolution, addRevolutionCut, addRevolutionFuse
 from FeaturesAPI import addPipe