From 11772a6407ab23d746f46e04aab173f5c4450c77 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 26 Dec 2013 09:49:53 +0000 Subject: [PATCH] debug of the channel creation --- src/HYDROData/HYDROData_Profile.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/HYDROData/HYDROData_Profile.cxx b/src/HYDROData/HYDROData_Profile.cxx index 6ed959ce..f970509e 100755 --- a/src/HYDROData/HYDROData_Profile.cxx +++ b/src/HYDROData/HYDROData_Profile.cxx @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -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 ); } -- 2.39.2