ConditionalQuery
- class ConditionalQuery(must_see: List[ShapeQuery], must_not_see: List[ShapeQuery])
A
ConditionalQuerycan be used to query aShapefor multiple conditions.Conditional queries are specified by lists of shapes that need to be found and shapes that need to not be found within a design for
query_shape()to returnTrue. These are specified as triples of (Shape,HomogeneousTransformation,ShapeQueryParameters) that indicate the shape to search for, the type of transformation to use when searching for the shape, and the parameters to use in the search.- Parameters:
must_see – A list of
ShapeQueryto look for in a design.must_not_see – A list of
ShapeQueryto look for the absense of in a design.
Methods
Query a
Shapefor the conditions of thisConditionalQuery.- query_shape(shape: Shape, dynamic_evaluation_context: dict) bool
Query a
Shapefor the conditions of thisConditionalQuery.- Parameters:
shape – The design to query.
dynamic_evaluation_context – Passed into
set_dynamic_evaluation_context().
- Returns:
True if all of
must_seeare found and all ofmust_not_seeare not found inshape.