Creating Complex Rules

Complex rules are rules that define relationships between defined symbols using the logical operators "and", "or", "not", and "xor". When the conditions of the complex rule are true, the target layers are displayed.

Complex rules are created manually by typing the desired expressions. To create a complex rule, use the new complex rule button in the Configurations editor.

  1. Open the Configurations editor. Go to the Editors menu > Create Configurations .
  2. Click on the New Complex Rule button. The Complex Rules editor will appear.
  3. In the first text box, the editor proposes a default name for your rule. Replace "Rule" with a meaningful name.

Figure 187 : Replacing "Rule" with a meaningful rule name.

  1. In the Expression text box, type out the Boolean expression. Refer to the chapter on Rule Syntax for more information on expression syntax.
  2. You can use the Insert Tool to insert simple rule expression within your complex rule:
    • Select the desired existing symbol from the drop-down list.
    • Click "defined" to insert the expression at the current cursor location in the Expression text box.

Figure 188 : Using the Insert Tool to insert the simple expression "(define "paint.black")" in a complex expression.

  1. Click OK to validate your rule. If the rule cannot be validated, the validation problems will be listed in the Compiler Output box. These problems must be corrected before you can validate your rule.

Figure 189 : Compiler output error for missing final parenthesis.

The tools found in the Inspection tab are particularly helpful to analyze the evaluation of complex rules.

Your rule has been created, but you still need to assign target layers to it:

  1. Return to the Configurations editor. In the rules list, select the rule you have just created.
  2. Drag and drop your desired target layers onto the target list. You can drag layers from any of the following:
    • Shaper: the model’s Geometry Layers list in the sidebar,
    • Shaper: the model’s Illumination Layers their colors from the list in the sidebar,
    • Shaper/Matter: Position Layers editor,
    • Matter: Aspect Layers editor,
    • Matter: Overlay Layers list in the Overlays editor,
    • Matter: Environment Layers list in the Product Environments editor.
Aspect and environment layers are stored at the product level. This means that a given aspect or environment level only affects the product with which it is associated. To apply the rule to several products, add the appropriate target layers for each additional product.
You cannot use a given layer as the target of two different rules.