[Part]Fix bad shape from Fillet

- see #4285 for similar fix on Chamfer
This commit is contained in:
wandererfan
2020-06-07 19:58:13 -04:00
committed by WandererFan
parent a9743b3471
commit 7d804cd615

View File

@@ -73,6 +73,18 @@ App::DocumentObjectExecReturn *Fillet::execute(void)
TopoDS_Shape shape = mkFillet.Shape();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Resulting shape is null");
//shapefix re #4285
//https://www.forum.freecadweb.org/viewtopic.php?f=3&t=43890&sid=dae2fa6fda71670863a103b42739e47f
TopoShape* ts = new TopoShape(shape);
double minTol = 2.0 * Precision::Confusion();
double maxTol = 4.0 * Precision::Confusion();
bool rc = ts->fix(Precision::Confusion(), minTol, maxTol);
if (rc) {
shape = ts->getShape();
}
delete ts;
ShapeHistory history = buildHistory(mkFillet, TopAbs_FACE, shape, baseShape);
this->Shape.setValue(shape);