+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: PartSet_Validators.cpp
// Created: 09 July 2014
// Author: Vitaly SMETANNIKOV
#include <ModelAPI_AttributeReference.h>
#include <list>
+#ifdef _DEBUG
+#include <iostream>
+#endif
int shapesNbPoints(const ModuleBase_ISelection* theSelection)
{
bool PartSet_DistanceValidator::isValid(const ModuleBase_ISelection* theSelection) const
{
- int aCount = shapesNbPoints(theSelection);
+ int aCount = shapesNbPoints(theSelection) + shapesNbLines(theSelection);
return (aCount > 0) && (aCount < 3);
}
return (aCount > 0) && (aCount < 2);
}
-
+bool PartSet_RigidValidator::isValid(const ModuleBase_ISelection* theSelection) const
+{
+ int aCount = shapesNbLines(theSelection);
+ return (aCount > 0) && (aCount < 2);
+}
bool PartSet_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
const std::list<std::string>& theArguments,
{
// not implemented
return true;
-}
\ No newline at end of file
+}