FUNCTION valid_datum_target_parameters

(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP203e2
-- IN AP203e2/AP238 STEP-NC/AP242
FUNCTION valid_datum_target_parameters
      (pdf : placed_datum_target_feature ) : BOOLEAN;
   LOCAL
      rep_set : SET OF representation := [];
      parameter_representations : SET OF representation;
   END_LOCAL;
      REPEAT i := 1 TO HIINDEX(pdf.representation_associations);
         rep_set := rep_set + pdf.representation_associations[i].used_representation;
      END_REPEAT;
      parameter_representations := QUERY (rep <* rep_set| 'STEP_MERGED_AP_SCHEMA.SHAPE_REPRESENTATION_WITH_PARAMETERS' IN TYPEOF(rep));
      IF SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.name = 'orientation') AND ('STEP_MERGED_AP_SCHEMA.PLACEMENT' IN TYPEOF(i)))) = 1))) <> 1 THEN
         RETURN (FALSE);
      END_IF;
      CASE pdf\shape_aspect.description OF
         'point' :
               RETURN (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(srwp.items) = 1))) = 1);
         'circle', 'circular curve' :
               RETURN ((SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(srwp.items) = 2))) = 1) AND (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.name = 'target diameter') AND (SIZEOF([ 'STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM', 'STEP_MERGED_AP_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(i)) = 2))) = 1))) = 1));
         'line' :
               RETURN (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.name = 'target length') AND (SIZEOF([ 'STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM', 'STEP_MERGED_AP_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(i)) = 2))) = 1))) = 1);
         'rectangle' :
               RETURN (((SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(srwp.items) = 3))) = 1) AND (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.name = 'target length') AND (SIZEOF([ 'STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM', 'STEP_MERGED_AP_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(i)) = 2))) = 1))) = 1)) AND (SIZEOF(QUERY (srwp <* parameter_representations| (SIZEOF(QUERY (i <* srwp.items| (i.name = 'target width') AND (SIZEOF([ 'STEP_MERGED_AP_SCHEMA.MEASURE_REPRESENTATION_ITEM', 'STEP_MERGED_AP_SCHEMA.LENGTH_MEASURE_WITH_UNIT' ] * TYPEOF(i)) = 2))) = 1))) = 1));
      OTHERWISE :
            RETURN (FALSE);
      END_CASE;
END_FUNCTION;

Referenced By

Defintion valid_datum_target_parameters is references by the following definitions:
DefinitionType
 placed_datum_target_feature ENTITY


[Top Level Definitions] [Exit]

Generated by STEP Tools® EXPRESS to HTML Converter
2024-09-06T14:00:33-04:00