From 56084216a8cfa27e39b1cad4b6f1d71444555058 Mon Sep 17 00:00:00 2001 From: Pawel Date: Tue, 17 Jul 2012 14:43:45 +0200 Subject: [PATCH] 0023303: Expression always true in ShapeFix_Face.cxx The two corrected if-clause conditions were always true. In FixSmallAreaWire where the documentation says: "Detects wires with small area (that is less than 100*Precision::PConfusion(). Removes these wires if they are internal." and the bugfix conforms to this. For 'NeedCheckSplitWire' option in the Perform method the same assumption is made although no documentation on this could be found. --- src/ShapeFix/ShapeFix_Face.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 313300c101..70274608d7 100755 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -588,7 +588,7 @@ Standard_Boolean ShapeFix_Face::Perform() B.Add (tmpFace,iter.Value()); continue; } - if(iter.Value().Orientation() != TopAbs_FORWARD || + if(iter.Value().Orientation() != TopAbs_FORWARD && iter.Value().Orientation() != TopAbs_REVERSED) { B.Add (tmpFace,TopoDS::Wire(iter.Value())); continue; @@ -1701,7 +1701,7 @@ Standard_Boolean ShapeFix_Face::FixSmallAreaWire() Standard_Real prec = ::Precision::PConfusion()*100; for (TopoDS_Iterator wi (myFace, Standard_False); wi.More(); wi.Next()) { if(wi.Value().ShapeType() != TopAbs_WIRE && - (wi.Value().Orientation() != TopAbs_FORWARD || wi.Value().Orientation() != TopAbs_REVERSED)) + (wi.Value().Orientation() != TopAbs_FORWARD && wi.Value().Orientation() != TopAbs_REVERSED)) continue; TopoDS_Wire wire = TopoDS::Wire ( wi.Value() ); Handle(ShapeAnalysis_Wire) saw = new ShapeAnalysis_Wire(wire,myFace,prec); -- 2.20.1