From a2be45b2e5980f94ed3afd65968731edd5c35a33 Mon Sep 17 00:00:00 2001 From: gka Date: Thu, 18 Oct 2018 19:50:35 +0300 Subject: [PATCH] 0030250: Obtained shape is invalid due to presence of the loop containing two separate edges lying on the seam of the closed surface Holes with null area is excluded from result in the ShapeFix_Face::FixMissingSeam in order to avoid cut by seam of the surface --- src/ShapeFix/ShapeFix_Face.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 0854b5b736..7581c391c7 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -1711,6 +1711,11 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam() else if ( wire.IsSame ( w2 ) ) wire = w21; else { + Handle(ShapeAnalysis_Wire) anAnalyzer = new ShapeAnalysis_Wire(wire, myFace, Precision()); + //To avoid addition of holes with null area (OCCT issue 0030250) + if (anAnalyzer->CheckSmallArea(wire)) + continue; + // other wires (not boundary) are considered as holes; make sure to have them oriented accordingly TopoDS_Shape curface = tmpF.EmptyCopied(); B.Add(curface,wire); -- 2.39.5