Configuration 2
of KwrProfilesDesignTable.xls
applied to
KwrBottleProfiles.CATPart
The bottle we start from is described in Appendix:
Creating a Deformable Revolution Body. First of all, we want to be able to
measure the bottle's volume, then each time the bottle's profile is modified,
we want to be warned about whether the resulting volume is still in the
[230 cm3 - 280cm3] range. To achieve this goal, we will be using two CATIA
Knowledgeware capabilities, the measures and the
checks.
Measures are functions provided by various applications such as Part Design or
Generative Shape Design to compute data. These functions can be used in
formulas as well as in rules and checks. They can be accessed from an
interactive dictionary. Checks are relations that don't modify the
document but just tell you whether certain specified criteria are fulfilled.
Before going any further in the scenario developed in this Part, check the settings below:
|
|||
|
Open the KwrThickSurface.CATPart document.
Click the icon or select the Tools->Formula command from the standard menu bar. The "Formula" dialog box is displayed.
Select the Volume item in the New Parameter of type list. Then click New Parameter of type. A parameter called Volume.1 is displayed and highlighted in the parameters list.
In the Edit name or value of the current parameter field, replace the Volume.1 name with BottleVolume. Click the Add Formula button.
In the dictionary, select the
Measures item, then double-click
Volume in the measure list. If need be, add parentheses after
the function name in the formula editor. At this stage the formula must be:
BottleVolume = volume()
Position the cursor between the parentheses and capture the
joined surface (Join.1) definition from the specification tree. To do this,
just double-click the Join.1 feature. The formula definition you should get
in the editor is something like:
BottleVolume = volume (Geometrical
Set.1\Join.1)
Click OK in the
Formula Editor. You are back to the Formulas
dialog box. The new formula is displayed in the parameter list opposite the
BottleVolume parameter. It is also displayed in the specification tree under
the Parameters and Relations nodes. Click OK
again in the Formulas dialog box to
exit the Formulas dialog.
Select the document root feature, then access the Knowledge
Advisor workbench.
To do this, select the
Click the icon to display the Check Editor. In the first dialog box, replace the default name with VolumeCheck. Click OK. The Check Editor is displayed.
Define your check. To do this:
Select Information or Warning in the Type of Check list.
Enter the string "Volume out of range" in the message field.
Enter the statement below in the edition window:
(BottleVolume > 230 cm3) and (BottleVolume
< 280 cm3)
Click OK to exit the dialog box and add the check to the document. In the specification tree, the check icon is green.
The resulting document is KwrVolumeCheck.CATPart.