{
}
+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)
+ , myWeakNamingPair(theType, std::pair<std::string, int>(theContextName, theIndex))
+{
+}
+
+
ModelHighAPI_Selection::~ModelHighAPI_Selection()
{
}
case VT_TypeInnerPointPair:
theAttribute->selectSubShape(myTypeInnerPointPair.first, myTypeInnerPointPair.second);
return;
+ case VT_WeakNamingPair:
+ theAttribute->selectSubShape(
+ myWeakNamingPair.first, myWeakNamingPair.second.first, myWeakNamingPair.second.second);
+ break;
}
if (theAttribute->isInvalid()) {
// Note: the reverse order (first - type, second - selected point)
theAttribute->append(myTypeInnerPointPair.second, myTypeInnerPointPair.first);
return;
+ case VT_WeakNamingPair:
+ // Note: the reverse order (first - type, second - selected point)
+ theAttribute->append(
+ myWeakNamingPair.first, myWeakNamingPair.second.first, myWeakNamingPair.second.second);
+ return;
}
}
aDeflectionAttr->setValue(theValue);
}
+// LCOV_EXCL_START
void ModelHighAPI_Selection::setTransparency(double theValue)
{
if (myVariantType != VT_ResultSubShapePair)
aTransparencyAttr->setValue(theValue);
}
+// LCOV_EXCL_STOP
int ModelHighAPI_Selection::numberOfSubs() const
{