Skip to content

Commit

Permalink
Update filter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed Jan 15, 2021
1 parent 89fc5a4 commit b070f05
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions revitron/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ def applyStringFilter(self, paramName, value, evaluator, invert = False):
self.collector.IntersectWith(filters[i].collector)


def byIntersection(self, element):
"""
Reduces the set of elements to the ones that are intersecting a given element.
Args:
element (objetc): A Revit element
Returns:
object: The Filter instance
"""
import revitron
self.collector = self.collector.WherePasses(revitron.DB.ElementIntersectsElementFilter(element))
return self


def byRegex(self, paramName, regex, invert = False):
"""
Filters a collection by a given regex.
Expand Down

0 comments on commit b070f05

Please sign in to comment.