From: mzn Date: Fri, 22 Nov 2013 07:36:13 +0000 (+0000) Subject: Bugs 113, 114: polyline which are not a wire is not allowed to be a limit. X-Git-Tag: BR_hydro_v_0_3_1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=603e4d56e36c1f0b71f08806f66dbbae09013e7f;p=modules%2Fhydro.git Bugs 113, 114: polyline which are not a wire is not allowed to be a limit. --- diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 192e5559..707a3086 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -93,12 +93,16 @@ void HYDROGUI_CalculationOp::startOperation() aPolylineObj = Handle(HYDROData_Polyline)::DownCast( anIter.Current() ); if ( !aPolylineObj.IsNull() && aPolylineObj->IsClosed() ) - { - aPolylineName = aPolylineObj->GetName(); - if ( !aPolylineName.isEmpty() ) - { - aList.append( aPolylineName ); - anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) ); + { + // Check the polyline shape + TopoDS_Shape aPolylineShape = aPolylineObj->GetTopShape(); + if ( !aPolylineShape.IsNull() && aPolylineShape.ShapeType() == TopAbs_WIRE ) { + aPolylineName = aPolylineObj->GetName(); + if ( !aPolylineName.isEmpty() ) + { + aList.append( aPolylineName ); + anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) ); + } } } }