Salome HOME
Mantis issue 0021392: EDF 1631 GEOM: Dump study of sketcher 3D with relatives coordin...
[modules/geom.git] / src / GEOM_I / GEOM_IBlocksOperations_i.cc
index 9ecf62a22b374ae2c7505c807877103d513902dc..c71432528a43e0597f7e7fbc411e0332bab9365f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -18,7 +18,6 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 #include <Standard_Stream.hxx>
 
@@ -742,6 +741,39 @@ char* GEOM_IBlocksOperations_i::PrintBCErrors
   return CORBA::string_dup(aDescr.ToCString());
 }
 
+//=============================================================================
+/*!
+ *  GetNonBlocks
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetNonBlocks
+                                      (GEOM::GEOM_Object_ptr theShape,
+                                       GEOM::GEOM_Object_out theNonQuads)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+  GEOM::GEOM_Object_var aNonQuads;
+
+  theNonQuads = aNonQuads._retn();
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference Objects
+  Handle(GEOM_Object) aShape = GetObjectImpl(theShape);
+  if (aShape.IsNull()) return aGEOMObject._retn();
+
+  //Get the result
+  Handle(GEOM_Object) aFaces;
+  Handle(GEOM_Object) anObject = GetOperations()->GetNonBlocks(aShape, aFaces);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  if (!aFaces.IsNull())
+    theNonQuads = GetObject(aFaces);
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  RemoveExtraEdges