}
else
{
- setPolylineShape( theShape );
+ TopoDS_Shape aShape = theShape;
+
+ if ( theShape.ShapeType() == TopAbs_EDGE )
+ {
+ // We make the wire from incoming edge because of other algorithms
+ // are waiting at least the wire from polyline
+ TopoDS_Edge anEdge = TopoDS::Edge( theShape );
+ BRepBuilderAPI_MakeWire aMakeWire( anEdge );
+ aMakeWire.Build();
+ if ( aMakeWire.IsDone() )
+ aShape = aMakeWire.Wire();
+ }
+
+ setPolylineShape( aShape );
}
setEditable( anIsCanBeImported );
if ( aShape.IsNull() )
return anIsClosed;
- if ( aShape.ShapeType() == TopAbs_EDGE )
- {
- //For unrecognized curves from GEOM module
- anIsClosed = BRep_Tool::IsClosed( aShape );
- return anIsClosed;
- }
-
TopTools_SequenceOfShape aWires;
HYDROData_ShapesTool::ExploreShapeToShapes( aShape, TopAbs_WIRE, aWires );