<commit_before># ***************************************************************************
# *                                                                         *
# *   Copyright (c) 2016 - <NAME> (DeepSOIC) <<EMAIL>>     *
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU Lesser General Public License (LGPL)    *
# *   as published by the Free Software Foundation; either version 2 of     *
# *   the License, or (at your option) any later version.                   *
# *   for detail see the LICENCE text file.                                 *
# *                                                                         *
# *   This program is distributed in the hope that it will be useful,       *
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
# *   GNU Library General Public License for more details.                  *
# *                                                                         *
# *   You should have received a copy of the GNU Library General Public     *
# *   License along with this program; if not, write to the Free Software   *
# *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
# *   USA                                                                   *
# *                                                                         *
# ***************************************************************************

__title__ = "CompoundTools.CompoundFilter"
__author__ = "DeepSOIC, <NAME>"
__url__ = "http://www.freecadweb.org"
__doc__ = "Compound Filter: remove some children from a compound (features)."


import FreeCAD
import Part
import math
import sys

# xrange is not available in python3
if sys.version_info.major >= 3:
    xrange = range

# OCC's Precision::Confusion; should have taken this from FreeCAD but haven't found; unlikely to ever change (DeepSOIC)
DistConfusion = 1e-7
ParaConfusion = 1e-8


def makeCompoundFilter(name):
    '''makeCompoundFilter(name): makes a CompoundFilter object.'''
    obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", name)
    _CompoundFilter(obj)
    _ViewProviderCompoundFilter(obj.ViewObject)
    return obj


class _CompoundFilter:
    "The CompoundFilter object"
    def __init__(self, obj):
        obj.addProperty("App::PropertyLink", "Base", "CompoundFilter", "Compound to be filtered")

        obj.addProperty("App::PropertyEnumeration", "FilterType", "CompoundFilter", "")
        obj.FilterType = ['bypass', 'specific items', 'collision-pass', 'window-volume', 'window-area', 'window-length', 'window-distance']
        obj.FilterType = 'bypass'

        # properties controlling "specific items" mode
        obj.addProperty("App::PropertyString", "items", "CompoundFilter", "list of indexes of childs to be returned (like this: 1,4,8:10).")

        obj.addProperty("App::PropertyLink", "Stencil", "CompoundFilter", "Object that defines filtering")

        obj.addProperty("App::PropertyFloat", "WindowFrom", "CompoundFilter", "Value of threshold, expressed as a percentage of maximum value.")
        obj.WindowFrom = 80.0
        obj.addProperty("App::PropertyFloat", "WindowTo", "CompoundFilter", "Value of threshold, expressed as a percentage of maximum value.")
        obj.WindowTo = 100.0

        obj.addProperty("App::PropertyFloat", "OverrideMaxVal", "CompoundFilter", "Volume threshold, expressed as percentage of the volume of largest child")<commit_msg>Part: fix compoundfilter's items property tooltip<commit_after># ***************************************************************************
# *                                                                         *
# *   Copyright (c) 2016 - <NAME> (DeepSOIC) <<EMAIL>>     *
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU Lesser General Public License (LGPL)    *
# *   as published by the Free Software Foundation; either version 2 of     *
# *   the License, or (at your option) any later version.                   *
# *   for detail see the LICENCE text file.                                 *
# *                                                                         *
# *   This program is distributed in the hope that it will be useful,       *
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
# *   GNU Library General Public License for more details.                  *
# *                                                                         *
# *   You should have received a copy of the GNU Library General Public     *
# *   License along with this program; if not, write to the Free Software   *
# *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
# *   USA                                                                   *
# *                                                                         *
# ***************************************************************************

__title__ = "CompoundTools.CompoundFilter"
__author__ = "DeepSOIC, <NAME>"
__url__ = "http://www.freecadweb.org"
__doc__ = "Compound Filter: remove some children from a compound (features)."


import FreeCAD
import Part
import math
import sys

# xrange is not available in python3
if sys.version_info.major >= 3:
    xrange = range

# OCC's Precision::Confusion; should have taken this from FreeCAD but haven't found; unlikely to ever change (DeepSOIC)
DistConfusion = 1e-7
ParaConfusion = 1e-8


def makeCompoundFilter(name):
    '''makeCompoundFilter(name): makes a CompoundFilter object.'''
    obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", name)
    _CompoundFilter(obj)
    _ViewProviderCompoundFilter(obj.ViewObject)
    return obj


class _CompoundFilter:
    "The CompoundFilter object"
    def __init__(self, obj):
        obj.addProperty("App::PropertyLink", "Base", "CompoundFilter", "Compound to be filtered")

        obj.addProperty("App::PropertyEnumeration", "FilterType", "CompoundFilter", "")
        obj.FilterType = ['bypass', 'specific items', 'collision-pass', 'window-volume', 'window-area', 'window-length', 'window-distance']
        obj.FilterType = 'bypass'

        # properties controlling "specific items" mode
        obj.addProperty("App::PropertyString", "items", "CompoundFilter", "list of indexes of childs to be returned (like this: 1;4;8:10).")

        obj.addProperty("App::PropertyLink", "Stencil", "CompoundFilter", "Object that defines filtering")

        obj.addProperty("App::PropertyFloat", "WindowFrom", "CompoundFilter", "Value of threshold, expressed as a percentage of maximum value.")
        obj.WindowFrom = 80.0
        obj.addProperty("App::PropertyFloat", "WindowTo", "CompoundFilter", "Value of threshold, expressed as a percentage of maximum value.")
        obj.WindowTo = 100.0

        obj.addProperty("App::PropertyFloat", "OverrideMaxVal", "CompoundFilter", "Volume threshold, expressed as percentage of the volume of largest child")
{'fraction_non_alphanumeric': 0.13400380538189727, 'fraction_numerical': 0.01005708072845882, 'mean_word_length': 2.261968085106383, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4431286', 'n_tokens_mistral': 1837, 'n_tokens_neox': 1725, 'n_words': 604}