 |
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. |
 |
Writing
Clash Rules Using
Knowledge Expert
Before you begin, make sure you have selected the required packages.
-
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. |
-
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. |
-
Select Knowledgeware > Knowledge Expert from
the Start menu to switch to the Knowledge Expert workbench.
-
Click Expert Rule
.The Rule Editor
dialog box appears.
-
(Optional) Modify the default rule name and comments.
In our example, the rule name is: CATKWERule.3
-
Click OK when done. The Rule Editor
appears.
-
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. |
-
Click Apply to check rule syntax.
-
Click Ok to add the expert rule to the
document
-
Click the Update icon to solve the rule
base. If needed, update the document.
-
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. |
-
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 |
-
Open the sample document containing alternate shapes:
Knowledge_Rule-based_Clash.CATProduct.
-
Select Insert > Clash from the menu bar or
click Clash
in DMU Space Analysis toolbar. The Check Clash
dialog box appears.
-
Activate the first Type drop-down list box and select
Clash rule.
-
Activate the second Type drop-down list box and select
the computation type.
-
Select the products to check for interference, for
example the trigger and the lock.
-
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. |
-
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:
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). |