(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP238 STEP-NC -- IN AP238 STEP-NC/AP242 RULE unique_gdt_element_id_constraint FOR (product_definition_shape, dimensional_location, dimensional_size, shape_aspect, shape_aspect_relationship ); LOCAL bss : BAG OF STRING := []; ds : SET OF dimensional_size := QUERY (ds <* dimensional_size| EXISTS(ds\dimensional_size.id)); sa : SET OF shape_aspect := QUERY (sa <* shape_aspect| EXISTS(sa\shape_aspect.id)); sar : SET OF shape_aspect_relationship := QUERY (sar <* shape_aspect_relationship| EXISTS(sar\shape_aspect_relationship.id)); ssa : SET OF shape_aspect := []; pass : BOOLEAN := FALSE; END_LOCAL; REPEAT ii := 1 TO SIZEOF(product_definition_shape) WHILE pass; bss := []; ssa := bag_to_set(USEDIN(product_definition_shape[ii], 'STEP_MERGED_AP_SCHEMA.SHAPE_ASPECT.OF_SHAPE')); REPEAT i := 1 TO SIZEOF(ds); IF ds[i]\dimensional_size.applies_to IN ssa THEN bss := bss + ds[i]\dimensional_size.id; END_IF; END_REPEAT; REPEAT i := 1 TO SIZEOF(sa); IF sa[i] IN ssa THEN bss := bss + sa[i]\shape_aspect.id; END_IF; END_REPEAT; REPEAT i := 1 TO SIZEOF(sar); IF sar[i]\shape_aspect_relationship.relating_shape_aspect IN ssa THEN bss := bss + sar[i]\shape_aspect_relationship.id; END_IF; END_REPEAT; IF SIZEOF(bag_to_set(bss)) <> SIZEOF(bss) THEN pass := FALSE; END_IF; END_REPEAT; WHERE WR1: pass; END_RULE;
Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00