#include <BRep_Tool.hxx>
+#include <Bnd_Box.hxx>
+#include <BRepBndLib.hxx>
+
#include <Geom_BSplineCurve.hxx>
#include <gp_Pnt2d.hxx>
TopoDS_Wire aResWire = HYDROData_PolylineXY::BuildWire( aSectionType, anIsSectionClosed, aResPoints );
SetTopShape( aResWire );
SetShape3D( aResWire );
+
+ double Xmin=0, Xmax=0, Ymin=0, Ymax=0, Zmin=-9999, Zmax=-9999;
+ Bnd_Box B;
+ BRepBndLib::Add(aResWire, B);
+ B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
+ SetMiddleZ((Zmin+Zmax)/2.);
}
QColor HYDROData_Polyline3D::DefaultFillingColor()