def FilterGenerator():
    class SandlerSimplificationFilter(SimplifyFilter):
        def __init__(self):
            super(SandlerSimplificationFilter, self).__init__('sander_simplify', 'Simplifies the mesh based on sandler, et al. method.')
            self.arguments.append(FileArgument('pm_file', 'Where to save the progressive mesh stream'))
        def apply(self, mesh, pm_file):
            try:
                pmout = open(pm_file, 'w')
            except __HOLE__:
                pmout = pm_file
            
            s = SanderSimplify(mesh, pmout)
            if USE_IPDB:
                with launch_ipdb_on_exception():
                    mesh = s.simplify()
            else:
                mesh = s.simplify()
            return mesh
    return SandlerSimplificationFilter()
dataset/ETHPy150Open pycollada/meshtool/meshtool/filters/simplify_filters/sander_simplify.py/FilterGenerator