]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
debug of the channel creation
authorasl <asl@opencascade.com>
Thu, 26 Dec 2013 09:49:53 +0000 (09:49 +0000)
committerasl <asl@opencascade.com>
Thu, 26 Dec 2013 09:49:53 +0000 (09:49 +0000)
src/HYDROData/HYDROData_Profile.cxx

index 6ed959ceb097667b46f020169b0c345c70b0be61..f970509e255594371801463ab7ba79218b6f0673 100755 (executable)
@@ -7,6 +7,7 @@
 
 #include <BRepBuilderAPI_MakeEdge.hxx>
 #include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakePolygon.hxx>
 
 #include <gp_XY.hxx>
 #include <gp_XYZ.hxx>
@@ -85,7 +86,21 @@ void HYDROData_Profile::Update()
 {
   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 )
@@ -104,7 +119,7 @@ void HYDROData_Profile::Update()
 
   TopoDS_Wire aWire;
   if ( aMakeWire.IsDone() )
-    aWire = aMakeWire;
+    aWire = aMakeWire;*/
 
   SetShape3D( aWire );
 }