Create the Query Definition
Developing a custom Query Processor starts with the Query Definition. Users can use the default Query Definition as is, use a modified copy, or use the default simply as a reference when creating a new Query Definition. The specific ItemTypes chosen do not matter so long as the required data is either included in the Query results or is provided in some other manner within the logic of the Query Processor implementation. For this section the discussion will be referring to the Default Query Definition discussed in section Creating Query and Tree Grid View Definitions. It’s important to note the following about this query:
- CAD as the context ItemType
- The Query is rooted (top level node) by a Query Item referring to the CAD ItemType.
Recursion
There is a recursive relationship based on CAD and the CAD Structure Relationship.
CAD Structure defines the Mechanical Bill of Materials. Thus, there is a hierarchical relationship between upper Assemblies and lower sub-Assemblies and Components.
Data required for custom processing logic
- Instances – determined by the related CAD Instance Items with the Transformation strings included. CAD Instances identify both assembly and component instances of child CAD Items.
Bounding Box – Retrieved either from the CAD Item Properties directly (legacy CAD Items) or from the related CAD ConversionInfo.
NoteThe processing logic should check the CAD ConversionInfo Item and use those values if they exist. Otherwise, use the bounding box properties attached directly to the CAD Item.- Transformations – attached to each CAD Instance Item. An Identity matrix is assumed when a CAD Instance does not exist. Also, the matrix ordering is assumed to be column centric. See section Base Query Definition. The transformation value is set during conversion and represents the format of the data expected by the HOOPS 3D Viewer. As such, it is used as it is stored when creating the Product Occurrence data as part of the output of a Query Processor.
- View Files – attached to each CAD Item through the native file Property. See section CAD Data Model.