Bug 0019766: EDF 720 GEOM: Building a Wire from unconnected edges by introducing a tolerance. Fix a problem.

This commit is contained in:
jfa 2009-06-04 13:20:44 +00:00
parent 9557a996af
commit bb5f1e62ee

View File

@ -168,20 +168,22 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
if (aFW->StatusConnected(ShapeExtend_FAIL)) { if (aFW->StatusConnected(ShapeExtend_FAIL)) {
Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire"); Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire");
} }
// IMP 0019766 // IMP 0019766
aFW->FixGapsByRangesMode() = Standard_True; if (aFW->StatusConnected(ShapeExtend_DONE3)) {
if (aFW->FixGaps3d()) { // Confused with <prec> but not Analyzer.Precision(), set the same
Handle(ShapeExtend_WireData) sbwd = aFW->WireData(); aFW->FixGapsByRangesMode() = Standard_True;
Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge; if (aFW->FixGaps3d()) {
for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) { Handle(ShapeExtend_WireData) sbwd = aFW->WireData();
TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge)); Handle(ShapeFix_Edge) aFe = new ShapeFix_Edge;
aFe->FixVertexTolerance(aEdge); for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) {
aFe->FixSameParameter(aEdge); 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(); aShape = aFW->WireAPIMake();