#include <Geom_Plane.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepLib.hxx>
+#include <BRepLib_MakePolygon.hxx>
+#include <TopoDS_Compound.hxx>
+#include <BRep_Builder.hxx>
static std::vector<gp_Pnt2d> GetProfileUZPoints(const Handle(HYDROData_Profile)& theProfile)
{
InsertPoints(profilesPoints[i], nbPointsToInsert);
}
+ TopoDS_Compound cmp2d;
+ if ( buildPresentationShapes)
+ {
+ BRep_Builder().MakeCompound(cmp2d);
+ BRep_Builder().Add(cmp2d, prsDef.myLeftBank);
+ BRep_Builder().Add(cmp2d, prsDef.myRightBank);
+ }
+
for (int i=0;i<profilesPoints.size()-1;i++)
{
const std::vector<gp_Pnt2d>& prof1 = profilesPoints[i];
HYDROData_Bathymetry::AltitudePoint AP(profile_points3d(k).X(), profile_points3d(k).Y(), profile_points3d(k).Z());
outBathypoints.push_back(AP);
}
+ if (buildPresentationShapes)
+ {
+ if (m==0 || i == profilesPoints.size()-2 && param == indToParam.rbegin()->second) //if last prof1/prof2 segment => take a last profile too
+ {
+ BRepLib_MakePolygon PM;
+ for (int k=1;k<=profile_points3d.Length();k++)
+ PM.Add(gp_Pnt(profile_points3d(k)));
+ if (PM.IsDone())
+ {
+ const TopoDS_Wire& resW = PM.Wire();
+ BRep_Builder().Add(cmp2d, resW);
+ }
+ }
+ }
}
}
+ if (buildPresentationShapes)
+ {
+ prsDef.myPrs3D = cmp2d;
+ }
//outBathy->SetAltitudePoints(bathypoints);
}