JumpRule
- class JumpRule(jump_target, query: ConditionalQuery = None)
A
JumpRulecontains information that enables theShapeMachineengine to jump from oneRuleSequenceto another within aProgram. This is done by querying thecurrent_designwith aConditionalQuery. When the query returnsTrue, the engine proceeds to the rule sequence labeled byjump_target.- Parameters:
jump_target – The name of the
RuleSequenceto jump to if the query succeeds.query – The
ConditionalQueryto use on the engine’scurrent_design.
Attributes
The name of the
RuleSequenceto jump to if the query succeeds.The
ConditionalQueryto use on the engine'scurrent_design.The
RuleApplicationTypeto use when selecting a match to apply the rule to.Methods
Not used by the engine.
- apply_to(shape: Shape, communication_layer: CommunicationLayer, in_automation: bool = False, _to_design: ndarray = array([0., 0., 0.])) Tuple[Rule, List[Tuple[Shape, Shape]], Shape, Shape, Shape, Shape]
Not used by the engine. Instead, use
query’squery_shape()method.
- application_type
The
RuleApplicationTypeto use when selecting a match to apply the rule to.
- jump_target
The name of the
RuleSequenceto jump to if the query succeeds.
- query
The
ConditionalQueryto use on the engine’scurrent_design.