JumpRule
- class JumpRule(jump_target, query: ConditionalQuery = None)
A
JumpRule
contains information that enables theShapeMachine
engine to jump from oneRuleSequence
to another within aProgram
. This is done by querying thecurrent_design
with aConditionalQuery
. When the query returnsTrue
, the engine proceeds to the rule sequence labeled byjump_target
.- Parameters:
jump_target – The name of the
RuleSequence
to jump to if the query succeeds.query – The
ConditionalQuery
to use on the engine’scurrent_design
.
Attributes
The name of the
RuleSequence
to jump to if the query succeeds.The
ConditionalQuery
to use on the engine'scurrent_design
.The
RuleApplicationType
to 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
RuleApplicationType
to use when selecting a match to apply the rule to.
- jump_target
The name of the
RuleSequence
to jump to if the query succeeds.
- query
The
ConditionalQuery
to use on the engine’scurrent_design
.