From: jfa Date: Fri, 4 Feb 2022 18:25:03 +0000 (+0300) Subject: [bos #28816] EDF 24678 - tolerance with wires X-Git-Tag: V9_9_0a1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=807a056cd815fb5ebde22d63d55becb1670efd7d;p=modules%2Fgeom.git [bos #28816] EDF 24678 - tolerance with wires --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 60b9816ab..0a0709276 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -1127,7 +1127,17 @@ TopoDS_Wire GEOMImpl_ShapeDriver::MakeWireFromEdges(const Handle(TColStd_HSequen } // IMP 0019766: Building a Wire from unconnected edges by introducing a tolerance - aFW->ClosedWireMode() = Standard_False; + // aaajfa + bool isClosed = false; + Handle(ShapeAnalysis_Wire) asaw = aFW->Analyzer(); + if (asaw->CheckGap3d(1)) { // between last and first edges + Standard_Real dist = asaw->MinDistance3d(); + if (dist < theTolerance) + isClosed = true; + } + aFW->ClosedWireMode() = isClosed; + // aaajfa + //aFW->ClosedWireMode() = Standard_False; aFW->FixConnected(theTolerance); if (aFW->StatusConnected(ShapeExtend_FAIL)) { Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire");