0023497: EDF 15720 - Projection transforms the type of shape

This commit is contained in:
jfa 2018-08-15 12:59:41 +03:00
parent 306370e41f
commit 2b52706653

View File

@ -240,6 +240,18 @@ Standard_Integer GEOMImpl_ProjectionDriver::Execute(Handle(TFunction_Logbook)& l
TopoDS_Iterator anIter(aShape);
if (!anIter.More())
Standard_ConstructionError::Raise("Projection aborted : empty compound produced");
if (anOriginal.ShapeType() == TopAbs_WIRE) {
// Make wire from resulting compound (Mantis issue 0023497)
TopTools_ListOfShape anEdgesList;
for (; anIter.More(); anIter.Next()) {
anEdgesList.Append(anIter.Value());
}
BRepBuilderAPI_MakeWire aMkWire;
aMkWire.Add(anEdgesList);
if (aMkWire.IsDone())
aShape = aMkWire.Wire();
}
}
}