def simply_closed(self, primitives=None):
        primitives = primitives or self.primitives
        # We do this by counting the number of triangles on each triangle edge
        # Specifically check that this value is exactly 2 for every edge.1
        edges = { }
        def _inc(a, b):
            """Increment edge count for vertex indices a, b.
               Return True if edge count has exceeded 2"""
            if a > b:
                return _inc(b, a)
            if (a, b) in edges:
                edges[(a, b)] += 1
            else:
                edges[(a, b)] = 1
            return edges[(a, b)] > 2

        for (i1, i2, i3) in primitives:
            if _inc(i1, i2):
                return False
            if _inc(i2, i3):
                return False
            if _inc(i3, i1):
                return False

        for (_, v) in edges.items():
            if v != 2:
                return False

        return True
Stop all services.
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/mesh.py/Mesh.simply_closed--crossover with--dataset/ETHPy150Open clips/pattern/pattern/server/cherrypy/cherrypy/process/wspbus.py/Bus.stop