Examples: Comparing Groups
You can compare two groups. The groups are defined in the input data set. In Creo View you can preconfigure groups.
A group <inclusion> is defined as follows:
<inclusion selfIntersect="false" id="id1">
<groupref name="built"/>
</inclusion>
Example: Group Query without Testing within the Group
The selfIntersect attribute (default = true) determines whether the items within this <inclusion> element should be tested against themselves. In this example, the element is defined as “false”. The full example is shown below:
<inclusions>
<inclusion selfIntersect="false" id="id1">
<groupref name="built"/>
</inclusion>
<inclusion selfIntersect="false" id="id2">
<groupref name="bought"/>
</inclusion>
</inclusions>
Example: Group Query Comparing the Contents of Two Groups
In this example two groups are defined: built and bought. Both contain the value selfIntersect= “false”. The query compares the contents of built against the contents of bought.
<?xml version="1.0" encoding="UTF-8"?>
<pvc>
<dataset srcurl="d:/temp/batch_clash/landing_gear.pvs">
<clashDefinition>
<clashParams mode="QUICK">
<hard maxAllowableVolume="4" active="true"/>
</clashParams>
<inclusions>
<inclusion selfIntersect="false">
<groupref name="built"/>
</inclusion>
<inclusion selfIntersect="false">
<groupref name="bought"/>
</inclusion>
</inclusions>
</clashDefinition>
</dataset>
</pvc>
Run the query using % pvsclashbatch groups.xml. The query tests group built against group bought. The output is written to groups.pvc.
Any type of Creo View group can be used. They can be dynamically populated from a search query, for example. The IDD (interference detection definition) does not include which items to include, only the names of the groups. When pvsclashbatch starts the Creo View session, it loads the data, populates the contents of the dynamic groups, and then it executes the interference detection query.
Example: Group Query Comparing the Contents of Two Groups and Excluding Particular Items
Alongside the <inclusions> section you can specify the optional <exclusions> section. This includes specific items such as parts, assemblies, and groups that you want to exclude from the test. This example shows how to exclude a specific instance of a part called CASE1.
<clashDefinition>
<inclusions> … </inclusions>
<exclusions>
<exclusion>
<partref name="CASE1" allInstances="false"
pvcidpath="/@@PV-AUTO-ID@@000/@@PV-AUTO-ID@@000"/>
</exclusion>
</exclusions>
Example: Group Query Excluding Defined Instances
In the example below, one part instance (UPPER_CYL) and one group (Specific) are excluded from a test which uses a group named All. All is defined as a search group. Its contents are populated dynamically.
<?xml version="1.0" encoding="UTF-8"?>
<pvc>
<dataset srcurl="d:/temp/batch_clash/landing_gear.pvs">
<clashDefinition>
<clashParams mode="QUICK">
<hard maxAllowableVolume="4" active="true"/>
</clashParams>
<inclusions>
<inclusion selfIntersect="true" id="id1">
<groupref name="All"/>
</inclusion>
</inclusions>
<exclusions>
<exclusion>
<partref name="UPPER_CYL" allInstances="false" pvcidpath="/3"/>
</exclusion>
<exclusion>
<groupref name="Specific"/>
</exclusion>
</exclusions>
</clashDefinition>
</dataset>
</pvc>
Use % pvsclashbatch exclude.xml to exclude the items from the query. The output is exclude.pvc.
Example: Query Containing Pair Exclusions and Group Exclusion
<exclusions>
<exclusion>
<groupref name="MyExclusion" allInstances="false"/>
</exclusion>
<exclusion>
<pair allInstances="false">
<partref name="crank_case" pvcidpath="/@@PV-AUTO-ID@@000/
@@PV-AUTO-ID@@006"/>
<partref name="crank_rod_caps" pvcidpath="/@@PV-AUTO-ID@@000/
@@PV-AUTO-ID@@010"/>
</pair>
</exclusion>
<exclusion>
<pair allInstances="false">
<partref name="cam_gear" pvcidpath="/@@PV-AUTO-ID@@000/
@@PV-AUTO-ID@@007"/>
<partref name="crank" pvcidpath="/@@PV-AUTO-ID@@000/
@@PV-AUTO-ID@@001"/>
</pair>
</exclusion>
<exclusion>
<grouppair>
<groupref name="Small">
<groupref name="Soft">
</grouppair>
</exclusion>
</exclusions>
Example: Query of Grouped Items Tested against Each Other
For simple A versus. B to test a collection of items (A) against another collection of items (B), you have two options:
Use Creo View to create the two groups (A,B). You can then use the standard Group test, defined above.
Use the <vs> element. This is a special-case test that tests two <group> definitions that are created on the fly. In this example, our <inclusions> element includes a <vs> element which defines two <group> elements. Each <group> can contain one or more reference elements, for example, a groupsref or a partref. Using this syntax, you can define a group on the fly.
<inclusions>
<vs>
<group>
<groupref name="Specific" id="id3"/>
</group>
<group>
<groupref name="built" id="id1"/>
<groupref name="bought" id="id2"/>
</group>
</vs>
</inclusions>
In this example, the first group (A) references the Specific group. The second group (B) references two groups, built and bought. When this test is run, the contents of A is tested against the contents of B. There is no option for selfIntersect. The <vs> mode always requires that groups A,B are tested only against each other.
Run this query with % pvsclashbatch avsb.xml to test group Specific against the combined contents of built and bought. The output will be written to file avsb.pvc.
Example: Dynamic Groups Query
Dynamic splitter groups provide a powerful tool for creating complex and dynamic inputs to the interference engine. A dynamic splitter group takes a group as an input and based on certain criteria defined in the splitter group, a new set of groups is created. These new groups, which appear as children to the splitter group, contain items from the input group, divided and categorized according to the splitter rules.
By supplying a dynamic splitter group as the input to an interference test, a test is defined that uses the derived, or child, groups as the inputs. For example, for a dynamic group called Vendors that splits the input groups (All) by the value of the attribute Vendors, the output is a list of child groups which represent all the parts designed or supplied by each vendor. To test for interferences between vendor parts, a test can be defined as follows:
<inclusions>
<inclusion selfIntersect="false">
<groupref name="Vendors"/>
</inclusion>
</inclusions>
The <inclusion> element here defines Vendors as the input with selfIntersect OFF.
When Vendors is loaded in Creo View, it actually creates a number of child groups, for example, vend1, vend2, … vendN. The test that actually gets performed could be defined as follows:
<inclusions>
<inclusion selfIntersect="false"><groupref name="vend1"/></inclusion>
<inclusion selfIntersect="false"><groupref name="vend2"/></inclusion>
...
<inclusion selfIntersect="false"><groupref name="vendN"/></inclusion>
</inclusions>
This test is static. If the number of vendors changes, instances from the test might be missed. By using the dynamic splitter group as the input, each time this test is run, the child groups are created dynamically, and can therefore change as the data changes.
Run this query with % pvsclashbatch vendor-dynamic.xml to test the group Vendors. The output will be written to file vendor-dynamic.pvc.
Example: Group Clearance for VS mode
Example of input format for VS mode
<inclusions>
<vs>
<group>
<groupref name="B" id="id1" minAllowableClearance =”0.5”/>
<groupref name="A" id="id0" minAllowableClearance =”0.6”/>
</group>
<group>
<groupref name="C" id="id2" minAllowableClearance =”0.7”/>
<groupref name="D" id="id3" minAllowableClearance =”0.9”/>
</group>
</vs>
</inclusions>
* 
Optional attribute minAllowableClearance for each groupref, partref, or predefined