LSE.Append(E);
}
- BRepLib_MakeWire WM;
- WM.Add(LSE);
- TopoDS_Shape aShapeW;
- if (WM.IsDone())
- aShapeW = WM.Wire();
- else
- continue;
+
+ TopoDS_Shape aShapeOut;
+ if (LSE.Extent() == 1)
+ {
+ aShapeOut = LSE.First();
+ }
+ else if (LSE.Extent() > 1)
+ {
+ BRepLib_MakeWire WM;
+ WM.Add(LSE);
+ if (WM.IsDone())
+ aShapeOut = WM.Wire();
+ else
+ continue;
+ }
+ else continue;
Handle( HYDROData_PolylineXY ) aPolyline =
Handle( HYDROData_PolylineXY )::DownCast( theDocument->CreateObject( KIND_POLYLINEXY ) );
if( aPolyline.IsNull() )
return false;
- aPolyline->SetShape( aShapeW );
+ aPolyline->SetShape( aShapeOut );
int anIndex = 0;
QString aName = K;