EDF 25230 - Impossible to create directly a face

This commit is contained in:
Ekaterina Sukhareva 2024-02-06 11:01:51 +00:00
parent e067674b75
commit aecc16bb84

View File

@ -494,6 +494,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
Handle(TopTools_HSequenceOfShape) aSeqEdgesIn = new TopTools_HSequenceOfShape; Handle(TopTools_HSequenceOfShape) aSeqEdgesIn = new TopTools_HSequenceOfShape;
TColStd_IndexedDataMapOfTransientTransient aMapTShapes; TColStd_IndexedDataMapOfTransientTransient aMapTShapes;
Standard_Real aTolerance = Precision::Confusion();
for (ind = 1; ind <= nbshapes; ind++) { for (ind = 1; ind <= nbshapes; ind++) {
Handle(GEOM_Function) aRefSh_i = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); Handle(GEOM_Function) aRefSh_i = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
TopoDS_Shape aSh_i = aRefSh_i->GetValue(); TopoDS_Shape aSh_i = aRefSh_i->GetValue();
@ -503,7 +504,11 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
if (aMapEdges.Add(anExpE_i.Current())) { if (aMapEdges.Add(anExpE_i.Current())) {
// Copy the original shape. // Copy the original shape.
TopoDS_Shape aShapeCopy; TopoDS_Shape aShapeCopy;
Standard_Real aCurTol = BRep_Tool::MaxTolerance(anExpE_i.Current(), TopAbs_EDGE);
if(aCurTol > aTolerance)
{
aTolerance = aCurTol;
}
TNaming_CopyShape::CopyTool TNaming_CopyShape::CopyTool
(anExpE_i.Current(), aMapTShapes, aShapeCopy); (anExpE_i.Current(), aMapTShapes, aShapeCopy);
aSeqEdgesIn->Append(aShapeCopy); aSeqEdgesIn->Append(aShapeCopy);
@ -517,7 +522,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
// 2. Connect edges to wires of maximum length // 2. Connect edges to wires of maximum length
Handle(TopTools_HSequenceOfShape) aSeqWiresOut; Handle(TopTools_HSequenceOfShape) aSeqWiresOut;
ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdgesIn, Precision::Confusion(), ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdgesIn, aTolerance,
/*shared*/Standard_False, aSeqWiresOut); /*shared*/Standard_False, aSeqWiresOut);
//modified by NIZNHY-PKV Wed Dec 28 13:46:55 2011f //modified by NIZNHY-PKV Wed Dec 28 13:46:55 2011f
//KeepEdgesOrder(aSeqEdgesIn, aSeqWiresOut); //KeepEdgesOrder(aSeqEdgesIn, aSeqWiresOut);