0000463: a pad fails to produce a valid solid from a valid sketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5086 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
5c6e3ab1c2
commit
7931687dd1
|
@ -44,6 +44,7 @@
|
|||
# include <TopTools_IndexedMapOfShape.hxx>
|
||||
# include <IntTools_FClass2d.hxx>
|
||||
# include <ShapeAnalysis_Surface.hxx>
|
||||
# include <ShapeFix_Shape.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -138,6 +139,17 @@ TopoDS_Face SketchBased::validateFace(const TopoDS_Face& face) const
|
|||
xp.Next();
|
||||
}
|
||||
|
||||
aChecker.Init(mkFace.Face());
|
||||
if (!aChecker.IsValid()) {
|
||||
ShapeFix_Shape fix(mkFace.Face());
|
||||
fix.SetPrecision(Precision::Confusion());
|
||||
fix.SetMaxTolerance(Precision::Confusion());
|
||||
fix.SetMaxTolerance(Precision::Confusion());
|
||||
fix.Perform();
|
||||
fix.FixWireTool()->Perform();
|
||||
fix.FixFaceTool()->Perform();
|
||||
return TopoDS::Face(fix.Shape());
|
||||
}
|
||||
return mkFace.Face();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user