Knowledgeware Rule-based Clash

Clash rules written using knowledgeware capabilities can be used in a standalone clash process or in an ENOVIA LCA clash process, ensuring clash analyses take corporate practices into account.

Clash rules written to perform interference checking rely on the DefineInterferenceComputation function.
The mechanism works as follows:

The rule enables calling the DefineInterferenceComputation function, which in return launches the interference calculation.

This task shows you how to apply clash rules in interactive interference analysis. This involves the following procedures described hereafter:
 

Two samples are provided in online/cfysm_*X2/samples:
 

  • Knowledge_Rule-based_Clash.CATProduct (contains alternate shapes)

  • Rule_for_Interference.CATProduct (contains a rule).

Two samples are provided in online/spaug_*X2/samples:
 

  • SPE1Rules.xls

  • macro1_clashrules.txt

Writing Clash Rules Using Knowledge Expert

Before you begin, make sure you have selected the required packages. 

  1. To customize Knowledgeware settings:

    • Select Tools > Options... command.
      The Options dialog box is displayed.

    • Select General > Parameters and Measure and click the Knowledge Environment tab

    • Select the Load extended language libraries check box

    • Load the SpaITFCheckMethod package

    You need to restart CATIA for this setting to be taken into account.
    A warning message is prompts you to do so.
  2. To customize Product Structure settings:

    • Select the Infrastructure category, then the Product Structure sub-category, and click the Tree Customization tab:

    • Activate both Parameters and Relations options (the Constraints option is set to Yes by default) clicking the Activate button

    You are now ready to write your rule.

  3. Select Knowledgeware > Knowledge Expert from the Start menu to switch to the Knowledge Expert workbench.

  4. Click Expert Rule .The Rule Editor dialog box appears.

  5. (Optional) Modify the default rule name and comments.
    In our example, the rule name is: CATKWERule.3

  6. Click OK when done. The Rule Editor appears.

  7. Write your rule. Here is a clash rule example below:

    Let's zoom on the clash rule example:


    if (p1 != p2) 
                 
    {
       DefineInterferenceComputation (p1, p2,
                                     "Clearance", 70mm,
                                     "WRAPPING","Shape 1",
                                     ThisRule);
    }

       

    P1 and P2 correspond to identifiers used within this rule.

    The arguments used in this rule are:

    • P1 (object type 1)

    • P2 (object type 2)

    • Clearance (type of calculation),

      the values for this type can be:

      • "Clash" (clash + contact checking)

      • "Clash_only" (clash checking only)

      • "Clearance" (clearance checking  with the clearance value defined)

      • "Authorized_penetration" (authorized penetration checking with the clearance value)

    • 70mm (clearance value)

    • WRAPPING (name of the shape object type 1)

    • Shape 1 (name of the shape object type 2)

    For more information about expert rules, see the Knowledge Expert User's Guide.

  8. Click Apply to check rule syntax.

  9. Click Ok to add the expert rule to the document

  10. Click the Update icon to solve the rule base. If needed, update the document.

  11. Save your clash rule in the CATProduct document.

    Clash rules must be saved in a separate CATProduct document from the one in which you will run your interference analysis.

    You can save more than one rule in the CATProduct document. If you do so, do not forget to give rules a priority in the Rule Editor dialog box. When running your interference analysis, rule priority is taken into account and if pairs of products and shapes satisfy more than one rule, the results of the rule with the highest priority only are output.

Running Interference Analysis Using the Clash command

  1. Identify the location of the document containing the clash rules:

    • Select Tools > Options > Digital Mockup > DMU Space Analysis.

    • Click the DMU Clash - Rule tab.

    • Enter the full path for the CATProduct containing the clash rules.

    • Click OK when done.

    Reminder: A sample document, Rule_for_Interference.CATProduct, containing rules is provided in the DMU Space Analysis samples folder online/cfysm_*X2/samples

  2. Open the sample document containing alternate shapes: Knowledge_Rule-based_Clash.CATProduct.

  3. Select Insert > Clash from the menu bar or click Clash in DMU Space Analysis toolbar. The Check Clash dialog box appears.

  4. Activate the first Type drop-down list box and select Clash rule.

  5. Activate the second Type drop-down list box and select the computation type.

  6. Select the products to check for interference, for example the trigger and the lock.

  7. Click Apply. The Check Clash dialog box expands to show the results. The dialog box identifies the interferences detected and shows which shapes of which products interfere.
     

    Note: Since you can only view the results of one product-shape combination at any one time, List by Product and Matrix tabs are not available.

  8. Scroll to the right in the List by Conflict tab. The expert rule is also named.

    A Preview window showing shapes in conflict also appears.

Generating Clash Rules Using a Macro

You can take advantage of a macro to automate the clash rule creation from an Excel file.

The following example will help you to work this out:
 

  • SPE1Rules.xls (reference file from which the macro will extract the data to generate the clash rules in a CATProduct document).
     

Run the macro by selecting Tools->Macro->Macros..., selecting the macro, and clicking Run.

For more information, refer to Running and Editing Macros in the Infrastructure User's Guide

Knowledgeware Rule-based Clash & ENOVIA V5

The results of the rule-based clash can be compared to results already stored in ENOVIA V5 and new results can be saved back into the ENOVIA LCA database. Storing results in ENOVIA V5 saves both the shape and rule names.

To do so, do not forget to select the Retrieve Information From PDM check box in the DMU Clash tab (Tools > Options..., Digital Mockup > DMU Space Analysis).

  For more information on: