From: jfa Date: Thu, 4 Jun 2009 13:20:44 +0000 (+0000) Subject: Bug 0019766: EDF 720 GEOM: Building a Wire from unconnected edges by introducing... X-Git-Tag: V5_1_2rc2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bb5f1e62ee0b33b016cbb1766bf3698a39cd5199;p=modules%2Fgeom.git Bug 0019766: EDF 720 GEOM: Building a Wire from unconnected edges by introducing a tolerance. Fix a problem. --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 1165007ea..ca0f348ed 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -168,20 +168,22 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const if (aFW->StatusConnected(ShapeExtend_FAIL)) { Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire"); } - // IMP 0019766 - aFW->FixGapsByRangesMode() = Standard_True; - if (aFW->FixGaps3d()) { - Handle(ShapeExtend_WireData) sbwd = aFW->WireData(); - Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge; - for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) { - TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge)); - aFe->FixVertexTolerance(aEdge); - aFe->FixSameParameter(aEdge); + if (aFW->StatusConnected(ShapeExtend_DONE3)) { + // Confused with but not Analyzer.Precision(), set the same + aFW->FixGapsByRangesMode() = Standard_True; + if (aFW->FixGaps3d()) { + Handle(ShapeExtend_WireData) sbwd = aFW->WireData(); + Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge; + for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) { + TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge)); + aFe->FixVertexTolerance(aEdge); + aFe->FixSameParameter(aEdge); + } + } + else if (aFW->StatusGaps3d(ShapeExtend_FAIL)) { + Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps"); } - } - else if (aFW->StatusGaps3d(ShapeExtend_FAIL)) { - Standard_ConstructionError::Raise("Wire construction failed: cannot fix 3d gaps"); } aShape = aFW->WireAPIMake();