Salome HOME
0022178: [CEA 798] Sewing: Make option NonManifoldMode available in GEOM
[modules/geom.git] / src / GEOM_I / GEOM_IHealingOperations_i.cc
index 449e733026d2931fee3e3c453814ede970bdd93c..195b4a3a0384d92c6feedc55166ecb841ed16938 100644 (file)
@@ -356,7 +356,38 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::Sew (GEOM::GEOM_Object_ptr theO
 
   // Perform
   Handle(GEOM_Object) aNewObject =
-    GetOperations()->Sew( anObject, theTolerance );
+    GetOperations()->Sew( anObject, theTolerance, false );
+  if (!GetOperations()->IsDone() || aNewObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(aNewObject);
+}
+
+//=============================================================================
+/*!
+ *  SewAllowNonManifold
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::SewAllowNonManifold (GEOM::GEOM_Object_ptr theObject,
+                                                                      CORBA::Double theTolerance)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  // Set a not done flag
+  GetOperations()->SetNotDone();
+
+  // Check parameters
+  if (theTolerance < 0)
+    return aGEOMObject._retn();
+
+  // Get the object itself
+  Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
+  if (anObject.IsNull())
+    return aGEOMObject._retn();
+
+  // Perform
+  Handle(GEOM_Object) aNewObject =
+    GetOperations()->Sew( anObject, theTolerance, true );
   if (!GetOperations()->IsDone() || aNewObject.IsNull())
     return aGEOMObject._retn();