]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
To implement issue 0019962: MakePipeBiNormalAlongAxis implementation.
authorakl <akl@opencascade.com>
Mon, 29 Sep 2008 07:32:29 +0000 (07:32 +0000)
committerakl <akl@opencascade.com>
Mon, 29 Sep 2008 07:32:29 +0000 (07:32 +0000)
doc/salome/gui/GEOM/images/pipe2.png [new file with mode: 0755]
doc/salome/gui/GEOM/images/pipebinormalsn.png [new file with mode: 0644]
doc/salome/gui/GEOM/input/creating_extrusion_alongpath.doc
doc/salome/gui/GEOM/input/tui_complex_objs.doc
src/GEOM_I/GEOM_I3DPrimOperations_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.hh
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_SWIG/geompyDC.py
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.h

diff --git a/doc/salome/gui/GEOM/images/pipe2.png b/doc/salome/gui/GEOM/images/pipe2.png
new file mode 100755 (executable)
index 0000000..0a69cd8
Binary files /dev/null and b/doc/salome/gui/GEOM/images/pipe2.png differ
diff --git a/doc/salome/gui/GEOM/images/pipebinormalsn.png b/doc/salome/gui/GEOM/images/pipebinormalsn.png
new file mode 100644 (file)
index 0000000..d5add9f
Binary files /dev/null and b/doc/salome/gui/GEOM/images/pipebinormalsn.png differ
index 77e453170638ccee3838da3f09a90e6772d2db07..e0a629bb0fc873100886e42a4345544da625af50 100644 (file)
@@ -4,7 +4,7 @@
 
 To generate a \b Pipe in the <b>Main Menu</b> select <b>New Entity - > Generation  - > Extrusion along a path</b>
 
-\n To create an extruded \b Pipe shape, you need to define the <b>Base
+\n Firstly, to create an extruded \b Pipe shape, you can define the <b>Base
 Object</b> (vertex, edge, planar wire, face or shell), which will be extruded
 and the <b>Path Object</b> (edge or wire) along which the <b>Base 
 Object</b> will be extruded.
@@ -18,12 +18,30 @@ definition of the path.
 
 \image html pipe.png
 
+\n Secondly, you can define the <b>Base
+Object</b> (edge, planar wire or face), which will be extruded, 
+the <b>Path Object</b> (edge or wire) along which the <b>Base 
+Object</b> will be extruded and the <b>Vector</b> (edge or wire)
+to keep constant angular relations between the sections and this one.
+\n The \b Result of the operation will be a GEOM_Object (edge, face, shell,
+solid or compsolid).
+
+\n <b>TUI Command:</b> <em>geompy.MakePipeBiNormalAlongVector(baseShape, pathShape, binormalShape)</em>
+\n <b>Arguments:</b> Name + 1 shape (edge, planar wire or face) 
+serving as base object + 1 shape (edge or wire) for
+definition of the path + 1 shape (edge or wire) to set a fixed 
+BiNormal direction to perform the extrusion.
+
+\image html pipe2.png
+
 <b>Example:</b>
 
 \image html pipe_wire_edgesn.png
 
 \image html pipesn.png
 
+\image html pipebinormalsn.png
+
 Our <b>TUI Scripts</b> provide you with useful examples of creation of
 \ref tui_creation_pipe "Complex Geometric Objects".
 
index 2f4fa50765a6f9ae5e177e2072565d50927e186b..254846e07db343a1f153c9588a176fa971e824f4 100644 (file)
@@ -543,4 +543,84 @@ gg.createAndDisplayGO(id_pipe)
 gg.setDisplayMode(id_pipe,1) 
 \endcode
 
+\anchor tui_creation_pipe_binormal_along_vector
+<br><h2>Creation of a PipeBiNormalAlongVector</h2>
+
+\code
+def MakeHelix(radius, height, rotation, direction):
+    #  - create a helix -
+    radius = 1.0 * radius
+    height = 1.0 * height
+    rotation = 1.0 * rotation
+    if direction > 0:
+        direction = +1
+    else:
+        direction = -1
+        pass
+    from math import sqrt
+    length_z  = height
+    length_xy = radius*rotation
+    length = sqrt(length_z*length_z + length_xy*length_xy)
+    import geompy
+    nb_steps = 1
+    epsilon = 1.0e-6
+    while 1:
+        z_step = height / nb_steps
+        angle_step = rotation / nb_steps
+        z = 0.0
+        angle = 0.0
+        helix_points = []
+        for n in range(nb_steps+1):
+            from math import cos, sin
+            x = radius * cos(angle)
+            y = radius * sin(angle)
+            p = geompy.MakeVertex(x, y, z)
+            helix_points.append( p )
+            z += z_step
+            angle += direction * angle_step
+            pass
+        helix = geompy.MakeInterpol(helix_points)
+        length_test = geompy.BasicProperties(helix)[0]
+        prec = abs(length-length_test)/length
+        # print nb_steps, length_test, prec
+        if prec < epsilon:
+            break
+        nb_steps *= 2
+        pass
+    return helix
+
+def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation=0.0):
+    #  - create a pipe -
+    thread_radius = 1.0 * thread_radius
+    # create a helix
+    helix = MakeHelix(radius, height, rotation, direction)
+    # base in the (Ox, Oz) plane
+    import geompy
+    p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
+    p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
+    p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
+    p3 = geompy.MakeVertex(radius-3*thread_radius, 0.0, +thread_radius)
+    e0 = geompy.MakeEdge(p0, p1)
+    e1 = geompy.MakeEdge(p1, p2)
+    e2 = geompy.MakeEdge(p2, p3)
+    e3 = geompy.MakeEdge(p3, p0)
+    w = geompy.MakeWire([e0, e1, e2, e3])
+    # create a base face
+    base = geompy.MakeFace(w, True)
+    # create a binormal vector
+    binormal = geompy.MakeVectorDXDYDZ(0.0, 0.0, 10.0)
+    # create a pipe
+    spring = geompy.MakePipeBiNormalAlongVector(base, helix, binormal)
+    # Publish in the study
+    geompy.addToStudy(base, "base")
+    geompy.addToStudy(helix, "helix")
+    geompy.addToStudy(binormal, "binormal")
+    geompy.addToStudy(spring, "spring")
+    return spring
+
+from math import pi
+
+spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2)
+\endcode
+
 */
index 6e6a4b8be29745e73f4375c780639fb5eec0e4f3..ae0ba98c6baab53d56f8e0ff940e69dfec604f29 100644 (file)
@@ -1031,3 +1031,40 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeShellsWithoutPath
 
   return GetObject(anObject);
 }
+
+
+//=============================================================================
+/*!
+ *  MakePipeBiNormalAlongVector
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeBiNormalAlongVector
+                 (GEOM::GEOM_Object_ptr theBase, 
+                 GEOM::GEOM_Object_ptr thePath, 
+                 GEOM::GEOM_Object_ptr theVec)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (theBase == NULL || thePath == NULL || theVec == NULL) return aGEOMObject._retn();
+
+  //Get the reference objects
+  Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject
+    (theBase->GetStudyID(), theBase->GetEntry());
+  Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject
+    (thePath->GetStudyID(), thePath->GetEntry());
+  Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject
+    (theVec->GetStudyID(), theVec->GetEntry());
+
+  if (aBase.IsNull() || aPath.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
+
+  //Create the Pipe
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePipeBiNormalAlongVector(aBase, aPath, aVec);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
index 0f5641eae6a536e2174d91ecfa851ae2b66c6472..b8464650c8f2d8ed4140c872134809ac3206bb88 100644 (file)
@@ -156,6 +156,10 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
   GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
                                                  const GEOM::ListOfGO& theLocations);
 
+  GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
+                                                    GEOM::GEOM_Object_ptr thePath,
+                                                    GEOM::GEOM_Object_ptr theVec);
+
   ::GEOMImpl_I3DPrimOperations* GetOperations()
   { return (::GEOMImpl_I3DPrimOperations*)GetImpl(); }
 };
index 97d7f17af36133b208b8f981c2dfa4a1f7c0abca..910c380bdc254a17e98a70baf65e9884d15c0ab5 100644 (file)
@@ -1222,6 +1222,24 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeShellsWithoutPath
 }
 
 
+//=============================================================================
+//  MakePipe:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeBiNormalAlongVector 
+                                                (GEOM::GEOM_Object_ptr theBase, 
+                                                GEOM::GEOM_Object_ptr thePath, 
+                                                GEOM::GEOM_Object_ptr theVec)
+{
+  beginService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
+  MESSAGE("GEOM_Superv_i::MakePipeBiNormalAlongVector");
+  get3DPrimOp();
+  GEOM::GEOM_Object_ptr anObj = 
+    my3DPrimOp->MakePipeBiNormalAlongVector(theBase, thePath, theVec);
+  endService( " GEOM_Superv_i::MakePipeBiNormalAlongVector" );
+  return anObj;
+}
+
+
 //=============================================================================
 //  MakeFuse:
 //=============================================================================
index 75a66523e5f9fd15788da4d827220e6d81fb2d5a..e35bf641b5a01c985ee4a387ad68681797e8de8b 100644 (file)
@@ -282,6 +282,10 @@ public:
   GEOM::GEOM_Object_ptr MakePipeShellsWithoutPath(const GEOM::ListOfGO& theBases,
                                                  const GEOM::ListOfGO& theLocations);
   
+  GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
+                                                    GEOM::GEOM_Object_ptr thePath,
+                                                    GEOM::GEOM_Object_ptr theVec);
+
   //-----------------------------------------------------------//
   // BooleanOperations                                         //
   //-----------------------------------------------------------//
index 2b2f27dc3bd717d3f395ea1b09bacd6f1b5b3d03..d3477a9a3853e1f341764b090ff7036af397a6d1 100644 (file)
@@ -1139,6 +1139,23 @@ class geompyDC(GEOM._objref_GEOM_Gen):
             RaiseIfFailed("MakePipeShellsWithoutPath", self.PrimOp)
             return anObj
 
+        ## Create a shape by extrusion of the base shape along
+        #  the path shape with constant bi-normal direction along the given vector.
+        #  The path shape can be a wire or an edge.
+        #  @param theBase Base shape to be extruded.
+        #  @param thePath Path shape to extrude the base shape along it.
+        #  @param theVec Vector defines a constant binormal direction to keep the
+        #                same angle beetween the direction and the sections
+        #                along the sweep surface.
+        #  @return New GEOM_Object, containing the created pipe.
+        #
+        #  @ref tui_creation_pipe "Example"
+        def MakePipeBiNormalAlongVector(self,theBase, thePath, theVec):
+            # Example: see GEOM_TestAll.py
+            anObj = self.PrimOp.MakePipeBiNormalAlongVector(theBase, thePath, theVec)
+            RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
+            return anObj
+
         # end of l3_complex
         ## @}
 
index 4e15dd2ba7c52a615020a70e239b4f13c68e8126..0bc5e05f1b3311df218b36b5bb0f995d390447ee 100644 (file)
@@ -55,26 +55,26 @@ GenerationGUI_PipeDlg::GenerationGUI_PipeDlg (GeometryGUI* theGeometryGUI, QWidg
 {
   QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPE")));
   QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
+  QPixmap image2 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPE_BINORMAL")));
 
   setWindowTitle(tr("GEOM_PIPE_TITLE"));
 
   /***************************************************************/
   mainFrame()->GroupConstructors->setTitle(tr("GEOM_PIPE"));
   mainFrame()->RadioButton1->setIcon(image0);
-  mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
-  mainFrame()->RadioButton2->close();
+  mainFrame()->RadioButton2->setIcon(image2);
   mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
   mainFrame()->RadioButton3->close();
 
-  GroupPoints = new DlgRef_2Sel(centralWidget());
+  GroupPoints = new DlgRef_3Sel(centralWidget());
 
   GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
   GroupPoints->TextLabel1->setText(tr("GEOM_BASE_OBJECT"));
   GroupPoints->TextLabel2->setText(tr("GEOM_PATH_OBJECT"));
+  GroupPoints->TextLabel3->setText(tr("GEOM_VECTOR"));
   GroupPoints->PushButton1->setIcon(image1);
   GroupPoints->PushButton2->setIcon(image1);
-  GroupPoints->LineEdit1->setReadOnly(true);
-  GroupPoints->LineEdit2->setReadOnly(true);
+  GroupPoints->PushButton3->setIcon(image1);
 
   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
   layout->setMargin(0); layout->setSpacing(6);
@@ -105,28 +105,68 @@ void GenerationGUI_PipeDlg::Init()
   // init variables
   GroupPoints->LineEdit1->setReadOnly(true);
   GroupPoints->LineEdit2->setReadOnly(true);
+  GroupPoints->LineEdit3->setReadOnly(true);
 
   GroupPoints->LineEdit1->setText("");
   GroupPoints->LineEdit2->setText("");
-  myBase = myPath = GEOM::GEOM_Object::_nil();
-  myOkBase = myOkPath = false;
+  GroupPoints->LineEdit3->setText("");
+  myBase = myPath = myVec = GEOM::GEOM_Object::_nil();
+  myOkBase = myOkPath = myOkVec = false;
 
   // signals and slots connections
   connect(buttonOk(),    SIGNAL(clicked()), this, SLOT(ClickOnOk()));
   connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
 
+  connect(this,          SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
+
   connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
   connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
 
   connect(GroupPoints->LineEdit1,   SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
   connect(GroupPoints->LineEdit2,   SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupPoints->LineEdit3,   SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
 
   initName(tr("GEOM_PIPE"));
 
+  GroupPoints->TextLabel3->hide();
+  GroupPoints->PushButton3->hide();
+  GroupPoints->LineEdit3->hide();
+  ConstructorsClicked(0);
+
   GroupPoints->PushButton1->click();
   SelectionIntoArgument();
 }
 
+//=================================================================================
+// function : ConstructorsClicked()
+// purpose  : Radio button management
+//=================================================================================
+void GenerationGUI_PipeDlg::ConstructorsClicked( int constructorId )
+{
+  erasePreview();
+
+  switch (constructorId)
+  {
+    case 0:
+    {
+      GroupPoints->TextLabel3->hide();
+      GroupPoints->PushButton3->hide();
+      GroupPoints->LineEdit3->hide();
+      break;
+    }
+    case 1:
+    {
+      GroupPoints->TextLabel3->show();
+      GroupPoints->PushButton3->show();
+      GroupPoints->LineEdit3->show();
+      break;
+    }
+  }
+
+  displayPreview();
+}
+
 //=================================================================================
 // function : ClickOnOk()
 // purpose  :
@@ -147,6 +187,8 @@ bool GenerationGUI_PipeDlg::ClickOnApply()
     return false;
 
   initName();
+  if ( getConstructorId() != 1 )
+       ConstructorsClicked( getConstructorId() );
   // activate selection and connect selection manager
   GroupPoints->PushButton1->click();
   return true;
@@ -162,6 +204,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
   myEditCurrentArgument->setText("");
   if      (myEditCurrentArgument == GroupPoints->LineEdit1) myOkBase = false;
   else if (myEditCurrentArgument == GroupPoints->LineEdit2) myOkPath = false;
+  else if (myEditCurrentArgument == GroupPoints->LineEdit3) myOkVec  = false;
 
   LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
   SALOME_ListIO aSelList;
@@ -187,14 +230,23 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
         S.ShapeType() == TopAbs_SOLID ||
         S.ShapeType() == TopAbs_SHAPE)
       return;
+    if ( getConstructorId() == 1 && 
+        (S.ShapeType() == TopAbs_SHELL || 
+         S.ShapeType() == TopAbs_VERTEX))
+      return;
 
     myBase = aSelectedObject;
     myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
     myOkBase = true;
     if (!myOkPath)
       GroupPoints->PushButton2->click();
+    else if (!myOkVec)
+      GroupPoints->PushButton3->click();
   }
-  else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
+  else if (myEditCurrentArgument == GroupPoints->LineEdit2 || 
+          myEditCurrentArgument == GroupPoints->LineEdit3) {
+    myEditCurrentArgument == GroupPoints->LineEdit2 ? myOkPath = false : myOkVec = false;
+    bool myOk = false;
     QString aName = GEOMBase::GetName(aSelectedObject);
 
     if (aSelectedObject != myBase) {
@@ -210,27 +262,44 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
         if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
           GEOM::GEOM_IShapesOperations_var aShapesOp =
             getGeomEngine()->GetIShapesOperations(getStudyId());
-          myPath = aShapesOp->GetSubShape(aSelectedObject, anIndex);
-          myOkPath = true;
+          aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
+          myOk = true;
         }
         else { // get Object from study
-          myPath = aFindedObject;
-          myOkPath = true;
+          aSelectedObject = aFindedObject;
+          myOk = true;
         }
       }
       else {
-        myOkPath = true;
+        myOk = true;
         if (S.ShapeType() != TopAbs_EDGE) {
           aSelectedObject = GEOM::GEOM_Object::_nil();
           aName = "";
-          myOkPath = false;
+          myOk = false;
         }
-        myPath = aSelectedObject;
+      }
+      if (myEditCurrentArgument == GroupPoints->LineEdit2) {
+       myPath = aSelectedObject;
+       myOkPath = myOk;
+      }
+      else if (myEditCurrentArgument == GroupPoints->LineEdit3) {
+       myVec = aSelectedObject;
+       myOkVec = myOk;
       }
     }
     myEditCurrentArgument->setText(aName);
-    if (myOkPath && !myOkBase)
-      GroupPoints->PushButton1->click();
+    if (myOkPath) {
+      if (!myOkBase)
+       GroupPoints->PushButton1->click();
+      else if (!myOkVec)
+       GroupPoints->PushButton3->click();
+    }
+    else if (myOkVec) {
+      if (!myOkBase)
+       GroupPoints->PushButton1->click();
+      else if (!myOkPath)
+       GroupPoints->PushButton2->click();
+    }
   }
 
   // clear selection
@@ -252,15 +321,22 @@ void GenerationGUI_PipeDlg::SetEditCurrentArgument()
 
   disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
   globalSelection(GEOM_ALLSHAPES);
+  GroupPoints->PushButton1->setDown(false);
+  GroupPoints->PushButton2->setDown(false);
+  GroupPoints->PushButton3->setDown(false);
+  GroupPoints->LineEdit1->setEnabled(false);
+  GroupPoints->LineEdit2->setEnabled(false);
+  GroupPoints->LineEdit3->setEnabled(false);
   if (send == GroupPoints->PushButton1) {
     myEditCurrentArgument = GroupPoints->LineEdit1;
-    GroupPoints->PushButton2->setDown(false);
-    GroupPoints->LineEdit2->setEnabled(false);
   }
   else if (send == GroupPoints->PushButton2) {
     myEditCurrentArgument = GroupPoints->LineEdit2;
-    GroupPoints->PushButton1->setDown(false);
-    GroupPoints->LineEdit1->setEnabled(false);
+
+    localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+  }
+  else if(send == GroupPoints->PushButton3) {
+    myEditCurrentArgument = GroupPoints->LineEdit3;
 
     localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
   }
@@ -285,7 +361,8 @@ void GenerationGUI_PipeDlg::LineEditReturnPressed()
 {
   QLineEdit* send = (QLineEdit*)sender();
   if (send == GroupPoints->LineEdit1 ||
-      send == GroupPoints->LineEdit2) {
+      send == GroupPoints->LineEdit2 ||
+      send == GroupPoints->LineEdit3) {
     myEditCurrentArgument = send;
     GEOMBase_Skeleton::LineEditReturnPressed();
   }
@@ -328,7 +405,12 @@ GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation()
 //=================================================================================
 bool GenerationGUI_PipeDlg::isValid (QString&)
 {
-  return myOkBase && myOkPath;
+  switch ( getConstructorId() ) {
+  case 0 :
+    return myOkBase && myOkPath;
+  case 1 :
+    return myOkBase && myOkPath && myOkVec;
+  }
 }
 
 //=================================================================================
@@ -339,7 +421,15 @@ bool GenerationGUI_PipeDlg::execute (ObjectList& objects)
 {
   GEOM::GEOM_Object_var anObj;
 
-  anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->MakePipe(myBase, myPath);
+  switch ( getConstructorId() ) {
+  case 0 :
+    anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->MakePipe(myBase, myPath);
+    break;
+  case 1 :
+    anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation())->
+      MakePipeBiNormalAlongVector(myBase, myPath, myVec);
+    break;
+  }
 
   if (!anObj->_is_nil())
     objects.push_back(anObj._retn());
index 4200cf1f9f1bbb661373d29ae2402ef2259dd7be..51ebe83624dbc7c34a5e7f74c33e86118e7216ed 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <GEOMBase_Skeleton.h>
 
-class DlgRef_2Sel;
+class DlgRef_3Sel;
 
 //=================================================================================
 // class    : GenerationGUI_PipeDlg
@@ -56,10 +56,12 @@ private:
 private:
   GEOM::GEOM_Object_var              myBase; /* Base shape */
   GEOM::GEOM_Object_var              myPath; /* Shape, defining the path */
+  GEOM::GEOM_Object_var              myVec;  /* Vector, defining the constant binormal direction */
   bool                               myOkBase;
-  bool                               myOkPath; /* to check when arguments are defined */
+  bool                               myOkPath;
+  bool                               myOkVec; /* to check when arguments are defined */
   
-  DlgRef_2Sel*                       GroupPoints;
+  DlgRef_3Sel*                       GroupPoints;
 
 private slots:
   void                               ClickOnOk();
@@ -68,6 +70,7 @@ private slots:
   void                               LineEditReturnPressed();
   void                               SelectionIntoArgument();
   void                               SetEditCurrentArgument();
+  void                               ConstructorsClicked( int );
 };
 
 #endif // GENERATIONGUI_PIPEDLG_H