-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 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
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "BuildPlugin_Validators.h"
std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(aConstruction.get()) {
if(aConstruction->isInfinite()) {
- theError = "Inifinte objects not acceptable.";
+ theError = "Infinite objects not acceptable.";
return false;
}
}
// Check that selected objects have closed contours.
- ListOfShape aFaces;
- GeomAlgoAPI_SketchBuilder::createFaces(aPln->location(), aPln->xDirection(),
- aPln->direction(), anEdges, aFaces);
+ GeomAlgoAPI_SketchBuilder aBuilder(aPln, anEdges);
+ const ListOfShape& aFaces = aBuilder.faces();
if(aFaces.empty()) {
theError = "Selected objects do not generate closed contour.";
return false;
Events_InfoMessage& theError) const
{
if(theArguments.size() != 1) {
+ // LCOV_EXCL_START
std::string aMsg = "Error: BuildPlugin_ValidatorSubShapesSelection should be used only with "
"1 parameter(Sketch feature id).";
Events_InfoMessage("BuildPlugin_Validators", aMsg).send();
return false;
+ // LCOV_EXCL_STOP
}
// Get base objects list.
if(theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
+ // LCOV_EXCL_START
std::string aMsg =
"Error: BuildPlugin_ValidatorSubShapesSelection does not support attribute type \""
"%1\"\n Only \"%2\" supported.";
Events_InfoMessage("BuildPlugin_Validators", aMsg).
arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
return false;
+ // LCOV_EXCL_STOP
}
AttributeSelectionListPtr aSelectionList =
std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);
{
// Get base objects list.
if (theAttribute->attributeType() != ModelAPI_AttributeSelectionList::typeId()) {
+ // LCOV_EXCL_START
std::string aMsg =
"Error: BuildPlugin_ValidatorFillingSelection does not support attribute type \""
"%1\"\n Only \"%2\" supported.";
Events_InfoMessage("BuildPlugin_Validators", aMsg).
arg(theAttribute->attributeType()).arg(ModelAPI_AttributeSelectionList::typeId()).send();
return false;
+ // LCOV_EXCL_STOP
}
AttributeSelectionListPtr aSelectionList =
std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(theAttribute);