<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_feature_positioning</TITLE><H1>%mqc_check_feature_positioning </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_feature_positioning </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>
    Check if every feature's positioning in the validated part is fully
    constrained. There are four possible status: fully constrained,
    overconstrained, underconstrained and no constraint.
Parameters:
   ( 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            - Indicate which logging type to use to report the violation.
                                     1 - LOG_ERROR,
                                     2 - LOG_WARNING,
                                     3 - LOG_INFO,
                                     Default is 1 to log error.
    (String)  log_msg             - User defined message to be added when the system reports the violation.
                                    Default is an empty string.
Results:
    Info   - This part has no modeling features.
    Pass   - Every feature's positioning is fully constrained.
    Failed - Found some features' positioning is not fully constrained.
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_feature_positioning( %ug_base_checker );
</FONT></PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )               %test_category:  "Modeling.Features";
   ( String )               %displayed_name: "Check Feature Positioning";

</SPAN></FONT></PRE></DIV><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";
 # parameter for log_message     
</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;
   ( Integer Parameter )   log_type: 1;
   ( string Parameter )    log_msg: "";
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"> checking ...</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( string )              log_msg_label: "Log Message";

</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( Any Uncached )   do_check:

   If ( -Member( log_type:, { 1, 2, 3} ) )

   Then ug_mqc_empty_param_warning()
   
   Else
   @{
        $all_features << mqc_askFeatures();

        $feature_num  << Length( $all_features );

        If ( $feature_num = 0 )
        
        Then ug_mqc_log( LOG_INFO, {}, "This part has no modeling features." )

        Else
        @{
            $rpo_features << Loop
            {
                 For  $each_feat  In    $all_features;
                 
                 If  (mqc_isFeatureValidToPosition($each_feat) = true ) 
                    Append { $each_feat };                               
            };
            
            $rpo_feature_num << Length( $rpo_features );

            $feature_not_fully_constrained << Loop
            {
                 For  $each_rpo_feat  In    $rpo_features;
                 
                 If (mqc_askFeatureConstraintStatus($each_rpo_feat)!= FULLY_CONSTRAINED ) 
                    Append { $each_rpo_feat };                               
            };

            If (!empty?($feature_not_fully_constrained) )
            Then
            @{
                            
                 $log_option << Nth( log_type:, log_type_option: );

                 
                 $detail_msg << 
                       "Total number of rpo features in the part: "+Stringvalue( $rpo_feature_num )+".~n"+
                       Stringvalue(Length($feature_not_fully_constrained))+ " of them positioning are not fully constrained.";

                 $usr_msg << If ( "" = log_msg: ) Then "" Else log_msg: + "~n";
                 
                 ug_mqc_log( $log_option, $feature_not_fully_constrained, $usr_msg+$detail_msg );

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