Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_Validators.cpp
diff --git
a/src/PartSet/PartSet_Validators.cpp
b/src/PartSet/PartSet_Validators.cpp
index 8f026d712489af75f531e6150b3b844ec18a6627..fa7ac518f60a1696c8a4b04f5b88cc7392107735 100644
(file)
--- a/
src/PartSet/PartSet_Validators.cpp
+++ b/
src/PartSet/PartSet_Validators.cpp
@@
-18,6
+18,9
@@
#include <ModelAPI_AttributeReference.h>
#include <list>
#include <ModelAPI_AttributeReference.h>
#include <list>
+#ifdef _DEBUG
+#include <iostream>
+#endif
int shapesNbPoints(const ModuleBase_ISelection* theSelection)
{
int shapesNbPoints(const ModuleBase_ISelection* theSelection)
{
@@
-55,7
+58,7
@@
int shapesNbLines(const ModuleBase_ISelection* theSelection)
bool PartSet_DistanceValidator::isValid(const ModuleBase_ISelection* theSelection) const
{
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 < 3);
}
@@
-98,7
+101,11
@@
bool PartSet_RadiusValidator::isValid(const ModuleBase_ISelection* theSelection)
return (aCount > 0) && (aCount < 2);
}
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,
bool PartSet_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
const std::list<std::string>& theArguments,
@@
-163,4
+170,4
@@
bool PartSet_DifferentObjectsValidator::isValid(const AttributePtr& theAttribute
{
// not implemented
return true;
{
// not implemented
return true;
-}
\ No newline at end of file
+}