Salome HOME
Mantis issue 0021565: [CEA 557] Opposite of the pipe
[modules/geom.git] / src / GEOM_I / GEOM_IAdvancedOperations_i.cc
index 4f932f1574b67a42c1f7d5cc9ba04d03a32d2902..77310827f73d307d2bd738763352ee097c0038c0 100644 (file)
@@ -330,7 +330,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
  *  \return New GEOM_Object, containing the created shape.
  */
 //=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR, CORBA::Double theRatio)
+GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR, 
+                                                                   CORBA::Double theRatio, 
+                                                                   CORBA::Short theOrientation,
+                                                                   GEOM::pattern thePattern)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
@@ -338,7 +341,63 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double
   GetOperations()->SetNotDone();
 
   //Create the DividedDisk
-  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedDisk(theR, theRatio);
+  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedDisk(theR, theRatio, theOrientation, thePattern);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeDividedDiskPntVecR
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt, 
+                                                                          GEOM::GEOM_Object_ptr theVec,
+                                                                          CORBA::Double theR,
+                                                                          CORBA::Double theRatio,
+                                                                          GEOM::pattern thePattern)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference points
+  Handle(GEOM_Object) aPnt = GetObjectImpl(thePnt);
+  Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
+
+  if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
+
+  // Make DividedDisk
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakeDividedDiskPntVecR(aPnt, aVec, theR, theRatio, thePattern);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  Builds a cylinder prepared for hexa meshes
+ *  \param theR Radius of the cylinder
+ *  \param theH Height of the cylinder
+ *  \return New GEOM_Object, containing the created shape.
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR, 
+                                                                       CORBA::Double theH,
+                                                                       GEOM::pattern thePattern)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Create the DividedCylinder
+  Handle(GEOM_Object) anObject = GetOperations()->MakeDividedCylinder(theR, theH, thePattern);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();