+
+ HYDROData_Stream::PrsDefinition aPrsDef;
+
+ TopoDS_Shape Out3dPres;
+ TopoDS_Shape Out2dPres;
+ TopoDS_Shape OutLeftB;
+ TopoDS_Shape OutRightB;
+ TopoDS_Shape OutInlet;
+ TopoDS_Shape OutOutlet;
+
+ HYDROGUI_StreamDlg* aPanel = ::qobject_cast<HYDROGUI_StreamDlg*>( inputPanel() );
+ double ddz = aPanel->getDDZ();
+ double ss = aPanel->getSpatialStep();
+
+ std::set<int> InvInd;
+
+#ifdef _DEBUG
+ const int MAX_POINTS_IN_PREVIEW = 50000;
+#else
+ const int MAX_POINTS_IN_PREVIEW = 500000;
+#endif
+
+ HYDROData_Bathymetry::AltitudePoints points;
+
+ bool ProjStat = true;
+ HYDROData_DTM::CreateProfilesFromDTM( aRefProfiles, ddz, ss, points, Out3dPres, Out2dPres, OutLeftB, OutRightB,
+ OutInlet, OutOutlet, true, true, InvInd, MAX_POINTS_IN_PREVIEW, ProjStat );
+
+ aPanel->clearAllBackgroundColorsForProfileList();
+ for (std::set<int>::const_iterator it = InvInd.begin(); it != InvInd.end(); it++)
+ aPanel->setBackgroundColorForProfileList(*it, QColor(Qt::yellow));
+
+ aPrsDef.myInlet = OutInlet;
+ aPrsDef.myOutlet = OutOutlet;
+ aPrsDef.myLeftBank = OutLeftB;
+ aPrsDef.myRightBank = OutRightB;
+ if (ProjStat)
+ aPrsDef.myPrs2D = Out2dPres;
+ aPrsDef.myPrs3D = Out3dPres;
+
+ if (!ProjStat)
+ aPanel->addWarning(tr("STREAM_PROJECTION_FAILED"));
+
+ myPreviewPrs->setShape( aPrsDef.myPrs2D );