// 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();
else
theEdge1 = aDivider1.Edge();
}
+ else {
+ // error: filleted edge becomes degenerated
+ aResult = TopoDS_Edge();
+ }
aCurve = BRep_Tool::Curve(myEdge2, aStart, anEnd);
aCurve->D1(aNearest->GetParam2(), aPoint2, aDir);
else
theEdge2 = aDivider2.Edge();
}
+ else {
+ // error: filleted edge becomes degenerated
+ aResult = TopoDS_Edge();
+ }
delete aNearest;
return aResult;