<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_sket_fully_constrained</TITLE><H1>%mqc_check_sket_fully_constrained </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_sket_fully_constrained </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 checks if all of the sketches in the work part
    are fully constrained.
    Extract sketch or linked sketch will be ignored since they
    do not have constrains.
Parameters:
    (Boolean) list_names -  List names of sketches that are not fully
                             constrained or not.
                               True  -  List names of these sketches
                               False -  Not list names
                             Default is False.
    (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 report the violations
                             1 - LOG_ERROR,
                             2 - LOG_WARNING,
                             3 - LOG_INFO
                             default is 1 to log error
    (String)  log_msg    -  User provided message that will be appended to the
                             logging message if the system generates any
                             of error/warning/info message.
Results:
        PASS    - Sketches are fully constrained,
                   or the part does not have sketches.
        FAILED  - Found sketch in the work part is not fully constrained .
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_sket_fully_constrained( %ug_base_checker );
</FONT></PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )              %test_category: "Modeling.Sketch";
   ( String )              %displayed_name: "Sketch Fully Constrained?";
   
</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;
   ( Boolean Parameter )   list_names: False;
</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">  parameter for log_option                                       </PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( String )              list_names_label: "List Sketch Name";

</SPAN></FONT></PRE></DIV><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\">  parameter for log_message     </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\">  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:  
 @{
      $sket_status << mqc_askSketchConstrainStatus2();

      $num_sket << Length( $sket_status );
      
      If ( $num_sket>0 ) 
      Then 
      @{
          $tags << Loop 
          {
                    For $i From 1 To $num_sket;
                    For $each Is nth( $i, $sket_status );
                    For $status Is Second( $each );
                    For $tag Is First( $each );

                    If ( -( $status = CONSTRAIN_fully_constrained ) )
                       Append { $tag };
          };

          If ( Length( $tags )>0 )
          Then
          @{
              $log_msg << log_msg:+"~n"+"Found "+Format("%d",Length( $tags ))+
                          " sketch(es) not fully constrained."+ 
                          mqc_log_sketch_name:($tags);
                 
              ug_mqc_log( nth( log_type:, log_type_option: ), $tags, $log_msg );
          }
          Else Donothing;       
          
       }
      Else
          ug_mqc_lprintf( {"MQC debug: check is skipped since there are no sketches in the work part." } );
};


</SPAN></FONT></PRE></DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\">
mqc_log_sketch_name
    Make a string with sketch names if needed.
</PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method String) mqc_log_sketch_name:( List $sketch_tags )
@{
      If ( (list_names: = True) & (Empty?($sketch_tags) = False) )
      Then
      @{
          $sketch_names << mqc_askNameOfObject($sketch_tags);

          "~nThey are:~n    "+mqc_list_to_string($sketch_names, "~n    ");
      }
      Else "";
};

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