//=================================================================================================
bool GeomValidators_ZeroOffset::isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const std::list<std::string>& theArguments) const
+ const std::list<std::string>& theArguments,
+ std::string& theError) const
{
if(theArguments.size() != 8) {
+ theError = "Wrong number of arguments (expected 8).";
return false;
}
anIt++;
if(aSelectedMethod == aCreationMethod) {
- if(aToSize == 0.0 && aFromSize == 0.0) {
+ if(aToSize == -aFromSize) {
+ theError = "ToSize = -FromSize.";
return false;
} else {
return true;
}
if(((!aFromShape && !aToShape) || ((aFromShape && aToShape) && aFromShape->isEqual(aToShape)))
- && (aFromSize == 0.0 && aToSize == 0.0)) {
+ && (aFromSize == -aToSize)) {
+ theError = "FromSize = -ToSize and bounding planes are equal.";
return false;
}