Salome HOME
[Code coverage ModelHighAPI]: Improve coverage
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Selection.cpp
index 025314d220d892737052dd43adbf215d56485e35..b9a9f0be5479305cc4eb0eb2cba7994a96107591 100644 (file)
@@ -58,6 +58,20 @@ ModelHighAPI_Selection::ModelHighAPI_Selection(const std::string& theType,
 {
 }
 
+ModelHighAPI_Selection::ModelHighAPI_Selection(const std::string& theType,
+                                               const std::list<double>& theSubShapeInnerPoint)
+: myVariantType(VT_TypeInnerPointPair)
+{
+  double aCoordinates[3] = { 0.0, 0.0, 0.0 };
+  double* aCIt = aCoordinates;
+  std::list<double>::const_iterator aPIt = theSubShapeInnerPoint.begin();
+  for (; aPIt != theSubShapeInnerPoint.end(); ++aPIt, ++aCIt)
+    *aCIt = *aPIt;
+
+  GeomPointPtr anInnerPoint(new GeomAPI_Pnt(aCoordinates[0], aCoordinates[1], aCoordinates[2]));
+  myTypeInnerPointPair = std::pair<std::string, GeomPointPtr>(theType, anInnerPoint);
+}
+
 ModelHighAPI_Selection::ModelHighAPI_Selection(const std::string& theType,
   const std::string& theContextName, const int theIndex)
   : myVariantType(VT_WeakNamingPair)
@@ -207,6 +221,7 @@ void ModelHighAPI_Selection::setDeflection(double theValue)
   aDeflectionAttr->setValue(theValue);
 }
 
+// LCOV_EXCL_START
 void ModelHighAPI_Selection::setTransparency(double theValue)
 {
   if (myVariantType != VT_ResultSubShapePair)
@@ -217,6 +232,7 @@ void ModelHighAPI_Selection::setTransparency(double theValue)
 
   aTransparencyAttr->setValue(theValue);
 }
+// LCOV_EXCL_STOP
 
 int ModelHighAPI_Selection::numberOfSubs() const
 {