mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
fix multiple requirements at a time
This commit is contained in:
@@ -213,7 +213,6 @@ class boolean_logic:
|
|||||||
self.terms = terms
|
self.terms = terms
|
||||||
|
|
||||||
def __call__(self, *args):
|
def __call__(self, *args):
|
||||||
#TODO only takes one requirement of a type, should take all
|
|
||||||
eval = [t(*args) for t in self.terms]
|
eval = [t(*args) for t in self.terms]
|
||||||
join = [" and ", " or "][self.fold == any]
|
join = [" and ", " or "][self.fold == any]
|
||||||
return facet_evaluation(
|
return facet_evaluation(
|
||||||
@@ -285,8 +284,8 @@ class specification:
|
|||||||
|
|
||||||
def __init__(self, node):
|
def __init__(self, node):
|
||||||
def parse_rules(node):
|
def parse_rules(node):
|
||||||
children = [node[n][0] for n in node]
|
names = [req for req in node for n in node[req]]
|
||||||
names = [n for n in node]
|
children = [child for req in node for child in node[req]]
|
||||||
classes = map(meta_facet.facets.__getitem__, names)
|
classes = map(meta_facet.facets.__getitem__, names)
|
||||||
return [cls(n) for cls, n in zip(classes, children)]
|
return [cls(n) for cls, n in zip(classes, children)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user