Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit '0d956a814' into pre/IMPS_2016
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_PolylineOperator.cxx
diff --git
a/src/HYDROData/HYDROData_PolylineOperator.cxx
b/src/HYDROData/HYDROData_PolylineOperator.cxx
index 43fb6799520b45b8e48c4b31bbd961c3d72ccba0..07387a6e9d0cf085fba22e6aca6e2ee26cee61fc 100644
(file)
--- a/
src/HYDROData/HYDROData_PolylineOperator.cxx
+++ b/
src/HYDROData/HYDROData_PolylineOperator.cxx
@@
-487,13
+487,22
@@
bool HYDROData_PolylineOperator::Extract( const Handle(HYDROData_Document)& theD
LSE.Append(E);
}
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 ) );
Handle( HYDROData_PolylineXY ) aPolyline =
Handle( HYDROData_PolylineXY )::DownCast( theDocument->CreateObject( KIND_POLYLINEXY ) );
@@
-501,7
+510,7
@@
bool HYDROData_PolylineOperator::Extract( const Handle(HYDROData_Document)& theD
if( aPolyline.IsNull() )
return false;
if( aPolyline.IsNull() )
return false;
- aPolyline->SetShape( aShape
W
);
+ aPolyline->SetShape( aShape
Out
);
int anIndex = 0;
QString aName = K;
int anIndex = 0;
QString aName = K;