<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_tiny_object</TITLE><H1>%mqc_check_tiny_object  </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_tiny_object  </B></P><P CLASS="Paragraph">Inherits from: <B><A href=..\checkmate\xug_base_checker.html>%ug_base_checker </A></B></P><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"> </PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">
<B>Description:</B>
    This checker searches for any tiny bodies, faces, edges or curves
    or check for user's selection:
    * Curves, faces, edges, and bodies for which the diagonal length of a box
      enclosing the object is less than the specified Distance Tolerance.
    * Faces whose surface area is less than the specified Distance tolerance.
    * Squared face whose area to perimeter ratio is such that 2 times the area divided by
      the perimeter is less than the specified Distance Tolerance. This function also
      accounts for sliver faces.
Parameters:
    (Number)  Distance_tol        - distance tolerance for tiny geometry.
                                    The default is 0.025.
    (Name)    unit                - grams_and_millimeters or pounds_and_inches
                                    The default is grams_and_millimeters.
    (Boolean)  disabled?          - If it is true, the checker is disabled.
                                    Default is False.
    (Boolean)  save_log_in_part   -  The flag indicates whether the checking results can
                                     be saved to the part file
                                     Default is True.
    (Integer) log_type            - Error, Warning, Info, or None.
                                    The default is to log error.
    (String)  log_msg             - error/warning/info/None message
Results:
    PASS:   --  No tiny object.
    FAIL:   --  Tiny geometry found.
Object Log:
    Tiny geometry.
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_tiny_object ( %ug_base_checker );
</FONT></PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( String )                      %test_category: "Modeling.Examine Geometry";
( String )                      %displayed_name: "Objects - Tiny";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( Boolean Parameter )           disabled?: false;
( Boolean Parameter )           save_log_in_part: True;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Parameter for part unit</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( Name Parameter )           unit: grams_and_millimeters;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Paramter for distance tolerance:</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( List )                     unit_option: { grams_and_millimeters, 
                                            pounds_and_inches };
( String )                   unit_label: "Tolerance Unit";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( Number Parameter )         Distance_tol:              0.025;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Paramter for geometry selection:</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( String )                   Distance_tol_label:        "Distance Threshold Tolerance";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( List )                    selection:                 {};
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">#( List )                     selection_mask:            { curve, spline, line, arc, conic,
#                                                         solid, face, edge };
#( Name )                     selection_mode:            Multiple;
</PRE><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Paramter for log_type:</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( Integer Parameter )           log_type: 1;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  Paramter for log_msg:</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( list )                        log_type_option: { LOG_ERROR, 
                                                   LOG_WARNING, 
                                                   LOG_INFO, 
                                                 };
( string )                      log_type_label: "Log Option";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( string Parameter )            log_msg: "";
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">   Checker function</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>( string )                      log_msg_label: "Log Additional Message";

( List )     tiny_entity_type: { All, conic, spline, line, arc, curve, 
                                 solid, face, edge };

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Any Uncached)  do_check: 
@{
    $Distance_tol << mqc_convert_unit_for_tolerance(Distance_tol:, unit:);
    
    $tiny_obj << ug_mqc_ask_tiny_geom ( $Distance_tol, selection:, 
                                        Position( All, tiny_entity_type: ) );
                
    $usr_msg << If ( "" = log_msg: ) Then "" Else log_msg: + "~n";

    $detail_msg << "Found " + Stringvalue( Length( $tiny_obj ) ) + 
        " tiny geometry objects in part.";
        
    If   ( -empty?( $tiny_obj ) )
    Then  ug_mqc_log( Nth( log_type:, log_type_option: ), $tiny_obj, $usr_msg + $detail_msg)
    Else  Donothing;
 };

</SPAN></FONT></PRE></DIV></TABLE><p class=EndLine>&nbsp;</p><p class=blank>&nbsp;</p></BODY></HTML>