-// Copyright (C) 2020 CEA/DEN, EDF R&D
+// Copyright (C) 2020-2022 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
// create fillet builder
GEOMImpl_Fillet1d aFilletBuilder(anEdge1, anEdge2, aPlane->impl<gp_Pln>());
- if (!aFilletBuilder.Perform(theRadius)) {
- // store the failed vertex and continue
+ bool isOk = aFilletBuilder.Perform(theRadius);
+ TopoDS_Edge aFilletEdge;
+ if (isOk) {
+ GeomPointPtr aPoint = aVE->first->vertex()->point();
+ aFilletEdge = aFilletBuilder.Result(aPoint->impl<gp_Pnt>(), anEdge1, anEdge2);
+ isOk = !aFilletEdge.IsNull();
+ }
+
+ if (!isOk) {
+ // something gone wrong and the fillet edge is not constructed,
+ // just store the failed vertex and continue
myFailedVertices.push_back(*aVIt);
continue;
}
- GeomPointPtr aPoint = aVE->first->vertex()->point();
- TopoDS_Edge aFilletEdge = aFilletBuilder.Result(aPoint->impl<gp_Pnt>(), anEdge1, anEdge2);
-
// store modified shapes
myGenerated[aVE->first].push_back(convert(aFilletEdge));
SetOfShapes::const_iterator aEIt = aVE->second.begin();