RULE restrict_viewing_plane_usage FOR (geometric_tolerance); WHERE wr1: SIZEOF ( QUERY ( gt <* geometric_tolerance | SIZEOF ( QUERY ( sar <* USEDIN ( gt. toleranced_shape_aspect , 'AUTOMOTIVE_DESIGN.SHAPE_ASPECT_RELATIONSHIP.'+'RELATING_SHAPE_ASPECT' ) | sar. name = 'affected plane association' ) ) >1 ) ) =0; wr2: SIZEOF ( QUERY ( gt <* geometric_tolerance | SIZEOF ( QUERY ( sar <* USEDIN ( gt. toleranced_shape_aspect , 'AUTOMOTIVE_DESIGN.'+'SHAPE_ASPECT_RELATIONSHIP.'+ 'RELATING_SHAPE_ASPECT' ) | ( sar. name = 'affected plane association' ) AND NOT ( SIZEOF ( ['AUTOMOTIVE_DESIGN.'+ 'LINE_PROFILE_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+ 'PARALLELISM_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+ 'PERPENDICULARITY_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+ 'POSITION_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+ 'STRAIGHTNESS_TOLERANCE' , 'AUTOMOTIVE_DESIGN.'+ 'SYMMETRY_TOLERANCE']* TYPEOF ( gt ) ) <>1 ) ) ) >0 ) ) =0; END_RULE; -- restrict_viewing_plane_usage |
public class RRestrict_viewing_plane_usage public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |