<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>ug_fbm_classifyFeatures()</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic3" id="xps10_pagetitle">ug_fbm_classifyFeatures()</div>
      <hr noshade="true">
      <p class="para_topic">The system calls this function whenever a feature group is adopted to KF and the system is classifying or reclassifying the features within the group. This function allows a rule based classification beyond the criteria present in the classification criteria dialog. The input is always the result of the current classification (Checked classification criteria boxes) and can be further classified within this function. The result is a list of features that are classified into the same group.</p>
      <p class="para_topic">You can use this function to classify holes by a range (depth, etc.) or hole type (through hole and blind hole) and other criteria that is not available as feature attribute and accordingly not present in the Classification Criteria dialog of the feature group. </p>
      <p class="para_topic">Example:</p><pre class="indent"># Initial situation (checked criteria in feature group dialog) &nbsp;
$groups &lt;&lt; ug_fbm_askFeatureClassification($instance);
# modify by first range
$my_classification1 &lt;&lt; ug_cam_classify_byRange($groups, &quot;Depth&quot;, 0, 30, &quot;SIMPLE_HOLE&quot;, $object_name); 
# modify by second range
$my_classification2 &lt;&lt; ug_cam_classify_byRange($my_classification1, &quot;Depth&quot;, 30, 80, &quot;SIMPLE_HOLE&quot;, $object_name); 
# trigger classification
ug_fbm_setFeatureClassification($instance, $my_classification2);</pre><p class="para_topic">The initial situation gets passed into a &quot;classify by range&quot; function that sorts SIMPLE_HOLE features by depth ranges. Features with a depth greater than 0 and smaller than or equal to 30 go into the same list. All features greater than 30 go into another list. The lists are concatenated and returned.</p>
      <p class="para_topic">Then the list gets passed into the next &quot;classify by range&quot; function which sorts them by depths from 30 to 80. Features with a depth greater than 30 and smaller than or equal to 80 go into the same list. All features greater than 80 go into another list. The lists are concatenated and returned.</p>
      <p class="para_topic">Finally it gets passed into ug_fbm_setFeatureClassification() which triggers the classification and creates the feature groups.</p>
      <p class="para_topic">See also  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgholemaking/kf_rules_func.html');return(false);">ug_cam_classify_byRange()</a>,  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgholemaking/kf_rules_func.html');return(false);">ug_cam_classify_byAccessVector()</a>,  <a class="links" href="javascript:void(0)" onclick="top.openFile('mfgholemaking/kf_rules_func.html');return(false);">ug_cam_classify_byHasAttribute()</a></p>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/note.gif" alt="Note" title="Note"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_note">
                  <p class="para_note_body"> The result (my_classification2) can be used to further classify, but finally must be passed into ug_fbm_setFeatureClassification() to trigger the classification.</p>
               </div>
            </td>
         </tr>
      </table>
   </body>
</html>