#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakePolygon.hxx>
#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
{
HYDROData_Object::Update();
- BRepBuilderAPI_MakeWire aMakeWire;
+ BRepBuilderAPI_MakePolygon aMakeWire;
+
+ ProfilePoints aProfilePoints = GetProfilePoints();
+ for ( int i = 1, n = aProfilePoints.Length(); i <= n ; ++i )
+ {
+ ProfilePoint aPoint = aProfilePoints.Value( i );
+ gp_Pnt aPnt( aPoint.X(), aPoint.Y(), aPoint.Z() );
+ aMakeWire.Add( aPnt );
+ }
+
+ TopoDS_Wire aWire;
+ if ( aMakeWire.IsDone() )
+ aWire = aMakeWire.Wire();
+
+ /*BRepBuilderAPI_MakeWire aMakeWire;
ProfilePoints aProfilePoints = GetProfilePoints();
for ( int i = 1, n = aProfilePoints.Length(); i < n ; ++i )
TopoDS_Wire aWire;
if ( aMakeWire.IsDone() )
- aWire = aMakeWire;
+ aWire = aMakeWire;*/
SetShape3D( aWire );
}