# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
# GEOM_SWIG : binding of C++ implementaion with Python
# File : GEOM_TestHealing.py
ii = ii + 1
pass
+def TestRemoveWebs (geompy):
+
+ # create solids with some coincident faces
+ Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+ Translation_1 = geompy.MakeTranslation(Box_1, 200, 0, 0)
+ Translation_2 = geompy.MakeTranslation(Box_1, 200, 200, 0)
+
+ geompy.addToStudy(Box_1, 'Box_1')
+ geompy.addToStudy(Translation_1, 'Translation_1')
+ geompy.addToStudy(Translation_2, 'Translation_2')
+
+ # partition three solids to obtain shared faces
+ Partition_1 = geompy.MakePartition([Box_1, Translation_1, Translation_2])
+ geompy.addToStudy(Partition_1, 'Partition_1')
+
+ # remove shared faces to obtain one solid instead of three
+ Joined_1 = geompy.RemoveInternalFaces(Partition_1)
+ geompy.addToStudy(Joined_1, 'Joined_1')
+
def TestHealingOperations (geompy, math):
TestMakeSewing(geompy, math)
TestSuppressFaces(geompy)
TestProcessShape(geompy)
TestFuseEdges(geompy)
+ TestRemoveWebs(geompy)