<HTML><HEAD><link type="text/css" href="../css/main_styles.css" rel="stylesheet"></HEAD>
<BODY><TITLE>%mqc_check_parent_curve_of_sweep_feature</TITLE><H1>%mqc_check_parent_curve_of_sweep_feature </H1><P CLASS="Paragraph">Classname: <B>%mqc_check_parent_curve_of_sweep_feature </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 parent curves of sweep features in the part are parametric.
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.

<B>Returns:</B>
    Pass   -   There is no sweep feature.
               All sweep features are with parametric parent curves.
    Failed -  Find non-parametric parent curves of sweep feature.
</PRE><PRE><FONT COLOR= blue>DefClass: %mqc_check_parent_curve_of_sweep_feature( %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 Parent Curves of Sweep Feature";

</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 log_message     </PRE><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( List )                 log_type_option: { LOG_ERROR, LOG_WARNING, LOG_INFO };
</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>   ( 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:
  @{
         #For sweep features prior to NX32
         $old_sweep_features << mqc_askFeatures( feature_type, SWP104 ); 

         #For nx3 new extrude feature
         $new_extruded_features << mqc_askFeatures( feature_type, EXTRUDE ); 

         #All sweep features
         $sweep_features << $old_sweep_features + $new_extruded_features;

         #Get sweep features with non-parametric parent curve (profile and guide)
         $feat_with_nonpar_curve << Loop
         {
             For  $each_feat  In  $sweep_features;       
            
             For  $pro_curve  Is  Flatten(mqc_askParentCurvesOfSweep( $each_feat ));

             For  $with_non_par_curve? Is Loop
             {
                For $each_curve In $pro_curve;
                For $is_param? Is mqc_is_parametric_curve?:($each_curve);

                #If found non-param parent curve, then return
                If ( $is_param? = False )
                   Return True;

                Return Is False;
             };

             If ( $with_non_par_curve? = True )
             Append { $each_feat };
          };

         #Write log if found sweep with non-parametric parent curve
         If ( -Empty?( $feat_with_nonpar_curve ) )
         Then
         @{
             $detail_msg << "Number of sweep features with nonparametric curves: " + 
                            Stringvalue( Length( $feat_with_nonpar_curve ) ); 

             $usr_msg << If ( "" = log_msg: ) Then "" Else log_msg: + "~n";

             ug_mqc_log( Nth(log_type:, log_type_option:), $feat_with_nonpar_curve, $usr_msg + $detail_msg );
         }
         Else if ( -Empty?( $sweep_features ) )
         then
         @{
             ug_mqc_lprintf( { "MQC debug: all of the sweep features are from parametric curves." } );
         }
         Else
             donothing;
   };


</SPAN></FONT></PRE></DIV><DIV><PRE STYLE=\"text-align : left;\" CLASS=\"Code\"><FONT COLOR=blue>(Method Boolean) mqc_is_parametric_curve?:(Integer $curve_tag)
</SPAN></FONT></PRE></DIV></TABLE><p class=EndLine>&nbsp;</p><p class=blank>&nbsp;</p></BODY></HTML>