-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
}
GeomTrsfPtr aTrsf(new GeomAPI_Trsf);
- aTrsf->setTranslation(aFirstPoint, aSecondPoint);
+ if (aFirstPoint && aSecondPoint) {
+ aTrsf->setTranslation(aFirstPoint, aSecondPoint);
+ }
return aTrsf;
}
//=================================================================================================
void FeaturesPlugin_Translation::performTranslation(const GeomTrsfPtr& theTrsf)
{
- if (!theTrsf)
+ if (!theTrsf) {
+ setError("Invalid transformation.");
return;
+ }
bool isKeepSubShapes = data()->version() == TRANSLATION_VERSION_1;